From 130c0e309fc2bdbf326ae230dc4ac40aafa56cb4 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 2 Mar 2026 22:07:26 +0000 Subject: [PATCH] SDK regeneration --- .fern/metadata.json | 8 +- .github/workflows/ci.yml | 14 +- apple_pay.go | 27 + apple_pay_test.go | 309 + applepay/apple_pay_test/apple_pay_test.go | 88 + bank_accounts.go | 57 + bank_accounts_test.go | 2990 + .../bank_accounts_test/bank_accounts_test.go | 203 + bookings.go | 250 +- bookings/bookings_test/bookings_test.go | 338 + bookings/custom_attribute_definitions.go | 48 +- bookings/custom_attribute_definitions_test.go | 352 + bookings/custom_attributes.go | 71 +- bookings/custom_attributes_test.go | 541 + ...kings_custom_attribute_definitions_test.go | 198 + .../bookings_custom_attributes_test.go | 243 + bookings/location_profiles_test.go | 94 + .../bookings_location_profiles_test.go | 94 + bookings/team_member_profiles_test.go | 217 + .../bookings_team_member_profiles_test.go | 125 + bookings_test.go | 8375 + cards.go | 47 +- cards/cards_test/cards_test.go | 205 + cards_test.go | 1435 + .../cash_drawers_shifts_test.go | 160 + cashdrawers/shifts_test.go | 457 + catalog.go | 313 +- catalog/catalog_test/catalog_test.go | 412 + catalog/images.go | 23 + .../catalog_images_test.go | 119 + catalog/images_test.go | 55 + catalog/object.go | 25 +- .../catalog_object_test.go | 153 + catalog/object_test.go | 262 + catalog_test.go | 9356 + channels.go | 53 +- channels/channels_test/channels_test.go | 152 + channels_test.go | 2079 + checkout.go | 130 +- checkout/checkout_test/checkout_test.go | 160 + checkout/payment_links.go | 46 +- checkout/payment_links_test.go | 352 + .../checkout_payment_links_test.go | 214 + checkout_test.go | 4198 + core/request_option.go | 4 +- customers.go | 305 +- customers/cards.go | 23 + .../customers_cards_test.go | 137 + customers/cards_test.go | 256 + customers/custom_attribute_definitions.go | 71 +- .../custom_attribute_definitions_test.go | 352 + customers/custom_attributes.go | 25 +- customers/custom_attributes_test.go | 541 + ...omers_custom_attribute_definitions_test.go | 288 + .../customers_custom_attributes_test.go | 185 + customers/customers_test/customers_test.go | 512 + customers/groups.go | 48 +- .../customers_groups_test.go | 251 + customers/groups_test.go | 442 + .../customers_segments_test.go | 119 + customers/segments_test.go | 139 + customers_test.go | 11090 + devices.go | 72 + devices/codes.go | 25 +- .../devices_codes_test/devices_codes_test.go | 159 + devices/codes_test.go | 184 + devices/devices_test/devices_test.go | 122 + devices_test.go | 4204 + disputes.go | 96 + disputes/disputes_test/disputes_test.go | 226 + .../disputes_evidence_test.go | 144 + disputes/evidence_test.go | 262 + disputes_test.go | 3719 + employees.go | 18 + employees/employees_test/employees_test.go | 122 + employees_test.go | 1569 + events.go | 81 + events/events_test/events_test.go | 155 + events_test.go | 3004 + gift_cards.go | 155 +- gift_cards_test.go | 3032 + giftcards/activities.go | 25 +- .../gift_cards_activities_test.go | 152 + giftcards/activities_test.go | 373 + giftcards/gift_cards_test/gift_cards_test.go | 258 + internal/explicit_fields_test.go | 149 + internal/multipart.go | 3 + internal/multipart_test.go | 76 + inventory.go | 102 + inventory/inventory_test/inventory_test.go | 508 + inventory_test.go | 9139 + invoices.go | 264 +- invoices/invoices_test/invoices_test.go | 461 + invoices_test.go | 9839 + labor.go | 322 +- labor/break_types.go | 48 +- labor/break_types_test.go | 313 + .../labor_break_types_test.go | 214 + labor/employee_wages_test.go | 178 + .../labor_employee_wages_test.go | 122 + labor/labor_test/labor_test.go | 524 + labor/shifts.go | 69 +- .../labor_shifts_test/labor_shifts_test.go | 301 + labor/shifts_test.go | 274 + labor/team_member_wages_test.go | 178 + .../labor_team_member_wages_test.go | 122 + labor/workweek_configs.go | 25 +- labor/workweek_configs_test.go | 139 + .../labor_workweek_configs_test.go | 126 + labor_test.go | 9101 + locations.go | 137 +- locations/custom_attribute_definitions.go | 48 +- .../custom_attribute_definitions_test.go | 352 + locations/custom_attributes.go | 71 +- locations/custom_attributes_test.go | 541 + ...tions_custom_attribute_definitions_test.go | 218 + .../locations_custom_attributes_test.go | 280 + locations/locations_test/locations_test.go | 379 + .../locations_transactions_test.go | 177 + locations/transactions_test.go | 424 + locations_test.go | 6018 + loyalty.go | 69 + loyalty/accounts.go | 92 +- .../loyalty_accounts_test.go | 222 + loyalty/accounts_test.go | 430 + loyalty/loyalty_test/loyalty_test.go | 97 + loyalty/programs.go | 23 + .../loyalty_programs_test.go | 141 + loyalty/programs/promotions.go | 25 +- .../loyalty_programs_promotions_test.go | 207 + loyalty/programs/promotions_test.go | 385 + loyalty/programs_test.go | 178 + loyalty/rewards.go | 67 +- .../loyalty_rewards_test.go | 203 + loyalty/rewards_test.go | 352 + loyalty_test.go | 1769 + merchants.go | 18 + merchants/custom_attribute_definitions.go | 48 +- .../custom_attribute_definitions_test.go | 352 + merchants/custom_attributes.go | 71 +- merchants/custom_attributes_test.go | 541 + ...hants_custom_attribute_definitions_test.go | 218 + .../merchants_custom_attributes_test.go | 266 + merchants/merchants_test/merchants_test.go | 115 + merchants_test.go | 1298 + o_auth.go | 60 + o_auth_test.go | 2146 + oauth/o_auth_test/o_auth_test.go | 167 + orders.go | 232 +- orders/custom_attribute_definitions.go | 48 +- orders/custom_attribute_definitions_test.go | 352 + orders/custom_attributes.go | 71 +- orders/custom_attributes_test.go | 541 + ...rders_custom_attribute_definitions_test.go | 227 + .../orders_custom_attributes_test.go | 280 + orders/orders_test/orders_test.go | 472 + orders_test.go | 5154 + payments.go | 234 + payments/payments_test/payments_test.go | 326 + payments_test.go | 12661 + payouts.go | 192 + payouts/payouts_test/payouts_test.go | 161 + payouts_test.go | 10230 + pointer.go | 5 + pointer_test.go | 211 + reference.md | 124 +- refunds.go | 71 +- refunds/refunds_test/refunds_test.go | 186 + refunds_test.go | 4098 + sites.go | 12 + sites/sites_test/sites_test.go | 83 + sites_test.go | 748 + snippets.go | 47 +- snippets/snippets_test/snippets_test.go | 141 + snippets_test.go | 1218 + subscriptions.go | 294 + .../subscriptions_test/subscriptions_test.go | 437 + subscriptions_test.go | 9296 + team.go | 76 +- team/team_test/team_test.go | 181 + team_members.go | 139 +- team_members_test.go | 3791 + team_test.go | 1753 + .../team_members_test/team_members_test.go | 451 + teammembers/wage_setting.go | 25 +- teammembers/wage_setting_test.go | 100 + .../team_members_wage_setting_test.go | 148 + terminal.go | 18 + terminal/actions.go | 46 +- .../terminal_actions_test.go | 193 + terminal/actions_test.go | 229 + terminal/checkouts.go | 46 +- .../terminal_checkouts_test.go | 190 + terminal/checkouts_test.go | 229 + terminal/refunds.go | 44 + .../terminal_refunds_test.go | 184 + terminal/refunds_test.go | 229 + terminal/terminal_test/terminal_test.go | 138 + terminal_test.go | 820 + transfer_orders.go | 246 +- transfer_orders_test.go | 7288 + .../transfer_orders_test.go | 399 + types.go | 4362 + types_test.go | 277427 +++++++++++++++ v1transactions.go | 45 + .../v1transactions_test.go | 148 + v1transactions_test.go | 4469 + vendors.go | 181 +- vendors/vendors_test/vendors_test.go | 349 + vendors_test.go | 4126 + webhooks/event_types_test.go | 55 + .../webhooks_event_types_test.go | 91 + webhooks/subscriptions.go | 88 +- .../webhooks_subscriptions_test.go | 279 + webhooks/subscriptions_test.go | 481 + wiremock/docker-compose.test.yml | 14 + wiremock/wiremock-mappings.json | 1 + 217 files changed, 475878 insertions(+), 148 deletions(-) create mode 100644 apple_pay_test.go create mode 100644 applepay/apple_pay_test/apple_pay_test.go create mode 100644 bank_accounts_test.go create mode 100644 bankaccounts/bank_accounts_test/bank_accounts_test.go create mode 100644 bookings/bookings_test/bookings_test.go create mode 100644 bookings/custom_attribute_definitions_test.go create mode 100644 bookings/custom_attributes_test.go create mode 100644 bookings/customattributedefinitions/bookings_custom_attribute_definitions_test/bookings_custom_attribute_definitions_test.go create mode 100644 bookings/customattributes/bookings_custom_attributes_test/bookings_custom_attributes_test.go create mode 100644 bookings/location_profiles_test.go create mode 100644 bookings/locationprofiles/bookings_location_profiles_test/bookings_location_profiles_test.go create mode 100644 bookings/team_member_profiles_test.go create mode 100644 bookings/teammemberprofiles/bookings_team_member_profiles_test/bookings_team_member_profiles_test.go create mode 100644 bookings_test.go create mode 100644 cards/cards_test/cards_test.go create mode 100644 cards_test.go create mode 100644 cashdrawers/shifts/cash_drawers_shifts_test/cash_drawers_shifts_test.go create mode 100644 cashdrawers/shifts_test.go create mode 100644 catalog/catalog_test/catalog_test.go create mode 100644 catalog/images/catalog_images_test/catalog_images_test.go create mode 100644 catalog/images_test.go create mode 100644 catalog/object/catalog_object_test/catalog_object_test.go create mode 100644 catalog/object_test.go create mode 100644 catalog_test.go create mode 100644 channels/channels_test/channels_test.go create mode 100644 channels_test.go create mode 100644 checkout/checkout_test/checkout_test.go create mode 100644 checkout/payment_links_test.go create mode 100644 checkout/paymentlinks/checkout_payment_links_test/checkout_payment_links_test.go create mode 100644 checkout_test.go create mode 100644 customers/cards/customers_cards_test/customers_cards_test.go create mode 100644 customers/cards_test.go create mode 100644 customers/custom_attribute_definitions_test.go create mode 100644 customers/custom_attributes_test.go create mode 100644 customers/customattributedefinitions/customers_custom_attribute_definitions_test/customers_custom_attribute_definitions_test.go create mode 100644 customers/customattributes/customers_custom_attributes_test/customers_custom_attributes_test.go create mode 100644 customers/customers_test/customers_test.go create mode 100644 customers/groups/customers_groups_test/customers_groups_test.go create mode 100644 customers/groups_test.go create mode 100644 customers/segments/customers_segments_test/customers_segments_test.go create mode 100644 customers/segments_test.go create mode 100644 customers_test.go create mode 100644 devices/codes/devices_codes_test/devices_codes_test.go create mode 100644 devices/codes_test.go create mode 100644 devices/devices_test/devices_test.go create mode 100644 devices_test.go create mode 100644 disputes/disputes_test/disputes_test.go create mode 100644 disputes/evidence/disputes_evidence_test/disputes_evidence_test.go create mode 100644 disputes/evidence_test.go create mode 100644 disputes_test.go create mode 100644 employees/employees_test/employees_test.go create mode 100644 employees_test.go create mode 100644 events/events_test/events_test.go create mode 100644 events_test.go create mode 100644 gift_cards_test.go create mode 100644 giftcards/activities/gift_cards_activities_test/gift_cards_activities_test.go create mode 100644 giftcards/activities_test.go create mode 100644 giftcards/gift_cards_test/gift_cards_test.go create mode 100644 inventory/inventory_test/inventory_test.go create mode 100644 inventory_test.go create mode 100644 invoices/invoices_test/invoices_test.go create mode 100644 invoices_test.go create mode 100644 labor/break_types_test.go create mode 100644 labor/breaktypes/labor_break_types_test/labor_break_types_test.go create mode 100644 labor/employee_wages_test.go create mode 100644 labor/employeewages/labor_employee_wages_test/labor_employee_wages_test.go create mode 100644 labor/labor_test/labor_test.go create mode 100644 labor/shifts/labor_shifts_test/labor_shifts_test.go create mode 100644 labor/shifts_test.go create mode 100644 labor/team_member_wages_test.go create mode 100644 labor/teammemberwages/labor_team_member_wages_test/labor_team_member_wages_test.go create mode 100644 labor/workweek_configs_test.go create mode 100644 labor/workweekconfigs/labor_workweek_configs_test/labor_workweek_configs_test.go create mode 100644 labor_test.go create mode 100644 locations/custom_attribute_definitions_test.go create mode 100644 locations/custom_attributes_test.go create mode 100644 locations/customattributedefinitions/locations_custom_attribute_definitions_test/locations_custom_attribute_definitions_test.go create mode 100644 locations/customattributes/locations_custom_attributes_test/locations_custom_attributes_test.go create mode 100644 locations/locations_test/locations_test.go create mode 100644 locations/transactions/locations_transactions_test/locations_transactions_test.go create mode 100644 locations/transactions_test.go create mode 100644 locations_test.go create mode 100644 loyalty/accounts/loyalty_accounts_test/loyalty_accounts_test.go create mode 100644 loyalty/accounts_test.go create mode 100644 loyalty/loyalty_test/loyalty_test.go create mode 100644 loyalty/programs/loyalty_programs_test/loyalty_programs_test.go create mode 100644 loyalty/programs/promotions/loyalty_programs_promotions_test/loyalty_programs_promotions_test.go create mode 100644 loyalty/programs/promotions_test.go create mode 100644 loyalty/programs_test.go create mode 100644 loyalty/rewards/loyalty_rewards_test/loyalty_rewards_test.go create mode 100644 loyalty/rewards_test.go create mode 100644 loyalty_test.go create mode 100644 merchants/custom_attribute_definitions_test.go create mode 100644 merchants/custom_attributes_test.go create mode 100644 merchants/customattributedefinitions/merchants_custom_attribute_definitions_test/merchants_custom_attribute_definitions_test.go create mode 100644 merchants/customattributes/merchants_custom_attributes_test/merchants_custom_attributes_test.go create mode 100644 merchants/merchants_test/merchants_test.go create mode 100644 merchants_test.go create mode 100644 o_auth_test.go create mode 100644 oauth/o_auth_test/o_auth_test.go create mode 100644 orders/custom_attribute_definitions_test.go create mode 100644 orders/custom_attributes_test.go create mode 100644 orders/customattributedefinitions/orders_custom_attribute_definitions_test/orders_custom_attribute_definitions_test.go create mode 100644 orders/customattributes/orders_custom_attributes_test/orders_custom_attributes_test.go create mode 100644 orders/orders_test/orders_test.go create mode 100644 orders_test.go create mode 100644 payments/payments_test/payments_test.go create mode 100644 payments_test.go create mode 100644 payouts/payouts_test/payouts_test.go create mode 100644 payouts_test.go create mode 100644 pointer_test.go create mode 100644 refunds/refunds_test/refunds_test.go create mode 100644 refunds_test.go create mode 100644 sites/sites_test/sites_test.go create mode 100644 sites_test.go create mode 100644 snippets/snippets_test/snippets_test.go create mode 100644 snippets_test.go create mode 100644 subscriptions/subscriptions_test/subscriptions_test.go create mode 100644 subscriptions_test.go create mode 100644 team/team_test/team_test.go create mode 100644 team_members_test.go create mode 100644 team_test.go create mode 100644 teammembers/team_members_test/team_members_test.go create mode 100644 teammembers/wage_setting_test.go create mode 100644 teammembers/wagesetting/team_members_wage_setting_test/team_members_wage_setting_test.go create mode 100644 terminal/actions/terminal_actions_test/terminal_actions_test.go create mode 100644 terminal/actions_test.go create mode 100644 terminal/checkouts/terminal_checkouts_test/terminal_checkouts_test.go create mode 100644 terminal/checkouts_test.go create mode 100644 terminal/refunds/terminal_refunds_test/terminal_refunds_test.go create mode 100644 terminal/refunds_test.go create mode 100644 terminal/terminal_test/terminal_test.go create mode 100644 terminal_test.go create mode 100644 transfer_orders_test.go create mode 100644 transferorders/transfer_orders_test/transfer_orders_test.go create mode 100644 types_test.go create mode 100644 v1transactions/v1transactions_test/v1transactions_test.go create mode 100644 v1transactions_test.go create mode 100644 vendors/vendors_test/vendors_test.go create mode 100644 vendors_test.go create mode 100644 webhooks/event_types_test.go create mode 100644 webhooks/eventtypes/webhooks_event_types_test/webhooks_event_types_test.go create mode 100644 webhooks/subscriptions/webhooks_subscriptions_test/webhooks_subscriptions_test.go create mode 100644 webhooks/subscriptions_test.go create mode 100644 wiremock/docker-compose.test.yml create mode 100644 wiremock/wiremock-mappings.json diff --git a/.fern/metadata.json b/.fern/metadata.json index 3c44ff2..e16dca8 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,10 +1,10 @@ { - "cliVersion": "3.38.0", + "cliVersion": "3.98.5", "generatorName": "fernapi/fern-go-sdk", - "generatorVersion": "1.22.4", + "generatorVersion": "1.26.1", "generatorConfig": { "packageName": "square", - "enableWireTests": false + "enableWireTests": true }, - "sdkVersion": "v3.0.0" + "sdkVersion": "v3.0.1" } \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 56310d6..8a39ee0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,11 +25,21 @@ jobs: - name: Setup wiremock server run: | - if [ -f wiremock/docker-compose.test.yml ]; then docker compose -f wiremock/docker-compose.test.yml down && docker compose -f wiremock/docker-compose.test.yml up -d; fi + PROJECT_NAME="wiremock-$(basename $(dirname $(pwd)) | tr -d '.')" + echo "PROJECT_NAME=$PROJECT_NAME" >> $GITHUB_ENV + if [ -f wiremock/docker-compose.test.yml ]; then + docker compose -p "$PROJECT_NAME" -f wiremock/docker-compose.test.yml down + docker compose -p "$PROJECT_NAME" -f wiremock/docker-compose.test.yml up -d + WIREMOCK_PORT=$(docker compose -p "$PROJECT_NAME" -f wiremock/docker-compose.test.yml port wiremock 8080 | cut -d: -f2) + echo "WIREMOCK_URL=http://localhost:$WIREMOCK_PORT" >> $GITHUB_ENV + fi - name: Test run: go test ./... - name: Teardown wiremock server + if: always() run: | - if [ -f wiremock/docker-compose.test.yml ]; then docker compose -f wiremock/docker-compose.test.yml down; fi + if [ -f wiremock/docker-compose.test.yml ]; then + docker compose -p "$PROJECT_NAME" -f wiremock/docker-compose.test.yml down + fi diff --git a/apple_pay.go b/apple_pay.go index f4eeff9..e8d3ea7 100644 --- a/apple_pay.go +++ b/apple_pay.go @@ -35,6 +35,27 @@ func (r *RegisterDomainRequest) SetDomainName(domainName string) { r.require(registerDomainRequestFieldDomainName) } +func (r *RegisterDomainRequest) UnmarshalJSON(data []byte) error { + type unmarshaler RegisterDomainRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *r = RegisterDomainRequest(body) + return nil +} + +func (r *RegisterDomainRequest) MarshalJSON() ([]byte, error) { + type embed RegisterDomainRequest + var marshaler = struct { + embed + }{ + embed: embed(*r), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, r.explicitFields) + return json.Marshal(explicitMarshaler) +} + // Defines the fields that are included in the response body of // a request to the [RegisterDomain](api-endpoint:ApplePay-RegisterDomain) endpoint. // @@ -75,6 +96,9 @@ func (r *RegisterDomainResponse) GetStatus() *RegisterDomainResponseStatus { } func (r *RegisterDomainResponse) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -127,6 +151,9 @@ func (r *RegisterDomainResponse) MarshalJSON() ([]byte, error) { } func (r *RegisterDomainResponse) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value diff --git a/apple_pay_test.go b/apple_pay_test.go new file mode 100644 index 0000000..d173fa5 --- /dev/null +++ b/apple_pay_test.go @@ -0,0 +1,309 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersRegisterDomainRequest(t *testing.T) { + t.Run("SetDomainName", func(t *testing.T) { + obj := &RegisterDomainRequest{} + var fernTestValueDomainName string + obj.SetDomainName(fernTestValueDomainName) + assert.Equal(t, fernTestValueDomainName, obj.DomainName) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitRegisterDomainRequest(t *testing.T) { + t.Run("SetDomainName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RegisterDomainRequest{} + var fernTestValueDomainName string + + // Act + obj.SetDomainName(fernTestValueDomainName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRegisterDomainResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &RegisterDomainResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &RegisterDomainResponse{} + var fernTestValueStatus *RegisterDomainResponseStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRegisterDomainResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RegisterDomainResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RegisterDomainResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RegisterDomainResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RegisterDomainResponse{} + var expected *RegisterDomainResponseStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RegisterDomainResponse{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RegisterDomainResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRegisterDomainResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RegisterDomainResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RegisterDomainResponse{} + var fernTestValueStatus *RegisterDomainResponseStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingRegisterDomainResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RegisterDomainResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RegisterDomainResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RegisterDomainResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RegisterDomainResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringRegisterDomainResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RegisterDomainResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RegisterDomainResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestEnumRegisterDomainResponseStatus(t *testing.T) { + t.Run("NewFromString_PENDING", func(t *testing.T) { + t.Parallel() + val, err := NewRegisterDomainResponseStatusFromString("PENDING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, RegisterDomainResponseStatus("PENDING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VERIFIED", func(t *testing.T) { + t.Parallel() + val, err := NewRegisterDomainResponseStatusFromString("VERIFIED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, RegisterDomainResponseStatus("VERIFIED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewRegisterDomainResponseStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewRegisterDomainResponseStatusFromString("PENDING") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestExtraPropertiesRegisterDomainResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RegisterDomainResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RegisterDomainResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/applepay/apple_pay_test/apple_pay_test.go b/applepay/apple_pay_test/apple_pay_test.go new file mode 100644 index 0000000..6c1502f --- /dev/null +++ b/applepay/apple_pay_test/apple_pay_test.go @@ -0,0 +1,88 @@ +// Code generated by Fern. DO NOT EDIT. + +package apple_pay_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestApplePayRegisterDomainWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.RegisterDomainRequest{ + DomainName: "example.com", + } + _, invocationErr := client.ApplePay.RegisterDomain( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestApplePayRegisterDomainWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestApplePayRegisterDomainWithWireMock", "POST", "/v2/apple-pay/domains", nil, 1) +} diff --git a/bank_accounts.go b/bank_accounts.go index 5bac703..d638a38 100644 --- a/bank_accounts.go +++ b/bank_accounts.go @@ -57,6 +57,27 @@ func (c *CreateBankAccountRequest) SetCustomerID(customerID *string) { c.require(createBankAccountRequestFieldCustomerID) } +func (c *CreateBankAccountRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateBankAccountRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateBankAccountRequest(body) + return nil +} + +func (c *CreateBankAccountRequest) MarshalJSON() ([]byte, error) { + type embed CreateBankAccountRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( disableBankAccountRequestFieldBankAccountID = big.NewInt(1 << 0) ) @@ -411,6 +432,9 @@ func (b *BankAccount) GetCustomerID() *string { } func (b *BankAccount) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -575,6 +599,9 @@ func (b *BankAccount) MarshalJSON() ([]byte, error) { } func (b *BankAccount) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -678,6 +705,9 @@ func (c *CreateBankAccountResponse) GetErrors() []*Error { } func (c *CreateBankAccountResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -730,6 +760,9 @@ func (c *CreateBankAccountResponse) MarshalJSON() ([]byte, error) { } func (c *CreateBankAccountResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -775,6 +808,9 @@ func (d *DisableBankAccountResponse) GetErrors() []*Error { } func (d *DisableBankAccountResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -827,6 +863,9 @@ func (d *DisableBankAccountResponse) MarshalJSON() ([]byte, error) { } func (d *DisableBankAccountResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -872,6 +911,9 @@ func (g *GetBankAccountByV1IDResponse) GetBankAccount() *BankAccount { } func (g *GetBankAccountByV1IDResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -924,6 +966,9 @@ func (g *GetBankAccountByV1IDResponse) MarshalJSON() ([]byte, error) { } func (g *GetBankAccountByV1IDResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -969,6 +1014,9 @@ func (g *GetBankAccountResponse) GetErrors() []*Error { } func (g *GetBankAccountResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -1021,6 +1069,9 @@ func (g *GetBankAccountResponse) MarshalJSON() ([]byte, error) { } func (g *GetBankAccountResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -1080,6 +1131,9 @@ func (l *ListBankAccountsResponse) GetCursor() *string { } func (l *ListBankAccountsResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -1139,6 +1193,9 @@ func (l *ListBankAccountsResponse) MarshalJSON() ([]byte, error) { } func (l *ListBankAccountsResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value diff --git a/bank_accounts_test.go b/bank_accounts_test.go new file mode 100644 index 0000000..624538a --- /dev/null +++ b/bank_accounts_test.go @@ -0,0 +1,2990 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersCreateBankAccountRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateBankAccountRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSourceID", func(t *testing.T) { + obj := &CreateBankAccountRequest{} + var fernTestValueSourceID string + obj.SetSourceID(fernTestValueSourceID) + assert.Equal(t, fernTestValueSourceID, obj.SourceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerID", func(t *testing.T) { + obj := &CreateBankAccountRequest{} + var fernTestValueCustomerID *string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateBankAccountRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBankAccountRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSourceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBankAccountRequest{} + var fernTestValueSourceID string + + // Act + obj.SetSourceID(fernTestValueSourceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBankAccountRequest{} + var fernTestValueCustomerID *string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisableBankAccountRequest(t *testing.T) { + t.Run("SetBankAccountID", func(t *testing.T) { + obj := &DisableBankAccountRequest{} + var fernTestValueBankAccountID string + obj.SetBankAccountID(fernTestValueBankAccountID) + assert.Equal(t, fernTestValueBankAccountID, obj.BankAccountID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDisableBankAccountRequest(t *testing.T) { + t.Run("SetBankAccountID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisableBankAccountRequest{} + var fernTestValueBankAccountID string + + // Act + obj.SetBankAccountID(fernTestValueBankAccountID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetByV1IDBankAccountsRequest(t *testing.T) { + t.Run("SetV1BankAccountID", func(t *testing.T) { + obj := &GetByV1IDBankAccountsRequest{} + var fernTestValueV1BankAccountID string + obj.SetV1BankAccountID(fernTestValueV1BankAccountID) + assert.Equal(t, fernTestValueV1BankAccountID, obj.V1BankAccountID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetByV1IDBankAccountsRequest(t *testing.T) { + t.Run("SetV1BankAccountID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetByV1IDBankAccountsRequest{} + var fernTestValueV1BankAccountID string + + // Act + obj.SetV1BankAccountID(fernTestValueV1BankAccountID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetBankAccountsRequest(t *testing.T) { + t.Run("SetBankAccountID", func(t *testing.T) { + obj := &GetBankAccountsRequest{} + var fernTestValueBankAccountID string + obj.SetBankAccountID(fernTestValueBankAccountID) + assert.Equal(t, fernTestValueBankAccountID, obj.BankAccountID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetBankAccountsRequest(t *testing.T) { + t.Run("SetBankAccountID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBankAccountsRequest{} + var fernTestValueBankAccountID string + + // Act + obj.SetBankAccountID(fernTestValueBankAccountID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListBankAccountsRequest(t *testing.T) { + t.Run("SetCursor", func(t *testing.T) { + obj := &ListBankAccountsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListBankAccountsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &ListBankAccountsRequest{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerID", func(t *testing.T) { + obj := &ListBankAccountsRequest{} + var fernTestValueCustomerID *string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListBankAccountsRequest(t *testing.T) { + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBankAccountsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBankAccountsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBankAccountsRequest{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBankAccountsRequest{} + var fernTestValueCustomerID *string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBankAccount(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &BankAccount{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAccountNumberSuffix", func(t *testing.T) { + obj := &BankAccount{} + var fernTestValueAccountNumberSuffix string + obj.SetAccountNumberSuffix(fernTestValueAccountNumberSuffix) + assert.Equal(t, fernTestValueAccountNumberSuffix, obj.AccountNumberSuffix) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCountry", func(t *testing.T) { + obj := &BankAccount{} + var fernTestValueCountry Country + obj.SetCountry(fernTestValueCountry) + assert.Equal(t, fernTestValueCountry, obj.Country) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCurrency", func(t *testing.T) { + obj := &BankAccount{} + var fernTestValueCurrency Currency + obj.SetCurrency(fernTestValueCurrency) + assert.Equal(t, fernTestValueCurrency, obj.Currency) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAccountType", func(t *testing.T) { + obj := &BankAccount{} + var fernTestValueAccountType BankAccountType + obj.SetAccountType(fernTestValueAccountType) + assert.Equal(t, fernTestValueAccountType, obj.AccountType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetHolderName", func(t *testing.T) { + obj := &BankAccount{} + var fernTestValueHolderName string + obj.SetHolderName(fernTestValueHolderName) + assert.Equal(t, fernTestValueHolderName, obj.HolderName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPrimaryBankIdentificationNumber", func(t *testing.T) { + obj := &BankAccount{} + var fernTestValuePrimaryBankIdentificationNumber string + obj.SetPrimaryBankIdentificationNumber(fernTestValuePrimaryBankIdentificationNumber) + assert.Equal(t, fernTestValuePrimaryBankIdentificationNumber, obj.PrimaryBankIdentificationNumber) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSecondaryBankIdentificationNumber", func(t *testing.T) { + obj := &BankAccount{} + var fernTestValueSecondaryBankIdentificationNumber *string + obj.SetSecondaryBankIdentificationNumber(fernTestValueSecondaryBankIdentificationNumber) + assert.Equal(t, fernTestValueSecondaryBankIdentificationNumber, obj.SecondaryBankIdentificationNumber) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDebitMandateReferenceID", func(t *testing.T) { + obj := &BankAccount{} + var fernTestValueDebitMandateReferenceID *string + obj.SetDebitMandateReferenceID(fernTestValueDebitMandateReferenceID) + assert.Equal(t, fernTestValueDebitMandateReferenceID, obj.DebitMandateReferenceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReferenceID", func(t *testing.T) { + obj := &BankAccount{} + var fernTestValueReferenceID *string + obj.SetReferenceID(fernTestValueReferenceID) + assert.Equal(t, fernTestValueReferenceID, obj.ReferenceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &BankAccount{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &BankAccount{} + var fernTestValueStatus BankAccountStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreditable", func(t *testing.T) { + obj := &BankAccount{} + var fernTestValueCreditable bool + obj.SetCreditable(fernTestValueCreditable) + assert.Equal(t, fernTestValueCreditable, obj.Creditable) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDebitable", func(t *testing.T) { + obj := &BankAccount{} + var fernTestValueDebitable bool + obj.SetDebitable(fernTestValueDebitable) + assert.Equal(t, fernTestValueDebitable, obj.Debitable) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFingerprint", func(t *testing.T) { + obj := &BankAccount{} + var fernTestValueFingerprint *string + obj.SetFingerprint(fernTestValueFingerprint) + assert.Equal(t, fernTestValueFingerprint, obj.Fingerprint) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &BankAccount{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBankName", func(t *testing.T) { + obj := &BankAccount{} + var fernTestValueBankName *string + obj.SetBankName(fernTestValueBankName) + assert.Equal(t, fernTestValueBankName, obj.BankName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerID", func(t *testing.T) { + obj := &BankAccount{} + var fernTestValueCustomerID *string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBankAccount(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var expected string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetAccountNumberSuffix", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var expected string + obj.AccountNumberSuffix = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAccountNumberSuffix(), "getter should return the property value") + }) + + t.Run("GetAccountNumberSuffix_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAccountNumberSuffix() // Should return zero value + }) + + t.Run("GetCountry", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var expected Country + obj.Country = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCountry(), "getter should return the property value") + }) + + t.Run("GetCountry_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCountry() // Should return zero value + }) + + t.Run("GetCurrency", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var expected Currency + obj.Currency = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCurrency(), "getter should return the property value") + }) + + t.Run("GetCurrency_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCurrency() // Should return zero value + }) + + t.Run("GetAccountType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var expected BankAccountType + obj.AccountType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAccountType(), "getter should return the property value") + }) + + t.Run("GetAccountType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAccountType() // Should return zero value + }) + + t.Run("GetHolderName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var expected string + obj.HolderName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetHolderName(), "getter should return the property value") + }) + + t.Run("GetHolderName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetHolderName() // Should return zero value + }) + + t.Run("GetPrimaryBankIdentificationNumber", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var expected string + obj.PrimaryBankIdentificationNumber = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPrimaryBankIdentificationNumber(), "getter should return the property value") + }) + + t.Run("GetPrimaryBankIdentificationNumber_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPrimaryBankIdentificationNumber() // Should return zero value + }) + + t.Run("GetSecondaryBankIdentificationNumber", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var expected *string + obj.SecondaryBankIdentificationNumber = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSecondaryBankIdentificationNumber(), "getter should return the property value") + }) + + t.Run("GetSecondaryBankIdentificationNumber_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + obj.SecondaryBankIdentificationNumber = nil + + // Act & Assert + assert.Nil(t, obj.GetSecondaryBankIdentificationNumber(), "getter should return nil when property is nil") + }) + + t.Run("GetSecondaryBankIdentificationNumber_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSecondaryBankIdentificationNumber() // Should return zero value + }) + + t.Run("GetDebitMandateReferenceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var expected *string + obj.DebitMandateReferenceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDebitMandateReferenceID(), "getter should return the property value") + }) + + t.Run("GetDebitMandateReferenceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + obj.DebitMandateReferenceID = nil + + // Act & Assert + assert.Nil(t, obj.GetDebitMandateReferenceID(), "getter should return nil when property is nil") + }) + + t.Run("GetDebitMandateReferenceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDebitMandateReferenceID() // Should return zero value + }) + + t.Run("GetReferenceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var expected *string + obj.ReferenceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReferenceID(), "getter should return the property value") + }) + + t.Run("GetReferenceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + obj.ReferenceID = nil + + // Act & Assert + assert.Nil(t, obj.GetReferenceID(), "getter should return nil when property is nil") + }) + + t.Run("GetReferenceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReferenceID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var expected BankAccountStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetCreditable", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var expected bool + obj.Creditable = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreditable(), "getter should return the property value") + }) + + t.Run("GetCreditable_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreditable() // Should return zero value + }) + + t.Run("GetDebitable", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var expected bool + obj.Debitable = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDebitable(), "getter should return the property value") + }) + + t.Run("GetDebitable_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDebitable() // Should return zero value + }) + + t.Run("GetFingerprint", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var expected *string + obj.Fingerprint = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFingerprint(), "getter should return the property value") + }) + + t.Run("GetFingerprint_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + obj.Fingerprint = nil + + // Act & Assert + assert.Nil(t, obj.GetFingerprint(), "getter should return nil when property is nil") + }) + + t.Run("GetFingerprint_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFingerprint() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var expected *int + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetBankName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var expected *string + obj.BankName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBankName(), "getter should return the property value") + }) + + t.Run("GetBankName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + obj.BankName = nil + + // Act & Assert + assert.Nil(t, obj.GetBankName(), "getter should return nil when property is nil") + }) + + t.Run("GetBankName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBankName() // Should return zero value + }) + + t.Run("GetCustomerID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var expected *string + obj.CustomerID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomerID(), "getter should return the property value") + }) + + t.Run("GetCustomerID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + obj.CustomerID = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomerID(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomerID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomerID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBankAccount(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAccountNumberSuffix_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var fernTestValueAccountNumberSuffix string + + // Act + obj.SetAccountNumberSuffix(fernTestValueAccountNumberSuffix) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCountry_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var fernTestValueCountry Country + + // Act + obj.SetCountry(fernTestValueCountry) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCurrency_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var fernTestValueCurrency Currency + + // Act + obj.SetCurrency(fernTestValueCurrency) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAccountType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var fernTestValueAccountType BankAccountType + + // Act + obj.SetAccountType(fernTestValueAccountType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetHolderName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var fernTestValueHolderName string + + // Act + obj.SetHolderName(fernTestValueHolderName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPrimaryBankIdentificationNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var fernTestValuePrimaryBankIdentificationNumber string + + // Act + obj.SetPrimaryBankIdentificationNumber(fernTestValuePrimaryBankIdentificationNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSecondaryBankIdentificationNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var fernTestValueSecondaryBankIdentificationNumber *string + + // Act + obj.SetSecondaryBankIdentificationNumber(fernTestValueSecondaryBankIdentificationNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDebitMandateReferenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var fernTestValueDebitMandateReferenceID *string + + // Act + obj.SetDebitMandateReferenceID(fernTestValueDebitMandateReferenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReferenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var fernTestValueReferenceID *string + + // Act + obj.SetReferenceID(fernTestValueReferenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var fernTestValueStatus BankAccountStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreditable_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var fernTestValueCreditable bool + + // Act + obj.SetCreditable(fernTestValueCreditable) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDebitable_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var fernTestValueDebitable bool + + // Act + obj.SetDebitable(fernTestValueDebitable) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFingerprint_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var fernTestValueFingerprint *string + + // Act + obj.SetFingerprint(fernTestValueFingerprint) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBankName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var fernTestValueBankName *string + + // Act + obj.SetBankName(fernTestValueBankName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + var fernTestValueCustomerID *string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateBankAccountResponse(t *testing.T) { + t.Run("SetBankAccount", func(t *testing.T) { + obj := &CreateBankAccountResponse{} + var fernTestValueBankAccount *BankAccount + obj.SetBankAccount(fernTestValueBankAccount) + assert.Equal(t, fernTestValueBankAccount, obj.BankAccount) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateBankAccountResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateBankAccountResponse(t *testing.T) { + t.Run("GetBankAccount", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBankAccountResponse{} + var expected *BankAccount + obj.BankAccount = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBankAccount(), "getter should return the property value") + }) + + t.Run("GetBankAccount_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBankAccountResponse{} + obj.BankAccount = nil + + // Act & Assert + assert.Nil(t, obj.GetBankAccount(), "getter should return nil when property is nil") + }) + + t.Run("GetBankAccount_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateBankAccountResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBankAccount() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBankAccountResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBankAccountResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateBankAccountResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateBankAccountResponse(t *testing.T) { + t.Run("SetBankAccount_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBankAccountResponse{} + var fernTestValueBankAccount *BankAccount + + // Act + obj.SetBankAccount(fernTestValueBankAccount) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBankAccountResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisableBankAccountResponse(t *testing.T) { + t.Run("SetBankAccount", func(t *testing.T) { + obj := &DisableBankAccountResponse{} + var fernTestValueBankAccount *BankAccount + obj.SetBankAccount(fernTestValueBankAccount) + assert.Equal(t, fernTestValueBankAccount, obj.BankAccount) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &DisableBankAccountResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDisableBankAccountResponse(t *testing.T) { + t.Run("GetBankAccount", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisableBankAccountResponse{} + var expected *BankAccount + obj.BankAccount = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBankAccount(), "getter should return the property value") + }) + + t.Run("GetBankAccount_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisableBankAccountResponse{} + obj.BankAccount = nil + + // Act & Assert + assert.Nil(t, obj.GetBankAccount(), "getter should return nil when property is nil") + }) + + t.Run("GetBankAccount_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisableBankAccountResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBankAccount() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisableBankAccountResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisableBankAccountResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisableBankAccountResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDisableBankAccountResponse(t *testing.T) { + t.Run("SetBankAccount_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisableBankAccountResponse{} + var fernTestValueBankAccount *BankAccount + + // Act + obj.SetBankAccount(fernTestValueBankAccount) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisableBankAccountResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetBankAccountByV1IDResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetBankAccountByV1IDResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBankAccount", func(t *testing.T) { + obj := &GetBankAccountByV1IDResponse{} + var fernTestValueBankAccount *BankAccount + obj.SetBankAccount(fernTestValueBankAccount) + assert.Equal(t, fernTestValueBankAccount, obj.BankAccount) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetBankAccountByV1IDResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBankAccountByV1IDResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBankAccountByV1IDResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetBankAccountByV1IDResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetBankAccount", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBankAccountByV1IDResponse{} + var expected *BankAccount + obj.BankAccount = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBankAccount(), "getter should return the property value") + }) + + t.Run("GetBankAccount_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBankAccountByV1IDResponse{} + obj.BankAccount = nil + + // Act & Assert + assert.Nil(t, obj.GetBankAccount(), "getter should return nil when property is nil") + }) + + t.Run("GetBankAccount_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetBankAccountByV1IDResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBankAccount() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetBankAccountByV1IDResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBankAccountByV1IDResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBankAccount_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBankAccountByV1IDResponse{} + var fernTestValueBankAccount *BankAccount + + // Act + obj.SetBankAccount(fernTestValueBankAccount) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetBankAccountResponse(t *testing.T) { + t.Run("SetBankAccount", func(t *testing.T) { + obj := &GetBankAccountResponse{} + var fernTestValueBankAccount *BankAccount + obj.SetBankAccount(fernTestValueBankAccount) + assert.Equal(t, fernTestValueBankAccount, obj.BankAccount) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &GetBankAccountResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetBankAccountResponse(t *testing.T) { + t.Run("GetBankAccount", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBankAccountResponse{} + var expected *BankAccount + obj.BankAccount = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBankAccount(), "getter should return the property value") + }) + + t.Run("GetBankAccount_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBankAccountResponse{} + obj.BankAccount = nil + + // Act & Assert + assert.Nil(t, obj.GetBankAccount(), "getter should return nil when property is nil") + }) + + t.Run("GetBankAccount_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetBankAccountResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBankAccount() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBankAccountResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBankAccountResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetBankAccountResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetBankAccountResponse(t *testing.T) { + t.Run("SetBankAccount_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBankAccountResponse{} + var fernTestValueBankAccount *BankAccount + + // Act + obj.SetBankAccount(fernTestValueBankAccount) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBankAccountResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListBankAccountsResponse(t *testing.T) { + t.Run("SetBankAccounts", func(t *testing.T) { + obj := &ListBankAccountsResponse{} + var fernTestValueBankAccounts []*BankAccount + obj.SetBankAccounts(fernTestValueBankAccounts) + assert.Equal(t, fernTestValueBankAccounts, obj.BankAccounts) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &ListBankAccountsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListBankAccountsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListBankAccountsResponse(t *testing.T) { + t.Run("GetBankAccounts", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBankAccountsResponse{} + var expected []*BankAccount + obj.BankAccounts = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBankAccounts(), "getter should return the property value") + }) + + t.Run("GetBankAccounts_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBankAccountsResponse{} + obj.BankAccounts = nil + + // Act & Assert + assert.Nil(t, obj.GetBankAccounts(), "getter should return nil when property is nil") + }) + + t.Run("GetBankAccounts_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListBankAccountsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBankAccounts() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBankAccountsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBankAccountsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListBankAccountsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBankAccountsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBankAccountsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListBankAccountsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListBankAccountsResponse(t *testing.T) { + t.Run("SetBankAccounts_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBankAccountsResponse{} + var fernTestValueBankAccounts []*BankAccount + + // Act + obj.SetBankAccounts(fernTestValueBankAccounts) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBankAccountsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBankAccountsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingBankAccount(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccount{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BankAccount + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BankAccount + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BankAccount + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateBankAccountResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBankAccountResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateBankAccountResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateBankAccountResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateBankAccountResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDisableBankAccountResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisableBankAccountResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DisableBankAccountResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DisableBankAccountResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DisableBankAccountResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetBankAccountByV1IDResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBankAccountByV1IDResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetBankAccountByV1IDResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetBankAccountByV1IDResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetBankAccountByV1IDResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetBankAccountResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBankAccountResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetBankAccountResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetBankAccountResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetBankAccountResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListBankAccountsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBankAccountsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListBankAccountsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListBankAccountsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListBankAccountsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringBankAccount(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BankAccount{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccount + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateBankAccountResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateBankAccountResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateBankAccountResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDisableBankAccountResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DisableBankAccountResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisableBankAccountResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetBankAccountByV1IDResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetBankAccountByV1IDResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetBankAccountByV1IDResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetBankAccountResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetBankAccountResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetBankAccountResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListBankAccountsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListBankAccountsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListBankAccountsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestEnumBankAccountStatus(t *testing.T) { + t.Run("NewFromString_VERIFICATION_IN_PROGRESS", func(t *testing.T) { + t.Parallel() + val, err := NewBankAccountStatusFromString("VERIFICATION_IN_PROGRESS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BankAccountStatus("VERIFICATION_IN_PROGRESS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VERIFIED", func(t *testing.T) { + t.Parallel() + val, err := NewBankAccountStatusFromString("VERIFIED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BankAccountStatus("VERIFIED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DISABLED", func(t *testing.T) { + t.Parallel() + val, err := NewBankAccountStatusFromString("DISABLED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BankAccountStatus("DISABLED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewBankAccountStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewBankAccountStatusFromString("VERIFICATION_IN_PROGRESS") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumBankAccountType(t *testing.T) { + t.Run("NewFromString_CHECKING", func(t *testing.T) { + t.Parallel() + val, err := NewBankAccountTypeFromString("CHECKING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BankAccountType("CHECKING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SAVINGS", func(t *testing.T) { + t.Parallel() + val, err := NewBankAccountTypeFromString("SAVINGS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BankAccountType("SAVINGS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVESTMENT", func(t *testing.T) { + t.Parallel() + val, err := NewBankAccountTypeFromString("INVESTMENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BankAccountType("INVESTMENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_OTHER", func(t *testing.T) { + t.Parallel() + val, err := NewBankAccountTypeFromString("OTHER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BankAccountType("OTHER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BUSINESS_CHECKING", func(t *testing.T) { + t.Parallel() + val, err := NewBankAccountTypeFromString("BUSINESS_CHECKING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BankAccountType("BUSINESS_CHECKING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewBankAccountTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewBankAccountTypeFromString("CHECKING") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestExtraPropertiesBankAccount(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BankAccount{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccount + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateBankAccountResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateBankAccountResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateBankAccountResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDisableBankAccountResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DisableBankAccountResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisableBankAccountResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetBankAccountByV1IDResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetBankAccountByV1IDResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetBankAccountByV1IDResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetBankAccountResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetBankAccountResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetBankAccountResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListBankAccountsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListBankAccountsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListBankAccountsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/bankaccounts/bank_accounts_test/bank_accounts_test.go b/bankaccounts/bank_accounts_test/bank_accounts_test.go new file mode 100644 index 0000000..529a253 --- /dev/null +++ b/bankaccounts/bank_accounts_test/bank_accounts_test.go @@ -0,0 +1,203 @@ +// Code generated by Fern. DO NOT EDIT. + +package bank_accounts_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestBankAccountsListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.ListBankAccountsRequest{ + Cursor: square.String( + "cursor", + ), + Limit: square.Int( + 1, + ), + LocationID: square.String( + "location_id", + ), + CustomerID: square.String( + "customer_id", + ), + } + _, invocationErr := client.BankAccounts.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBankAccountsListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBankAccountsListWithWireMock", "GET", "/v2/bank-accounts", map[string]string{"cursor": "cursor", "limit": "1", "location_id": "location_id", "customer_id": "customer_id"}, 1) +} + +func TestBankAccountsCreateBankAccountWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CreateBankAccountRequest{ + IdempotencyKey: "4e43559a-f0fd-47d3-9da2-7ea1f97d94be", + SourceID: "bnon:CA4SEHsQwr0rx6DbWLD5BQaqMnoYAQ", + CustomerID: square.String( + "HM3B2D5JKGZ69359BTEHXM2V8M", + ), + } + _, invocationErr := client.BankAccounts.CreateBankAccount( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBankAccountsCreateBankAccountWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBankAccountsCreateBankAccountWithWireMock", "POST", "/v2/bank-accounts", nil, 1) +} + +func TestBankAccountsGetByV1IDWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.GetByV1IDBankAccountsRequest{ + V1BankAccountID: "v1_bank_account_id", + } + _, invocationErr := client.BankAccounts.GetByV1ID( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBankAccountsGetByV1IDWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBankAccountsGetByV1IDWithWireMock", "GET", "/v2/bank-accounts/by-v1-id/v1_bank_account_id", nil, 1) +} + +func TestBankAccountsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.GetBankAccountsRequest{ + BankAccountID: "bank_account_id", + } + _, invocationErr := client.BankAccounts.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBankAccountsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBankAccountsGetWithWireMock", "GET", "/v2/bank-accounts/bank_account_id", nil, 1) +} + +func TestBankAccountsDisableBankAccountWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.DisableBankAccountRequest{ + BankAccountID: "bank_account_id", + } + _, invocationErr := client.BankAccounts.DisableBankAccount( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBankAccountsDisableBankAccountWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBankAccountsDisableBankAccountWithWireMock", "POST", "/v2/bank-accounts/bank_account_id/disable", nil, 1) +} diff --git a/bookings.go b/bookings.go index c2b2d1b..0b7a6c5 100644 --- a/bookings.go +++ b/bookings.go @@ -15,7 +15,7 @@ var ( type BulkRetrieveBookingsRequest struct { // A non-empty list of [Booking](entity:Booking) IDs specifying bookings to retrieve. - BookingIDs []string `json:"booking_ids,omitempty" url:"-"` + BookingIDs []string `json:"booking_ids" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -35,13 +35,34 @@ func (b *BulkRetrieveBookingsRequest) SetBookingIDs(bookingIDs []string) { b.require(bulkRetrieveBookingsRequestFieldBookingIDs) } +func (b *BulkRetrieveBookingsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler BulkRetrieveBookingsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *b = BulkRetrieveBookingsRequest(body) + return nil +} + +func (b *BulkRetrieveBookingsRequest) MarshalJSON() ([]byte, error) { + type embed BulkRetrieveBookingsRequest + var marshaler = struct { + embed + }{ + embed: embed(*b), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, b.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( bulkRetrieveTeamMemberBookingProfilesRequestFieldTeamMemberIDs = big.NewInt(1 << 0) ) type BulkRetrieveTeamMemberBookingProfilesRequest struct { // A non-empty list of IDs of team members whose booking profiles you want to retrieve. - TeamMemberIDs []string `json:"team_member_ids,omitempty" url:"-"` + TeamMemberIDs []string `json:"team_member_ids" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -61,6 +82,27 @@ func (b *BulkRetrieveTeamMemberBookingProfilesRequest) SetTeamMemberIDs(teamMemb b.require(bulkRetrieveTeamMemberBookingProfilesRequestFieldTeamMemberIDs) } +func (b *BulkRetrieveTeamMemberBookingProfilesRequest) UnmarshalJSON(data []byte) error { + type unmarshaler BulkRetrieveTeamMemberBookingProfilesRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *b = BulkRetrieveTeamMemberBookingProfilesRequest(body) + return nil +} + +func (b *BulkRetrieveTeamMemberBookingProfilesRequest) MarshalJSON() ([]byte, error) { + type embed BulkRetrieveTeamMemberBookingProfilesRequest + var marshaler = struct { + embed + }{ + embed: embed(*b), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, b.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( retrieveLocationBookingProfileRequestFieldLocationID = big.NewInt(1 << 0) ) @@ -93,7 +135,7 @@ var ( type SearchAvailabilityRequest struct { // Query conditions used to filter buyer-accessible booking availabilities. - Query *SearchAvailabilityQuery `json:"query,omitempty" url:"-"` + Query *SearchAvailabilityQuery `json:"query" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -113,6 +155,27 @@ func (s *SearchAvailabilityRequest) SetQuery(query *SearchAvailabilityQuery) { s.require(searchAvailabilityRequestFieldQuery) } +func (s *SearchAvailabilityRequest) UnmarshalJSON(data []byte) error { + type unmarshaler SearchAvailabilityRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *s = SearchAvailabilityRequest(body) + return nil +} + +func (s *SearchAvailabilityRequest) MarshalJSON() ([]byte, error) { + type embed SearchAvailabilityRequest + var marshaler = struct { + embed + }{ + embed: embed(*s), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, s.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( cancelBookingRequestFieldBookingID = big.NewInt(1 << 0) cancelBookingRequestFieldIdempotencyKey = big.NewInt(1 << 1) @@ -159,6 +222,27 @@ func (c *CancelBookingRequest) SetBookingVersion(bookingVersion *int) { c.require(cancelBookingRequestFieldBookingVersion) } +func (c *CancelBookingRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CancelBookingRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CancelBookingRequest(body) + return nil +} + +func (c *CancelBookingRequest) MarshalJSON() ([]byte, error) { + type embed CancelBookingRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( createBookingRequestFieldIdempotencyKey = big.NewInt(1 << 0) createBookingRequestFieldBooking = big.NewInt(1 << 1) @@ -168,7 +252,7 @@ type CreateBookingRequest struct { // A unique key to make this request an idempotent operation. IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"` // The details of the booking to be created. - Booking *Booking `json:"booking,omitempty" url:"-"` + Booking *Booking `json:"booking" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -195,6 +279,27 @@ func (c *CreateBookingRequest) SetBooking(booking *Booking) { c.require(createBookingRequestFieldBooking) } +func (c *CreateBookingRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateBookingRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateBookingRequest(body) + return nil +} + +func (c *CreateBookingRequest) MarshalJSON() ([]byte, error) { + type embed CreateBookingRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( getBookingsRequestFieldBookingID = big.NewInt(1 << 0) ) @@ -391,6 +496,9 @@ func (a *AppointmentSegment) GetResourceIDs() []string { } func (a *AppointmentSegment) GetExtraProperties() map[string]interface{} { + if a == nil { + return nil + } return a.extraProperties } @@ -478,6 +586,9 @@ func (a *AppointmentSegment) MarshalJSON() ([]byte, error) { } func (a *AppointmentSegment) String() string { + if a == nil { + return "" + } if len(a.rawJSON) > 0 { if value, err := internal.StringifyJSON(a.rawJSON); err == nil { return value @@ -533,6 +644,9 @@ func (a *Availability) GetAppointmentSegments() []*AppointmentSegment { } func (a *Availability) GetExtraProperties() map[string]interface{} { + if a == nil { + return nil + } return a.extraProperties } @@ -592,6 +706,9 @@ func (a *Availability) MarshalJSON() ([]byte, error) { } func (a *Availability) String() string { + if a == nil { + return "" + } if len(a.rawJSON) > 0 { if value, err := internal.StringifyJSON(a.rawJSON); err == nil { return value @@ -794,6 +911,9 @@ func (b *Booking) GetAddress() *Address { } func (b *Booking) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -951,6 +1071,9 @@ func (b *Booking) MarshalJSON() ([]byte, error) { } func (b *Booking) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -1038,6 +1161,9 @@ func (b *BookingCreatorDetails) GetCustomerID() *string { } func (b *BookingCreatorDetails) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -1097,6 +1223,9 @@ func (b *BookingCreatorDetails) MarshalJSON() ([]byte, error) { } func (b *BookingCreatorDetails) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -1200,6 +1329,9 @@ func (b *BulkRetrieveBookingsResponse) GetErrors() []*Error { } func (b *BulkRetrieveBookingsResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -1252,6 +1384,9 @@ func (b *BulkRetrieveBookingsResponse) MarshalJSON() ([]byte, error) { } func (b *BulkRetrieveBookingsResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -1297,6 +1432,9 @@ func (b *BulkRetrieveTeamMemberBookingProfilesResponse) GetErrors() []*Error { } func (b *BulkRetrieveTeamMemberBookingProfilesResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -1349,6 +1487,9 @@ func (b *BulkRetrieveTeamMemberBookingProfilesResponse) MarshalJSON() ([]byte, e } func (b *BulkRetrieveTeamMemberBookingProfilesResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -1510,6 +1651,9 @@ func (b *BusinessAppointmentSettings) GetSkipBookingFlowStaffSelection() *bool { } func (b *BusinessAppointmentSettings) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -1639,6 +1783,9 @@ func (b *BusinessAppointmentSettings) MarshalJSON() ([]byte, error) { } func (b *BusinessAppointmentSettings) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -1849,6 +1996,9 @@ func (b *BusinessBookingProfile) GetSupportSellerLevelWrites() *bool { } func (b *BusinessBookingProfile) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -1943,6 +2093,9 @@ func (b *BusinessBookingProfile) MarshalJSON() ([]byte, error) { } func (b *BusinessBookingProfile) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -2033,6 +2186,9 @@ func (c *CancelBookingResponse) GetErrors() []*Error { } func (c *CancelBookingResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -2085,6 +2241,9 @@ func (c *CancelBookingResponse) MarshalJSON() ([]byte, error) { } func (c *CancelBookingResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -2129,6 +2288,9 @@ func (c *CreateBookingResponse) GetErrors() []*Error { } func (c *CreateBookingResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -2181,6 +2343,9 @@ func (c *CreateBookingResponse) MarshalJSON() ([]byte, error) { } func (c *CreateBookingResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -2225,6 +2390,9 @@ func (g *GetBookingResponse) GetErrors() []*Error { } func (g *GetBookingResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -2277,6 +2445,9 @@ func (g *GetBookingResponse) MarshalJSON() ([]byte, error) { } func (g *GetBookingResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -2321,6 +2492,9 @@ func (g *GetBusinessBookingProfileResponse) GetErrors() []*Error { } func (g *GetBusinessBookingProfileResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -2373,6 +2547,9 @@ func (g *GetBusinessBookingProfileResponse) MarshalJSON() ([]byte, error) { } func (g *GetBusinessBookingProfileResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -2427,6 +2604,9 @@ func (l *ListBookingsResponse) GetErrors() []*Error { } func (l *ListBookingsResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -2486,6 +2666,9 @@ func (l *ListBookingsResponse) MarshalJSON() ([]byte, error) { } func (l *ListBookingsResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -2530,6 +2713,9 @@ func (r *RetrieveLocationBookingProfileResponse) GetErrors() []*Error { } func (r *RetrieveLocationBookingProfileResponse) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -2582,6 +2768,9 @@ func (r *RetrieveLocationBookingProfileResponse) MarshalJSON() ([]byte, error) { } func (r *RetrieveLocationBookingProfileResponse) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -2655,6 +2844,9 @@ func (s *SearchAvailabilityFilter) GetBookingID() *string { } func (s *SearchAvailabilityFilter) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -2721,6 +2913,9 @@ func (s *SearchAvailabilityFilter) MarshalJSON() ([]byte, error) { } func (s *SearchAvailabilityFilter) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -2756,6 +2951,9 @@ func (s *SearchAvailabilityQuery) GetFilter() *SearchAvailabilityFilter { } func (s *SearchAvailabilityQuery) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -2801,6 +2999,9 @@ func (s *SearchAvailabilityQuery) MarshalJSON() ([]byte, error) { } func (s *SearchAvailabilityQuery) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -2845,6 +3046,9 @@ func (s *SearchAvailabilityResponse) GetErrors() []*Error { } func (s *SearchAvailabilityResponse) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -2897,6 +3101,9 @@ func (s *SearchAvailabilityResponse) MarshalJSON() ([]byte, error) { } func (s *SearchAvailabilityResponse) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -2947,6 +3154,9 @@ func (s *SegmentFilter) GetTeamMemberIDFilter() *FilterValue { } func (s *SegmentFilter) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -2999,6 +3209,9 @@ func (s *SegmentFilter) MarshalJSON() ([]byte, error) { } func (s *SegmentFilter) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -3043,6 +3256,9 @@ func (u *UpdateBookingResponse) GetErrors() []*Error { } func (u *UpdateBookingResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -3095,6 +3311,9 @@ func (u *UpdateBookingResponse) MarshalJSON() ([]byte, error) { } func (u *UpdateBookingResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -3118,7 +3337,7 @@ type UpdateBookingRequest struct { // A unique key to make this request an idempotent operation. IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"` // The booking to be updated. Individual attributes explicitly specified here override the corresponding values of the existing booking. - Booking *Booking `json:"booking,omitempty" url:"-"` + Booking *Booking `json:"booking" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -3151,3 +3370,24 @@ func (u *UpdateBookingRequest) SetBooking(booking *Booking) { u.Booking = booking u.require(updateBookingRequestFieldBooking) } + +func (u *UpdateBookingRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdateBookingRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdateBookingRequest(body) + return nil +} + +func (u *UpdateBookingRequest) MarshalJSON() ([]byte, error) { + type embed UpdateBookingRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/bookings/bookings_test/bookings_test.go b/bookings/bookings_test/bookings_test.go new file mode 100644 index 0000000..c035b94 --- /dev/null +++ b/bookings/bookings_test/bookings_test.go @@ -0,0 +1,338 @@ +// Code generated by Fern. DO NOT EDIT. + +package bookings_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestBookingsListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.ListBookingsRequest{ + Limit: square.Int( + 1, + ), + Cursor: square.String( + "cursor", + ), + CustomerID: square.String( + "customer_id", + ), + TeamMemberID: square.String( + "team_member_id", + ), + LocationID: square.String( + "location_id", + ), + StartAtMin: square.String( + "start_at_min", + ), + StartAtMax: square.String( + "start_at_max", + ), + } + _, invocationErr := client.Bookings.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBookingsListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBookingsListWithWireMock", "GET", "/v2/bookings", map[string]string{"limit": "1", "cursor": "cursor", "customer_id": "customer_id", "team_member_id": "team_member_id", "location_id": "location_id", "start_at_min": "start_at_min", "start_at_max": "start_at_max"}, 1) +} + +func TestBookingsCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CreateBookingRequest{ + Booking: &square.Booking{}, + } + _, invocationErr := client.Bookings.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBookingsCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBookingsCreateWithWireMock", "POST", "/v2/bookings", nil, 1) +} + +func TestBookingsSearchAvailabilityWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.SearchAvailabilityRequest{ + Query: &square.SearchAvailabilityQuery{ + Filter: &square.SearchAvailabilityFilter{ + StartAtRange: &square.TimeRange{}, + }, + }, + } + _, invocationErr := client.Bookings.SearchAvailability( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBookingsSearchAvailabilityWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBookingsSearchAvailabilityWithWireMock", "POST", "/v2/bookings/availability/search", nil, 1) +} + +func TestBookingsBulkRetrieveBookingsWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.BulkRetrieveBookingsRequest{ + BookingIDs: []string{ + "booking_ids", + }, + } + _, invocationErr := client.Bookings.BulkRetrieveBookings( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBookingsBulkRetrieveBookingsWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBookingsBulkRetrieveBookingsWithWireMock", "POST", "/v2/bookings/bulk-retrieve", nil, 1) +} + +func TestBookingsGetBusinessProfileWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + _, invocationErr := client.Bookings.GetBusinessProfile( + context.TODO(), + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBookingsGetBusinessProfileWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBookingsGetBusinessProfileWithWireMock", "GET", "/v2/bookings/business-booking-profile", nil, 1) +} + +func TestBookingsRetrieveLocationBookingProfileWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.RetrieveLocationBookingProfileRequest{ + LocationID: "location_id", + } + _, invocationErr := client.Bookings.RetrieveLocationBookingProfile( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBookingsRetrieveLocationBookingProfileWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBookingsRetrieveLocationBookingProfileWithWireMock", "GET", "/v2/bookings/location-booking-profiles/location_id", nil, 1) +} + +func TestBookingsBulkRetrieveTeamMemberBookingProfilesWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.BulkRetrieveTeamMemberBookingProfilesRequest{ + TeamMemberIDs: []string{ + "team_member_ids", + }, + } + _, invocationErr := client.Bookings.BulkRetrieveTeamMemberBookingProfiles( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBookingsBulkRetrieveTeamMemberBookingProfilesWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBookingsBulkRetrieveTeamMemberBookingProfilesWithWireMock", "POST", "/v2/bookings/team-member-booking-profiles/bulk-retrieve", nil, 1) +} + +func TestBookingsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.GetBookingsRequest{ + BookingID: "booking_id", + } + _, invocationErr := client.Bookings.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBookingsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBookingsGetWithWireMock", "GET", "/v2/bookings/booking_id", nil, 1) +} + +func TestBookingsUpdateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.UpdateBookingRequest{ + BookingID: "booking_id", + Booking: &square.Booking{}, + } + _, invocationErr := client.Bookings.Update( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBookingsUpdateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBookingsUpdateWithWireMock", "PUT", "/v2/bookings/booking_id", nil, 1) +} + +func TestBookingsCancelWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CancelBookingRequest{ + BookingID: "booking_id", + } + _, invocationErr := client.Bookings.Cancel( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBookingsCancelWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBookingsCancelWithWireMock", "POST", "/v2/bookings/booking_id/cancel", nil, 1) +} diff --git a/bookings/custom_attribute_definitions.go b/bookings/custom_attribute_definitions.go index dbfb977..c4885e0 100644 --- a/bookings/custom_attribute_definitions.go +++ b/bookings/custom_attribute_definitions.go @@ -3,7 +3,9 @@ package bookings import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" big "math/big" ) @@ -28,7 +30,7 @@ type CreateBookingCustomAttributeDefinitionRequest struct { // - `schema`. With the exception of the `Selection` data type, the `schema` is specified as a // simple URL to the JSON schema definition hosted on the Square CDN. For more information, see // [Specifying the schema](https://developer.squareup.com/docs/booking-custom-attributes-api/custom-attribute-definitions#specify-schema). - CustomAttributeDefinition *v3.CustomAttributeDefinition `json:"custom_attribute_definition,omitempty" url:"-"` + CustomAttributeDefinition *v3.CustomAttributeDefinition `json:"custom_attribute_definition" url:"-"` // A unique identifier for this request, used to ensure idempotency. For more information, // see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"` @@ -58,6 +60,27 @@ func (c *CreateBookingCustomAttributeDefinitionRequest) SetIdempotencyKey(idempo c.require(createBookingCustomAttributeDefinitionRequestFieldIdempotencyKey) } +func (c *CreateBookingCustomAttributeDefinitionRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateBookingCustomAttributeDefinitionRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateBookingCustomAttributeDefinitionRequest(body) + return nil +} + +func (c *CreateBookingCustomAttributeDefinitionRequest) MarshalJSON() ([]byte, error) { + type embed CreateBookingCustomAttributeDefinitionRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( deleteCustomAttributeDefinitionsRequestFieldKey = big.NewInt(1 << 0) ) @@ -185,7 +208,7 @@ type UpdateBookingCustomAttributeDefinitionRequest struct { // // To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) // control, include the optional `version` field and specify the current version of the custom attribute definition. - CustomAttributeDefinition *v3.CustomAttributeDefinition `json:"custom_attribute_definition,omitempty" url:"-"` + CustomAttributeDefinition *v3.CustomAttributeDefinition `json:"custom_attribute_definition" url:"-"` // A unique identifier for this request, used to ensure idempotency. For more information, // see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"` @@ -221,3 +244,24 @@ func (u *UpdateBookingCustomAttributeDefinitionRequest) SetIdempotencyKey(idempo u.IdempotencyKey = idempotencyKey u.require(updateBookingCustomAttributeDefinitionRequestFieldIdempotencyKey) } + +func (u *UpdateBookingCustomAttributeDefinitionRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdateBookingCustomAttributeDefinitionRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdateBookingCustomAttributeDefinitionRequest(body) + return nil +} + +func (u *UpdateBookingCustomAttributeDefinitionRequest) MarshalJSON() ([]byte, error) { + type embed UpdateBookingCustomAttributeDefinitionRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/bookings/custom_attribute_definitions_test.go b/bookings/custom_attribute_definitions_test.go new file mode 100644 index 0000000..50b9567 --- /dev/null +++ b/bookings/custom_attribute_definitions_test.go @@ -0,0 +1,352 @@ +// Code generated by Fern. DO NOT EDIT. + +package bookings + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersCreateBookingCustomAttributeDefinitionRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateBookingCustomAttributeDefinitionRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateBookingCustomAttributeDefinitionRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBookingCustomAttributeDefinitionRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetKey", func(t *testing.T) { + obj := &DeleteCustomAttributeDefinitionsRequest{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDeleteCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomAttributeDefinitionsRequest{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetKey", func(t *testing.T) { + obj := &GetCustomAttributeDefinitionsRequest{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &GetCustomAttributeDefinitionsRequest{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributeDefinitionsRequest{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributeDefinitionsRequest{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetLimit", func(t *testing.T) { + obj := &ListCustomAttributeDefinitionsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListCustomAttributeDefinitionsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributeDefinitionsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributeDefinitionsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateBookingCustomAttributeDefinitionRequest(t *testing.T) { + t.Run("SetKey", func(t *testing.T) { + obj := &UpdateBookingCustomAttributeDefinitionRequest{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &UpdateBookingCustomAttributeDefinitionRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateBookingCustomAttributeDefinitionRequest(t *testing.T) { + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateBookingCustomAttributeDefinitionRequest{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateBookingCustomAttributeDefinitionRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/bookings/custom_attributes.go b/bookings/custom_attributes.go index 88ba7df..af725d2 100644 --- a/bookings/custom_attributes.go +++ b/bookings/custom_attributes.go @@ -3,7 +3,9 @@ package bookings import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" big "math/big" ) @@ -15,7 +17,7 @@ type BulkDeleteBookingCustomAttributesRequest struct { // A map containing 1 to 25 individual Delete requests. For each request, provide an // arbitrary ID that is unique for this `BulkDeleteBookingCustomAttributes` request and the // information needed to delete a custom attribute. - Values map[string]*v3.BookingCustomAttributeDeleteRequest `json:"values,omitempty" url:"-"` + Values map[string]*v3.BookingCustomAttributeDeleteRequest `json:"values" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -35,6 +37,27 @@ func (b *BulkDeleteBookingCustomAttributesRequest) SetValues(values map[string]* b.require(bulkDeleteBookingCustomAttributesRequestFieldValues) } +func (b *BulkDeleteBookingCustomAttributesRequest) UnmarshalJSON(data []byte) error { + type unmarshaler BulkDeleteBookingCustomAttributesRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *b = BulkDeleteBookingCustomAttributesRequest(body) + return nil +} + +func (b *BulkDeleteBookingCustomAttributesRequest) MarshalJSON() ([]byte, error) { + type embed BulkDeleteBookingCustomAttributesRequest + var marshaler = struct { + embed + }{ + embed: embed(*b), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, b.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( bulkUpsertBookingCustomAttributesRequestFieldValues = big.NewInt(1 << 0) ) @@ -43,7 +66,7 @@ type BulkUpsertBookingCustomAttributesRequest struct { // A map containing 1 to 25 individual upsert requests. For each request, provide an // arbitrary ID that is unique for this `BulkUpsertBookingCustomAttributes` request and the // information needed to create or update a custom attribute. - Values map[string]*v3.BookingCustomAttributeUpsertRequest `json:"values,omitempty" url:"-"` + Values map[string]*v3.BookingCustomAttributeUpsertRequest `json:"values" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -63,6 +86,27 @@ func (b *BulkUpsertBookingCustomAttributesRequest) SetValues(values map[string]* b.require(bulkUpsertBookingCustomAttributesRequestFieldValues) } +func (b *BulkUpsertBookingCustomAttributesRequest) UnmarshalJSON(data []byte) error { + type unmarshaler BulkUpsertBookingCustomAttributesRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *b = BulkUpsertBookingCustomAttributesRequest(body) + return nil +} + +func (b *BulkUpsertBookingCustomAttributesRequest) MarshalJSON() ([]byte, error) { + type embed BulkUpsertBookingCustomAttributesRequest + var marshaler = struct { + embed + }{ + embed: embed(*b), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, b.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( deleteCustomAttributesRequestFieldBookingID = big.NewInt(1 << 0) deleteCustomAttributesRequestFieldKey = big.NewInt(1 << 1) @@ -248,7 +292,7 @@ type UpsertBookingCustomAttributeRequest struct { // - `version`. To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) // control for an update operation, include this optional field and specify the current version // of the custom attribute. - CustomAttribute *v3.CustomAttribute `json:"custom_attribute,omitempty" url:"-"` + CustomAttribute *v3.CustomAttribute `json:"custom_attribute" url:"-"` // A unique identifier for this request, used to ensure idempotency. For more information, // see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"` @@ -291,3 +335,24 @@ func (u *UpsertBookingCustomAttributeRequest) SetIdempotencyKey(idempotencyKey * u.IdempotencyKey = idempotencyKey u.require(upsertBookingCustomAttributeRequestFieldIdempotencyKey) } + +func (u *UpsertBookingCustomAttributeRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpsertBookingCustomAttributeRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpsertBookingCustomAttributeRequest(body) + return nil +} + +func (u *UpsertBookingCustomAttributeRequest) MarshalJSON() ([]byte, error) { + type embed UpsertBookingCustomAttributeRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/bookings/custom_attributes_test.go b/bookings/custom_attributes_test.go new file mode 100644 index 0000000..bec04ec --- /dev/null +++ b/bookings/custom_attributes_test.go @@ -0,0 +1,541 @@ +// Code generated by Fern. DO NOT EDIT. + +package bookings + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersDeleteCustomAttributesRequest(t *testing.T) { + t.Run("SetBookingID", func(t *testing.T) { + obj := &DeleteCustomAttributesRequest{} + var fernTestValueBookingID string + obj.SetBookingID(fernTestValueBookingID) + assert.Equal(t, fernTestValueBookingID, obj.BookingID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetKey", func(t *testing.T) { + obj := &DeleteCustomAttributesRequest{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDeleteCustomAttributesRequest(t *testing.T) { + t.Run("SetBookingID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomAttributesRequest{} + var fernTestValueBookingID string + + // Act + obj.SetBookingID(fernTestValueBookingID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomAttributesRequest{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetCustomAttributesRequest(t *testing.T) { + t.Run("SetBookingID", func(t *testing.T) { + obj := &GetCustomAttributesRequest{} + var fernTestValueBookingID string + obj.SetBookingID(fernTestValueBookingID) + assert.Equal(t, fernTestValueBookingID, obj.BookingID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetKey", func(t *testing.T) { + obj := &GetCustomAttributesRequest{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetWithDefinition", func(t *testing.T) { + obj := &GetCustomAttributesRequest{} + var fernTestValueWithDefinition *bool + obj.SetWithDefinition(fernTestValueWithDefinition) + assert.Equal(t, fernTestValueWithDefinition, obj.WithDefinition) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &GetCustomAttributesRequest{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetCustomAttributesRequest(t *testing.T) { + t.Run("SetBookingID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributesRequest{} + var fernTestValueBookingID string + + // Act + obj.SetBookingID(fernTestValueBookingID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributesRequest{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetWithDefinition_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributesRequest{} + var fernTestValueWithDefinition *bool + + // Act + obj.SetWithDefinition(fernTestValueWithDefinition) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributesRequest{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListCustomAttributesRequest(t *testing.T) { + t.Run("SetBookingID", func(t *testing.T) { + obj := &ListCustomAttributesRequest{} + var fernTestValueBookingID string + obj.SetBookingID(fernTestValueBookingID) + assert.Equal(t, fernTestValueBookingID, obj.BookingID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListCustomAttributesRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListCustomAttributesRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetWithDefinitions", func(t *testing.T) { + obj := &ListCustomAttributesRequest{} + var fernTestValueWithDefinitions *bool + obj.SetWithDefinitions(fernTestValueWithDefinitions) + assert.Equal(t, fernTestValueWithDefinitions, obj.WithDefinitions) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListCustomAttributesRequest(t *testing.T) { + t.Run("SetBookingID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributesRequest{} + var fernTestValueBookingID string + + // Act + obj.SetBookingID(fernTestValueBookingID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributesRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributesRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetWithDefinitions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributesRequest{} + var fernTestValueWithDefinitions *bool + + // Act + obj.SetWithDefinitions(fernTestValueWithDefinitions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpsertBookingCustomAttributeRequest(t *testing.T) { + t.Run("SetBookingID", func(t *testing.T) { + obj := &UpsertBookingCustomAttributeRequest{} + var fernTestValueBookingID string + obj.SetBookingID(fernTestValueBookingID) + assert.Equal(t, fernTestValueBookingID, obj.BookingID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetKey", func(t *testing.T) { + obj := &UpsertBookingCustomAttributeRequest{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &UpsertBookingCustomAttributeRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpsertBookingCustomAttributeRequest(t *testing.T) { + t.Run("SetBookingID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertBookingCustomAttributeRequest{} + var fernTestValueBookingID string + + // Act + obj.SetBookingID(fernTestValueBookingID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertBookingCustomAttributeRequest{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertBookingCustomAttributeRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/bookings/customattributedefinitions/bookings_custom_attribute_definitions_test/bookings_custom_attribute_definitions_test.go b/bookings/customattributedefinitions/bookings_custom_attribute_definitions_test/bookings_custom_attribute_definitions_test.go new file mode 100644 index 0000000..08fe14c --- /dev/null +++ b/bookings/customattributedefinitions/bookings_custom_attribute_definitions_test/bookings_custom_attribute_definitions_test.go @@ -0,0 +1,198 @@ +// Code generated by Fern. DO NOT EDIT. + +package bookings_custom_attribute_definitions_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + bookings "github.com/square/square-go-sdk/v3/bookings" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestBookingsCustomAttributeDefinitionsListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &bookings.ListCustomAttributeDefinitionsRequest{ + Limit: square.Int( + 1, + ), + Cursor: square.String( + "cursor", + ), + } + _, invocationErr := client.Bookings.CustomAttributeDefinitions.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBookingsCustomAttributeDefinitionsListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBookingsCustomAttributeDefinitionsListWithWireMock", "GET", "/v2/bookings/custom-attribute-definitions", map[string]string{"limit": "1", "cursor": "cursor"}, 1) +} + +func TestBookingsCustomAttributeDefinitionsCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &bookings.CreateBookingCustomAttributeDefinitionRequest{ + CustomAttributeDefinition: &square.CustomAttributeDefinition{}, + } + _, invocationErr := client.Bookings.CustomAttributeDefinitions.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBookingsCustomAttributeDefinitionsCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBookingsCustomAttributeDefinitionsCreateWithWireMock", "POST", "/v2/bookings/custom-attribute-definitions", nil, 1) +} + +func TestBookingsCustomAttributeDefinitionsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &bookings.GetCustomAttributeDefinitionsRequest{ + Key: "key", + Version: square.Int( + 1, + ), + } + _, invocationErr := client.Bookings.CustomAttributeDefinitions.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBookingsCustomAttributeDefinitionsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBookingsCustomAttributeDefinitionsGetWithWireMock", "GET", "/v2/bookings/custom-attribute-definitions/key", map[string]string{"version": "1"}, 1) +} + +func TestBookingsCustomAttributeDefinitionsUpdateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &bookings.UpdateBookingCustomAttributeDefinitionRequest{ + Key: "key", + CustomAttributeDefinition: &square.CustomAttributeDefinition{}, + } + _, invocationErr := client.Bookings.CustomAttributeDefinitions.Update( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBookingsCustomAttributeDefinitionsUpdateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBookingsCustomAttributeDefinitionsUpdateWithWireMock", "PUT", "/v2/bookings/custom-attribute-definitions/key", nil, 1) +} + +func TestBookingsCustomAttributeDefinitionsDeleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &bookings.DeleteCustomAttributeDefinitionsRequest{ + Key: "key", + } + _, invocationErr := client.Bookings.CustomAttributeDefinitions.Delete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBookingsCustomAttributeDefinitionsDeleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBookingsCustomAttributeDefinitionsDeleteWithWireMock", "DELETE", "/v2/bookings/custom-attribute-definitions/key", nil, 1) +} diff --git a/bookings/customattributes/bookings_custom_attributes_test/bookings_custom_attributes_test.go b/bookings/customattributes/bookings_custom_attributes_test/bookings_custom_attributes_test.go new file mode 100644 index 0000000..aa2d882 --- /dev/null +++ b/bookings/customattributes/bookings_custom_attributes_test/bookings_custom_attributes_test.go @@ -0,0 +1,243 @@ +// Code generated by Fern. DO NOT EDIT. + +package bookings_custom_attributes_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + bookings "github.com/square/square-go-sdk/v3/bookings" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestBookingsCustomAttributesBatchDeleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &bookings.BulkDeleteBookingCustomAttributesRequest{ + Values: map[string]*square.BookingCustomAttributeDeleteRequest{ + "key": &square.BookingCustomAttributeDeleteRequest{ + BookingID: "booking_id", + Key: "key", + }, + }, + } + _, invocationErr := client.Bookings.CustomAttributes.BatchDelete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBookingsCustomAttributesBatchDeleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBookingsCustomAttributesBatchDeleteWithWireMock", "POST", "/v2/bookings/custom-attributes/bulk-delete", nil, 1) +} + +func TestBookingsCustomAttributesBatchUpsertWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &bookings.BulkUpsertBookingCustomAttributesRequest{ + Values: map[string]*square.BookingCustomAttributeUpsertRequest{ + "key": &square.BookingCustomAttributeUpsertRequest{ + BookingID: "booking_id", + CustomAttribute: &square.CustomAttribute{}, + }, + }, + } + _, invocationErr := client.Bookings.CustomAttributes.BatchUpsert( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBookingsCustomAttributesBatchUpsertWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBookingsCustomAttributesBatchUpsertWithWireMock", "POST", "/v2/bookings/custom-attributes/bulk-upsert", nil, 1) +} + +func TestBookingsCustomAttributesListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &bookings.ListCustomAttributesRequest{ + BookingID: "booking_id", + Limit: square.Int( + 1, + ), + Cursor: square.String( + "cursor", + ), + WithDefinitions: square.Bool( + true, + ), + } + _, invocationErr := client.Bookings.CustomAttributes.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBookingsCustomAttributesListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBookingsCustomAttributesListWithWireMock", "GET", "/v2/bookings/booking_id/custom-attributes", map[string]string{"limit": "1", "cursor": "cursor", "with_definitions": "true"}, 1) +} + +func TestBookingsCustomAttributesGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &bookings.GetCustomAttributesRequest{ + BookingID: "booking_id", + Key: "key", + WithDefinition: square.Bool( + true, + ), + Version: square.Int( + 1, + ), + } + _, invocationErr := client.Bookings.CustomAttributes.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBookingsCustomAttributesGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBookingsCustomAttributesGetWithWireMock", "GET", "/v2/bookings/booking_id/custom-attributes/key", map[string]string{"with_definition": "true", "version": "1"}, 1) +} + +func TestBookingsCustomAttributesUpsertWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &bookings.UpsertBookingCustomAttributeRequest{ + BookingID: "booking_id", + Key: "key", + CustomAttribute: &square.CustomAttribute{}, + } + _, invocationErr := client.Bookings.CustomAttributes.Upsert( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBookingsCustomAttributesUpsertWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBookingsCustomAttributesUpsertWithWireMock", "PUT", "/v2/bookings/booking_id/custom-attributes/key", nil, 1) +} + +func TestBookingsCustomAttributesDeleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &bookings.DeleteCustomAttributesRequest{ + BookingID: "booking_id", + Key: "key", + } + _, invocationErr := client.Bookings.CustomAttributes.Delete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBookingsCustomAttributesDeleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBookingsCustomAttributesDeleteWithWireMock", "DELETE", "/v2/bookings/booking_id/custom-attributes/key", nil, 1) +} diff --git a/bookings/location_profiles_test.go b/bookings/location_profiles_test.go new file mode 100644 index 0000000..115f66f --- /dev/null +++ b/bookings/location_profiles_test.go @@ -0,0 +1,94 @@ +// Code generated by Fern. DO NOT EDIT. + +package bookings + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersListLocationProfilesRequest(t *testing.T) { + t.Run("SetLimit", func(t *testing.T) { + obj := &ListLocationProfilesRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListLocationProfilesRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListLocationProfilesRequest(t *testing.T) { + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationProfilesRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationProfilesRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/bookings/locationprofiles/bookings_location_profiles_test/bookings_location_profiles_test.go b/bookings/locationprofiles/bookings_location_profiles_test/bookings_location_profiles_test.go new file mode 100644 index 0000000..6df071c --- /dev/null +++ b/bookings/locationprofiles/bookings_location_profiles_test/bookings_location_profiles_test.go @@ -0,0 +1,94 @@ +// Code generated by Fern. DO NOT EDIT. + +package bookings_location_profiles_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + bookings "github.com/square/square-go-sdk/v3/bookings" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestBookingsLocationProfilesListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &bookings.ListLocationProfilesRequest{ + Limit: square.Int( + 1, + ), + Cursor: square.String( + "cursor", + ), + } + _, invocationErr := client.Bookings.LocationProfiles.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBookingsLocationProfilesListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBookingsLocationProfilesListWithWireMock", "GET", "/v2/bookings/location-booking-profiles", map[string]string{"limit": "1", "cursor": "cursor"}, 1) +} diff --git a/bookings/team_member_profiles_test.go b/bookings/team_member_profiles_test.go new file mode 100644 index 0000000..0fd7f54 --- /dev/null +++ b/bookings/team_member_profiles_test.go @@ -0,0 +1,217 @@ +// Code generated by Fern. DO NOT EDIT. + +package bookings + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersGetTeamMemberProfilesRequest(t *testing.T) { + t.Run("SetTeamMemberID", func(t *testing.T) { + obj := &GetTeamMemberProfilesRequest{} + var fernTestValueTeamMemberID string + obj.SetTeamMemberID(fernTestValueTeamMemberID) + assert.Equal(t, fernTestValueTeamMemberID, obj.TeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetTeamMemberProfilesRequest(t *testing.T) { + t.Run("SetTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTeamMemberProfilesRequest{} + var fernTestValueTeamMemberID string + + // Act + obj.SetTeamMemberID(fernTestValueTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListTeamMemberProfilesRequest(t *testing.T) { + t.Run("SetBookableOnly", func(t *testing.T) { + obj := &ListTeamMemberProfilesRequest{} + var fernTestValueBookableOnly *bool + obj.SetBookableOnly(fernTestValueBookableOnly) + assert.Equal(t, fernTestValueBookableOnly, obj.BookableOnly) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListTeamMemberProfilesRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListTeamMemberProfilesRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &ListTeamMemberProfilesRequest{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListTeamMemberProfilesRequest(t *testing.T) { + t.Run("SetBookableOnly_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTeamMemberProfilesRequest{} + var fernTestValueBookableOnly *bool + + // Act + obj.SetBookableOnly(fernTestValueBookableOnly) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTeamMemberProfilesRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTeamMemberProfilesRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTeamMemberProfilesRequest{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/bookings/teammemberprofiles/bookings_team_member_profiles_test/bookings_team_member_profiles_test.go b/bookings/teammemberprofiles/bookings_team_member_profiles_test/bookings_team_member_profiles_test.go new file mode 100644 index 0000000..a1abb53 --- /dev/null +++ b/bookings/teammemberprofiles/bookings_team_member_profiles_test/bookings_team_member_profiles_test.go @@ -0,0 +1,125 @@ +// Code generated by Fern. DO NOT EDIT. + +package bookings_team_member_profiles_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + bookings "github.com/square/square-go-sdk/v3/bookings" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestBookingsTeamMemberProfilesListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &bookings.ListTeamMemberProfilesRequest{ + BookableOnly: square.Bool( + true, + ), + Limit: square.Int( + 1, + ), + Cursor: square.String( + "cursor", + ), + LocationID: square.String( + "location_id", + ), + } + _, invocationErr := client.Bookings.TeamMemberProfiles.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBookingsTeamMemberProfilesListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBookingsTeamMemberProfilesListWithWireMock", "GET", "/v2/bookings/team-member-booking-profiles", map[string]string{"bookable_only": "true", "limit": "1", "cursor": "cursor", "location_id": "location_id"}, 1) +} + +func TestBookingsTeamMemberProfilesGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &bookings.GetTeamMemberProfilesRequest{ + TeamMemberID: "team_member_id", + } + _, invocationErr := client.Bookings.TeamMemberProfiles.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestBookingsTeamMemberProfilesGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestBookingsTeamMemberProfilesGetWithWireMock", "GET", "/v2/bookings/team-member-booking-profiles/team_member_id", nil, 1) +} diff --git a/bookings_test.go b/bookings_test.go new file mode 100644 index 0000000..7939839 --- /dev/null +++ b/bookings_test.go @@ -0,0 +1,8375 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersBulkRetrieveBookingsRequest(t *testing.T) { + t.Run("SetBookingIDs", func(t *testing.T) { + obj := &BulkRetrieveBookingsRequest{} + var fernTestValueBookingIDs []string + obj.SetBookingIDs(fernTestValueBookingIDs) + assert.Equal(t, fernTestValueBookingIDs, obj.BookingIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitBulkRetrieveBookingsRequest(t *testing.T) { + t.Run("SetBookingIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveBookingsRequest{} + var fernTestValueBookingIDs []string + + // Act + obj.SetBookingIDs(fernTestValueBookingIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkRetrieveTeamMemberBookingProfilesRequest(t *testing.T) { + t.Run("SetTeamMemberIDs", func(t *testing.T) { + obj := &BulkRetrieveTeamMemberBookingProfilesRequest{} + var fernTestValueTeamMemberIDs []string + obj.SetTeamMemberIDs(fernTestValueTeamMemberIDs) + assert.Equal(t, fernTestValueTeamMemberIDs, obj.TeamMemberIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitBulkRetrieveTeamMemberBookingProfilesRequest(t *testing.T) { + t.Run("SetTeamMemberIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveTeamMemberBookingProfilesRequest{} + var fernTestValueTeamMemberIDs []string + + // Act + obj.SetTeamMemberIDs(fernTestValueTeamMemberIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRetrieveLocationBookingProfileRequest(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &RetrieveLocationBookingProfileRequest{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitRetrieveLocationBookingProfileRequest(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationBookingProfileRequest{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchAvailabilityRequest(t *testing.T) { + t.Run("SetQuery", func(t *testing.T) { + obj := &SearchAvailabilityRequest{} + var fernTestValueQuery *SearchAvailabilityQuery + obj.SetQuery(fernTestValueQuery) + assert.Equal(t, fernTestValueQuery, obj.Query) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitSearchAvailabilityRequest(t *testing.T) { + t.Run("SetQuery_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchAvailabilityRequest{} + var fernTestValueQuery *SearchAvailabilityQuery + + // Act + obj.SetQuery(fernTestValueQuery) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCancelBookingRequest(t *testing.T) { + t.Run("SetBookingID", func(t *testing.T) { + obj := &CancelBookingRequest{} + var fernTestValueBookingID string + obj.SetBookingID(fernTestValueBookingID) + assert.Equal(t, fernTestValueBookingID, obj.BookingID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CancelBookingRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBookingVersion", func(t *testing.T) { + obj := &CancelBookingRequest{} + var fernTestValueBookingVersion *int + obj.SetBookingVersion(fernTestValueBookingVersion) + assert.Equal(t, fernTestValueBookingVersion, obj.BookingVersion) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCancelBookingRequest(t *testing.T) { + t.Run("SetBookingID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelBookingRequest{} + var fernTestValueBookingID string + + // Act + obj.SetBookingID(fernTestValueBookingID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelBookingRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBookingVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelBookingRequest{} + var fernTestValueBookingVersion *int + + // Act + obj.SetBookingVersion(fernTestValueBookingVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateBookingRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateBookingRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBooking", func(t *testing.T) { + obj := &CreateBookingRequest{} + var fernTestValueBooking *Booking + obj.SetBooking(fernTestValueBooking) + assert.Equal(t, fernTestValueBooking, obj.Booking) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateBookingRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBookingRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBooking_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBookingRequest{} + var fernTestValueBooking *Booking + + // Act + obj.SetBooking(fernTestValueBooking) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetBookingsRequest(t *testing.T) { + t.Run("SetBookingID", func(t *testing.T) { + obj := &GetBookingsRequest{} + var fernTestValueBookingID string + obj.SetBookingID(fernTestValueBookingID) + assert.Equal(t, fernTestValueBookingID, obj.BookingID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetBookingsRequest(t *testing.T) { + t.Run("SetBookingID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBookingsRequest{} + var fernTestValueBookingID string + + // Act + obj.SetBookingID(fernTestValueBookingID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListBookingsRequest(t *testing.T) { + t.Run("SetLimit", func(t *testing.T) { + obj := &ListBookingsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListBookingsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerID", func(t *testing.T) { + obj := &ListBookingsRequest{} + var fernTestValueCustomerID *string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTeamMemberID", func(t *testing.T) { + obj := &ListBookingsRequest{} + var fernTestValueTeamMemberID *string + obj.SetTeamMemberID(fernTestValueTeamMemberID) + assert.Equal(t, fernTestValueTeamMemberID, obj.TeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &ListBookingsRequest{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStartAtMin", func(t *testing.T) { + obj := &ListBookingsRequest{} + var fernTestValueStartAtMin *string + obj.SetStartAtMin(fernTestValueStartAtMin) + assert.Equal(t, fernTestValueStartAtMin, obj.StartAtMin) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStartAtMax", func(t *testing.T) { + obj := &ListBookingsRequest{} + var fernTestValueStartAtMax *string + obj.SetStartAtMax(fernTestValueStartAtMax) + assert.Equal(t, fernTestValueStartAtMax, obj.StartAtMax) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListBookingsRequest(t *testing.T) { + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingsRequest{} + var fernTestValueCustomerID *string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingsRequest{} + var fernTestValueTeamMemberID *string + + // Act + obj.SetTeamMemberID(fernTestValueTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingsRequest{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStartAtMin_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingsRequest{} + var fernTestValueStartAtMin *string + + // Act + obj.SetStartAtMin(fernTestValueStartAtMin) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStartAtMax_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingsRequest{} + var fernTestValueStartAtMax *string + + // Act + obj.SetStartAtMax(fernTestValueStartAtMax) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersAppointmentSegment(t *testing.T) { + t.Run("SetDurationMinutes", func(t *testing.T) { + obj := &AppointmentSegment{} + var fernTestValueDurationMinutes *int + obj.SetDurationMinutes(fernTestValueDurationMinutes) + assert.Equal(t, fernTestValueDurationMinutes, obj.DurationMinutes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetServiceVariationID", func(t *testing.T) { + obj := &AppointmentSegment{} + var fernTestValueServiceVariationID *string + obj.SetServiceVariationID(fernTestValueServiceVariationID) + assert.Equal(t, fernTestValueServiceVariationID, obj.ServiceVariationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTeamMemberID", func(t *testing.T) { + obj := &AppointmentSegment{} + var fernTestValueTeamMemberID string + obj.SetTeamMemberID(fernTestValueTeamMemberID) + assert.Equal(t, fernTestValueTeamMemberID, obj.TeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetServiceVariationVersion", func(t *testing.T) { + obj := &AppointmentSegment{} + var fernTestValueServiceVariationVersion *int64 + obj.SetServiceVariationVersion(fernTestValueServiceVariationVersion) + assert.Equal(t, fernTestValueServiceVariationVersion, obj.ServiceVariationVersion) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIntermissionMinutes", func(t *testing.T) { + obj := &AppointmentSegment{} + var fernTestValueIntermissionMinutes *int + obj.SetIntermissionMinutes(fernTestValueIntermissionMinutes) + assert.Equal(t, fernTestValueIntermissionMinutes, obj.IntermissionMinutes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAnyTeamMember", func(t *testing.T) { + obj := &AppointmentSegment{} + var fernTestValueAnyTeamMember *bool + obj.SetAnyTeamMember(fernTestValueAnyTeamMember) + assert.Equal(t, fernTestValueAnyTeamMember, obj.AnyTeamMember) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetResourceIDs", func(t *testing.T) { + obj := &AppointmentSegment{} + var fernTestValueResourceIDs []string + obj.SetResourceIDs(fernTestValueResourceIDs) + assert.Equal(t, fernTestValueResourceIDs, obj.ResourceIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersAppointmentSegment(t *testing.T) { + t.Run("GetDurationMinutes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AppointmentSegment{} + var expected *int + obj.DurationMinutes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDurationMinutes(), "getter should return the property value") + }) + + t.Run("GetDurationMinutes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AppointmentSegment{} + obj.DurationMinutes = nil + + // Act & Assert + assert.Nil(t, obj.GetDurationMinutes(), "getter should return nil when property is nil") + }) + + t.Run("GetDurationMinutes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AppointmentSegment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDurationMinutes() // Should return zero value + }) + + t.Run("GetServiceVariationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AppointmentSegment{} + var expected *string + obj.ServiceVariationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetServiceVariationID(), "getter should return the property value") + }) + + t.Run("GetServiceVariationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AppointmentSegment{} + obj.ServiceVariationID = nil + + // Act & Assert + assert.Nil(t, obj.GetServiceVariationID(), "getter should return nil when property is nil") + }) + + t.Run("GetServiceVariationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AppointmentSegment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetServiceVariationID() // Should return zero value + }) + + t.Run("GetTeamMemberID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AppointmentSegment{} + var expected string + obj.TeamMemberID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMemberID(), "getter should return the property value") + }) + + t.Run("GetTeamMemberID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AppointmentSegment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMemberID() // Should return zero value + }) + + t.Run("GetServiceVariationVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AppointmentSegment{} + var expected *int64 + obj.ServiceVariationVersion = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetServiceVariationVersion(), "getter should return the property value") + }) + + t.Run("GetServiceVariationVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AppointmentSegment{} + obj.ServiceVariationVersion = nil + + // Act & Assert + assert.Nil(t, obj.GetServiceVariationVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetServiceVariationVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AppointmentSegment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetServiceVariationVersion() // Should return zero value + }) + + t.Run("GetIntermissionMinutes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AppointmentSegment{} + var expected *int + obj.IntermissionMinutes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIntermissionMinutes(), "getter should return the property value") + }) + + t.Run("GetIntermissionMinutes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AppointmentSegment{} + obj.IntermissionMinutes = nil + + // Act & Assert + assert.Nil(t, obj.GetIntermissionMinutes(), "getter should return nil when property is nil") + }) + + t.Run("GetIntermissionMinutes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AppointmentSegment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIntermissionMinutes() // Should return zero value + }) + + t.Run("GetAnyTeamMember", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AppointmentSegment{} + var expected *bool + obj.AnyTeamMember = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAnyTeamMember(), "getter should return the property value") + }) + + t.Run("GetAnyTeamMember_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AppointmentSegment{} + obj.AnyTeamMember = nil + + // Act & Assert + assert.Nil(t, obj.GetAnyTeamMember(), "getter should return nil when property is nil") + }) + + t.Run("GetAnyTeamMember_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AppointmentSegment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAnyTeamMember() // Should return zero value + }) + + t.Run("GetResourceIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AppointmentSegment{} + var expected []string + obj.ResourceIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetResourceIDs(), "getter should return the property value") + }) + + t.Run("GetResourceIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AppointmentSegment{} + obj.ResourceIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetResourceIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetResourceIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AppointmentSegment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetResourceIDs() // Should return zero value + }) + +} + +func TestSettersMarkExplicitAppointmentSegment(t *testing.T) { + t.Run("SetDurationMinutes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AppointmentSegment{} + var fernTestValueDurationMinutes *int + + // Act + obj.SetDurationMinutes(fernTestValueDurationMinutes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetServiceVariationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AppointmentSegment{} + var fernTestValueServiceVariationID *string + + // Act + obj.SetServiceVariationID(fernTestValueServiceVariationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AppointmentSegment{} + var fernTestValueTeamMemberID string + + // Act + obj.SetTeamMemberID(fernTestValueTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetServiceVariationVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AppointmentSegment{} + var fernTestValueServiceVariationVersion *int64 + + // Act + obj.SetServiceVariationVersion(fernTestValueServiceVariationVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIntermissionMinutes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AppointmentSegment{} + var fernTestValueIntermissionMinutes *int + + // Act + obj.SetIntermissionMinutes(fernTestValueIntermissionMinutes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAnyTeamMember_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AppointmentSegment{} + var fernTestValueAnyTeamMember *bool + + // Act + obj.SetAnyTeamMember(fernTestValueAnyTeamMember) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetResourceIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AppointmentSegment{} + var fernTestValueResourceIDs []string + + // Act + obj.SetResourceIDs(fernTestValueResourceIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersAvailability(t *testing.T) { + t.Run("SetStartAt", func(t *testing.T) { + obj := &Availability{} + var fernTestValueStartAt *string + obj.SetStartAt(fernTestValueStartAt) + assert.Equal(t, fernTestValueStartAt, obj.StartAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &Availability{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppointmentSegments", func(t *testing.T) { + obj := &Availability{} + var fernTestValueAppointmentSegments []*AppointmentSegment + obj.SetAppointmentSegments(fernTestValueAppointmentSegments) + assert.Equal(t, fernTestValueAppointmentSegments, obj.AppointmentSegments) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersAvailability(t *testing.T) { + t.Run("GetStartAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Availability{} + var expected *string + obj.StartAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStartAt(), "getter should return the property value") + }) + + t.Run("GetStartAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Availability{} + obj.StartAt = nil + + // Act & Assert + assert.Nil(t, obj.GetStartAt(), "getter should return nil when property is nil") + }) + + t.Run("GetStartAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Availability + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStartAt() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Availability{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Availability{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Availability + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetAppointmentSegments", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Availability{} + var expected []*AppointmentSegment + obj.AppointmentSegments = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppointmentSegments(), "getter should return the property value") + }) + + t.Run("GetAppointmentSegments_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Availability{} + obj.AppointmentSegments = nil + + // Act & Assert + assert.Nil(t, obj.GetAppointmentSegments(), "getter should return nil when property is nil") + }) + + t.Run("GetAppointmentSegments_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Availability + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppointmentSegments() // Should return zero value + }) + +} + +func TestSettersMarkExplicitAvailability(t *testing.T) { + t.Run("SetStartAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Availability{} + var fernTestValueStartAt *string + + // Act + obj.SetStartAt(fernTestValueStartAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Availability{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppointmentSegments_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Availability{} + var fernTestValueAppointmentSegments []*AppointmentSegment + + // Act + obj.SetAppointmentSegments(fernTestValueAppointmentSegments) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBooking(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &Booking{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &Booking{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &Booking{} + var fernTestValueStatus *BookingStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &Booking{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &Booking{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStartAt", func(t *testing.T) { + obj := &Booking{} + var fernTestValueStartAt *string + obj.SetStartAt(fernTestValueStartAt) + assert.Equal(t, fernTestValueStartAt, obj.StartAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &Booking{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerID", func(t *testing.T) { + obj := &Booking{} + var fernTestValueCustomerID *string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerNote", func(t *testing.T) { + obj := &Booking{} + var fernTestValueCustomerNote *string + obj.SetCustomerNote(fernTestValueCustomerNote) + assert.Equal(t, fernTestValueCustomerNote, obj.CustomerNote) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSellerNote", func(t *testing.T) { + obj := &Booking{} + var fernTestValueSellerNote *string + obj.SetSellerNote(fernTestValueSellerNote) + assert.Equal(t, fernTestValueSellerNote, obj.SellerNote) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppointmentSegments", func(t *testing.T) { + obj := &Booking{} + var fernTestValueAppointmentSegments []*AppointmentSegment + obj.SetAppointmentSegments(fernTestValueAppointmentSegments) + assert.Equal(t, fernTestValueAppointmentSegments, obj.AppointmentSegments) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTransitionTimeMinutes", func(t *testing.T) { + obj := &Booking{} + var fernTestValueTransitionTimeMinutes *int + obj.SetTransitionTimeMinutes(fernTestValueTransitionTimeMinutes) + assert.Equal(t, fernTestValueTransitionTimeMinutes, obj.TransitionTimeMinutes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAllDay", func(t *testing.T) { + obj := &Booking{} + var fernTestValueAllDay *bool + obj.SetAllDay(fernTestValueAllDay) + assert.Equal(t, fernTestValueAllDay, obj.AllDay) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationType", func(t *testing.T) { + obj := &Booking{} + var fernTestValueLocationType *BusinessAppointmentSettingsBookingLocationType + obj.SetLocationType(fernTestValueLocationType) + assert.Equal(t, fernTestValueLocationType, obj.LocationType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatorDetails", func(t *testing.T) { + obj := &Booking{} + var fernTestValueCreatorDetails *BookingCreatorDetails + obj.SetCreatorDetails(fernTestValueCreatorDetails) + assert.Equal(t, fernTestValueCreatorDetails, obj.CreatorDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSource", func(t *testing.T) { + obj := &Booking{} + var fernTestValueSource *BookingBookingSource + obj.SetSource(fernTestValueSource) + assert.Equal(t, fernTestValueSource, obj.Source) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAddress", func(t *testing.T) { + obj := &Booking{} + var fernTestValueAddress *Address + obj.SetAddress(fernTestValueAddress) + assert.Equal(t, fernTestValueAddress, obj.Address) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBooking(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Booking + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var expected *int + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Booking + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var expected *BookingStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Booking + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Booking + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Booking + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetStartAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var expected *string + obj.StartAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStartAt(), "getter should return the property value") + }) + + t.Run("GetStartAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + obj.StartAt = nil + + // Act & Assert + assert.Nil(t, obj.GetStartAt(), "getter should return nil when property is nil") + }) + + t.Run("GetStartAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Booking + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStartAt() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Booking + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetCustomerID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var expected *string + obj.CustomerID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomerID(), "getter should return the property value") + }) + + t.Run("GetCustomerID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + obj.CustomerID = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomerID(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomerID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Booking + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomerID() // Should return zero value + }) + + t.Run("GetCustomerNote", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var expected *string + obj.CustomerNote = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomerNote(), "getter should return the property value") + }) + + t.Run("GetCustomerNote_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + obj.CustomerNote = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomerNote(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomerNote_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Booking + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomerNote() // Should return zero value + }) + + t.Run("GetSellerNote", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var expected *string + obj.SellerNote = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSellerNote(), "getter should return the property value") + }) + + t.Run("GetSellerNote_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + obj.SellerNote = nil + + // Act & Assert + assert.Nil(t, obj.GetSellerNote(), "getter should return nil when property is nil") + }) + + t.Run("GetSellerNote_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Booking + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSellerNote() // Should return zero value + }) + + t.Run("GetAppointmentSegments", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var expected []*AppointmentSegment + obj.AppointmentSegments = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppointmentSegments(), "getter should return the property value") + }) + + t.Run("GetAppointmentSegments_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + obj.AppointmentSegments = nil + + // Act & Assert + assert.Nil(t, obj.GetAppointmentSegments(), "getter should return nil when property is nil") + }) + + t.Run("GetAppointmentSegments_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Booking + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppointmentSegments() // Should return zero value + }) + + t.Run("GetTransitionTimeMinutes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var expected *int + obj.TransitionTimeMinutes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTransitionTimeMinutes(), "getter should return the property value") + }) + + t.Run("GetTransitionTimeMinutes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + obj.TransitionTimeMinutes = nil + + // Act & Assert + assert.Nil(t, obj.GetTransitionTimeMinutes(), "getter should return nil when property is nil") + }) + + t.Run("GetTransitionTimeMinutes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Booking + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTransitionTimeMinutes() // Should return zero value + }) + + t.Run("GetAllDay", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var expected *bool + obj.AllDay = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAllDay(), "getter should return the property value") + }) + + t.Run("GetAllDay_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + obj.AllDay = nil + + // Act & Assert + assert.Nil(t, obj.GetAllDay(), "getter should return nil when property is nil") + }) + + t.Run("GetAllDay_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Booking + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAllDay() // Should return zero value + }) + + t.Run("GetLocationType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var expected *BusinessAppointmentSettingsBookingLocationType + obj.LocationType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationType(), "getter should return the property value") + }) + + t.Run("GetLocationType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + obj.LocationType = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationType(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Booking + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationType() // Should return zero value + }) + + t.Run("GetCreatorDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var expected *BookingCreatorDetails + obj.CreatorDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatorDetails(), "getter should return the property value") + }) + + t.Run("GetCreatorDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + obj.CreatorDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatorDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatorDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Booking + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatorDetails() // Should return zero value + }) + + t.Run("GetSource", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var expected *BookingBookingSource + obj.Source = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSource(), "getter should return the property value") + }) + + t.Run("GetSource_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + obj.Source = nil + + // Act & Assert + assert.Nil(t, obj.GetSource(), "getter should return nil when property is nil") + }) + + t.Run("GetSource_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Booking + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSource() // Should return zero value + }) + + t.Run("GetAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var expected *Address + obj.Address = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAddress(), "getter should return the property value") + }) + + t.Run("GetAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + obj.Address = nil + + // Act & Assert + assert.Nil(t, obj.GetAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Booking + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAddress() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBooking(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var fernTestValueStatus *BookingStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStartAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var fernTestValueStartAt *string + + // Act + obj.SetStartAt(fernTestValueStartAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var fernTestValueCustomerID *string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerNote_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var fernTestValueCustomerNote *string + + // Act + obj.SetCustomerNote(fernTestValueCustomerNote) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSellerNote_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var fernTestValueSellerNote *string + + // Act + obj.SetSellerNote(fernTestValueSellerNote) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppointmentSegments_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var fernTestValueAppointmentSegments []*AppointmentSegment + + // Act + obj.SetAppointmentSegments(fernTestValueAppointmentSegments) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTransitionTimeMinutes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var fernTestValueTransitionTimeMinutes *int + + // Act + obj.SetTransitionTimeMinutes(fernTestValueTransitionTimeMinutes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAllDay_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var fernTestValueAllDay *bool + + // Act + obj.SetAllDay(fernTestValueAllDay) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var fernTestValueLocationType *BusinessAppointmentSettingsBookingLocationType + + // Act + obj.SetLocationType(fernTestValueLocationType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatorDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var fernTestValueCreatorDetails *BookingCreatorDetails + + // Act + obj.SetCreatorDetails(fernTestValueCreatorDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSource_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var fernTestValueSource *BookingBookingSource + + // Act + obj.SetSource(fernTestValueSource) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + var fernTestValueAddress *Address + + // Act + obj.SetAddress(fernTestValueAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBookingCreatorDetails(t *testing.T) { + t.Run("SetCreatorType", func(t *testing.T) { + obj := &BookingCreatorDetails{} + var fernTestValueCreatorType *BookingCreatorDetailsCreatorType + obj.SetCreatorType(fernTestValueCreatorType) + assert.Equal(t, fernTestValueCreatorType, obj.CreatorType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTeamMemberID", func(t *testing.T) { + obj := &BookingCreatorDetails{} + var fernTestValueTeamMemberID *string + obj.SetTeamMemberID(fernTestValueTeamMemberID) + assert.Equal(t, fernTestValueTeamMemberID, obj.TeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerID", func(t *testing.T) { + obj := &BookingCreatorDetails{} + var fernTestValueCustomerID *string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBookingCreatorDetails(t *testing.T) { + t.Run("GetCreatorType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatorDetails{} + var expected *BookingCreatorDetailsCreatorType + obj.CreatorType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatorType(), "getter should return the property value") + }) + + t.Run("GetCreatorType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatorDetails{} + obj.CreatorType = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatorType(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatorType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCreatorDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatorType() // Should return zero value + }) + + t.Run("GetTeamMemberID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatorDetails{} + var expected *string + obj.TeamMemberID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMemberID(), "getter should return the property value") + }) + + t.Run("GetTeamMemberID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatorDetails{} + obj.TeamMemberID = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMemberID(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMemberID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCreatorDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMemberID() // Should return zero value + }) + + t.Run("GetCustomerID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatorDetails{} + var expected *string + obj.CustomerID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomerID(), "getter should return the property value") + }) + + t.Run("GetCustomerID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatorDetails{} + obj.CustomerID = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomerID(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomerID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCreatorDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomerID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBookingCreatorDetails(t *testing.T) { + t.Run("SetCreatorType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatorDetails{} + var fernTestValueCreatorType *BookingCreatorDetailsCreatorType + + // Act + obj.SetCreatorType(fernTestValueCreatorType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatorDetails{} + var fernTestValueTeamMemberID *string + + // Act + obj.SetTeamMemberID(fernTestValueTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatorDetails{} + var fernTestValueCustomerID *string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkRetrieveBookingsResponse(t *testing.T) { + t.Run("SetBookings", func(t *testing.T) { + obj := &BulkRetrieveBookingsResponse{} + var fernTestValueBookings map[string]*GetBookingResponse + obj.SetBookings(fernTestValueBookings) + assert.Equal(t, fernTestValueBookings, obj.Bookings) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &BulkRetrieveBookingsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkRetrieveBookingsResponse(t *testing.T) { + t.Run("GetBookings", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveBookingsResponse{} + var expected map[string]*GetBookingResponse + obj.Bookings = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBookings(), "getter should return the property value") + }) + + t.Run("GetBookings_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveBookingsResponse{} + obj.Bookings = nil + + // Act & Assert + assert.Nil(t, obj.GetBookings(), "getter should return nil when property is nil") + }) + + t.Run("GetBookings_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkRetrieveBookingsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBookings() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveBookingsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveBookingsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkRetrieveBookingsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkRetrieveBookingsResponse(t *testing.T) { + t.Run("SetBookings_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveBookingsResponse{} + var fernTestValueBookings map[string]*GetBookingResponse + + // Act + obj.SetBookings(fernTestValueBookings) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveBookingsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkRetrieveTeamMemberBookingProfilesResponse(t *testing.T) { + t.Run("SetTeamMemberBookingProfiles", func(t *testing.T) { + obj := &BulkRetrieveTeamMemberBookingProfilesResponse{} + var fernTestValueTeamMemberBookingProfiles map[string]*GetTeamMemberBookingProfileResponse + obj.SetTeamMemberBookingProfiles(fernTestValueTeamMemberBookingProfiles) + assert.Equal(t, fernTestValueTeamMemberBookingProfiles, obj.TeamMemberBookingProfiles) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &BulkRetrieveTeamMemberBookingProfilesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkRetrieveTeamMemberBookingProfilesResponse(t *testing.T) { + t.Run("GetTeamMemberBookingProfiles", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveTeamMemberBookingProfilesResponse{} + var expected map[string]*GetTeamMemberBookingProfileResponse + obj.TeamMemberBookingProfiles = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMemberBookingProfiles(), "getter should return the property value") + }) + + t.Run("GetTeamMemberBookingProfiles_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveTeamMemberBookingProfilesResponse{} + obj.TeamMemberBookingProfiles = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMemberBookingProfiles(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMemberBookingProfiles_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkRetrieveTeamMemberBookingProfilesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMemberBookingProfiles() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveTeamMemberBookingProfilesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveTeamMemberBookingProfilesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkRetrieveTeamMemberBookingProfilesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkRetrieveTeamMemberBookingProfilesResponse(t *testing.T) { + t.Run("SetTeamMemberBookingProfiles_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveTeamMemberBookingProfilesResponse{} + var fernTestValueTeamMemberBookingProfiles map[string]*GetTeamMemberBookingProfileResponse + + // Act + obj.SetTeamMemberBookingProfiles(fernTestValueTeamMemberBookingProfiles) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveTeamMemberBookingProfilesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBusinessAppointmentSettings(t *testing.T) { + t.Run("SetLocationTypes", func(t *testing.T) { + obj := &BusinessAppointmentSettings{} + var fernTestValueLocationTypes []BusinessAppointmentSettingsBookingLocationType + obj.SetLocationTypes(fernTestValueLocationTypes) + assert.Equal(t, fernTestValueLocationTypes, obj.LocationTypes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAlignmentTime", func(t *testing.T) { + obj := &BusinessAppointmentSettings{} + var fernTestValueAlignmentTime *BusinessAppointmentSettingsAlignmentTime + obj.SetAlignmentTime(fernTestValueAlignmentTime) + assert.Equal(t, fernTestValueAlignmentTime, obj.AlignmentTime) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMinBookingLeadTimeSeconds", func(t *testing.T) { + obj := &BusinessAppointmentSettings{} + var fernTestValueMinBookingLeadTimeSeconds *int + obj.SetMinBookingLeadTimeSeconds(fernTestValueMinBookingLeadTimeSeconds) + assert.Equal(t, fernTestValueMinBookingLeadTimeSeconds, obj.MinBookingLeadTimeSeconds) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMaxBookingLeadTimeSeconds", func(t *testing.T) { + obj := &BusinessAppointmentSettings{} + var fernTestValueMaxBookingLeadTimeSeconds *int + obj.SetMaxBookingLeadTimeSeconds(fernTestValueMaxBookingLeadTimeSeconds) + assert.Equal(t, fernTestValueMaxBookingLeadTimeSeconds, obj.MaxBookingLeadTimeSeconds) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAnyTeamMemberBookingEnabled", func(t *testing.T) { + obj := &BusinessAppointmentSettings{} + var fernTestValueAnyTeamMemberBookingEnabled *bool + obj.SetAnyTeamMemberBookingEnabled(fernTestValueAnyTeamMemberBookingEnabled) + assert.Equal(t, fernTestValueAnyTeamMemberBookingEnabled, obj.AnyTeamMemberBookingEnabled) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMultipleServiceBookingEnabled", func(t *testing.T) { + obj := &BusinessAppointmentSettings{} + var fernTestValueMultipleServiceBookingEnabled *bool + obj.SetMultipleServiceBookingEnabled(fernTestValueMultipleServiceBookingEnabled) + assert.Equal(t, fernTestValueMultipleServiceBookingEnabled, obj.MultipleServiceBookingEnabled) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMaxAppointmentsPerDayLimitType", func(t *testing.T) { + obj := &BusinessAppointmentSettings{} + var fernTestValueMaxAppointmentsPerDayLimitType *BusinessAppointmentSettingsMaxAppointmentsPerDayLimitType + obj.SetMaxAppointmentsPerDayLimitType(fernTestValueMaxAppointmentsPerDayLimitType) + assert.Equal(t, fernTestValueMaxAppointmentsPerDayLimitType, obj.MaxAppointmentsPerDayLimitType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMaxAppointmentsPerDayLimit", func(t *testing.T) { + obj := &BusinessAppointmentSettings{} + var fernTestValueMaxAppointmentsPerDayLimit *int + obj.SetMaxAppointmentsPerDayLimit(fernTestValueMaxAppointmentsPerDayLimit) + assert.Equal(t, fernTestValueMaxAppointmentsPerDayLimit, obj.MaxAppointmentsPerDayLimit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCancellationWindowSeconds", func(t *testing.T) { + obj := &BusinessAppointmentSettings{} + var fernTestValueCancellationWindowSeconds *int + obj.SetCancellationWindowSeconds(fernTestValueCancellationWindowSeconds) + assert.Equal(t, fernTestValueCancellationWindowSeconds, obj.CancellationWindowSeconds) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCancellationFeeMoney", func(t *testing.T) { + obj := &BusinessAppointmentSettings{} + var fernTestValueCancellationFeeMoney *Money + obj.SetCancellationFeeMoney(fernTestValueCancellationFeeMoney) + assert.Equal(t, fernTestValueCancellationFeeMoney, obj.CancellationFeeMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCancellationPolicy", func(t *testing.T) { + obj := &BusinessAppointmentSettings{} + var fernTestValueCancellationPolicy *BusinessAppointmentSettingsCancellationPolicy + obj.SetCancellationPolicy(fernTestValueCancellationPolicy) + assert.Equal(t, fernTestValueCancellationPolicy, obj.CancellationPolicy) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCancellationPolicyText", func(t *testing.T) { + obj := &BusinessAppointmentSettings{} + var fernTestValueCancellationPolicyText *string + obj.SetCancellationPolicyText(fernTestValueCancellationPolicyText) + assert.Equal(t, fernTestValueCancellationPolicyText, obj.CancellationPolicyText) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSkipBookingFlowStaffSelection", func(t *testing.T) { + obj := &BusinessAppointmentSettings{} + var fernTestValueSkipBookingFlowStaffSelection *bool + obj.SetSkipBookingFlowStaffSelection(fernTestValueSkipBookingFlowStaffSelection) + assert.Equal(t, fernTestValueSkipBookingFlowStaffSelection, obj.SkipBookingFlowStaffSelection) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBusinessAppointmentSettings(t *testing.T) { + t.Run("GetLocationTypes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + var expected []BusinessAppointmentSettingsBookingLocationType + obj.LocationTypes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationTypes(), "getter should return the property value") + }) + + t.Run("GetLocationTypes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + obj.LocationTypes = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationTypes(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationTypes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessAppointmentSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationTypes() // Should return zero value + }) + + t.Run("GetAlignmentTime", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + var expected *BusinessAppointmentSettingsAlignmentTime + obj.AlignmentTime = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAlignmentTime(), "getter should return the property value") + }) + + t.Run("GetAlignmentTime_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + obj.AlignmentTime = nil + + // Act & Assert + assert.Nil(t, obj.GetAlignmentTime(), "getter should return nil when property is nil") + }) + + t.Run("GetAlignmentTime_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessAppointmentSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAlignmentTime() // Should return zero value + }) + + t.Run("GetMinBookingLeadTimeSeconds", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + var expected *int + obj.MinBookingLeadTimeSeconds = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMinBookingLeadTimeSeconds(), "getter should return the property value") + }) + + t.Run("GetMinBookingLeadTimeSeconds_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + obj.MinBookingLeadTimeSeconds = nil + + // Act & Assert + assert.Nil(t, obj.GetMinBookingLeadTimeSeconds(), "getter should return nil when property is nil") + }) + + t.Run("GetMinBookingLeadTimeSeconds_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessAppointmentSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMinBookingLeadTimeSeconds() // Should return zero value + }) + + t.Run("GetMaxBookingLeadTimeSeconds", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + var expected *int + obj.MaxBookingLeadTimeSeconds = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMaxBookingLeadTimeSeconds(), "getter should return the property value") + }) + + t.Run("GetMaxBookingLeadTimeSeconds_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + obj.MaxBookingLeadTimeSeconds = nil + + // Act & Assert + assert.Nil(t, obj.GetMaxBookingLeadTimeSeconds(), "getter should return nil when property is nil") + }) + + t.Run("GetMaxBookingLeadTimeSeconds_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessAppointmentSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMaxBookingLeadTimeSeconds() // Should return zero value + }) + + t.Run("GetAnyTeamMemberBookingEnabled", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + var expected *bool + obj.AnyTeamMemberBookingEnabled = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAnyTeamMemberBookingEnabled(), "getter should return the property value") + }) + + t.Run("GetAnyTeamMemberBookingEnabled_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + obj.AnyTeamMemberBookingEnabled = nil + + // Act & Assert + assert.Nil(t, obj.GetAnyTeamMemberBookingEnabled(), "getter should return nil when property is nil") + }) + + t.Run("GetAnyTeamMemberBookingEnabled_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessAppointmentSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAnyTeamMemberBookingEnabled() // Should return zero value + }) + + t.Run("GetMultipleServiceBookingEnabled", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + var expected *bool + obj.MultipleServiceBookingEnabled = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMultipleServiceBookingEnabled(), "getter should return the property value") + }) + + t.Run("GetMultipleServiceBookingEnabled_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + obj.MultipleServiceBookingEnabled = nil + + // Act & Assert + assert.Nil(t, obj.GetMultipleServiceBookingEnabled(), "getter should return nil when property is nil") + }) + + t.Run("GetMultipleServiceBookingEnabled_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessAppointmentSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMultipleServiceBookingEnabled() // Should return zero value + }) + + t.Run("GetMaxAppointmentsPerDayLimitType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + var expected *BusinessAppointmentSettingsMaxAppointmentsPerDayLimitType + obj.MaxAppointmentsPerDayLimitType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMaxAppointmentsPerDayLimitType(), "getter should return the property value") + }) + + t.Run("GetMaxAppointmentsPerDayLimitType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + obj.MaxAppointmentsPerDayLimitType = nil + + // Act & Assert + assert.Nil(t, obj.GetMaxAppointmentsPerDayLimitType(), "getter should return nil when property is nil") + }) + + t.Run("GetMaxAppointmentsPerDayLimitType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessAppointmentSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMaxAppointmentsPerDayLimitType() // Should return zero value + }) + + t.Run("GetMaxAppointmentsPerDayLimit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + var expected *int + obj.MaxAppointmentsPerDayLimit = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMaxAppointmentsPerDayLimit(), "getter should return the property value") + }) + + t.Run("GetMaxAppointmentsPerDayLimit_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + obj.MaxAppointmentsPerDayLimit = nil + + // Act & Assert + assert.Nil(t, obj.GetMaxAppointmentsPerDayLimit(), "getter should return nil when property is nil") + }) + + t.Run("GetMaxAppointmentsPerDayLimit_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessAppointmentSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMaxAppointmentsPerDayLimit() // Should return zero value + }) + + t.Run("GetCancellationWindowSeconds", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + var expected *int + obj.CancellationWindowSeconds = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCancellationWindowSeconds(), "getter should return the property value") + }) + + t.Run("GetCancellationWindowSeconds_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + obj.CancellationWindowSeconds = nil + + // Act & Assert + assert.Nil(t, obj.GetCancellationWindowSeconds(), "getter should return nil when property is nil") + }) + + t.Run("GetCancellationWindowSeconds_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessAppointmentSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCancellationWindowSeconds() // Should return zero value + }) + + t.Run("GetCancellationFeeMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + var expected *Money + obj.CancellationFeeMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCancellationFeeMoney(), "getter should return the property value") + }) + + t.Run("GetCancellationFeeMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + obj.CancellationFeeMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetCancellationFeeMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetCancellationFeeMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessAppointmentSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCancellationFeeMoney() // Should return zero value + }) + + t.Run("GetCancellationPolicy", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + var expected *BusinessAppointmentSettingsCancellationPolicy + obj.CancellationPolicy = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCancellationPolicy(), "getter should return the property value") + }) + + t.Run("GetCancellationPolicy_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + obj.CancellationPolicy = nil + + // Act & Assert + assert.Nil(t, obj.GetCancellationPolicy(), "getter should return nil when property is nil") + }) + + t.Run("GetCancellationPolicy_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessAppointmentSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCancellationPolicy() // Should return zero value + }) + + t.Run("GetCancellationPolicyText", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + var expected *string + obj.CancellationPolicyText = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCancellationPolicyText(), "getter should return the property value") + }) + + t.Run("GetCancellationPolicyText_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + obj.CancellationPolicyText = nil + + // Act & Assert + assert.Nil(t, obj.GetCancellationPolicyText(), "getter should return nil when property is nil") + }) + + t.Run("GetCancellationPolicyText_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessAppointmentSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCancellationPolicyText() // Should return zero value + }) + + t.Run("GetSkipBookingFlowStaffSelection", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + var expected *bool + obj.SkipBookingFlowStaffSelection = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSkipBookingFlowStaffSelection(), "getter should return the property value") + }) + + t.Run("GetSkipBookingFlowStaffSelection_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + obj.SkipBookingFlowStaffSelection = nil + + // Act & Assert + assert.Nil(t, obj.GetSkipBookingFlowStaffSelection(), "getter should return nil when property is nil") + }) + + t.Run("GetSkipBookingFlowStaffSelection_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessAppointmentSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSkipBookingFlowStaffSelection() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBusinessAppointmentSettings(t *testing.T) { + t.Run("SetLocationTypes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + var fernTestValueLocationTypes []BusinessAppointmentSettingsBookingLocationType + + // Act + obj.SetLocationTypes(fernTestValueLocationTypes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAlignmentTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + var fernTestValueAlignmentTime *BusinessAppointmentSettingsAlignmentTime + + // Act + obj.SetAlignmentTime(fernTestValueAlignmentTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMinBookingLeadTimeSeconds_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + var fernTestValueMinBookingLeadTimeSeconds *int + + // Act + obj.SetMinBookingLeadTimeSeconds(fernTestValueMinBookingLeadTimeSeconds) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMaxBookingLeadTimeSeconds_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + var fernTestValueMaxBookingLeadTimeSeconds *int + + // Act + obj.SetMaxBookingLeadTimeSeconds(fernTestValueMaxBookingLeadTimeSeconds) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAnyTeamMemberBookingEnabled_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + var fernTestValueAnyTeamMemberBookingEnabled *bool + + // Act + obj.SetAnyTeamMemberBookingEnabled(fernTestValueAnyTeamMemberBookingEnabled) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMultipleServiceBookingEnabled_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + var fernTestValueMultipleServiceBookingEnabled *bool + + // Act + obj.SetMultipleServiceBookingEnabled(fernTestValueMultipleServiceBookingEnabled) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMaxAppointmentsPerDayLimitType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + var fernTestValueMaxAppointmentsPerDayLimitType *BusinessAppointmentSettingsMaxAppointmentsPerDayLimitType + + // Act + obj.SetMaxAppointmentsPerDayLimitType(fernTestValueMaxAppointmentsPerDayLimitType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMaxAppointmentsPerDayLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + var fernTestValueMaxAppointmentsPerDayLimit *int + + // Act + obj.SetMaxAppointmentsPerDayLimit(fernTestValueMaxAppointmentsPerDayLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCancellationWindowSeconds_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + var fernTestValueCancellationWindowSeconds *int + + // Act + obj.SetCancellationWindowSeconds(fernTestValueCancellationWindowSeconds) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCancellationFeeMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + var fernTestValueCancellationFeeMoney *Money + + // Act + obj.SetCancellationFeeMoney(fernTestValueCancellationFeeMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCancellationPolicy_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + var fernTestValueCancellationPolicy *BusinessAppointmentSettingsCancellationPolicy + + // Act + obj.SetCancellationPolicy(fernTestValueCancellationPolicy) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCancellationPolicyText_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + var fernTestValueCancellationPolicyText *string + + // Act + obj.SetCancellationPolicyText(fernTestValueCancellationPolicyText) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSkipBookingFlowStaffSelection_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + var fernTestValueSkipBookingFlowStaffSelection *bool + + // Act + obj.SetSkipBookingFlowStaffSelection(fernTestValueSkipBookingFlowStaffSelection) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBusinessBookingProfile(t *testing.T) { + t.Run("SetSellerID", func(t *testing.T) { + obj := &BusinessBookingProfile{} + var fernTestValueSellerID *string + obj.SetSellerID(fernTestValueSellerID) + assert.Equal(t, fernTestValueSellerID, obj.SellerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &BusinessBookingProfile{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBookingEnabled", func(t *testing.T) { + obj := &BusinessBookingProfile{} + var fernTestValueBookingEnabled *bool + obj.SetBookingEnabled(fernTestValueBookingEnabled) + assert.Equal(t, fernTestValueBookingEnabled, obj.BookingEnabled) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerTimezoneChoice", func(t *testing.T) { + obj := &BusinessBookingProfile{} + var fernTestValueCustomerTimezoneChoice *BusinessBookingProfileCustomerTimezoneChoice + obj.SetCustomerTimezoneChoice(fernTestValueCustomerTimezoneChoice) + assert.Equal(t, fernTestValueCustomerTimezoneChoice, obj.CustomerTimezoneChoice) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBookingPolicy", func(t *testing.T) { + obj := &BusinessBookingProfile{} + var fernTestValueBookingPolicy *BusinessBookingProfileBookingPolicy + obj.SetBookingPolicy(fernTestValueBookingPolicy) + assert.Equal(t, fernTestValueBookingPolicy, obj.BookingPolicy) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAllowUserCancel", func(t *testing.T) { + obj := &BusinessBookingProfile{} + var fernTestValueAllowUserCancel *bool + obj.SetAllowUserCancel(fernTestValueAllowUserCancel) + assert.Equal(t, fernTestValueAllowUserCancel, obj.AllowUserCancel) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBusinessAppointmentSettings", func(t *testing.T) { + obj := &BusinessBookingProfile{} + var fernTestValueBusinessAppointmentSettings *BusinessAppointmentSettings + obj.SetBusinessAppointmentSettings(fernTestValueBusinessAppointmentSettings) + assert.Equal(t, fernTestValueBusinessAppointmentSettings, obj.BusinessAppointmentSettings) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSupportSellerLevelWrites", func(t *testing.T) { + obj := &BusinessBookingProfile{} + var fernTestValueSupportSellerLevelWrites *bool + obj.SetSupportSellerLevelWrites(fernTestValueSupportSellerLevelWrites) + assert.Equal(t, fernTestValueSupportSellerLevelWrites, obj.SupportSellerLevelWrites) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBusinessBookingProfile(t *testing.T) { + t.Run("GetSellerID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessBookingProfile{} + var expected *string + obj.SellerID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSellerID(), "getter should return the property value") + }) + + t.Run("GetSellerID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessBookingProfile{} + obj.SellerID = nil + + // Act & Assert + assert.Nil(t, obj.GetSellerID(), "getter should return nil when property is nil") + }) + + t.Run("GetSellerID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessBookingProfile + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSellerID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessBookingProfile{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessBookingProfile{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessBookingProfile + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetBookingEnabled", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessBookingProfile{} + var expected *bool + obj.BookingEnabled = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBookingEnabled(), "getter should return the property value") + }) + + t.Run("GetBookingEnabled_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessBookingProfile{} + obj.BookingEnabled = nil + + // Act & Assert + assert.Nil(t, obj.GetBookingEnabled(), "getter should return nil when property is nil") + }) + + t.Run("GetBookingEnabled_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessBookingProfile + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBookingEnabled() // Should return zero value + }) + + t.Run("GetCustomerTimezoneChoice", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessBookingProfile{} + var expected *BusinessBookingProfileCustomerTimezoneChoice + obj.CustomerTimezoneChoice = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomerTimezoneChoice(), "getter should return the property value") + }) + + t.Run("GetCustomerTimezoneChoice_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessBookingProfile{} + obj.CustomerTimezoneChoice = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomerTimezoneChoice(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomerTimezoneChoice_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessBookingProfile + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomerTimezoneChoice() // Should return zero value + }) + + t.Run("GetBookingPolicy", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessBookingProfile{} + var expected *BusinessBookingProfileBookingPolicy + obj.BookingPolicy = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBookingPolicy(), "getter should return the property value") + }) + + t.Run("GetBookingPolicy_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessBookingProfile{} + obj.BookingPolicy = nil + + // Act & Assert + assert.Nil(t, obj.GetBookingPolicy(), "getter should return nil when property is nil") + }) + + t.Run("GetBookingPolicy_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessBookingProfile + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBookingPolicy() // Should return zero value + }) + + t.Run("GetAllowUserCancel", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessBookingProfile{} + var expected *bool + obj.AllowUserCancel = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAllowUserCancel(), "getter should return the property value") + }) + + t.Run("GetAllowUserCancel_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessBookingProfile{} + obj.AllowUserCancel = nil + + // Act & Assert + assert.Nil(t, obj.GetAllowUserCancel(), "getter should return nil when property is nil") + }) + + t.Run("GetAllowUserCancel_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessBookingProfile + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAllowUserCancel() // Should return zero value + }) + + t.Run("GetBusinessAppointmentSettings", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessBookingProfile{} + var expected *BusinessAppointmentSettings + obj.BusinessAppointmentSettings = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBusinessAppointmentSettings(), "getter should return the property value") + }) + + t.Run("GetBusinessAppointmentSettings_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessBookingProfile{} + obj.BusinessAppointmentSettings = nil + + // Act & Assert + assert.Nil(t, obj.GetBusinessAppointmentSettings(), "getter should return nil when property is nil") + }) + + t.Run("GetBusinessAppointmentSettings_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessBookingProfile + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBusinessAppointmentSettings() // Should return zero value + }) + + t.Run("GetSupportSellerLevelWrites", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessBookingProfile{} + var expected *bool + obj.SupportSellerLevelWrites = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSupportSellerLevelWrites(), "getter should return the property value") + }) + + t.Run("GetSupportSellerLevelWrites_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessBookingProfile{} + obj.SupportSellerLevelWrites = nil + + // Act & Assert + assert.Nil(t, obj.GetSupportSellerLevelWrites(), "getter should return nil when property is nil") + }) + + t.Run("GetSupportSellerLevelWrites_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessBookingProfile + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSupportSellerLevelWrites() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBusinessBookingProfile(t *testing.T) { + t.Run("SetSellerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessBookingProfile{} + var fernTestValueSellerID *string + + // Act + obj.SetSellerID(fernTestValueSellerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessBookingProfile{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBookingEnabled_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessBookingProfile{} + var fernTestValueBookingEnabled *bool + + // Act + obj.SetBookingEnabled(fernTestValueBookingEnabled) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerTimezoneChoice_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessBookingProfile{} + var fernTestValueCustomerTimezoneChoice *BusinessBookingProfileCustomerTimezoneChoice + + // Act + obj.SetCustomerTimezoneChoice(fernTestValueCustomerTimezoneChoice) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBookingPolicy_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessBookingProfile{} + var fernTestValueBookingPolicy *BusinessBookingProfileBookingPolicy + + // Act + obj.SetBookingPolicy(fernTestValueBookingPolicy) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAllowUserCancel_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessBookingProfile{} + var fernTestValueAllowUserCancel *bool + + // Act + obj.SetAllowUserCancel(fernTestValueAllowUserCancel) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBusinessAppointmentSettings_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessBookingProfile{} + var fernTestValueBusinessAppointmentSettings *BusinessAppointmentSettings + + // Act + obj.SetBusinessAppointmentSettings(fernTestValueBusinessAppointmentSettings) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSupportSellerLevelWrites_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessBookingProfile{} + var fernTestValueSupportSellerLevelWrites *bool + + // Act + obj.SetSupportSellerLevelWrites(fernTestValueSupportSellerLevelWrites) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCancelBookingResponse(t *testing.T) { + t.Run("SetBooking", func(t *testing.T) { + obj := &CancelBookingResponse{} + var fernTestValueBooking *Booking + obj.SetBooking(fernTestValueBooking) + assert.Equal(t, fernTestValueBooking, obj.Booking) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &CancelBookingResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCancelBookingResponse(t *testing.T) { + t.Run("GetBooking", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelBookingResponse{} + var expected *Booking + obj.Booking = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBooking(), "getter should return the property value") + }) + + t.Run("GetBooking_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelBookingResponse{} + obj.Booking = nil + + // Act & Assert + assert.Nil(t, obj.GetBooking(), "getter should return nil when property is nil") + }) + + t.Run("GetBooking_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelBookingResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBooking() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelBookingResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelBookingResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelBookingResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCancelBookingResponse(t *testing.T) { + t.Run("SetBooking_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelBookingResponse{} + var fernTestValueBooking *Booking + + // Act + obj.SetBooking(fernTestValueBooking) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelBookingResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateBookingResponse(t *testing.T) { + t.Run("SetBooking", func(t *testing.T) { + obj := &CreateBookingResponse{} + var fernTestValueBooking *Booking + obj.SetBooking(fernTestValueBooking) + assert.Equal(t, fernTestValueBooking, obj.Booking) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateBookingResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateBookingResponse(t *testing.T) { + t.Run("GetBooking", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBookingResponse{} + var expected *Booking + obj.Booking = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBooking(), "getter should return the property value") + }) + + t.Run("GetBooking_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBookingResponse{} + obj.Booking = nil + + // Act & Assert + assert.Nil(t, obj.GetBooking(), "getter should return nil when property is nil") + }) + + t.Run("GetBooking_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateBookingResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBooking() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBookingResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBookingResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateBookingResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateBookingResponse(t *testing.T) { + t.Run("SetBooking_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBookingResponse{} + var fernTestValueBooking *Booking + + // Act + obj.SetBooking(fernTestValueBooking) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBookingResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetBookingResponse(t *testing.T) { + t.Run("SetBooking", func(t *testing.T) { + obj := &GetBookingResponse{} + var fernTestValueBooking *Booking + obj.SetBooking(fernTestValueBooking) + assert.Equal(t, fernTestValueBooking, obj.Booking) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &GetBookingResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetBookingResponse(t *testing.T) { + t.Run("GetBooking", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBookingResponse{} + var expected *Booking + obj.Booking = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBooking(), "getter should return the property value") + }) + + t.Run("GetBooking_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBookingResponse{} + obj.Booking = nil + + // Act & Assert + assert.Nil(t, obj.GetBooking(), "getter should return nil when property is nil") + }) + + t.Run("GetBooking_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetBookingResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBooking() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBookingResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBookingResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetBookingResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetBookingResponse(t *testing.T) { + t.Run("SetBooking_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBookingResponse{} + var fernTestValueBooking *Booking + + // Act + obj.SetBooking(fernTestValueBooking) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBookingResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetBusinessBookingProfileResponse(t *testing.T) { + t.Run("SetBusinessBookingProfile", func(t *testing.T) { + obj := &GetBusinessBookingProfileResponse{} + var fernTestValueBusinessBookingProfile *BusinessBookingProfile + obj.SetBusinessBookingProfile(fernTestValueBusinessBookingProfile) + assert.Equal(t, fernTestValueBusinessBookingProfile, obj.BusinessBookingProfile) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &GetBusinessBookingProfileResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetBusinessBookingProfileResponse(t *testing.T) { + t.Run("GetBusinessBookingProfile", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBusinessBookingProfileResponse{} + var expected *BusinessBookingProfile + obj.BusinessBookingProfile = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBusinessBookingProfile(), "getter should return the property value") + }) + + t.Run("GetBusinessBookingProfile_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBusinessBookingProfileResponse{} + obj.BusinessBookingProfile = nil + + // Act & Assert + assert.Nil(t, obj.GetBusinessBookingProfile(), "getter should return nil when property is nil") + }) + + t.Run("GetBusinessBookingProfile_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetBusinessBookingProfileResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBusinessBookingProfile() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBusinessBookingProfileResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBusinessBookingProfileResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetBusinessBookingProfileResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetBusinessBookingProfileResponse(t *testing.T) { + t.Run("SetBusinessBookingProfile_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBusinessBookingProfileResponse{} + var fernTestValueBusinessBookingProfile *BusinessBookingProfile + + // Act + obj.SetBusinessBookingProfile(fernTestValueBusinessBookingProfile) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBusinessBookingProfileResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListBookingsResponse(t *testing.T) { + t.Run("SetBookings", func(t *testing.T) { + obj := &ListBookingsResponse{} + var fernTestValueBookings []*Booking + obj.SetBookings(fernTestValueBookings) + assert.Equal(t, fernTestValueBookings, obj.Bookings) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListBookingsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &ListBookingsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListBookingsResponse(t *testing.T) { + t.Run("GetBookings", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingsResponse{} + var expected []*Booking + obj.Bookings = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBookings(), "getter should return the property value") + }) + + t.Run("GetBookings_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingsResponse{} + obj.Bookings = nil + + // Act & Assert + assert.Nil(t, obj.GetBookings(), "getter should return nil when property is nil") + }) + + t.Run("GetBookings_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListBookingsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBookings() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListBookingsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListBookingsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListBookingsResponse(t *testing.T) { + t.Run("SetBookings_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingsResponse{} + var fernTestValueBookings []*Booking + + // Act + obj.SetBookings(fernTestValueBookings) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRetrieveLocationBookingProfileResponse(t *testing.T) { + t.Run("SetLocationBookingProfile", func(t *testing.T) { + obj := &RetrieveLocationBookingProfileResponse{} + var fernTestValueLocationBookingProfile *LocationBookingProfile + obj.SetLocationBookingProfile(fernTestValueLocationBookingProfile) + assert.Equal(t, fernTestValueLocationBookingProfile, obj.LocationBookingProfile) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &RetrieveLocationBookingProfileResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRetrieveLocationBookingProfileResponse(t *testing.T) { + t.Run("GetLocationBookingProfile", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationBookingProfileResponse{} + var expected *LocationBookingProfile + obj.LocationBookingProfile = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationBookingProfile(), "getter should return the property value") + }) + + t.Run("GetLocationBookingProfile_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationBookingProfileResponse{} + obj.LocationBookingProfile = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationBookingProfile(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationBookingProfile_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveLocationBookingProfileResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationBookingProfile() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationBookingProfileResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationBookingProfileResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveLocationBookingProfileResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRetrieveLocationBookingProfileResponse(t *testing.T) { + t.Run("SetLocationBookingProfile_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationBookingProfileResponse{} + var fernTestValueLocationBookingProfile *LocationBookingProfile + + // Act + obj.SetLocationBookingProfile(fernTestValueLocationBookingProfile) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationBookingProfileResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchAvailabilityFilter(t *testing.T) { + t.Run("SetStartAtRange", func(t *testing.T) { + obj := &SearchAvailabilityFilter{} + var fernTestValueStartAtRange *TimeRange + obj.SetStartAtRange(fernTestValueStartAtRange) + assert.Equal(t, fernTestValueStartAtRange, obj.StartAtRange) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &SearchAvailabilityFilter{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSegmentFilters", func(t *testing.T) { + obj := &SearchAvailabilityFilter{} + var fernTestValueSegmentFilters []*SegmentFilter + obj.SetSegmentFilters(fernTestValueSegmentFilters) + assert.Equal(t, fernTestValueSegmentFilters, obj.SegmentFilters) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBookingID", func(t *testing.T) { + obj := &SearchAvailabilityFilter{} + var fernTestValueBookingID *string + obj.SetBookingID(fernTestValueBookingID) + assert.Equal(t, fernTestValueBookingID, obj.BookingID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchAvailabilityFilter(t *testing.T) { + t.Run("GetStartAtRange", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchAvailabilityFilter{} + var expected *TimeRange + obj.StartAtRange = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStartAtRange(), "getter should return the property value") + }) + + t.Run("GetStartAtRange_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchAvailabilityFilter{} + obj.StartAtRange = nil + + // Act & Assert + assert.Nil(t, obj.GetStartAtRange(), "getter should return nil when property is nil") + }) + + t.Run("GetStartAtRange_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchAvailabilityFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStartAtRange() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchAvailabilityFilter{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchAvailabilityFilter{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchAvailabilityFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetSegmentFilters", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchAvailabilityFilter{} + var expected []*SegmentFilter + obj.SegmentFilters = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSegmentFilters(), "getter should return the property value") + }) + + t.Run("GetSegmentFilters_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchAvailabilityFilter{} + obj.SegmentFilters = nil + + // Act & Assert + assert.Nil(t, obj.GetSegmentFilters(), "getter should return nil when property is nil") + }) + + t.Run("GetSegmentFilters_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchAvailabilityFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSegmentFilters() // Should return zero value + }) + + t.Run("GetBookingID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchAvailabilityFilter{} + var expected *string + obj.BookingID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBookingID(), "getter should return the property value") + }) + + t.Run("GetBookingID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchAvailabilityFilter{} + obj.BookingID = nil + + // Act & Assert + assert.Nil(t, obj.GetBookingID(), "getter should return nil when property is nil") + }) + + t.Run("GetBookingID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchAvailabilityFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBookingID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchAvailabilityFilter(t *testing.T) { + t.Run("SetStartAtRange_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchAvailabilityFilter{} + var fernTestValueStartAtRange *TimeRange + + // Act + obj.SetStartAtRange(fernTestValueStartAtRange) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchAvailabilityFilter{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSegmentFilters_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchAvailabilityFilter{} + var fernTestValueSegmentFilters []*SegmentFilter + + // Act + obj.SetSegmentFilters(fernTestValueSegmentFilters) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBookingID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchAvailabilityFilter{} + var fernTestValueBookingID *string + + // Act + obj.SetBookingID(fernTestValueBookingID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchAvailabilityQuery(t *testing.T) { + t.Run("SetFilter", func(t *testing.T) { + obj := &SearchAvailabilityQuery{} + var fernTestValueFilter *SearchAvailabilityFilter + obj.SetFilter(fernTestValueFilter) + assert.Equal(t, fernTestValueFilter, obj.Filter) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchAvailabilityQuery(t *testing.T) { + t.Run("GetFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchAvailabilityQuery{} + var expected *SearchAvailabilityFilter + obj.Filter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFilter(), "getter should return the property value") + }) + + t.Run("GetFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchAvailabilityQuery{} + obj.Filter = nil + + // Act & Assert + assert.Nil(t, obj.GetFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchAvailabilityQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFilter() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchAvailabilityQuery(t *testing.T) { + t.Run("SetFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchAvailabilityQuery{} + var fernTestValueFilter *SearchAvailabilityFilter + + // Act + obj.SetFilter(fernTestValueFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchAvailabilityResponse(t *testing.T) { + t.Run("SetAvailabilities", func(t *testing.T) { + obj := &SearchAvailabilityResponse{} + var fernTestValueAvailabilities []*Availability + obj.SetAvailabilities(fernTestValueAvailabilities) + assert.Equal(t, fernTestValueAvailabilities, obj.Availabilities) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &SearchAvailabilityResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchAvailabilityResponse(t *testing.T) { + t.Run("GetAvailabilities", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchAvailabilityResponse{} + var expected []*Availability + obj.Availabilities = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAvailabilities(), "getter should return the property value") + }) + + t.Run("GetAvailabilities_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchAvailabilityResponse{} + obj.Availabilities = nil + + // Act & Assert + assert.Nil(t, obj.GetAvailabilities(), "getter should return nil when property is nil") + }) + + t.Run("GetAvailabilities_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchAvailabilityResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAvailabilities() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchAvailabilityResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchAvailabilityResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchAvailabilityResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchAvailabilityResponse(t *testing.T) { + t.Run("SetAvailabilities_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchAvailabilityResponse{} + var fernTestValueAvailabilities []*Availability + + // Act + obj.SetAvailabilities(fernTestValueAvailabilities) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchAvailabilityResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSegmentFilter(t *testing.T) { + t.Run("SetServiceVariationID", func(t *testing.T) { + obj := &SegmentFilter{} + var fernTestValueServiceVariationID string + obj.SetServiceVariationID(fernTestValueServiceVariationID) + assert.Equal(t, fernTestValueServiceVariationID, obj.ServiceVariationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTeamMemberIDFilter", func(t *testing.T) { + obj := &SegmentFilter{} + var fernTestValueTeamMemberIDFilter *FilterValue + obj.SetTeamMemberIDFilter(fernTestValueTeamMemberIDFilter) + assert.Equal(t, fernTestValueTeamMemberIDFilter, obj.TeamMemberIDFilter) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSegmentFilter(t *testing.T) { + t.Run("GetServiceVariationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SegmentFilter{} + var expected string + obj.ServiceVariationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetServiceVariationID(), "getter should return the property value") + }) + + t.Run("GetServiceVariationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SegmentFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetServiceVariationID() // Should return zero value + }) + + t.Run("GetTeamMemberIDFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SegmentFilter{} + var expected *FilterValue + obj.TeamMemberIDFilter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMemberIDFilter(), "getter should return the property value") + }) + + t.Run("GetTeamMemberIDFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SegmentFilter{} + obj.TeamMemberIDFilter = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMemberIDFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMemberIDFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SegmentFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMemberIDFilter() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSegmentFilter(t *testing.T) { + t.Run("SetServiceVariationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SegmentFilter{} + var fernTestValueServiceVariationID string + + // Act + obj.SetServiceVariationID(fernTestValueServiceVariationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTeamMemberIDFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SegmentFilter{} + var fernTestValueTeamMemberIDFilter *FilterValue + + // Act + obj.SetTeamMemberIDFilter(fernTestValueTeamMemberIDFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateBookingResponse(t *testing.T) { + t.Run("SetBooking", func(t *testing.T) { + obj := &UpdateBookingResponse{} + var fernTestValueBooking *Booking + obj.SetBooking(fernTestValueBooking) + assert.Equal(t, fernTestValueBooking, obj.Booking) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateBookingResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateBookingResponse(t *testing.T) { + t.Run("GetBooking", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateBookingResponse{} + var expected *Booking + obj.Booking = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBooking(), "getter should return the property value") + }) + + t.Run("GetBooking_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateBookingResponse{} + obj.Booking = nil + + // Act & Assert + assert.Nil(t, obj.GetBooking(), "getter should return nil when property is nil") + }) + + t.Run("GetBooking_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateBookingResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBooking() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateBookingResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateBookingResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateBookingResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateBookingResponse(t *testing.T) { + t.Run("SetBooking_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateBookingResponse{} + var fernTestValueBooking *Booking + + // Act + obj.SetBooking(fernTestValueBooking) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateBookingResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateBookingRequest(t *testing.T) { + t.Run("SetBookingID", func(t *testing.T) { + obj := &UpdateBookingRequest{} + var fernTestValueBookingID string + obj.SetBookingID(fernTestValueBookingID) + assert.Equal(t, fernTestValueBookingID, obj.BookingID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &UpdateBookingRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBooking", func(t *testing.T) { + obj := &UpdateBookingRequest{} + var fernTestValueBooking *Booking + obj.SetBooking(fernTestValueBooking) + assert.Equal(t, fernTestValueBooking, obj.Booking) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateBookingRequest(t *testing.T) { + t.Run("SetBookingID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateBookingRequest{} + var fernTestValueBookingID string + + // Act + obj.SetBookingID(fernTestValueBookingID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateBookingRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBooking_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateBookingRequest{} + var fernTestValueBooking *Booking + + // Act + obj.SetBooking(fernTestValueBooking) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingAppointmentSegment(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AppointmentSegment{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled AppointmentSegment + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj AppointmentSegment + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj AppointmentSegment + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingAvailability(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Availability{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Availability + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Availability + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Availability + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBooking(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Booking{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Booking + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Booking + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Booking + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBookingCreatorDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatorDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BookingCreatorDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BookingCreatorDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BookingCreatorDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBulkRetrieveBookingsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveBookingsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkRetrieveBookingsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkRetrieveBookingsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkRetrieveBookingsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBulkRetrieveTeamMemberBookingProfilesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveTeamMemberBookingProfilesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkRetrieveTeamMemberBookingProfilesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkRetrieveTeamMemberBookingProfilesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkRetrieveTeamMemberBookingProfilesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBusinessAppointmentSettings(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessAppointmentSettings{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BusinessAppointmentSettings + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BusinessAppointmentSettings + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BusinessAppointmentSettings + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBusinessBookingProfile(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessBookingProfile{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BusinessBookingProfile + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BusinessBookingProfile + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BusinessBookingProfile + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCancelBookingResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelBookingResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CancelBookingResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CancelBookingResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CancelBookingResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateBookingResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBookingResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateBookingResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateBookingResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateBookingResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetBookingResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBookingResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetBookingResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetBookingResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetBookingResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetBusinessBookingProfileResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBusinessBookingProfileResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetBusinessBookingProfileResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetBusinessBookingProfileResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetBusinessBookingProfileResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListBookingsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListBookingsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListBookingsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListBookingsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRetrieveLocationBookingProfileResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationBookingProfileResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RetrieveLocationBookingProfileResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RetrieveLocationBookingProfileResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RetrieveLocationBookingProfileResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchAvailabilityFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchAvailabilityFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchAvailabilityFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchAvailabilityFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchAvailabilityFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchAvailabilityQuery(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchAvailabilityQuery{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchAvailabilityQuery + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchAvailabilityQuery + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchAvailabilityQuery + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchAvailabilityResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchAvailabilityResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchAvailabilityResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchAvailabilityResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchAvailabilityResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSegmentFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SegmentFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SegmentFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SegmentFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SegmentFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateBookingResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateBookingResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateBookingResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateBookingResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateBookingResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringAppointmentSegment(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &AppointmentSegment{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AppointmentSegment + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringAvailability(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Availability{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Availability + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBooking(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Booking{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Booking + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBookingCreatorDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BookingCreatorDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCreatorDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBulkRetrieveBookingsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkRetrieveBookingsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkRetrieveBookingsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBulkRetrieveTeamMemberBookingProfilesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkRetrieveTeamMemberBookingProfilesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkRetrieveTeamMemberBookingProfilesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBusinessAppointmentSettings(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BusinessAppointmentSettings{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessAppointmentSettings + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBusinessBookingProfile(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BusinessBookingProfile{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessBookingProfile + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCancelBookingResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CancelBookingResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelBookingResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateBookingResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateBookingResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateBookingResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetBookingResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetBookingResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetBookingResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetBusinessBookingProfileResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetBusinessBookingProfileResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetBusinessBookingProfileResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListBookingsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListBookingsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListBookingsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRetrieveLocationBookingProfileResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RetrieveLocationBookingProfileResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveLocationBookingProfileResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchAvailabilityFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchAvailabilityFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchAvailabilityFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchAvailabilityQuery(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchAvailabilityQuery{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchAvailabilityQuery + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchAvailabilityResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchAvailabilityResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchAvailabilityResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSegmentFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SegmentFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SegmentFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateBookingResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateBookingResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateBookingResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestEnumBookingBookingSource(t *testing.T) { + t.Run("NewFromString_FIRST_PARTY_MERCHANT", func(t *testing.T) { + t.Parallel() + val, err := NewBookingBookingSourceFromString("FIRST_PARTY_MERCHANT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BookingBookingSource("FIRST_PARTY_MERCHANT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FIRST_PARTY_BUYER", func(t *testing.T) { + t.Parallel() + val, err := NewBookingBookingSourceFromString("FIRST_PARTY_BUYER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BookingBookingSource("FIRST_PARTY_BUYER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_THIRD_PARTY_BUYER", func(t *testing.T) { + t.Parallel() + val, err := NewBookingBookingSourceFromString("THIRD_PARTY_BUYER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BookingBookingSource("THIRD_PARTY_BUYER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_API", func(t *testing.T) { + t.Parallel() + val, err := NewBookingBookingSourceFromString("API") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BookingBookingSource("API"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewBookingBookingSourceFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewBookingBookingSourceFromString("FIRST_PARTY_MERCHANT") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumBookingCreatorDetailsCreatorType(t *testing.T) { + t.Run("NewFromString_TEAM_MEMBER", func(t *testing.T) { + t.Parallel() + val, err := NewBookingCreatorDetailsCreatorTypeFromString("TEAM_MEMBER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BookingCreatorDetailsCreatorType("TEAM_MEMBER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CUSTOMER", func(t *testing.T) { + t.Parallel() + val, err := NewBookingCreatorDetailsCreatorTypeFromString("CUSTOMER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BookingCreatorDetailsCreatorType("CUSTOMER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewBookingCreatorDetailsCreatorTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewBookingCreatorDetailsCreatorTypeFromString("TEAM_MEMBER") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumBookingStatus(t *testing.T) { + t.Run("NewFromString_PENDING", func(t *testing.T) { + t.Parallel() + val, err := NewBookingStatusFromString("PENDING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BookingStatus("PENDING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CANCELLED_BY_CUSTOMER", func(t *testing.T) { + t.Parallel() + val, err := NewBookingStatusFromString("CANCELLED_BY_CUSTOMER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BookingStatus("CANCELLED_BY_CUSTOMER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CANCELLED_BY_SELLER", func(t *testing.T) { + t.Parallel() + val, err := NewBookingStatusFromString("CANCELLED_BY_SELLER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BookingStatus("CANCELLED_BY_SELLER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DECLINED", func(t *testing.T) { + t.Parallel() + val, err := NewBookingStatusFromString("DECLINED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BookingStatus("DECLINED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ACCEPTED", func(t *testing.T) { + t.Parallel() + val, err := NewBookingStatusFromString("ACCEPTED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BookingStatus("ACCEPTED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NO_SHOW", func(t *testing.T) { + t.Parallel() + val, err := NewBookingStatusFromString("NO_SHOW") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BookingStatus("NO_SHOW"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewBookingStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewBookingStatusFromString("PENDING") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumBusinessAppointmentSettingsAlignmentTime(t *testing.T) { + t.Run("NewFromString_SERVICE_DURATION", func(t *testing.T) { + t.Parallel() + val, err := NewBusinessAppointmentSettingsAlignmentTimeFromString("SERVICE_DURATION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BusinessAppointmentSettingsAlignmentTime("SERVICE_DURATION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_QUARTER_HOURLY", func(t *testing.T) { + t.Parallel() + val, err := NewBusinessAppointmentSettingsAlignmentTimeFromString("QUARTER_HOURLY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BusinessAppointmentSettingsAlignmentTime("QUARTER_HOURLY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_HALF_HOURLY", func(t *testing.T) { + t.Parallel() + val, err := NewBusinessAppointmentSettingsAlignmentTimeFromString("HALF_HOURLY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BusinessAppointmentSettingsAlignmentTime("HALF_HOURLY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_HOURLY", func(t *testing.T) { + t.Parallel() + val, err := NewBusinessAppointmentSettingsAlignmentTimeFromString("HOURLY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BusinessAppointmentSettingsAlignmentTime("HOURLY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewBusinessAppointmentSettingsAlignmentTimeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewBusinessAppointmentSettingsAlignmentTimeFromString("SERVICE_DURATION") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumBusinessAppointmentSettingsBookingLocationType(t *testing.T) { + t.Run("NewFromString_BUSINESS_LOCATION", func(t *testing.T) { + t.Parallel() + val, err := NewBusinessAppointmentSettingsBookingLocationTypeFromString("BUSINESS_LOCATION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BusinessAppointmentSettingsBookingLocationType("BUSINESS_LOCATION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CUSTOMER_LOCATION", func(t *testing.T) { + t.Parallel() + val, err := NewBusinessAppointmentSettingsBookingLocationTypeFromString("CUSTOMER_LOCATION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BusinessAppointmentSettingsBookingLocationType("CUSTOMER_LOCATION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PHONE", func(t *testing.T) { + t.Parallel() + val, err := NewBusinessAppointmentSettingsBookingLocationTypeFromString("PHONE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BusinessAppointmentSettingsBookingLocationType("PHONE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewBusinessAppointmentSettingsBookingLocationTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewBusinessAppointmentSettingsBookingLocationTypeFromString("BUSINESS_LOCATION") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumBusinessAppointmentSettingsCancellationPolicy(t *testing.T) { + t.Run("NewFromString_CANCELLATION_TREATED_AS_NO_SHOW", func(t *testing.T) { + t.Parallel() + val, err := NewBusinessAppointmentSettingsCancellationPolicyFromString("CANCELLATION_TREATED_AS_NO_SHOW") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BusinessAppointmentSettingsCancellationPolicy("CANCELLATION_TREATED_AS_NO_SHOW"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CUSTOM_POLICY", func(t *testing.T) { + t.Parallel() + val, err := NewBusinessAppointmentSettingsCancellationPolicyFromString("CUSTOM_POLICY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BusinessAppointmentSettingsCancellationPolicy("CUSTOM_POLICY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewBusinessAppointmentSettingsCancellationPolicyFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewBusinessAppointmentSettingsCancellationPolicyFromString("CANCELLATION_TREATED_AS_NO_SHOW") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumBusinessAppointmentSettingsMaxAppointmentsPerDayLimitType(t *testing.T) { + t.Run("NewFromString_PER_TEAM_MEMBER", func(t *testing.T) { + t.Parallel() + val, err := NewBusinessAppointmentSettingsMaxAppointmentsPerDayLimitTypeFromString("PER_TEAM_MEMBER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BusinessAppointmentSettingsMaxAppointmentsPerDayLimitType("PER_TEAM_MEMBER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PER_LOCATION", func(t *testing.T) { + t.Parallel() + val, err := NewBusinessAppointmentSettingsMaxAppointmentsPerDayLimitTypeFromString("PER_LOCATION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BusinessAppointmentSettingsMaxAppointmentsPerDayLimitType("PER_LOCATION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewBusinessAppointmentSettingsMaxAppointmentsPerDayLimitTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewBusinessAppointmentSettingsMaxAppointmentsPerDayLimitTypeFromString("PER_TEAM_MEMBER") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumBusinessBookingProfileBookingPolicy(t *testing.T) { + t.Run("NewFromString_ACCEPT_ALL", func(t *testing.T) { + t.Parallel() + val, err := NewBusinessBookingProfileBookingPolicyFromString("ACCEPT_ALL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BusinessBookingProfileBookingPolicy("ACCEPT_ALL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_REQUIRES_ACCEPTANCE", func(t *testing.T) { + t.Parallel() + val, err := NewBusinessBookingProfileBookingPolicyFromString("REQUIRES_ACCEPTANCE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BusinessBookingProfileBookingPolicy("REQUIRES_ACCEPTANCE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewBusinessBookingProfileBookingPolicyFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewBusinessBookingProfileBookingPolicyFromString("ACCEPT_ALL") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumBusinessBookingProfileCustomerTimezoneChoice(t *testing.T) { + t.Run("NewFromString_BUSINESS_LOCATION_TIMEZONE", func(t *testing.T) { + t.Parallel() + val, err := NewBusinessBookingProfileCustomerTimezoneChoiceFromString("BUSINESS_LOCATION_TIMEZONE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BusinessBookingProfileCustomerTimezoneChoice("BUSINESS_LOCATION_TIMEZONE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CUSTOMER_CHOICE", func(t *testing.T) { + t.Parallel() + val, err := NewBusinessBookingProfileCustomerTimezoneChoiceFromString("CUSTOMER_CHOICE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, BusinessBookingProfileCustomerTimezoneChoice("CUSTOMER_CHOICE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewBusinessBookingProfileCustomerTimezoneChoiceFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewBusinessBookingProfileCustomerTimezoneChoiceFromString("BUSINESS_LOCATION_TIMEZONE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestExtraPropertiesAppointmentSegment(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &AppointmentSegment{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AppointmentSegment + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesAvailability(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Availability{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Availability + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBooking(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Booking{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Booking + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBookingCreatorDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BookingCreatorDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCreatorDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBulkRetrieveBookingsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkRetrieveBookingsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkRetrieveBookingsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBulkRetrieveTeamMemberBookingProfilesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkRetrieveTeamMemberBookingProfilesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkRetrieveTeamMemberBookingProfilesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBusinessAppointmentSettings(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BusinessAppointmentSettings{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessAppointmentSettings + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBusinessBookingProfile(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BusinessBookingProfile{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessBookingProfile + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCancelBookingResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CancelBookingResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelBookingResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateBookingResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateBookingResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateBookingResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetBookingResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetBookingResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetBookingResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetBusinessBookingProfileResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetBusinessBookingProfileResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetBusinessBookingProfileResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListBookingsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListBookingsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListBookingsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRetrieveLocationBookingProfileResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RetrieveLocationBookingProfileResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveLocationBookingProfileResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchAvailabilityFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchAvailabilityFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchAvailabilityFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchAvailabilityQuery(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchAvailabilityQuery{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchAvailabilityQuery + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchAvailabilityResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchAvailabilityResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchAvailabilityResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSegmentFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SegmentFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SegmentFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateBookingResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateBookingResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateBookingResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/cards.go b/cards.go index 9ab8960..5f5e79d 100644 --- a/cards.go +++ b/cards.go @@ -33,7 +33,7 @@ type CreateCardRequest struct { // See the [SCA Overview](https://developer.squareup.com/docs/sca-overview). VerificationToken *string `json:"verification_token,omitempty" url:"-"` // Payment details associated with the card to be stored. - Card *Card `json:"card,omitempty" url:"-"` + Card *Card `json:"card" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -74,6 +74,27 @@ func (c *CreateCardRequest) SetCard(card *Card) { c.require(createCardRequestFieldCard) } +func (c *CreateCardRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateCardRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateCardRequest(body) + return nil +} + +func (c *CreateCardRequest) MarshalJSON() ([]byte, error) { + type embed CreateCardRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( disableCardsRequestFieldCardID = big.NewInt(1 << 0) ) @@ -236,6 +257,9 @@ func (c *CreateCardResponse) GetCard() *Card { } func (c *CreateCardResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -288,6 +312,9 @@ func (c *CreateCardResponse) MarshalJSON() ([]byte, error) { } func (c *CreateCardResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -337,6 +364,9 @@ func (d *DisableCardResponse) GetCard() *Card { } func (d *DisableCardResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -389,6 +419,9 @@ func (d *DisableCardResponse) MarshalJSON() ([]byte, error) { } func (d *DisableCardResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -438,6 +471,9 @@ func (g *GetCardResponse) GetCard() *Card { } func (g *GetCardResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -490,6 +526,9 @@ func (g *GetCardResponse) MarshalJSON() ([]byte, error) { } func (g *GetCardResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -552,6 +591,9 @@ func (l *ListCardsResponse) GetCursor() *string { } func (l *ListCardsResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -611,6 +653,9 @@ func (l *ListCardsResponse) MarshalJSON() ([]byte, error) { } func (l *ListCardsResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value diff --git a/cards/cards_test/cards_test.go b/cards/cards_test/cards_test.go new file mode 100644 index 0000000..80be608 --- /dev/null +++ b/cards/cards_test/cards_test.go @@ -0,0 +1,205 @@ +// Code generated by Fern. DO NOT EDIT. + +package cards_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestCardsListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.ListCardsRequest{ + Cursor: square.String( + "cursor", + ), + CustomerID: square.String( + "customer_id", + ), + IncludeDisabled: square.Bool( + true, + ), + ReferenceID: square.String( + "reference_id", + ), + SortOrder: square.SortOrderDesc.Ptr(), + } + _, invocationErr := client.Cards.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCardsListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCardsListWithWireMock", "GET", "/v2/cards", map[string]string{"cursor": "cursor", "customer_id": "customer_id", "include_disabled": "true", "reference_id": "reference_id", "sort_order": "DESC"}, 1) +} + +func TestCardsCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CreateCardRequest{ + IdempotencyKey: "4935a656-a929-4792-b97c-8848be85c27c", + SourceID: "cnon:uIbfJXhXETSP197M3GB", + Card: &square.Card{ + CardholderName: square.String( + "Amelia Earhart", + ), + BillingAddress: &square.Address{ + AddressLine1: square.String( + "500 Electric Ave", + ), + AddressLine2: square.String( + "Suite 600", + ), + Locality: square.String( + "New York", + ), + AdministrativeDistrictLevel1: square.String( + "NY", + ), + PostalCode: square.String( + "10003", + ), + Country: square.CountryUs.Ptr(), + }, + CustomerID: square.String( + "VDKXEEKPJN48QDG3BGGFAK05P8", + ), + ReferenceID: square.String( + "user-id-1", + ), + }, + } + _, invocationErr := client.Cards.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCardsCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCardsCreateWithWireMock", "POST", "/v2/cards", nil, 1) +} + +func TestCardsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.GetCardsRequest{ + CardID: "card_id", + } + _, invocationErr := client.Cards.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCardsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCardsGetWithWireMock", "GET", "/v2/cards/card_id", nil, 1) +} + +func TestCardsDisableWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.DisableCardsRequest{ + CardID: "card_id", + } + _, invocationErr := client.Cards.Disable( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCardsDisableWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCardsDisableWithWireMock", "POST", "/v2/cards/card_id/disable", nil, 1) +} diff --git a/cards_test.go b/cards_test.go new file mode 100644 index 0000000..60e2723 --- /dev/null +++ b/cards_test.go @@ -0,0 +1,1435 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersCreateCardRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateCardRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSourceID", func(t *testing.T) { + obj := &CreateCardRequest{} + var fernTestValueSourceID string + obj.SetSourceID(fernTestValueSourceID) + assert.Equal(t, fernTestValueSourceID, obj.SourceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVerificationToken", func(t *testing.T) { + obj := &CreateCardRequest{} + var fernTestValueVerificationToken *string + obj.SetVerificationToken(fernTestValueVerificationToken) + assert.Equal(t, fernTestValueVerificationToken, obj.VerificationToken) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCard", func(t *testing.T) { + obj := &CreateCardRequest{} + var fernTestValueCard *Card + obj.SetCard(fernTestValueCard) + assert.Equal(t, fernTestValueCard, obj.Card) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateCardRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCardRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSourceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCardRequest{} + var fernTestValueSourceID string + + // Act + obj.SetSourceID(fernTestValueSourceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVerificationToken_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCardRequest{} + var fernTestValueVerificationToken *string + + // Act + obj.SetVerificationToken(fernTestValueVerificationToken) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCardRequest{} + var fernTestValueCard *Card + + // Act + obj.SetCard(fernTestValueCard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisableCardsRequest(t *testing.T) { + t.Run("SetCardID", func(t *testing.T) { + obj := &DisableCardsRequest{} + var fernTestValueCardID string + obj.SetCardID(fernTestValueCardID) + assert.Equal(t, fernTestValueCardID, obj.CardID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDisableCardsRequest(t *testing.T) { + t.Run("SetCardID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisableCardsRequest{} + var fernTestValueCardID string + + // Act + obj.SetCardID(fernTestValueCardID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetCardsRequest(t *testing.T) { + t.Run("SetCardID", func(t *testing.T) { + obj := &GetCardsRequest{} + var fernTestValueCardID string + obj.SetCardID(fernTestValueCardID) + assert.Equal(t, fernTestValueCardID, obj.CardID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetCardsRequest(t *testing.T) { + t.Run("SetCardID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCardsRequest{} + var fernTestValueCardID string + + // Act + obj.SetCardID(fernTestValueCardID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListCardsRequest(t *testing.T) { + t.Run("SetCursor", func(t *testing.T) { + obj := &ListCardsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerID", func(t *testing.T) { + obj := &ListCardsRequest{} + var fernTestValueCustomerID *string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIncludeDisabled", func(t *testing.T) { + obj := &ListCardsRequest{} + var fernTestValueIncludeDisabled *bool + obj.SetIncludeDisabled(fernTestValueIncludeDisabled) + assert.Equal(t, fernTestValueIncludeDisabled, obj.IncludeDisabled) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReferenceID", func(t *testing.T) { + obj := &ListCardsRequest{} + var fernTestValueReferenceID *string + obj.SetReferenceID(fernTestValueReferenceID) + assert.Equal(t, fernTestValueReferenceID, obj.ReferenceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSortOrder", func(t *testing.T) { + obj := &ListCardsRequest{} + var fernTestValueSortOrder *SortOrder + obj.SetSortOrder(fernTestValueSortOrder) + assert.Equal(t, fernTestValueSortOrder, obj.SortOrder) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListCardsRequest(t *testing.T) { + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCardsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCardsRequest{} + var fernTestValueCustomerID *string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIncludeDisabled_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCardsRequest{} + var fernTestValueIncludeDisabled *bool + + // Act + obj.SetIncludeDisabled(fernTestValueIncludeDisabled) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReferenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCardsRequest{} + var fernTestValueReferenceID *string + + // Act + obj.SetReferenceID(fernTestValueReferenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSortOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCardsRequest{} + var fernTestValueSortOrder *SortOrder + + // Act + obj.SetSortOrder(fernTestValueSortOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateCardResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateCardResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCard", func(t *testing.T) { + obj := &CreateCardResponse{} + var fernTestValueCard *Card + obj.SetCard(fernTestValueCard) + assert.Equal(t, fernTestValueCard, obj.Card) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateCardResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCardResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCardResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetCard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCardResponse{} + var expected *Card + obj.Card = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCard(), "getter should return the property value") + }) + + t.Run("GetCard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCardResponse{} + obj.Card = nil + + // Act & Assert + assert.Nil(t, obj.GetCard(), "getter should return nil when property is nil") + }) + + t.Run("GetCard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCard() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateCardResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCardResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCardResponse{} + var fernTestValueCard *Card + + // Act + obj.SetCard(fernTestValueCard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisableCardResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DisableCardResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCard", func(t *testing.T) { + obj := &DisableCardResponse{} + var fernTestValueCard *Card + obj.SetCard(fernTestValueCard) + assert.Equal(t, fernTestValueCard, obj.Card) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDisableCardResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisableCardResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisableCardResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisableCardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetCard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisableCardResponse{} + var expected *Card + obj.Card = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCard(), "getter should return the property value") + }) + + t.Run("GetCard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisableCardResponse{} + obj.Card = nil + + // Act & Assert + assert.Nil(t, obj.GetCard(), "getter should return nil when property is nil") + }) + + t.Run("GetCard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisableCardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCard() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDisableCardResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisableCardResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisableCardResponse{} + var fernTestValueCard *Card + + // Act + obj.SetCard(fernTestValueCard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetCardResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetCardResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCard", func(t *testing.T) { + obj := &GetCardResponse{} + var fernTestValueCard *Card + obj.SetCard(fernTestValueCard) + assert.Equal(t, fernTestValueCard, obj.Card) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetCardResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCardResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCardResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetCard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCardResponse{} + var expected *Card + obj.Card = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCard(), "getter should return the property value") + }) + + t.Run("GetCard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCardResponse{} + obj.Card = nil + + // Act & Assert + assert.Nil(t, obj.GetCard(), "getter should return nil when property is nil") + }) + + t.Run("GetCard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCard() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetCardResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCardResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCardResponse{} + var fernTestValueCard *Card + + // Act + obj.SetCard(fernTestValueCard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListCardsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &ListCardsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCards", func(t *testing.T) { + obj := &ListCardsResponse{} + var fernTestValueCards []*Card + obj.SetCards(fernTestValueCards) + assert.Equal(t, fernTestValueCards, obj.Cards) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListCardsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListCardsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCardsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCardsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCardsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetCards", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCardsResponse{} + var expected []*Card + obj.Cards = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCards(), "getter should return the property value") + }) + + t.Run("GetCards_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCardsResponse{} + obj.Cards = nil + + // Act & Assert + assert.Nil(t, obj.GetCards(), "getter should return nil when property is nil") + }) + + t.Run("GetCards_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCardsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCards() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCardsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCardsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCardsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListCardsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCardsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCards_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCardsResponse{} + var fernTestValueCards []*Card + + // Act + obj.SetCards(fernTestValueCards) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCardsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingCreateCardResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCardResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateCardResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateCardResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateCardResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDisableCardResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisableCardResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DisableCardResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DisableCardResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DisableCardResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetCardResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCardResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetCardResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetCardResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetCardResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListCardsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCardsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListCardsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListCardsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListCardsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringCreateCardResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateCardResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCardResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDisableCardResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DisableCardResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisableCardResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetCardResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetCardResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCardResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListCardsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListCardsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCardsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestExtraPropertiesCreateCardResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateCardResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCardResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDisableCardResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DisableCardResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisableCardResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetCardResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetCardResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCardResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListCardsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListCardsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCardsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/cashdrawers/shifts/cash_drawers_shifts_test/cash_drawers_shifts_test.go b/cashdrawers/shifts/cash_drawers_shifts_test/cash_drawers_shifts_test.go new file mode 100644 index 0000000..d9cdcf9 --- /dev/null +++ b/cashdrawers/shifts/cash_drawers_shifts_test/cash_drawers_shifts_test.go @@ -0,0 +1,160 @@ +// Code generated by Fern. DO NOT EDIT. + +package cash_drawers_shifts_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + cashdrawers "github.com/square/square-go-sdk/v3/cashdrawers" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestCashDrawersShiftsListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &cashdrawers.ListShiftsRequest{ + LocationID: "location_id", + SortOrder: square.SortOrderDesc.Ptr(), + BeginTime: square.String( + "begin_time", + ), + EndTime: square.String( + "end_time", + ), + Limit: square.Int( + 1, + ), + Cursor: square.String( + "cursor", + ), + } + _, invocationErr := client.CashDrawers.Shifts.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCashDrawersShiftsListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCashDrawersShiftsListWithWireMock", "GET", "/v2/cash-drawers/shifts", map[string]string{"location_id": "location_id", "sort_order": "DESC", "begin_time": "begin_time", "end_time": "end_time", "limit": "1", "cursor": "cursor"}, 1) +} + +func TestCashDrawersShiftsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &cashdrawers.GetShiftsRequest{ + ShiftID: "shift_id", + LocationID: "location_id", + } + _, invocationErr := client.CashDrawers.Shifts.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCashDrawersShiftsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCashDrawersShiftsGetWithWireMock", "GET", "/v2/cash-drawers/shifts/shift_id", map[string]string{"location_id": "location_id"}, 1) +} + +func TestCashDrawersShiftsListEventsWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &cashdrawers.ListEventsShiftsRequest{ + ShiftID: "shift_id", + LocationID: "location_id", + Limit: square.Int( + 1, + ), + Cursor: square.String( + "cursor", + ), + } + _, invocationErr := client.CashDrawers.Shifts.ListEvents( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCashDrawersShiftsListEventsWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCashDrawersShiftsListEventsWithWireMock", "GET", "/v2/cash-drawers/shifts/shift_id/events", map[string]string{"location_id": "location_id", "limit": "1", "cursor": "cursor"}, 1) +} diff --git a/cashdrawers/shifts_test.go b/cashdrawers/shifts_test.go new file mode 100644 index 0000000..c6e8b9d --- /dev/null +++ b/cashdrawers/shifts_test.go @@ -0,0 +1,457 @@ +// Code generated by Fern. DO NOT EDIT. + +package cashdrawers + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersGetShiftsRequest(t *testing.T) { + t.Run("SetShiftID", func(t *testing.T) { + obj := &GetShiftsRequest{} + var fernTestValueShiftID string + obj.SetShiftID(fernTestValueShiftID) + assert.Equal(t, fernTestValueShiftID, obj.ShiftID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &GetShiftsRequest{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetShiftsRequest(t *testing.T) { + t.Run("SetShiftID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetShiftsRequest{} + var fernTestValueShiftID string + + // Act + obj.SetShiftID(fernTestValueShiftID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetShiftsRequest{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListShiftsRequest(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &ListShiftsRequest{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBeginTime", func(t *testing.T) { + obj := &ListShiftsRequest{} + var fernTestValueBeginTime *string + obj.SetBeginTime(fernTestValueBeginTime) + assert.Equal(t, fernTestValueBeginTime, obj.BeginTime) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEndTime", func(t *testing.T) { + obj := &ListShiftsRequest{} + var fernTestValueEndTime *string + obj.SetEndTime(fernTestValueEndTime) + assert.Equal(t, fernTestValueEndTime, obj.EndTime) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListShiftsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListShiftsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListShiftsRequest(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListShiftsRequest{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBeginTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListShiftsRequest{} + var fernTestValueBeginTime *string + + // Act + obj.SetBeginTime(fernTestValueBeginTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEndTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListShiftsRequest{} + var fernTestValueEndTime *string + + // Act + obj.SetEndTime(fernTestValueEndTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListShiftsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListShiftsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListEventsShiftsRequest(t *testing.T) { + t.Run("SetShiftID", func(t *testing.T) { + obj := &ListEventsShiftsRequest{} + var fernTestValueShiftID string + obj.SetShiftID(fernTestValueShiftID) + assert.Equal(t, fernTestValueShiftID, obj.ShiftID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &ListEventsShiftsRequest{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListEventsShiftsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListEventsShiftsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListEventsShiftsRequest(t *testing.T) { + t.Run("SetShiftID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEventsShiftsRequest{} + var fernTestValueShiftID string + + // Act + obj.SetShiftID(fernTestValueShiftID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEventsShiftsRequest{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEventsShiftsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEventsShiftsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/catalog.go b/catalog.go index 0a8bcf4..ae8544e 100644 --- a/catalog.go +++ b/catalog.go @@ -131,6 +131,27 @@ func (s *SearchCatalogItemsRequest) SetArchivedState(archivedState *ArchivedStat s.require(searchCatalogItemsRequestFieldArchivedState) } +func (s *SearchCatalogItemsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler SearchCatalogItemsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *s = SearchCatalogItemsRequest(body) + return nil +} + +func (s *SearchCatalogItemsRequest) MarshalJSON() ([]byte, error) { + type embed SearchCatalogItemsRequest + var marshaler = struct { + embed + }{ + embed: embed(*s), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, s.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( updateItemModifierListsRequestFieldItemIDs = big.NewInt(1 << 0) updateItemModifierListsRequestFieldModifierListsToEnable = big.NewInt(1 << 1) @@ -139,7 +160,7 @@ var ( type UpdateItemModifierListsRequest struct { // The IDs of the catalog items associated with the CatalogModifierList objects being updated. - ItemIDs []string `json:"item_ids,omitempty" url:"-"` + ItemIDs []string `json:"item_ids" url:"-"` // The IDs of the CatalogModifierList objects to enable for the CatalogItem. // At least one of `modifier_lists_to_enable` or `modifier_lists_to_disable` must be specified. ModifierListsToEnable []string `json:"modifier_lists_to_enable,omitempty" url:"-"` @@ -179,6 +200,27 @@ func (u *UpdateItemModifierListsRequest) SetModifierListsToDisable(modifierLists u.require(updateItemModifierListsRequestFieldModifierListsToDisable) } +func (u *UpdateItemModifierListsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdateItemModifierListsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdateItemModifierListsRequest(body) + return nil +} + +func (u *UpdateItemModifierListsRequest) MarshalJSON() ([]byte, error) { + type embed UpdateItemModifierListsRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( updateItemTaxesRequestFieldItemIDs = big.NewInt(1 << 0) updateItemTaxesRequestFieldTaxesToEnable = big.NewInt(1 << 1) @@ -188,7 +230,7 @@ var ( type UpdateItemTaxesRequest struct { // IDs for the CatalogItems associated with the CatalogTax objects being updated. // No more than 1,000 IDs may be provided. - ItemIDs []string `json:"item_ids,omitempty" url:"-"` + ItemIDs []string `json:"item_ids" url:"-"` // IDs of the CatalogTax objects to enable. // At least one of `taxes_to_enable` or `taxes_to_disable` must be specified. TaxesToEnable []string `json:"taxes_to_enable,omitempty" url:"-"` @@ -228,6 +270,27 @@ func (u *UpdateItemTaxesRequest) SetTaxesToDisable(taxesToDisable []string) { u.require(updateItemTaxesRequestFieldTaxesToDisable) } +func (u *UpdateItemTaxesRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdateItemTaxesRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdateItemTaxesRequest(body) + return nil +} + +func (u *UpdateItemTaxesRequest) MarshalJSON() ([]byte, error) { + type embed UpdateItemTaxesRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( batchDeleteCatalogObjectsRequestFieldObjectIDs = big.NewInt(1 << 0) ) @@ -236,7 +299,7 @@ type BatchDeleteCatalogObjectsRequest struct { // The IDs of the CatalogObjects to be deleted. When an object is deleted, other objects // in the graph that depend on that object will be deleted as well (for example, deleting a // CatalogItem will delete its CatalogItemVariation. - ObjectIDs []string `json:"object_ids,omitempty" url:"-"` + ObjectIDs []string `json:"object_ids" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -256,6 +319,27 @@ func (b *BatchDeleteCatalogObjectsRequest) SetObjectIDs(objectIDs []string) { b.require(batchDeleteCatalogObjectsRequestFieldObjectIDs) } +func (b *BatchDeleteCatalogObjectsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler BatchDeleteCatalogObjectsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *b = BatchDeleteCatalogObjectsRequest(body) + return nil +} + +func (b *BatchDeleteCatalogObjectsRequest) MarshalJSON() ([]byte, error) { + type embed BatchDeleteCatalogObjectsRequest + var marshaler = struct { + embed + }{ + embed: embed(*b), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, b.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( batchGetCatalogObjectsRequestFieldObjectIDs = big.NewInt(1 << 0) batchGetCatalogObjectsRequestFieldIncludeRelatedObjects = big.NewInt(1 << 1) @@ -266,7 +350,7 @@ var ( type BatchGetCatalogObjectsRequest struct { // The IDs of the CatalogObjects to be retrieved. - ObjectIDs []string `json:"object_ids,omitempty" url:"-"` + ObjectIDs []string `json:"object_ids" url:"-"` // If `true`, the response will include additional objects that are related to the // requested objects. Related objects are defined as any objects referenced by ID by the results in the `objects` field // of the response. These objects are put in the `related_objects` field. Setting this to `true` is @@ -341,6 +425,27 @@ func (b *BatchGetCatalogObjectsRequest) SetIncludeCategoryPathToRoot(includeCate b.require(batchGetCatalogObjectsRequestFieldIncludeCategoryPathToRoot) } +func (b *BatchGetCatalogObjectsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler BatchGetCatalogObjectsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *b = BatchGetCatalogObjectsRequest(body) + return nil +} + +func (b *BatchGetCatalogObjectsRequest) MarshalJSON() ([]byte, error) { + type embed BatchGetCatalogObjectsRequest + var marshaler = struct { + embed + }{ + embed: embed(*b), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, b.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( batchUpsertCatalogObjectsRequestFieldIdempotencyKey = big.NewInt(1 << 0) batchUpsertCatalogObjectsRequestFieldBatches = big.NewInt(1 << 1) @@ -378,7 +483,7 @@ type BatchUpsertCatalogObjectsRequest struct { // Each batch may contain up to 1,000 objects. The total number of objects across all batches for a single request // may not exceed 10,000. If either of these limits is violated, an error will be returned and no objects will // be inserted or updated. - Batches []*CatalogObjectBatch `json:"batches,omitempty" url:"-"` + Batches []*CatalogObjectBatch `json:"batches" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -405,6 +510,27 @@ func (b *BatchUpsertCatalogObjectsRequest) SetBatches(batches []*CatalogObjectBa b.require(batchUpsertCatalogObjectsRequestFieldBatches) } +func (b *BatchUpsertCatalogObjectsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler BatchUpsertCatalogObjectsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *b = BatchUpsertCatalogObjectsRequest(body) + return nil +} + +func (b *BatchUpsertCatalogObjectsRequest) MarshalJSON() ([]byte, error) { + type embed BatchUpsertCatalogObjectsRequest + var marshaler = struct { + embed + }{ + embed: embed(*b), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, b.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( listCatalogRequestFieldCursor = big.NewInt(1 << 0) listCatalogRequestFieldTypes = big.NewInt(1 << 1) @@ -596,6 +722,27 @@ func (s *SearchCatalogObjectsRequest) SetIncludeCategoryPathToRoot(includeCatego s.require(searchCatalogObjectsRequestFieldIncludeCategoryPathToRoot) } +func (s *SearchCatalogObjectsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler SearchCatalogObjectsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *s = SearchCatalogObjectsRequest(body) + return nil +} + +func (s *SearchCatalogObjectsRequest) MarshalJSON() ([]byte, error) { + type embed SearchCatalogObjectsRequest + var marshaler = struct { + embed + }{ + embed: embed(*s), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, s.explicitFields) + return json.Marshal(explicitMarshaler) +} + // Defines the values for the `archived_state` query expression // used in [SearchCatalogItems](api-endpoint:Catalog-SearchCatalogItems) // to return the archived, not archived or either type of catalog items. @@ -667,6 +814,9 @@ func (b *BatchDeleteCatalogObjectsResponse) GetDeletedAt() *string { } func (b *BatchDeleteCatalogObjectsResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -726,6 +876,9 @@ func (b *BatchDeleteCatalogObjectsResponse) MarshalJSON() ([]byte, error) { } func (b *BatchDeleteCatalogObjectsResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -780,6 +933,9 @@ func (b *BatchGetCatalogObjectsResponse) GetRelatedObjects() []*CatalogObject { } func (b *BatchGetCatalogObjectsResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -839,6 +995,9 @@ func (b *BatchGetCatalogObjectsResponse) MarshalJSON() ([]byte, error) { } func (b *BatchGetCatalogObjectsResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -903,6 +1062,9 @@ func (b *BatchUpsertCatalogObjectsResponse) GetIDMappings() []*CatalogIDMapping } func (b *BatchUpsertCatalogObjectsResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -969,6 +1131,9 @@ func (b *BatchUpsertCatalogObjectsResponse) MarshalJSON() ([]byte, error) { } func (b *BatchUpsertCatalogObjectsResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -1023,6 +1188,9 @@ func (c *CatalogInfoResponse) GetStandardUnitDescriptionGroup() *StandardUnitDes } func (c *CatalogInfoResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -1082,6 +1250,9 @@ func (c *CatalogInfoResponse) MarshalJSON() ([]byte, error) { } func (c *CatalogInfoResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -1227,6 +1398,9 @@ func (c *CatalogInfoResponseLimits) GetUpdateItemModifierListsMaxModifierListsTo } func (c *CatalogInfoResponseLimits) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -1342,6 +1516,9 @@ func (c *CatalogInfoResponseLimits) MarshalJSON() ([]byte, error) { } func (c *CatalogInfoResponseLimits) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -1377,6 +1554,9 @@ func (c *CatalogObjectBatch) GetObjects() []*CatalogObject { } func (c *CatalogObjectBatch) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -1422,6 +1602,9 @@ func (c *CatalogObjectBatch) MarshalJSON() ([]byte, error) { } func (c *CatalogObjectBatch) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -1581,6 +1764,9 @@ func (c *CatalogQuery) GetItemVariationsForItemOptionValuesQuery() *CatalogQuery } func (c *CatalogQuery) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -1689,6 +1875,9 @@ func (c *CatalogQuery) MarshalJSON() ([]byte, error) { } func (c *CatalogQuery) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -1735,6 +1924,9 @@ func (c *CatalogQueryExact) GetAttributeValue() string { } func (c *CatalogQueryExact) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -1787,6 +1979,9 @@ func (c *CatalogQueryExact) MarshalJSON() ([]byte, error) { } func (c *CatalogQueryExact) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -1824,6 +2019,9 @@ func (c *CatalogQueryItemVariationsForItemOptionValues) GetItemOptionValueIDs() } func (c *CatalogQueryItemVariationsForItemOptionValues) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -1869,6 +2067,9 @@ func (c *CatalogQueryItemVariationsForItemOptionValues) MarshalJSON() ([]byte, e } func (c *CatalogQueryItemVariationsForItemOptionValues) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -1906,6 +2107,9 @@ func (c *CatalogQueryItemsForItemOptions) GetItemOptionIDs() []string { } func (c *CatalogQueryItemsForItemOptions) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -1951,6 +2155,9 @@ func (c *CatalogQueryItemsForItemOptions) MarshalJSON() ([]byte, error) { } func (c *CatalogQueryItemsForItemOptions) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -1986,6 +2193,9 @@ func (c *CatalogQueryItemsForModifierList) GetModifierListIDs() []string { } func (c *CatalogQueryItemsForModifierList) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -2031,6 +2241,9 @@ func (c *CatalogQueryItemsForModifierList) MarshalJSON() ([]byte, error) { } func (c *CatalogQueryItemsForModifierList) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -2066,6 +2279,9 @@ func (c *CatalogQueryItemsForTax) GetTaxIDs() []string { } func (c *CatalogQueryItemsForTax) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -2111,6 +2327,9 @@ func (c *CatalogQueryItemsForTax) MarshalJSON() ([]byte, error) { } func (c *CatalogQueryItemsForTax) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -2156,6 +2375,9 @@ func (c *CatalogQueryPrefix) GetAttributePrefix() string { } func (c *CatalogQueryPrefix) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -2208,6 +2430,9 @@ func (c *CatalogQueryPrefix) MarshalJSON() ([]byte, error) { } func (c *CatalogQueryPrefix) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -2263,6 +2488,9 @@ func (c *CatalogQueryRange) GetAttributeMaxValue() *int64 { } func (c *CatalogQueryRange) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -2322,6 +2550,9 @@ func (c *CatalogQueryRange) MarshalJSON() ([]byte, error) { } func (c *CatalogQueryRange) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -2369,6 +2600,9 @@ func (c *CatalogQuerySet) GetAttributeValues() []string { } func (c *CatalogQuerySet) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -2421,6 +2655,9 @@ func (c *CatalogQuerySet) MarshalJSON() ([]byte, error) { } func (c *CatalogQuerySet) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -2479,6 +2716,9 @@ func (c *CatalogQuerySortedAttribute) GetSortOrder() *SortOrder { } func (c *CatalogQuerySortedAttribute) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -2538,6 +2778,9 @@ func (c *CatalogQuerySortedAttribute) MarshalJSON() ([]byte, error) { } func (c *CatalogQuerySortedAttribute) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -2573,6 +2816,9 @@ func (c *CatalogQueryText) GetKeywords() []string { } func (c *CatalogQueryText) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -2618,6 +2864,9 @@ func (c *CatalogQueryText) MarshalJSON() ([]byte, error) { } func (c *CatalogQueryText) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -2717,6 +2966,9 @@ func (c *CustomAttributeFilter) GetBoolFilter() *bool { } func (c *CustomAttributeFilter) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -2797,6 +3049,9 @@ func (c *CustomAttributeFilter) MarshalJSON() ([]byte, error) { } func (c *CustomAttributeFilter) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -2852,6 +3107,9 @@ func (l *ListCatalogResponse) GetObjects() []*CatalogObject { } func (l *ListCatalogResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -2911,6 +3169,9 @@ func (l *ListCatalogResponse) MarshalJSON() ([]byte, error) { } func (l *ListCatalogResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -2958,6 +3219,9 @@ func (r *Range) GetMax() *string { } func (r *Range) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -3010,6 +3274,9 @@ func (r *Range) MarshalJSON() ([]byte, error) { } func (r *Range) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -3098,6 +3365,9 @@ func (s *SearchCatalogItemsResponse) GetMatchedVariationIDs() []string { } func (s *SearchCatalogItemsResponse) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -3164,6 +3434,9 @@ func (s *SearchCatalogItemsResponse) MarshalJSON() ([]byte, error) { } func (s *SearchCatalogItemsResponse) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -3240,6 +3513,9 @@ func (s *SearchCatalogObjectsResponse) GetLatestTime() *string { } func (s *SearchCatalogObjectsResponse) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -3313,6 +3589,9 @@ func (s *SearchCatalogObjectsResponse) MarshalJSON() ([]byte, error) { } func (s *SearchCatalogObjectsResponse) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -3368,6 +3647,9 @@ func (s *StandardUnitDescription) GetAbbreviation() *string { } func (s *StandardUnitDescription) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -3427,6 +3709,9 @@ func (s *StandardUnitDescription) MarshalJSON() ([]byte, error) { } func (s *StandardUnitDescription) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -3472,6 +3757,9 @@ func (s *StandardUnitDescriptionGroup) GetLanguageCode() *string { } func (s *StandardUnitDescriptionGroup) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -3524,6 +3812,9 @@ func (s *StandardUnitDescriptionGroup) MarshalJSON() ([]byte, error) { } func (s *StandardUnitDescriptionGroup) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -3568,6 +3859,9 @@ func (u *UpdateItemModifierListsResponse) GetUpdatedAt() *string { } func (u *UpdateItemModifierListsResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -3620,6 +3914,9 @@ func (u *UpdateItemModifierListsResponse) MarshalJSON() ([]byte, error) { } func (u *UpdateItemModifierListsResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -3664,6 +3961,9 @@ func (u *UpdateItemTaxesResponse) GetUpdatedAt() *string { } func (u *UpdateItemTaxesResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -3716,6 +4016,9 @@ func (u *UpdateItemTaxesResponse) MarshalJSON() ([]byte, error) { } func (u *UpdateItemTaxesResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value diff --git a/catalog/catalog_test/catalog_test.go b/catalog/catalog_test/catalog_test.go new file mode 100644 index 0000000..c96cb6b --- /dev/null +++ b/catalog/catalog_test/catalog_test.go @@ -0,0 +1,412 @@ +// Code generated by Fern. DO NOT EDIT. + +package catalog_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestCatalogBatchDeleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.BatchDeleteCatalogObjectsRequest{ + ObjectIDs: []string{ + "W62UWFY35CWMYGVWK6TWJDNI", + "AA27W3M2GGTF3H6AVPNB77CK", + }, + } + _, invocationErr := client.Catalog.BatchDelete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCatalogBatchDeleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCatalogBatchDeleteWithWireMock", "POST", "/v2/catalog/batch-delete", nil, 1) +} + +func TestCatalogBatchGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.BatchGetCatalogObjectsRequest{ + ObjectIDs: []string{ + "W62UWFY35CWMYGVWK6TWJDNI", + "AA27W3M2GGTF3H6AVPNB77CK", + }, + IncludeRelatedObjects: square.Bool( + true, + ), + } + _, invocationErr := client.Catalog.BatchGet( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCatalogBatchGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCatalogBatchGetWithWireMock", "POST", "/v2/catalog/batch-retrieve", nil, 1) +} + +func TestCatalogBatchUpsertWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.BatchUpsertCatalogObjectsRequest{ + IdempotencyKey: "789ff020-f723-43a9-b4b5-43b5dc1fa3dc", + Batches: []*square.CatalogObjectBatch{ + &square.CatalogObjectBatch{ + Objects: []*square.CatalogObject{ + &square.CatalogObject{ + Item: &square.CatalogObjectItem{ + ID: "id", + }, + }, + &square.CatalogObject{ + Item: &square.CatalogObjectItem{ + ID: "id", + }, + }, + &square.CatalogObject{ + Item: &square.CatalogObjectItem{ + ID: "id", + }, + }, + &square.CatalogObject{ + Tax: &square.CatalogObjectTax{ + ID: "id", + }, + }, + }, + }, + }, + } + _, invocationErr := client.Catalog.BatchUpsert( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCatalogBatchUpsertWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCatalogBatchUpsertWithWireMock", "POST", "/v2/catalog/batch-upsert", nil, 1) +} + +func TestCatalogInfoWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + _, invocationErr := client.Catalog.Info( + context.TODO(), + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCatalogInfoWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCatalogInfoWithWireMock", "GET", "/v2/catalog/info", nil, 1) +} + +func TestCatalogListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.ListCatalogRequest{ + Cursor: square.String( + "cursor", + ), + Types: square.String( + "types", + ), + CatalogVersion: square.Int64( + int64(1000000), + ), + } + _, invocationErr := client.Catalog.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCatalogListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCatalogListWithWireMock", "GET", "/v2/catalog/list", map[string]string{"cursor": "cursor", "types": "types", "catalog_version": "1000000"}, 1) +} + +func TestCatalogSearchWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.SearchCatalogObjectsRequest{ + ObjectTypes: []square.CatalogObjectType{ + square.CatalogObjectTypeItem, + }, + Query: &square.CatalogQuery{ + PrefixQuery: &square.CatalogQueryPrefix{ + AttributeName: "name", + AttributePrefix: "tea", + }, + }, + Limit: square.Int( + 100, + ), + } + _, invocationErr := client.Catalog.Search( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCatalogSearchWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCatalogSearchWithWireMock", "POST", "/v2/catalog/search", nil, 1) +} + +func TestCatalogSearchItemsWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.SearchCatalogItemsRequest{ + TextFilter: square.String( + "red", + ), + CategoryIDs: []string{ + "WINE_CATEGORY_ID", + }, + StockLevels: []square.SearchCatalogItemsRequestStockLevel{ + square.SearchCatalogItemsRequestStockLevelOut, + square.SearchCatalogItemsRequestStockLevelLow, + }, + EnabledLocationIDs: []string{ + "ATL_LOCATION_ID", + }, + Limit: square.Int( + 100, + ), + SortOrder: square.SortOrderAsc.Ptr(), + ProductTypes: []square.CatalogItemProductType{ + square.CatalogItemProductTypeRegular, + }, + CustomAttributeFilters: []*square.CustomAttributeFilter{ + &square.CustomAttributeFilter{ + CustomAttributeDefinitionID: square.String( + "VEGAN_DEFINITION_ID", + ), + BoolFilter: square.Bool( + true, + ), + }, + &square.CustomAttributeFilter{ + CustomAttributeDefinitionID: square.String( + "BRAND_DEFINITION_ID", + ), + StringFilter: square.String( + "Dark Horse", + ), + }, + &square.CustomAttributeFilter{ + Key: square.String( + "VINTAGE", + ), + NumberFilter: &square.Range{ + Min: square.String( + "min", + ), + Max: square.String( + "max", + ), + }, + }, + &square.CustomAttributeFilter{ + CustomAttributeDefinitionID: square.String( + "VARIETAL_DEFINITION_ID", + ), + }, + }, + } + _, invocationErr := client.Catalog.SearchItems( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCatalogSearchItemsWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCatalogSearchItemsWithWireMock", "POST", "/v2/catalog/search-catalog-items", nil, 1) +} + +func TestCatalogUpdateItemModifierListsWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.UpdateItemModifierListsRequest{ + ItemIDs: []string{ + "H42BRLUJ5KTZTTMPVSLFAACQ", + "2JXOBJIHCWBQ4NZ3RIXQGJA6", + }, + ModifierListsToEnable: []string{ + "H42BRLUJ5KTZTTMPVSLFAACQ", + "2JXOBJIHCWBQ4NZ3RIXQGJA6", + }, + ModifierListsToDisable: []string{ + "7WRC16CJZDVLSNDQ35PP6YAD", + }, + } + _, invocationErr := client.Catalog.UpdateItemModifierLists( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCatalogUpdateItemModifierListsWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCatalogUpdateItemModifierListsWithWireMock", "POST", "/v2/catalog/update-item-modifier-lists", nil, 1) +} + +func TestCatalogUpdateItemTaxesWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.UpdateItemTaxesRequest{ + ItemIDs: []string{ + "H42BRLUJ5KTZTTMPVSLFAACQ", + "2JXOBJIHCWBQ4NZ3RIXQGJA6", + }, + TaxesToEnable: []string{ + "4WRCNHCJZDVLSNDQ35PP6YAD", + }, + TaxesToDisable: []string{ + "AQCEGCEBBQONINDOHRGZISEX", + }, + } + _, invocationErr := client.Catalog.UpdateItemTaxes( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCatalogUpdateItemTaxesWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCatalogUpdateItemTaxesWithWireMock", "POST", "/v2/catalog/update-item-taxes", nil, 1) +} diff --git a/catalog/images.go b/catalog/images.go index 9abc1b9..ff6edfe 100644 --- a/catalog/images.go +++ b/catalog/images.go @@ -3,7 +3,9 @@ package catalog import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" io "io" big "math/big" ) @@ -50,3 +52,24 @@ func (u *UpdateImagesRequest) SetImageID(imageID string) { u.ImageID = imageID u.require(updateImagesRequestFieldImageID) } + +func (u *UpdateImagesRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdateImagesRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdateImagesRequest(body) + return nil +} + +func (u *UpdateImagesRequest) MarshalJSON() ([]byte, error) { + type embed UpdateImagesRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/catalog/images/catalog_images_test/catalog_images_test.go b/catalog/images/catalog_images_test/catalog_images_test.go new file mode 100644 index 0000000..06da5cc --- /dev/null +++ b/catalog/images/catalog_images_test/catalog_images_test.go @@ -0,0 +1,119 @@ +// Code generated by Fern. DO NOT EDIT. + +package catalog_images_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + catalog "github.com/square/square-go-sdk/v3/catalog" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + strings "strings" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestCatalogImagesCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &catalog.CreateImagesRequest{ + ImageFile: strings.NewReader( + "", + ), + } + _, invocationErr := client.Catalog.Images.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCatalogImagesCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCatalogImagesCreateWithWireMock", "POST", "/v2/catalog/images", nil, 1) +} + +func TestCatalogImagesUpdateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &catalog.UpdateImagesRequest{ + ImageID: "image_id", + ImageFile: strings.NewReader( + "", + ), + } + _, invocationErr := client.Catalog.Images.Update( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCatalogImagesUpdateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCatalogImagesUpdateWithWireMock", "PUT", "/v2/catalog/images/image_id", nil, 1) +} diff --git a/catalog/images_test.go b/catalog/images_test.go new file mode 100644 index 0000000..d4ac8e1 --- /dev/null +++ b/catalog/images_test.go @@ -0,0 +1,55 @@ +// Code generated by Fern. DO NOT EDIT. + +package catalog + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersUpdateImagesRequest(t *testing.T) { + t.Run("SetImageID", func(t *testing.T) { + obj := &UpdateImagesRequest{} + var fernTestValueImageID string + obj.SetImageID(fernTestValueImageID) + assert.Equal(t, fernTestValueImageID, obj.ImageID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateImagesRequest(t *testing.T) { + t.Run("SetImageID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateImagesRequest{} + var fernTestValueImageID string + + // Act + obj.SetImageID(fernTestValueImageID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/catalog/object.go b/catalog/object.go index 11ab30b..5524305 100644 --- a/catalog/object.go +++ b/catalog/object.go @@ -3,7 +3,9 @@ package catalog import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" big "math/big" ) @@ -131,7 +133,7 @@ type UpsertCatalogObjectRequest struct { // // - For updates, the object must be active (the `is_deleted` field is not `true`). // - For creates, the object ID must start with `#`. The provided ID is replaced with a server-generated ID. - Object *v3.CatalogObject `json:"object,omitempty" url:"-"` + Object *v3.CatalogObject `json:"object" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -157,3 +159,24 @@ func (u *UpsertCatalogObjectRequest) SetObject(object *v3.CatalogObject) { u.Object = object u.require(upsertCatalogObjectRequestFieldObject) } + +func (u *UpsertCatalogObjectRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpsertCatalogObjectRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpsertCatalogObjectRequest(body) + return nil +} + +func (u *UpsertCatalogObjectRequest) MarshalJSON() ([]byte, error) { + type embed UpsertCatalogObjectRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/catalog/object/catalog_object_test/catalog_object_test.go b/catalog/object/catalog_object_test/catalog_object_test.go new file mode 100644 index 0000000..454ad15 --- /dev/null +++ b/catalog/object/catalog_object_test/catalog_object_test.go @@ -0,0 +1,153 @@ +// Code generated by Fern. DO NOT EDIT. + +package catalog_object_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + catalog "github.com/square/square-go-sdk/v3/catalog" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestCatalogObjectUpsertWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &catalog.UpsertCatalogObjectRequest{ + IdempotencyKey: "af3d1afc-7212-4300-b463-0bfc5314a5ae", + Object: &square.CatalogObject{ + Item: &square.CatalogObjectItem{ + ID: "id", + }, + }, + } + _, invocationErr := client.Catalog.Object.Upsert( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCatalogObjectUpsertWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCatalogObjectUpsertWithWireMock", "POST", "/v2/catalog/object", nil, 1) +} + +func TestCatalogObjectGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &catalog.GetObjectRequest{ + ObjectID: "object_id", + IncludeRelatedObjects: square.Bool( + true, + ), + CatalogVersion: square.Int64( + int64(1000000), + ), + IncludeCategoryPathToRoot: square.Bool( + true, + ), + } + _, invocationErr := client.Catalog.Object.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCatalogObjectGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCatalogObjectGetWithWireMock", "GET", "/v2/catalog/object/object_id", map[string]string{"include_related_objects": "true", "catalog_version": "1000000", "include_category_path_to_root": "true"}, 1) +} + +func TestCatalogObjectDeleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &catalog.DeleteObjectRequest{ + ObjectID: "object_id", + } + _, invocationErr := client.Catalog.Object.Delete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCatalogObjectDeleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCatalogObjectDeleteWithWireMock", "DELETE", "/v2/catalog/object/object_id", nil, 1) +} diff --git a/catalog/object_test.go b/catalog/object_test.go new file mode 100644 index 0000000..1e992ca --- /dev/null +++ b/catalog/object_test.go @@ -0,0 +1,262 @@ +// Code generated by Fern. DO NOT EDIT. + +package catalog + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersDeleteObjectRequest(t *testing.T) { + t.Run("SetObjectID", func(t *testing.T) { + obj := &DeleteObjectRequest{} + var fernTestValueObjectID string + obj.SetObjectID(fernTestValueObjectID) + assert.Equal(t, fernTestValueObjectID, obj.ObjectID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDeleteObjectRequest(t *testing.T) { + t.Run("SetObjectID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteObjectRequest{} + var fernTestValueObjectID string + + // Act + obj.SetObjectID(fernTestValueObjectID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetObjectRequest(t *testing.T) { + t.Run("SetObjectID", func(t *testing.T) { + obj := &GetObjectRequest{} + var fernTestValueObjectID string + obj.SetObjectID(fernTestValueObjectID) + assert.Equal(t, fernTestValueObjectID, obj.ObjectID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIncludeRelatedObjects", func(t *testing.T) { + obj := &GetObjectRequest{} + var fernTestValueIncludeRelatedObjects *bool + obj.SetIncludeRelatedObjects(fernTestValueIncludeRelatedObjects) + assert.Equal(t, fernTestValueIncludeRelatedObjects, obj.IncludeRelatedObjects) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogVersion", func(t *testing.T) { + obj := &GetObjectRequest{} + var fernTestValueCatalogVersion *int64 + obj.SetCatalogVersion(fernTestValueCatalogVersion) + assert.Equal(t, fernTestValueCatalogVersion, obj.CatalogVersion) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIncludeCategoryPathToRoot", func(t *testing.T) { + obj := &GetObjectRequest{} + var fernTestValueIncludeCategoryPathToRoot *bool + obj.SetIncludeCategoryPathToRoot(fernTestValueIncludeCategoryPathToRoot) + assert.Equal(t, fernTestValueIncludeCategoryPathToRoot, obj.IncludeCategoryPathToRoot) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetObjectRequest(t *testing.T) { + t.Run("SetObjectID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetObjectRequest{} + var fernTestValueObjectID string + + // Act + obj.SetObjectID(fernTestValueObjectID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIncludeRelatedObjects_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetObjectRequest{} + var fernTestValueIncludeRelatedObjects *bool + + // Act + obj.SetIncludeRelatedObjects(fernTestValueIncludeRelatedObjects) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetObjectRequest{} + var fernTestValueCatalogVersion *int64 + + // Act + obj.SetCatalogVersion(fernTestValueCatalogVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIncludeCategoryPathToRoot_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetObjectRequest{} + var fernTestValueIncludeCategoryPathToRoot *bool + + // Act + obj.SetIncludeCategoryPathToRoot(fernTestValueIncludeCategoryPathToRoot) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpsertCatalogObjectRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &UpsertCatalogObjectRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpsertCatalogObjectRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertCatalogObjectRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/catalog_test.go b/catalog_test.go new file mode 100644 index 0000000..c6e46da --- /dev/null +++ b/catalog_test.go @@ -0,0 +1,9356 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersSearchCatalogItemsRequest(t *testing.T) { + t.Run("SetTextFilter", func(t *testing.T) { + obj := &SearchCatalogItemsRequest{} + var fernTestValueTextFilter *string + obj.SetTextFilter(fernTestValueTextFilter) + assert.Equal(t, fernTestValueTextFilter, obj.TextFilter) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCategoryIDs", func(t *testing.T) { + obj := &SearchCatalogItemsRequest{} + var fernTestValueCategoryIDs []string + obj.SetCategoryIDs(fernTestValueCategoryIDs) + assert.Equal(t, fernTestValueCategoryIDs, obj.CategoryIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStockLevels", func(t *testing.T) { + obj := &SearchCatalogItemsRequest{} + var fernTestValueStockLevels []SearchCatalogItemsRequestStockLevel + obj.SetStockLevels(fernTestValueStockLevels) + assert.Equal(t, fernTestValueStockLevels, obj.StockLevels) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEnabledLocationIDs", func(t *testing.T) { + obj := &SearchCatalogItemsRequest{} + var fernTestValueEnabledLocationIDs []string + obj.SetEnabledLocationIDs(fernTestValueEnabledLocationIDs) + assert.Equal(t, fernTestValueEnabledLocationIDs, obj.EnabledLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchCatalogItemsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &SearchCatalogItemsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSortOrder", func(t *testing.T) { + obj := &SearchCatalogItemsRequest{} + var fernTestValueSortOrder *SortOrder + obj.SetSortOrder(fernTestValueSortOrder) + assert.Equal(t, fernTestValueSortOrder, obj.SortOrder) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetProductTypes", func(t *testing.T) { + obj := &SearchCatalogItemsRequest{} + var fernTestValueProductTypes []CatalogItemProductType + obj.SetProductTypes(fernTestValueProductTypes) + assert.Equal(t, fernTestValueProductTypes, obj.ProductTypes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttributeFilters", func(t *testing.T) { + obj := &SearchCatalogItemsRequest{} + var fernTestValueCustomAttributeFilters []*CustomAttributeFilter + obj.SetCustomAttributeFilters(fernTestValueCustomAttributeFilters) + assert.Equal(t, fernTestValueCustomAttributeFilters, obj.CustomAttributeFilters) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetArchivedState", func(t *testing.T) { + obj := &SearchCatalogItemsRequest{} + var fernTestValueArchivedState *ArchivedState + obj.SetArchivedState(fernTestValueArchivedState) + assert.Equal(t, fernTestValueArchivedState, obj.ArchivedState) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitSearchCatalogItemsRequest(t *testing.T) { + t.Run("SetTextFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogItemsRequest{} + var fernTestValueTextFilter *string + + // Act + obj.SetTextFilter(fernTestValueTextFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCategoryIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogItemsRequest{} + var fernTestValueCategoryIDs []string + + // Act + obj.SetCategoryIDs(fernTestValueCategoryIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStockLevels_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogItemsRequest{} + var fernTestValueStockLevels []SearchCatalogItemsRequestStockLevel + + // Act + obj.SetStockLevels(fernTestValueStockLevels) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEnabledLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogItemsRequest{} + var fernTestValueEnabledLocationIDs []string + + // Act + obj.SetEnabledLocationIDs(fernTestValueEnabledLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogItemsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogItemsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSortOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogItemsRequest{} + var fernTestValueSortOrder *SortOrder + + // Act + obj.SetSortOrder(fernTestValueSortOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetProductTypes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogItemsRequest{} + var fernTestValueProductTypes []CatalogItemProductType + + // Act + obj.SetProductTypes(fernTestValueProductTypes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttributeFilters_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogItemsRequest{} + var fernTestValueCustomAttributeFilters []*CustomAttributeFilter + + // Act + obj.SetCustomAttributeFilters(fernTestValueCustomAttributeFilters) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetArchivedState_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogItemsRequest{} + var fernTestValueArchivedState *ArchivedState + + // Act + obj.SetArchivedState(fernTestValueArchivedState) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateItemModifierListsRequest(t *testing.T) { + t.Run("SetItemIDs", func(t *testing.T) { + obj := &UpdateItemModifierListsRequest{} + var fernTestValueItemIDs []string + obj.SetItemIDs(fernTestValueItemIDs) + assert.Equal(t, fernTestValueItemIDs, obj.ItemIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetModifierListsToEnable", func(t *testing.T) { + obj := &UpdateItemModifierListsRequest{} + var fernTestValueModifierListsToEnable []string + obj.SetModifierListsToEnable(fernTestValueModifierListsToEnable) + assert.Equal(t, fernTestValueModifierListsToEnable, obj.ModifierListsToEnable) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetModifierListsToDisable", func(t *testing.T) { + obj := &UpdateItemModifierListsRequest{} + var fernTestValueModifierListsToDisable []string + obj.SetModifierListsToDisable(fernTestValueModifierListsToDisable) + assert.Equal(t, fernTestValueModifierListsToDisable, obj.ModifierListsToDisable) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateItemModifierListsRequest(t *testing.T) { + t.Run("SetItemIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateItemModifierListsRequest{} + var fernTestValueItemIDs []string + + // Act + obj.SetItemIDs(fernTestValueItemIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetModifierListsToEnable_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateItemModifierListsRequest{} + var fernTestValueModifierListsToEnable []string + + // Act + obj.SetModifierListsToEnable(fernTestValueModifierListsToEnable) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetModifierListsToDisable_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateItemModifierListsRequest{} + var fernTestValueModifierListsToDisable []string + + // Act + obj.SetModifierListsToDisable(fernTestValueModifierListsToDisable) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateItemTaxesRequest(t *testing.T) { + t.Run("SetItemIDs", func(t *testing.T) { + obj := &UpdateItemTaxesRequest{} + var fernTestValueItemIDs []string + obj.SetItemIDs(fernTestValueItemIDs) + assert.Equal(t, fernTestValueItemIDs, obj.ItemIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTaxesToEnable", func(t *testing.T) { + obj := &UpdateItemTaxesRequest{} + var fernTestValueTaxesToEnable []string + obj.SetTaxesToEnable(fernTestValueTaxesToEnable) + assert.Equal(t, fernTestValueTaxesToEnable, obj.TaxesToEnable) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTaxesToDisable", func(t *testing.T) { + obj := &UpdateItemTaxesRequest{} + var fernTestValueTaxesToDisable []string + obj.SetTaxesToDisable(fernTestValueTaxesToDisable) + assert.Equal(t, fernTestValueTaxesToDisable, obj.TaxesToDisable) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateItemTaxesRequest(t *testing.T) { + t.Run("SetItemIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateItemTaxesRequest{} + var fernTestValueItemIDs []string + + // Act + obj.SetItemIDs(fernTestValueItemIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTaxesToEnable_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateItemTaxesRequest{} + var fernTestValueTaxesToEnable []string + + // Act + obj.SetTaxesToEnable(fernTestValueTaxesToEnable) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTaxesToDisable_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateItemTaxesRequest{} + var fernTestValueTaxesToDisable []string + + // Act + obj.SetTaxesToDisable(fernTestValueTaxesToDisable) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBatchDeleteCatalogObjectsRequest(t *testing.T) { + t.Run("SetObjectIDs", func(t *testing.T) { + obj := &BatchDeleteCatalogObjectsRequest{} + var fernTestValueObjectIDs []string + obj.SetObjectIDs(fernTestValueObjectIDs) + assert.Equal(t, fernTestValueObjectIDs, obj.ObjectIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitBatchDeleteCatalogObjectsRequest(t *testing.T) { + t.Run("SetObjectIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchDeleteCatalogObjectsRequest{} + var fernTestValueObjectIDs []string + + // Act + obj.SetObjectIDs(fernTestValueObjectIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBatchGetCatalogObjectsRequest(t *testing.T) { + t.Run("SetObjectIDs", func(t *testing.T) { + obj := &BatchGetCatalogObjectsRequest{} + var fernTestValueObjectIDs []string + obj.SetObjectIDs(fernTestValueObjectIDs) + assert.Equal(t, fernTestValueObjectIDs, obj.ObjectIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIncludeRelatedObjects", func(t *testing.T) { + obj := &BatchGetCatalogObjectsRequest{} + var fernTestValueIncludeRelatedObjects *bool + obj.SetIncludeRelatedObjects(fernTestValueIncludeRelatedObjects) + assert.Equal(t, fernTestValueIncludeRelatedObjects, obj.IncludeRelatedObjects) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogVersion", func(t *testing.T) { + obj := &BatchGetCatalogObjectsRequest{} + var fernTestValueCatalogVersion *int64 + obj.SetCatalogVersion(fernTestValueCatalogVersion) + assert.Equal(t, fernTestValueCatalogVersion, obj.CatalogVersion) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIncludeDeletedObjects", func(t *testing.T) { + obj := &BatchGetCatalogObjectsRequest{} + var fernTestValueIncludeDeletedObjects *bool + obj.SetIncludeDeletedObjects(fernTestValueIncludeDeletedObjects) + assert.Equal(t, fernTestValueIncludeDeletedObjects, obj.IncludeDeletedObjects) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIncludeCategoryPathToRoot", func(t *testing.T) { + obj := &BatchGetCatalogObjectsRequest{} + var fernTestValueIncludeCategoryPathToRoot *bool + obj.SetIncludeCategoryPathToRoot(fernTestValueIncludeCategoryPathToRoot) + assert.Equal(t, fernTestValueIncludeCategoryPathToRoot, obj.IncludeCategoryPathToRoot) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitBatchGetCatalogObjectsRequest(t *testing.T) { + t.Run("SetObjectIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetCatalogObjectsRequest{} + var fernTestValueObjectIDs []string + + // Act + obj.SetObjectIDs(fernTestValueObjectIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIncludeRelatedObjects_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetCatalogObjectsRequest{} + var fernTestValueIncludeRelatedObjects *bool + + // Act + obj.SetIncludeRelatedObjects(fernTestValueIncludeRelatedObjects) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetCatalogObjectsRequest{} + var fernTestValueCatalogVersion *int64 + + // Act + obj.SetCatalogVersion(fernTestValueCatalogVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIncludeDeletedObjects_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetCatalogObjectsRequest{} + var fernTestValueIncludeDeletedObjects *bool + + // Act + obj.SetIncludeDeletedObjects(fernTestValueIncludeDeletedObjects) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIncludeCategoryPathToRoot_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetCatalogObjectsRequest{} + var fernTestValueIncludeCategoryPathToRoot *bool + + // Act + obj.SetIncludeCategoryPathToRoot(fernTestValueIncludeCategoryPathToRoot) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBatchUpsertCatalogObjectsRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &BatchUpsertCatalogObjectsRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBatches", func(t *testing.T) { + obj := &BatchUpsertCatalogObjectsRequest{} + var fernTestValueBatches []*CatalogObjectBatch + obj.SetBatches(fernTestValueBatches) + assert.Equal(t, fernTestValueBatches, obj.Batches) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitBatchUpsertCatalogObjectsRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCatalogObjectsRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBatches_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCatalogObjectsRequest{} + var fernTestValueBatches []*CatalogObjectBatch + + // Act + obj.SetBatches(fernTestValueBatches) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListCatalogRequest(t *testing.T) { + t.Run("SetCursor", func(t *testing.T) { + obj := &ListCatalogRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTypes", func(t *testing.T) { + obj := &ListCatalogRequest{} + var fernTestValueTypes *string + obj.SetTypes(fernTestValueTypes) + assert.Equal(t, fernTestValueTypes, obj.Types) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogVersion", func(t *testing.T) { + obj := &ListCatalogRequest{} + var fernTestValueCatalogVersion *int64 + obj.SetCatalogVersion(fernTestValueCatalogVersion) + assert.Equal(t, fernTestValueCatalogVersion, obj.CatalogVersion) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListCatalogRequest(t *testing.T) { + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCatalogRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTypes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCatalogRequest{} + var fernTestValueTypes *string + + // Act + obj.SetTypes(fernTestValueTypes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCatalogRequest{} + var fernTestValueCatalogVersion *int64 + + // Act + obj.SetCatalogVersion(fernTestValueCatalogVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchCatalogObjectsRequest(t *testing.T) { + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchCatalogObjectsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObjectTypes", func(t *testing.T) { + obj := &SearchCatalogObjectsRequest{} + var fernTestValueObjectTypes []CatalogObjectType + obj.SetObjectTypes(fernTestValueObjectTypes) + assert.Equal(t, fernTestValueObjectTypes, obj.ObjectTypes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIncludeDeletedObjects", func(t *testing.T) { + obj := &SearchCatalogObjectsRequest{} + var fernTestValueIncludeDeletedObjects *bool + obj.SetIncludeDeletedObjects(fernTestValueIncludeDeletedObjects) + assert.Equal(t, fernTestValueIncludeDeletedObjects, obj.IncludeDeletedObjects) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIncludeRelatedObjects", func(t *testing.T) { + obj := &SearchCatalogObjectsRequest{} + var fernTestValueIncludeRelatedObjects *bool + obj.SetIncludeRelatedObjects(fernTestValueIncludeRelatedObjects) + assert.Equal(t, fernTestValueIncludeRelatedObjects, obj.IncludeRelatedObjects) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBeginTime", func(t *testing.T) { + obj := &SearchCatalogObjectsRequest{} + var fernTestValueBeginTime *string + obj.SetBeginTime(fernTestValueBeginTime) + assert.Equal(t, fernTestValueBeginTime, obj.BeginTime) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuery", func(t *testing.T) { + obj := &SearchCatalogObjectsRequest{} + var fernTestValueQuery *CatalogQuery + obj.SetQuery(fernTestValueQuery) + assert.Equal(t, fernTestValueQuery, obj.Query) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &SearchCatalogObjectsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIncludeCategoryPathToRoot", func(t *testing.T) { + obj := &SearchCatalogObjectsRequest{} + var fernTestValueIncludeCategoryPathToRoot *bool + obj.SetIncludeCategoryPathToRoot(fernTestValueIncludeCategoryPathToRoot) + assert.Equal(t, fernTestValueIncludeCategoryPathToRoot, obj.IncludeCategoryPathToRoot) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitSearchCatalogObjectsRequest(t *testing.T) { + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogObjectsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObjectTypes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogObjectsRequest{} + var fernTestValueObjectTypes []CatalogObjectType + + // Act + obj.SetObjectTypes(fernTestValueObjectTypes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIncludeDeletedObjects_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogObjectsRequest{} + var fernTestValueIncludeDeletedObjects *bool + + // Act + obj.SetIncludeDeletedObjects(fernTestValueIncludeDeletedObjects) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIncludeRelatedObjects_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogObjectsRequest{} + var fernTestValueIncludeRelatedObjects *bool + + // Act + obj.SetIncludeRelatedObjects(fernTestValueIncludeRelatedObjects) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBeginTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogObjectsRequest{} + var fernTestValueBeginTime *string + + // Act + obj.SetBeginTime(fernTestValueBeginTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuery_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogObjectsRequest{} + var fernTestValueQuery *CatalogQuery + + // Act + obj.SetQuery(fernTestValueQuery) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogObjectsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIncludeCategoryPathToRoot_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogObjectsRequest{} + var fernTestValueIncludeCategoryPathToRoot *bool + + // Act + obj.SetIncludeCategoryPathToRoot(fernTestValueIncludeCategoryPathToRoot) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBatchDeleteCatalogObjectsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &BatchDeleteCatalogObjectsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeletedObjectIDs", func(t *testing.T) { + obj := &BatchDeleteCatalogObjectsResponse{} + var fernTestValueDeletedObjectIDs []string + obj.SetDeletedObjectIDs(fernTestValueDeletedObjectIDs) + assert.Equal(t, fernTestValueDeletedObjectIDs, obj.DeletedObjectIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeletedAt", func(t *testing.T) { + obj := &BatchDeleteCatalogObjectsResponse{} + var fernTestValueDeletedAt *string + obj.SetDeletedAt(fernTestValueDeletedAt) + assert.Equal(t, fernTestValueDeletedAt, obj.DeletedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBatchDeleteCatalogObjectsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchDeleteCatalogObjectsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchDeleteCatalogObjectsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchDeleteCatalogObjectsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetDeletedObjectIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchDeleteCatalogObjectsResponse{} + var expected []string + obj.DeletedObjectIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeletedObjectIDs(), "getter should return the property value") + }) + + t.Run("GetDeletedObjectIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchDeleteCatalogObjectsResponse{} + obj.DeletedObjectIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetDeletedObjectIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetDeletedObjectIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchDeleteCatalogObjectsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeletedObjectIDs() // Should return zero value + }) + + t.Run("GetDeletedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchDeleteCatalogObjectsResponse{} + var expected *string + obj.DeletedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeletedAt(), "getter should return the property value") + }) + + t.Run("GetDeletedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchDeleteCatalogObjectsResponse{} + obj.DeletedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetDeletedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetDeletedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchDeleteCatalogObjectsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeletedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBatchDeleteCatalogObjectsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchDeleteCatalogObjectsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeletedObjectIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchDeleteCatalogObjectsResponse{} + var fernTestValueDeletedObjectIDs []string + + // Act + obj.SetDeletedObjectIDs(fernTestValueDeletedObjectIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeletedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchDeleteCatalogObjectsResponse{} + var fernTestValueDeletedAt *string + + // Act + obj.SetDeletedAt(fernTestValueDeletedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBatchGetCatalogObjectsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &BatchGetCatalogObjectsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObjects", func(t *testing.T) { + obj := &BatchGetCatalogObjectsResponse{} + var fernTestValueObjects []*CatalogObject + obj.SetObjects(fernTestValueObjects) + assert.Equal(t, fernTestValueObjects, obj.Objects) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRelatedObjects", func(t *testing.T) { + obj := &BatchGetCatalogObjectsResponse{} + var fernTestValueRelatedObjects []*CatalogObject + obj.SetRelatedObjects(fernTestValueRelatedObjects) + assert.Equal(t, fernTestValueRelatedObjects, obj.RelatedObjects) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBatchGetCatalogObjectsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetCatalogObjectsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetCatalogObjectsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetCatalogObjectsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetObjects", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetCatalogObjectsResponse{} + var expected []*CatalogObject + obj.Objects = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObjects(), "getter should return the property value") + }) + + t.Run("GetObjects_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetCatalogObjectsResponse{} + obj.Objects = nil + + // Act & Assert + assert.Nil(t, obj.GetObjects(), "getter should return nil when property is nil") + }) + + t.Run("GetObjects_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetCatalogObjectsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObjects() // Should return zero value + }) + + t.Run("GetRelatedObjects", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetCatalogObjectsResponse{} + var expected []*CatalogObject + obj.RelatedObjects = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRelatedObjects(), "getter should return the property value") + }) + + t.Run("GetRelatedObjects_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetCatalogObjectsResponse{} + obj.RelatedObjects = nil + + // Act & Assert + assert.Nil(t, obj.GetRelatedObjects(), "getter should return nil when property is nil") + }) + + t.Run("GetRelatedObjects_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetCatalogObjectsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRelatedObjects() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBatchGetCatalogObjectsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetCatalogObjectsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObjects_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetCatalogObjectsResponse{} + var fernTestValueObjects []*CatalogObject + + // Act + obj.SetObjects(fernTestValueObjects) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRelatedObjects_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetCatalogObjectsResponse{} + var fernTestValueRelatedObjects []*CatalogObject + + // Act + obj.SetRelatedObjects(fernTestValueRelatedObjects) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBatchUpsertCatalogObjectsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &BatchUpsertCatalogObjectsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObjects", func(t *testing.T) { + obj := &BatchUpsertCatalogObjectsResponse{} + var fernTestValueObjects []*CatalogObject + obj.SetObjects(fernTestValueObjects) + assert.Equal(t, fernTestValueObjects, obj.Objects) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &BatchUpsertCatalogObjectsResponse{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIDMappings", func(t *testing.T) { + obj := &BatchUpsertCatalogObjectsResponse{} + var fernTestValueIDMappings []*CatalogIDMapping + obj.SetIDMappings(fernTestValueIDMappings) + assert.Equal(t, fernTestValueIDMappings, obj.IDMappings) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBatchUpsertCatalogObjectsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCatalogObjectsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCatalogObjectsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchUpsertCatalogObjectsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetObjects", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCatalogObjectsResponse{} + var expected []*CatalogObject + obj.Objects = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObjects(), "getter should return the property value") + }) + + t.Run("GetObjects_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCatalogObjectsResponse{} + obj.Objects = nil + + // Act & Assert + assert.Nil(t, obj.GetObjects(), "getter should return nil when property is nil") + }) + + t.Run("GetObjects_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchUpsertCatalogObjectsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObjects() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCatalogObjectsResponse{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCatalogObjectsResponse{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchUpsertCatalogObjectsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetIDMappings", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCatalogObjectsResponse{} + var expected []*CatalogIDMapping + obj.IDMappings = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIDMappings(), "getter should return the property value") + }) + + t.Run("GetIDMappings_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCatalogObjectsResponse{} + obj.IDMappings = nil + + // Act & Assert + assert.Nil(t, obj.GetIDMappings(), "getter should return nil when property is nil") + }) + + t.Run("GetIDMappings_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchUpsertCatalogObjectsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIDMappings() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBatchUpsertCatalogObjectsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCatalogObjectsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObjects_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCatalogObjectsResponse{} + var fernTestValueObjects []*CatalogObject + + // Act + obj.SetObjects(fernTestValueObjects) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCatalogObjectsResponse{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIDMappings_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCatalogObjectsResponse{} + var fernTestValueIDMappings []*CatalogIDMapping + + // Act + obj.SetIDMappings(fernTestValueIDMappings) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogInfoResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CatalogInfoResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimits", func(t *testing.T) { + obj := &CatalogInfoResponse{} + var fernTestValueLimits *CatalogInfoResponseLimits + obj.SetLimits(fernTestValueLimits) + assert.Equal(t, fernTestValueLimits, obj.Limits) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStandardUnitDescriptionGroup", func(t *testing.T) { + obj := &CatalogInfoResponse{} + var fernTestValueStandardUnitDescriptionGroup *StandardUnitDescriptionGroup + obj.SetStandardUnitDescriptionGroup(fernTestValueStandardUnitDescriptionGroup) + assert.Equal(t, fernTestValueStandardUnitDescriptionGroup, obj.StandardUnitDescriptionGroup) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogInfoResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogInfoResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetLimits", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponse{} + var expected *CatalogInfoResponseLimits + obj.Limits = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLimits(), "getter should return the property value") + }) + + t.Run("GetLimits_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponse{} + obj.Limits = nil + + // Act & Assert + assert.Nil(t, obj.GetLimits(), "getter should return nil when property is nil") + }) + + t.Run("GetLimits_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogInfoResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLimits() // Should return zero value + }) + + t.Run("GetStandardUnitDescriptionGroup", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponse{} + var expected *StandardUnitDescriptionGroup + obj.StandardUnitDescriptionGroup = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStandardUnitDescriptionGroup(), "getter should return the property value") + }) + + t.Run("GetStandardUnitDescriptionGroup_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponse{} + obj.StandardUnitDescriptionGroup = nil + + // Act & Assert + assert.Nil(t, obj.GetStandardUnitDescriptionGroup(), "getter should return nil when property is nil") + }) + + t.Run("GetStandardUnitDescriptionGroup_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogInfoResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStandardUnitDescriptionGroup() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogInfoResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimits_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponse{} + var fernTestValueLimits *CatalogInfoResponseLimits + + // Act + obj.SetLimits(fernTestValueLimits) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStandardUnitDescriptionGroup_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponse{} + var fernTestValueStandardUnitDescriptionGroup *StandardUnitDescriptionGroup + + // Act + obj.SetStandardUnitDescriptionGroup(fernTestValueStandardUnitDescriptionGroup) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogInfoResponseLimits(t *testing.T) { + t.Run("SetBatchUpsertMaxObjectsPerBatch", func(t *testing.T) { + obj := &CatalogInfoResponseLimits{} + var fernTestValueBatchUpsertMaxObjectsPerBatch *int + obj.SetBatchUpsertMaxObjectsPerBatch(fernTestValueBatchUpsertMaxObjectsPerBatch) + assert.Equal(t, fernTestValueBatchUpsertMaxObjectsPerBatch, obj.BatchUpsertMaxObjectsPerBatch) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBatchUpsertMaxTotalObjects", func(t *testing.T) { + obj := &CatalogInfoResponseLimits{} + var fernTestValueBatchUpsertMaxTotalObjects *int + obj.SetBatchUpsertMaxTotalObjects(fernTestValueBatchUpsertMaxTotalObjects) + assert.Equal(t, fernTestValueBatchUpsertMaxTotalObjects, obj.BatchUpsertMaxTotalObjects) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBatchRetrieveMaxObjectIDs", func(t *testing.T) { + obj := &CatalogInfoResponseLimits{} + var fernTestValueBatchRetrieveMaxObjectIDs *int + obj.SetBatchRetrieveMaxObjectIDs(fernTestValueBatchRetrieveMaxObjectIDs) + assert.Equal(t, fernTestValueBatchRetrieveMaxObjectIDs, obj.BatchRetrieveMaxObjectIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSearchMaxPageLimit", func(t *testing.T) { + obj := &CatalogInfoResponseLimits{} + var fernTestValueSearchMaxPageLimit *int + obj.SetSearchMaxPageLimit(fernTestValueSearchMaxPageLimit) + assert.Equal(t, fernTestValueSearchMaxPageLimit, obj.SearchMaxPageLimit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBatchDeleteMaxObjectIDs", func(t *testing.T) { + obj := &CatalogInfoResponseLimits{} + var fernTestValueBatchDeleteMaxObjectIDs *int + obj.SetBatchDeleteMaxObjectIDs(fernTestValueBatchDeleteMaxObjectIDs) + assert.Equal(t, fernTestValueBatchDeleteMaxObjectIDs, obj.BatchDeleteMaxObjectIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdateItemTaxesMaxItemIDs", func(t *testing.T) { + obj := &CatalogInfoResponseLimits{} + var fernTestValueUpdateItemTaxesMaxItemIDs *int + obj.SetUpdateItemTaxesMaxItemIDs(fernTestValueUpdateItemTaxesMaxItemIDs) + assert.Equal(t, fernTestValueUpdateItemTaxesMaxItemIDs, obj.UpdateItemTaxesMaxItemIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdateItemTaxesMaxTaxesToEnable", func(t *testing.T) { + obj := &CatalogInfoResponseLimits{} + var fernTestValueUpdateItemTaxesMaxTaxesToEnable *int + obj.SetUpdateItemTaxesMaxTaxesToEnable(fernTestValueUpdateItemTaxesMaxTaxesToEnable) + assert.Equal(t, fernTestValueUpdateItemTaxesMaxTaxesToEnable, obj.UpdateItemTaxesMaxTaxesToEnable) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdateItemTaxesMaxTaxesToDisable", func(t *testing.T) { + obj := &CatalogInfoResponseLimits{} + var fernTestValueUpdateItemTaxesMaxTaxesToDisable *int + obj.SetUpdateItemTaxesMaxTaxesToDisable(fernTestValueUpdateItemTaxesMaxTaxesToDisable) + assert.Equal(t, fernTestValueUpdateItemTaxesMaxTaxesToDisable, obj.UpdateItemTaxesMaxTaxesToDisable) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdateItemModifierListsMaxItemIDs", func(t *testing.T) { + obj := &CatalogInfoResponseLimits{} + var fernTestValueUpdateItemModifierListsMaxItemIDs *int + obj.SetUpdateItemModifierListsMaxItemIDs(fernTestValueUpdateItemModifierListsMaxItemIDs) + assert.Equal(t, fernTestValueUpdateItemModifierListsMaxItemIDs, obj.UpdateItemModifierListsMaxItemIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdateItemModifierListsMaxModifierListsToEnable", func(t *testing.T) { + obj := &CatalogInfoResponseLimits{} + var fernTestValueUpdateItemModifierListsMaxModifierListsToEnable *int + obj.SetUpdateItemModifierListsMaxModifierListsToEnable(fernTestValueUpdateItemModifierListsMaxModifierListsToEnable) + assert.Equal(t, fernTestValueUpdateItemModifierListsMaxModifierListsToEnable, obj.UpdateItemModifierListsMaxModifierListsToEnable) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdateItemModifierListsMaxModifierListsToDisable", func(t *testing.T) { + obj := &CatalogInfoResponseLimits{} + var fernTestValueUpdateItemModifierListsMaxModifierListsToDisable *int + obj.SetUpdateItemModifierListsMaxModifierListsToDisable(fernTestValueUpdateItemModifierListsMaxModifierListsToDisable) + assert.Equal(t, fernTestValueUpdateItemModifierListsMaxModifierListsToDisable, obj.UpdateItemModifierListsMaxModifierListsToDisable) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogInfoResponseLimits(t *testing.T) { + t.Run("GetBatchUpsertMaxObjectsPerBatch", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + var expected *int + obj.BatchUpsertMaxObjectsPerBatch = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBatchUpsertMaxObjectsPerBatch(), "getter should return the property value") + }) + + t.Run("GetBatchUpsertMaxObjectsPerBatch_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + obj.BatchUpsertMaxObjectsPerBatch = nil + + // Act & Assert + assert.Nil(t, obj.GetBatchUpsertMaxObjectsPerBatch(), "getter should return nil when property is nil") + }) + + t.Run("GetBatchUpsertMaxObjectsPerBatch_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogInfoResponseLimits + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBatchUpsertMaxObjectsPerBatch() // Should return zero value + }) + + t.Run("GetBatchUpsertMaxTotalObjects", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + var expected *int + obj.BatchUpsertMaxTotalObjects = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBatchUpsertMaxTotalObjects(), "getter should return the property value") + }) + + t.Run("GetBatchUpsertMaxTotalObjects_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + obj.BatchUpsertMaxTotalObjects = nil + + // Act & Assert + assert.Nil(t, obj.GetBatchUpsertMaxTotalObjects(), "getter should return nil when property is nil") + }) + + t.Run("GetBatchUpsertMaxTotalObjects_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogInfoResponseLimits + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBatchUpsertMaxTotalObjects() // Should return zero value + }) + + t.Run("GetBatchRetrieveMaxObjectIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + var expected *int + obj.BatchRetrieveMaxObjectIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBatchRetrieveMaxObjectIDs(), "getter should return the property value") + }) + + t.Run("GetBatchRetrieveMaxObjectIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + obj.BatchRetrieveMaxObjectIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetBatchRetrieveMaxObjectIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetBatchRetrieveMaxObjectIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogInfoResponseLimits + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBatchRetrieveMaxObjectIDs() // Should return zero value + }) + + t.Run("GetSearchMaxPageLimit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + var expected *int + obj.SearchMaxPageLimit = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSearchMaxPageLimit(), "getter should return the property value") + }) + + t.Run("GetSearchMaxPageLimit_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + obj.SearchMaxPageLimit = nil + + // Act & Assert + assert.Nil(t, obj.GetSearchMaxPageLimit(), "getter should return nil when property is nil") + }) + + t.Run("GetSearchMaxPageLimit_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogInfoResponseLimits + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSearchMaxPageLimit() // Should return zero value + }) + + t.Run("GetBatchDeleteMaxObjectIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + var expected *int + obj.BatchDeleteMaxObjectIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBatchDeleteMaxObjectIDs(), "getter should return the property value") + }) + + t.Run("GetBatchDeleteMaxObjectIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + obj.BatchDeleteMaxObjectIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetBatchDeleteMaxObjectIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetBatchDeleteMaxObjectIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogInfoResponseLimits + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBatchDeleteMaxObjectIDs() // Should return zero value + }) + + t.Run("GetUpdateItemTaxesMaxItemIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + var expected *int + obj.UpdateItemTaxesMaxItemIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdateItemTaxesMaxItemIDs(), "getter should return the property value") + }) + + t.Run("GetUpdateItemTaxesMaxItemIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + obj.UpdateItemTaxesMaxItemIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdateItemTaxesMaxItemIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdateItemTaxesMaxItemIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogInfoResponseLimits + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdateItemTaxesMaxItemIDs() // Should return zero value + }) + + t.Run("GetUpdateItemTaxesMaxTaxesToEnable", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + var expected *int + obj.UpdateItemTaxesMaxTaxesToEnable = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdateItemTaxesMaxTaxesToEnable(), "getter should return the property value") + }) + + t.Run("GetUpdateItemTaxesMaxTaxesToEnable_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + obj.UpdateItemTaxesMaxTaxesToEnable = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdateItemTaxesMaxTaxesToEnable(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdateItemTaxesMaxTaxesToEnable_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogInfoResponseLimits + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdateItemTaxesMaxTaxesToEnable() // Should return zero value + }) + + t.Run("GetUpdateItemTaxesMaxTaxesToDisable", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + var expected *int + obj.UpdateItemTaxesMaxTaxesToDisable = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdateItemTaxesMaxTaxesToDisable(), "getter should return the property value") + }) + + t.Run("GetUpdateItemTaxesMaxTaxesToDisable_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + obj.UpdateItemTaxesMaxTaxesToDisable = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdateItemTaxesMaxTaxesToDisable(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdateItemTaxesMaxTaxesToDisable_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogInfoResponseLimits + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdateItemTaxesMaxTaxesToDisable() // Should return zero value + }) + + t.Run("GetUpdateItemModifierListsMaxItemIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + var expected *int + obj.UpdateItemModifierListsMaxItemIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdateItemModifierListsMaxItemIDs(), "getter should return the property value") + }) + + t.Run("GetUpdateItemModifierListsMaxItemIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + obj.UpdateItemModifierListsMaxItemIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdateItemModifierListsMaxItemIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdateItemModifierListsMaxItemIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogInfoResponseLimits + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdateItemModifierListsMaxItemIDs() // Should return zero value + }) + + t.Run("GetUpdateItemModifierListsMaxModifierListsToEnable", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + var expected *int + obj.UpdateItemModifierListsMaxModifierListsToEnable = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdateItemModifierListsMaxModifierListsToEnable(), "getter should return the property value") + }) + + t.Run("GetUpdateItemModifierListsMaxModifierListsToEnable_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + obj.UpdateItemModifierListsMaxModifierListsToEnable = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdateItemModifierListsMaxModifierListsToEnable(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdateItemModifierListsMaxModifierListsToEnable_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogInfoResponseLimits + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdateItemModifierListsMaxModifierListsToEnable() // Should return zero value + }) + + t.Run("GetUpdateItemModifierListsMaxModifierListsToDisable", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + var expected *int + obj.UpdateItemModifierListsMaxModifierListsToDisable = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdateItemModifierListsMaxModifierListsToDisable(), "getter should return the property value") + }) + + t.Run("GetUpdateItemModifierListsMaxModifierListsToDisable_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + obj.UpdateItemModifierListsMaxModifierListsToDisable = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdateItemModifierListsMaxModifierListsToDisable(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdateItemModifierListsMaxModifierListsToDisable_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogInfoResponseLimits + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdateItemModifierListsMaxModifierListsToDisable() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogInfoResponseLimits(t *testing.T) { + t.Run("SetBatchUpsertMaxObjectsPerBatch_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + var fernTestValueBatchUpsertMaxObjectsPerBatch *int + + // Act + obj.SetBatchUpsertMaxObjectsPerBatch(fernTestValueBatchUpsertMaxObjectsPerBatch) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBatchUpsertMaxTotalObjects_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + var fernTestValueBatchUpsertMaxTotalObjects *int + + // Act + obj.SetBatchUpsertMaxTotalObjects(fernTestValueBatchUpsertMaxTotalObjects) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBatchRetrieveMaxObjectIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + var fernTestValueBatchRetrieveMaxObjectIDs *int + + // Act + obj.SetBatchRetrieveMaxObjectIDs(fernTestValueBatchRetrieveMaxObjectIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSearchMaxPageLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + var fernTestValueSearchMaxPageLimit *int + + // Act + obj.SetSearchMaxPageLimit(fernTestValueSearchMaxPageLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBatchDeleteMaxObjectIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + var fernTestValueBatchDeleteMaxObjectIDs *int + + // Act + obj.SetBatchDeleteMaxObjectIDs(fernTestValueBatchDeleteMaxObjectIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdateItemTaxesMaxItemIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + var fernTestValueUpdateItemTaxesMaxItemIDs *int + + // Act + obj.SetUpdateItemTaxesMaxItemIDs(fernTestValueUpdateItemTaxesMaxItemIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdateItemTaxesMaxTaxesToEnable_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + var fernTestValueUpdateItemTaxesMaxTaxesToEnable *int + + // Act + obj.SetUpdateItemTaxesMaxTaxesToEnable(fernTestValueUpdateItemTaxesMaxTaxesToEnable) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdateItemTaxesMaxTaxesToDisable_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + var fernTestValueUpdateItemTaxesMaxTaxesToDisable *int + + // Act + obj.SetUpdateItemTaxesMaxTaxesToDisable(fernTestValueUpdateItemTaxesMaxTaxesToDisable) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdateItemModifierListsMaxItemIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + var fernTestValueUpdateItemModifierListsMaxItemIDs *int + + // Act + obj.SetUpdateItemModifierListsMaxItemIDs(fernTestValueUpdateItemModifierListsMaxItemIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdateItemModifierListsMaxModifierListsToEnable_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + var fernTestValueUpdateItemModifierListsMaxModifierListsToEnable *int + + // Act + obj.SetUpdateItemModifierListsMaxModifierListsToEnable(fernTestValueUpdateItemModifierListsMaxModifierListsToEnable) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdateItemModifierListsMaxModifierListsToDisable_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + var fernTestValueUpdateItemModifierListsMaxModifierListsToDisable *int + + // Act + obj.SetUpdateItemModifierListsMaxModifierListsToDisable(fernTestValueUpdateItemModifierListsMaxModifierListsToDisable) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogObjectBatch(t *testing.T) { + t.Run("SetObjects", func(t *testing.T) { + obj := &CatalogObjectBatch{} + var fernTestValueObjects []*CatalogObject + obj.SetObjects(fernTestValueObjects) + assert.Equal(t, fernTestValueObjects, obj.Objects) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogObjectBatch(t *testing.T) { + t.Run("GetObjects", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBatch{} + var expected []*CatalogObject + obj.Objects = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObjects(), "getter should return the property value") + }) + + t.Run("GetObjects_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBatch{} + obj.Objects = nil + + // Act & Assert + assert.Nil(t, obj.GetObjects(), "getter should return nil when property is nil") + }) + + t.Run("GetObjects_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectBatch + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObjects() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogObjectBatch(t *testing.T) { + t.Run("SetObjects_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBatch{} + var fernTestValueObjects []*CatalogObject + + // Act + obj.SetObjects(fernTestValueObjects) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogQuery(t *testing.T) { + t.Run("SetSortedAttributeQuery", func(t *testing.T) { + obj := &CatalogQuery{} + var fernTestValueSortedAttributeQuery *CatalogQuerySortedAttribute + obj.SetSortedAttributeQuery(fernTestValueSortedAttributeQuery) + assert.Equal(t, fernTestValueSortedAttributeQuery, obj.SortedAttributeQuery) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExactQuery", func(t *testing.T) { + obj := &CatalogQuery{} + var fernTestValueExactQuery *CatalogQueryExact + obj.SetExactQuery(fernTestValueExactQuery) + assert.Equal(t, fernTestValueExactQuery, obj.ExactQuery) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSetQuery", func(t *testing.T) { + obj := &CatalogQuery{} + var fernTestValueSetQuery *CatalogQuerySet + obj.SetSetQuery(fernTestValueSetQuery) + assert.Equal(t, fernTestValueSetQuery, obj.SetQuery) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPrefixQuery", func(t *testing.T) { + obj := &CatalogQuery{} + var fernTestValuePrefixQuery *CatalogQueryPrefix + obj.SetPrefixQuery(fernTestValuePrefixQuery) + assert.Equal(t, fernTestValuePrefixQuery, obj.PrefixQuery) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRangeQuery", func(t *testing.T) { + obj := &CatalogQuery{} + var fernTestValueRangeQuery *CatalogQueryRange + obj.SetRangeQuery(fernTestValueRangeQuery) + assert.Equal(t, fernTestValueRangeQuery, obj.RangeQuery) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTextQuery", func(t *testing.T) { + obj := &CatalogQuery{} + var fernTestValueTextQuery *CatalogQueryText + obj.SetTextQuery(fernTestValueTextQuery) + assert.Equal(t, fernTestValueTextQuery, obj.TextQuery) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetItemsForTaxQuery", func(t *testing.T) { + obj := &CatalogQuery{} + var fernTestValueItemsForTaxQuery *CatalogQueryItemsForTax + obj.SetItemsForTaxQuery(fernTestValueItemsForTaxQuery) + assert.Equal(t, fernTestValueItemsForTaxQuery, obj.ItemsForTaxQuery) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetItemsForModifierListQuery", func(t *testing.T) { + obj := &CatalogQuery{} + var fernTestValueItemsForModifierListQuery *CatalogQueryItemsForModifierList + obj.SetItemsForModifierListQuery(fernTestValueItemsForModifierListQuery) + assert.Equal(t, fernTestValueItemsForModifierListQuery, obj.ItemsForModifierListQuery) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetItemsForItemOptionsQuery", func(t *testing.T) { + obj := &CatalogQuery{} + var fernTestValueItemsForItemOptionsQuery *CatalogQueryItemsForItemOptions + obj.SetItemsForItemOptionsQuery(fernTestValueItemsForItemOptionsQuery) + assert.Equal(t, fernTestValueItemsForItemOptionsQuery, obj.ItemsForItemOptionsQuery) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetItemVariationsForItemOptionValuesQuery", func(t *testing.T) { + obj := &CatalogQuery{} + var fernTestValueItemVariationsForItemOptionValuesQuery *CatalogQueryItemVariationsForItemOptionValues + obj.SetItemVariationsForItemOptionValuesQuery(fernTestValueItemVariationsForItemOptionValuesQuery) + assert.Equal(t, fernTestValueItemVariationsForItemOptionValuesQuery, obj.ItemVariationsForItemOptionValuesQuery) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogQuery(t *testing.T) { + t.Run("GetSortedAttributeQuery", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + var expected *CatalogQuerySortedAttribute + obj.SortedAttributeQuery = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSortedAttributeQuery(), "getter should return the property value") + }) + + t.Run("GetSortedAttributeQuery_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + obj.SortedAttributeQuery = nil + + // Act & Assert + assert.Nil(t, obj.GetSortedAttributeQuery(), "getter should return nil when property is nil") + }) + + t.Run("GetSortedAttributeQuery_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSortedAttributeQuery() // Should return zero value + }) + + t.Run("GetExactQuery", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + var expected *CatalogQueryExact + obj.ExactQuery = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExactQuery(), "getter should return the property value") + }) + + t.Run("GetExactQuery_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + obj.ExactQuery = nil + + // Act & Assert + assert.Nil(t, obj.GetExactQuery(), "getter should return nil when property is nil") + }) + + t.Run("GetExactQuery_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExactQuery() // Should return zero value + }) + + t.Run("GetSetQuery", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + var expected *CatalogQuerySet + obj.SetQuery = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSetQuery(), "getter should return the property value") + }) + + t.Run("GetSetQuery_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + obj.SetQuery = nil + + // Act & Assert + assert.Nil(t, obj.GetSetQuery(), "getter should return nil when property is nil") + }) + + t.Run("GetSetQuery_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSetQuery() // Should return zero value + }) + + t.Run("GetPrefixQuery", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + var expected *CatalogQueryPrefix + obj.PrefixQuery = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPrefixQuery(), "getter should return the property value") + }) + + t.Run("GetPrefixQuery_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + obj.PrefixQuery = nil + + // Act & Assert + assert.Nil(t, obj.GetPrefixQuery(), "getter should return nil when property is nil") + }) + + t.Run("GetPrefixQuery_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPrefixQuery() // Should return zero value + }) + + t.Run("GetRangeQuery", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + var expected *CatalogQueryRange + obj.RangeQuery = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRangeQuery(), "getter should return the property value") + }) + + t.Run("GetRangeQuery_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + obj.RangeQuery = nil + + // Act & Assert + assert.Nil(t, obj.GetRangeQuery(), "getter should return nil when property is nil") + }) + + t.Run("GetRangeQuery_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRangeQuery() // Should return zero value + }) + + t.Run("GetTextQuery", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + var expected *CatalogQueryText + obj.TextQuery = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTextQuery(), "getter should return the property value") + }) + + t.Run("GetTextQuery_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + obj.TextQuery = nil + + // Act & Assert + assert.Nil(t, obj.GetTextQuery(), "getter should return nil when property is nil") + }) + + t.Run("GetTextQuery_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTextQuery() // Should return zero value + }) + + t.Run("GetItemsForTaxQuery", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + var expected *CatalogQueryItemsForTax + obj.ItemsForTaxQuery = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItemsForTaxQuery(), "getter should return the property value") + }) + + t.Run("GetItemsForTaxQuery_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + obj.ItemsForTaxQuery = nil + + // Act & Assert + assert.Nil(t, obj.GetItemsForTaxQuery(), "getter should return nil when property is nil") + }) + + t.Run("GetItemsForTaxQuery_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItemsForTaxQuery() // Should return zero value + }) + + t.Run("GetItemsForModifierListQuery", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + var expected *CatalogQueryItemsForModifierList + obj.ItemsForModifierListQuery = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItemsForModifierListQuery(), "getter should return the property value") + }) + + t.Run("GetItemsForModifierListQuery_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + obj.ItemsForModifierListQuery = nil + + // Act & Assert + assert.Nil(t, obj.GetItemsForModifierListQuery(), "getter should return nil when property is nil") + }) + + t.Run("GetItemsForModifierListQuery_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItemsForModifierListQuery() // Should return zero value + }) + + t.Run("GetItemsForItemOptionsQuery", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + var expected *CatalogQueryItemsForItemOptions + obj.ItemsForItemOptionsQuery = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItemsForItemOptionsQuery(), "getter should return the property value") + }) + + t.Run("GetItemsForItemOptionsQuery_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + obj.ItemsForItemOptionsQuery = nil + + // Act & Assert + assert.Nil(t, obj.GetItemsForItemOptionsQuery(), "getter should return nil when property is nil") + }) + + t.Run("GetItemsForItemOptionsQuery_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItemsForItemOptionsQuery() // Should return zero value + }) + + t.Run("GetItemVariationsForItemOptionValuesQuery", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + var expected *CatalogQueryItemVariationsForItemOptionValues + obj.ItemVariationsForItemOptionValuesQuery = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItemVariationsForItemOptionValuesQuery(), "getter should return the property value") + }) + + t.Run("GetItemVariationsForItemOptionValuesQuery_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + obj.ItemVariationsForItemOptionValuesQuery = nil + + // Act & Assert + assert.Nil(t, obj.GetItemVariationsForItemOptionValuesQuery(), "getter should return nil when property is nil") + }) + + t.Run("GetItemVariationsForItemOptionValuesQuery_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItemVariationsForItemOptionValuesQuery() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogQuery(t *testing.T) { + t.Run("SetSortedAttributeQuery_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + var fernTestValueSortedAttributeQuery *CatalogQuerySortedAttribute + + // Act + obj.SetSortedAttributeQuery(fernTestValueSortedAttributeQuery) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExactQuery_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + var fernTestValueExactQuery *CatalogQueryExact + + // Act + obj.SetExactQuery(fernTestValueExactQuery) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSetQuery_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + var fernTestValueSetQuery *CatalogQuerySet + + // Act + obj.SetSetQuery(fernTestValueSetQuery) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPrefixQuery_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + var fernTestValuePrefixQuery *CatalogQueryPrefix + + // Act + obj.SetPrefixQuery(fernTestValuePrefixQuery) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRangeQuery_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + var fernTestValueRangeQuery *CatalogQueryRange + + // Act + obj.SetRangeQuery(fernTestValueRangeQuery) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTextQuery_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + var fernTestValueTextQuery *CatalogQueryText + + // Act + obj.SetTextQuery(fernTestValueTextQuery) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetItemsForTaxQuery_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + var fernTestValueItemsForTaxQuery *CatalogQueryItemsForTax + + // Act + obj.SetItemsForTaxQuery(fernTestValueItemsForTaxQuery) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetItemsForModifierListQuery_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + var fernTestValueItemsForModifierListQuery *CatalogQueryItemsForModifierList + + // Act + obj.SetItemsForModifierListQuery(fernTestValueItemsForModifierListQuery) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetItemsForItemOptionsQuery_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + var fernTestValueItemsForItemOptionsQuery *CatalogQueryItemsForItemOptions + + // Act + obj.SetItemsForItemOptionsQuery(fernTestValueItemsForItemOptionsQuery) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetItemVariationsForItemOptionValuesQuery_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + var fernTestValueItemVariationsForItemOptionValuesQuery *CatalogQueryItemVariationsForItemOptionValues + + // Act + obj.SetItemVariationsForItemOptionValuesQuery(fernTestValueItemVariationsForItemOptionValuesQuery) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogQueryExact(t *testing.T) { + t.Run("SetAttributeName", func(t *testing.T) { + obj := &CatalogQueryExact{} + var fernTestValueAttributeName string + obj.SetAttributeName(fernTestValueAttributeName) + assert.Equal(t, fernTestValueAttributeName, obj.AttributeName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAttributeValue", func(t *testing.T) { + obj := &CatalogQueryExact{} + var fernTestValueAttributeValue string + obj.SetAttributeValue(fernTestValueAttributeValue) + assert.Equal(t, fernTestValueAttributeValue, obj.AttributeValue) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogQueryExact(t *testing.T) { + t.Run("GetAttributeName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryExact{} + var expected string + obj.AttributeName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAttributeName(), "getter should return the property value") + }) + + t.Run("GetAttributeName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQueryExact + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAttributeName() // Should return zero value + }) + + t.Run("GetAttributeValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryExact{} + var expected string + obj.AttributeValue = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAttributeValue(), "getter should return the property value") + }) + + t.Run("GetAttributeValue_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQueryExact + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAttributeValue() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogQueryExact(t *testing.T) { + t.Run("SetAttributeName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryExact{} + var fernTestValueAttributeName string + + // Act + obj.SetAttributeName(fernTestValueAttributeName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAttributeValue_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryExact{} + var fernTestValueAttributeValue string + + // Act + obj.SetAttributeValue(fernTestValueAttributeValue) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogQueryItemVariationsForItemOptionValues(t *testing.T) { + t.Run("SetItemOptionValueIDs", func(t *testing.T) { + obj := &CatalogQueryItemVariationsForItemOptionValues{} + var fernTestValueItemOptionValueIDs []string + obj.SetItemOptionValueIDs(fernTestValueItemOptionValueIDs) + assert.Equal(t, fernTestValueItemOptionValueIDs, obj.ItemOptionValueIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogQueryItemVariationsForItemOptionValues(t *testing.T) { + t.Run("GetItemOptionValueIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryItemVariationsForItemOptionValues{} + var expected []string + obj.ItemOptionValueIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItemOptionValueIDs(), "getter should return the property value") + }) + + t.Run("GetItemOptionValueIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryItemVariationsForItemOptionValues{} + obj.ItemOptionValueIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetItemOptionValueIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetItemOptionValueIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQueryItemVariationsForItemOptionValues + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItemOptionValueIDs() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogQueryItemVariationsForItemOptionValues(t *testing.T) { + t.Run("SetItemOptionValueIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryItemVariationsForItemOptionValues{} + var fernTestValueItemOptionValueIDs []string + + // Act + obj.SetItemOptionValueIDs(fernTestValueItemOptionValueIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogQueryItemsForItemOptions(t *testing.T) { + t.Run("SetItemOptionIDs", func(t *testing.T) { + obj := &CatalogQueryItemsForItemOptions{} + var fernTestValueItemOptionIDs []string + obj.SetItemOptionIDs(fernTestValueItemOptionIDs) + assert.Equal(t, fernTestValueItemOptionIDs, obj.ItemOptionIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogQueryItemsForItemOptions(t *testing.T) { + t.Run("GetItemOptionIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryItemsForItemOptions{} + var expected []string + obj.ItemOptionIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItemOptionIDs(), "getter should return the property value") + }) + + t.Run("GetItemOptionIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryItemsForItemOptions{} + obj.ItemOptionIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetItemOptionIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetItemOptionIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQueryItemsForItemOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItemOptionIDs() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogQueryItemsForItemOptions(t *testing.T) { + t.Run("SetItemOptionIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryItemsForItemOptions{} + var fernTestValueItemOptionIDs []string + + // Act + obj.SetItemOptionIDs(fernTestValueItemOptionIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogQueryItemsForModifierList(t *testing.T) { + t.Run("SetModifierListIDs", func(t *testing.T) { + obj := &CatalogQueryItemsForModifierList{} + var fernTestValueModifierListIDs []string + obj.SetModifierListIDs(fernTestValueModifierListIDs) + assert.Equal(t, fernTestValueModifierListIDs, obj.ModifierListIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogQueryItemsForModifierList(t *testing.T) { + t.Run("GetModifierListIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryItemsForModifierList{} + var expected []string + obj.ModifierListIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetModifierListIDs(), "getter should return the property value") + }) + + t.Run("GetModifierListIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryItemsForModifierList{} + obj.ModifierListIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetModifierListIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetModifierListIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQueryItemsForModifierList + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetModifierListIDs() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogQueryItemsForModifierList(t *testing.T) { + t.Run("SetModifierListIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryItemsForModifierList{} + var fernTestValueModifierListIDs []string + + // Act + obj.SetModifierListIDs(fernTestValueModifierListIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogQueryItemsForTax(t *testing.T) { + t.Run("SetTaxIDs", func(t *testing.T) { + obj := &CatalogQueryItemsForTax{} + var fernTestValueTaxIDs []string + obj.SetTaxIDs(fernTestValueTaxIDs) + assert.Equal(t, fernTestValueTaxIDs, obj.TaxIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogQueryItemsForTax(t *testing.T) { + t.Run("GetTaxIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryItemsForTax{} + var expected []string + obj.TaxIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTaxIDs(), "getter should return the property value") + }) + + t.Run("GetTaxIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryItemsForTax{} + obj.TaxIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetTaxIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetTaxIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQueryItemsForTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTaxIDs() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogQueryItemsForTax(t *testing.T) { + t.Run("SetTaxIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryItemsForTax{} + var fernTestValueTaxIDs []string + + // Act + obj.SetTaxIDs(fernTestValueTaxIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogQueryPrefix(t *testing.T) { + t.Run("SetAttributeName", func(t *testing.T) { + obj := &CatalogQueryPrefix{} + var fernTestValueAttributeName string + obj.SetAttributeName(fernTestValueAttributeName) + assert.Equal(t, fernTestValueAttributeName, obj.AttributeName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAttributePrefix", func(t *testing.T) { + obj := &CatalogQueryPrefix{} + var fernTestValueAttributePrefix string + obj.SetAttributePrefix(fernTestValueAttributePrefix) + assert.Equal(t, fernTestValueAttributePrefix, obj.AttributePrefix) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogQueryPrefix(t *testing.T) { + t.Run("GetAttributeName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryPrefix{} + var expected string + obj.AttributeName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAttributeName(), "getter should return the property value") + }) + + t.Run("GetAttributeName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQueryPrefix + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAttributeName() // Should return zero value + }) + + t.Run("GetAttributePrefix", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryPrefix{} + var expected string + obj.AttributePrefix = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAttributePrefix(), "getter should return the property value") + }) + + t.Run("GetAttributePrefix_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQueryPrefix + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAttributePrefix() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogQueryPrefix(t *testing.T) { + t.Run("SetAttributeName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryPrefix{} + var fernTestValueAttributeName string + + // Act + obj.SetAttributeName(fernTestValueAttributeName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAttributePrefix_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryPrefix{} + var fernTestValueAttributePrefix string + + // Act + obj.SetAttributePrefix(fernTestValueAttributePrefix) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogQueryRange(t *testing.T) { + t.Run("SetAttributeName", func(t *testing.T) { + obj := &CatalogQueryRange{} + var fernTestValueAttributeName string + obj.SetAttributeName(fernTestValueAttributeName) + assert.Equal(t, fernTestValueAttributeName, obj.AttributeName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAttributeMinValue", func(t *testing.T) { + obj := &CatalogQueryRange{} + var fernTestValueAttributeMinValue *int64 + obj.SetAttributeMinValue(fernTestValueAttributeMinValue) + assert.Equal(t, fernTestValueAttributeMinValue, obj.AttributeMinValue) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAttributeMaxValue", func(t *testing.T) { + obj := &CatalogQueryRange{} + var fernTestValueAttributeMaxValue *int64 + obj.SetAttributeMaxValue(fernTestValueAttributeMaxValue) + assert.Equal(t, fernTestValueAttributeMaxValue, obj.AttributeMaxValue) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogQueryRange(t *testing.T) { + t.Run("GetAttributeName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryRange{} + var expected string + obj.AttributeName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAttributeName(), "getter should return the property value") + }) + + t.Run("GetAttributeName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQueryRange + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAttributeName() // Should return zero value + }) + + t.Run("GetAttributeMinValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryRange{} + var expected *int64 + obj.AttributeMinValue = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAttributeMinValue(), "getter should return the property value") + }) + + t.Run("GetAttributeMinValue_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryRange{} + obj.AttributeMinValue = nil + + // Act & Assert + assert.Nil(t, obj.GetAttributeMinValue(), "getter should return nil when property is nil") + }) + + t.Run("GetAttributeMinValue_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQueryRange + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAttributeMinValue() // Should return zero value + }) + + t.Run("GetAttributeMaxValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryRange{} + var expected *int64 + obj.AttributeMaxValue = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAttributeMaxValue(), "getter should return the property value") + }) + + t.Run("GetAttributeMaxValue_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryRange{} + obj.AttributeMaxValue = nil + + // Act & Assert + assert.Nil(t, obj.GetAttributeMaxValue(), "getter should return nil when property is nil") + }) + + t.Run("GetAttributeMaxValue_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQueryRange + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAttributeMaxValue() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogQueryRange(t *testing.T) { + t.Run("SetAttributeName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryRange{} + var fernTestValueAttributeName string + + // Act + obj.SetAttributeName(fernTestValueAttributeName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAttributeMinValue_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryRange{} + var fernTestValueAttributeMinValue *int64 + + // Act + obj.SetAttributeMinValue(fernTestValueAttributeMinValue) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAttributeMaxValue_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryRange{} + var fernTestValueAttributeMaxValue *int64 + + // Act + obj.SetAttributeMaxValue(fernTestValueAttributeMaxValue) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogQuerySet(t *testing.T) { + t.Run("SetAttributeName", func(t *testing.T) { + obj := &CatalogQuerySet{} + var fernTestValueAttributeName string + obj.SetAttributeName(fernTestValueAttributeName) + assert.Equal(t, fernTestValueAttributeName, obj.AttributeName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAttributeValues", func(t *testing.T) { + obj := &CatalogQuerySet{} + var fernTestValueAttributeValues []string + obj.SetAttributeValues(fernTestValueAttributeValues) + assert.Equal(t, fernTestValueAttributeValues, obj.AttributeValues) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogQuerySet(t *testing.T) { + t.Run("GetAttributeName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuerySet{} + var expected string + obj.AttributeName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAttributeName(), "getter should return the property value") + }) + + t.Run("GetAttributeName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuerySet + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAttributeName() // Should return zero value + }) + + t.Run("GetAttributeValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuerySet{} + var expected []string + obj.AttributeValues = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAttributeValues(), "getter should return the property value") + }) + + t.Run("GetAttributeValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuerySet{} + obj.AttributeValues = nil + + // Act & Assert + assert.Nil(t, obj.GetAttributeValues(), "getter should return nil when property is nil") + }) + + t.Run("GetAttributeValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuerySet + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAttributeValues() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogQuerySet(t *testing.T) { + t.Run("SetAttributeName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuerySet{} + var fernTestValueAttributeName string + + // Act + obj.SetAttributeName(fernTestValueAttributeName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAttributeValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuerySet{} + var fernTestValueAttributeValues []string + + // Act + obj.SetAttributeValues(fernTestValueAttributeValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogQuerySortedAttribute(t *testing.T) { + t.Run("SetAttributeName", func(t *testing.T) { + obj := &CatalogQuerySortedAttribute{} + var fernTestValueAttributeName string + obj.SetAttributeName(fernTestValueAttributeName) + assert.Equal(t, fernTestValueAttributeName, obj.AttributeName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetInitialAttributeValue", func(t *testing.T) { + obj := &CatalogQuerySortedAttribute{} + var fernTestValueInitialAttributeValue *string + obj.SetInitialAttributeValue(fernTestValueInitialAttributeValue) + assert.Equal(t, fernTestValueInitialAttributeValue, obj.InitialAttributeValue) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSortOrder", func(t *testing.T) { + obj := &CatalogQuerySortedAttribute{} + var fernTestValueSortOrder *SortOrder + obj.SetSortOrder(fernTestValueSortOrder) + assert.Equal(t, fernTestValueSortOrder, obj.SortOrder) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogQuerySortedAttribute(t *testing.T) { + t.Run("GetAttributeName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuerySortedAttribute{} + var expected string + obj.AttributeName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAttributeName(), "getter should return the property value") + }) + + t.Run("GetAttributeName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuerySortedAttribute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAttributeName() // Should return zero value + }) + + t.Run("GetInitialAttributeValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuerySortedAttribute{} + var expected *string + obj.InitialAttributeValue = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInitialAttributeValue(), "getter should return the property value") + }) + + t.Run("GetInitialAttributeValue_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuerySortedAttribute{} + obj.InitialAttributeValue = nil + + // Act & Assert + assert.Nil(t, obj.GetInitialAttributeValue(), "getter should return nil when property is nil") + }) + + t.Run("GetInitialAttributeValue_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuerySortedAttribute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInitialAttributeValue() // Should return zero value + }) + + t.Run("GetSortOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuerySortedAttribute{} + var expected *SortOrder + obj.SortOrder = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSortOrder(), "getter should return the property value") + }) + + t.Run("GetSortOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuerySortedAttribute{} + obj.SortOrder = nil + + // Act & Assert + assert.Nil(t, obj.GetSortOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetSortOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuerySortedAttribute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSortOrder() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogQuerySortedAttribute(t *testing.T) { + t.Run("SetAttributeName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuerySortedAttribute{} + var fernTestValueAttributeName string + + // Act + obj.SetAttributeName(fernTestValueAttributeName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetInitialAttributeValue_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuerySortedAttribute{} + var fernTestValueInitialAttributeValue *string + + // Act + obj.SetInitialAttributeValue(fernTestValueInitialAttributeValue) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSortOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuerySortedAttribute{} + var fernTestValueSortOrder *SortOrder + + // Act + obj.SetSortOrder(fernTestValueSortOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogQueryText(t *testing.T) { + t.Run("SetKeywords", func(t *testing.T) { + obj := &CatalogQueryText{} + var fernTestValueKeywords []string + obj.SetKeywords(fernTestValueKeywords) + assert.Equal(t, fernTestValueKeywords, obj.Keywords) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogQueryText(t *testing.T) { + t.Run("GetKeywords", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryText{} + var expected []string + obj.Keywords = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetKeywords(), "getter should return the property value") + }) + + t.Run("GetKeywords_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryText{} + obj.Keywords = nil + + // Act & Assert + assert.Nil(t, obj.GetKeywords(), "getter should return nil when property is nil") + }) + + t.Run("GetKeywords_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQueryText + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetKeywords() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogQueryText(t *testing.T) { + t.Run("SetKeywords_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryText{} + var fernTestValueKeywords []string + + // Act + obj.SetKeywords(fernTestValueKeywords) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomAttributeFilter(t *testing.T) { + t.Run("SetCustomAttributeDefinitionID", func(t *testing.T) { + obj := &CustomAttributeFilter{} + var fernTestValueCustomAttributeDefinitionID *string + obj.SetCustomAttributeDefinitionID(fernTestValueCustomAttributeDefinitionID) + assert.Equal(t, fernTestValueCustomAttributeDefinitionID, obj.CustomAttributeDefinitionID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetKey", func(t *testing.T) { + obj := &CustomAttributeFilter{} + var fernTestValueKey *string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStringFilter", func(t *testing.T) { + obj := &CustomAttributeFilter{} + var fernTestValueStringFilter *string + obj.SetStringFilter(fernTestValueStringFilter) + assert.Equal(t, fernTestValueStringFilter, obj.StringFilter) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNumberFilter", func(t *testing.T) { + obj := &CustomAttributeFilter{} + var fernTestValueNumberFilter *Range + obj.SetNumberFilter(fernTestValueNumberFilter) + assert.Equal(t, fernTestValueNumberFilter, obj.NumberFilter) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSelectionUIDsFilter", func(t *testing.T) { + obj := &CustomAttributeFilter{} + var fernTestValueSelectionUIDsFilter []string + obj.SetSelectionUIDsFilter(fernTestValueSelectionUIDsFilter) + assert.Equal(t, fernTestValueSelectionUIDsFilter, obj.SelectionUIDsFilter) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBoolFilter", func(t *testing.T) { + obj := &CustomAttributeFilter{} + var fernTestValueBoolFilter *bool + obj.SetBoolFilter(fernTestValueBoolFilter) + assert.Equal(t, fernTestValueBoolFilter, obj.BoolFilter) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomAttributeFilter(t *testing.T) { + t.Run("GetCustomAttributeDefinitionID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeFilter{} + var expected *string + obj.CustomAttributeDefinitionID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeDefinitionID(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeDefinitionID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeFilter{} + obj.CustomAttributeDefinitionID = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeDefinitionID(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeDefinitionID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeDefinitionID() // Should return zero value + }) + + t.Run("GetKey", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeFilter{} + var expected *string + obj.Key = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetKey(), "getter should return the property value") + }) + + t.Run("GetKey_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeFilter{} + obj.Key = nil + + // Act & Assert + assert.Nil(t, obj.GetKey(), "getter should return nil when property is nil") + }) + + t.Run("GetKey_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetKey() // Should return zero value + }) + + t.Run("GetStringFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeFilter{} + var expected *string + obj.StringFilter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStringFilter(), "getter should return the property value") + }) + + t.Run("GetStringFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeFilter{} + obj.StringFilter = nil + + // Act & Assert + assert.Nil(t, obj.GetStringFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetStringFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStringFilter() // Should return zero value + }) + + t.Run("GetNumberFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeFilter{} + var expected *Range + obj.NumberFilter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNumberFilter(), "getter should return the property value") + }) + + t.Run("GetNumberFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeFilter{} + obj.NumberFilter = nil + + // Act & Assert + assert.Nil(t, obj.GetNumberFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetNumberFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNumberFilter() // Should return zero value + }) + + t.Run("GetSelectionUIDsFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeFilter{} + var expected []string + obj.SelectionUIDsFilter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSelectionUIDsFilter(), "getter should return the property value") + }) + + t.Run("GetSelectionUIDsFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeFilter{} + obj.SelectionUIDsFilter = nil + + // Act & Assert + assert.Nil(t, obj.GetSelectionUIDsFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetSelectionUIDsFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSelectionUIDsFilter() // Should return zero value + }) + + t.Run("GetBoolFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeFilter{} + var expected *bool + obj.BoolFilter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBoolFilter(), "getter should return the property value") + }) + + t.Run("GetBoolFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeFilter{} + obj.BoolFilter = nil + + // Act & Assert + assert.Nil(t, obj.GetBoolFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetBoolFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBoolFilter() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomAttributeFilter(t *testing.T) { + t.Run("SetCustomAttributeDefinitionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeFilter{} + var fernTestValueCustomAttributeDefinitionID *string + + // Act + obj.SetCustomAttributeDefinitionID(fernTestValueCustomAttributeDefinitionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeFilter{} + var fernTestValueKey *string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStringFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeFilter{} + var fernTestValueStringFilter *string + + // Act + obj.SetStringFilter(fernTestValueStringFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNumberFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeFilter{} + var fernTestValueNumberFilter *Range + + // Act + obj.SetNumberFilter(fernTestValueNumberFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSelectionUIDsFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeFilter{} + var fernTestValueSelectionUIDsFilter []string + + // Act + obj.SetSelectionUIDsFilter(fernTestValueSelectionUIDsFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBoolFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeFilter{} + var fernTestValueBoolFilter *bool + + // Act + obj.SetBoolFilter(fernTestValueBoolFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListCatalogResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &ListCatalogResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListCatalogResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObjects", func(t *testing.T) { + obj := &ListCatalogResponse{} + var fernTestValueObjects []*CatalogObject + obj.SetObjects(fernTestValueObjects) + assert.Equal(t, fernTestValueObjects, obj.Objects) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListCatalogResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCatalogResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCatalogResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCatalogResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCatalogResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCatalogResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCatalogResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetObjects", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCatalogResponse{} + var expected []*CatalogObject + obj.Objects = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObjects(), "getter should return the property value") + }) + + t.Run("GetObjects_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCatalogResponse{} + obj.Objects = nil + + // Act & Assert + assert.Nil(t, obj.GetObjects(), "getter should return nil when property is nil") + }) + + t.Run("GetObjects_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCatalogResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObjects() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListCatalogResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCatalogResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCatalogResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObjects_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCatalogResponse{} + var fernTestValueObjects []*CatalogObject + + // Act + obj.SetObjects(fernTestValueObjects) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRange(t *testing.T) { + t.Run("SetMin", func(t *testing.T) { + obj := &Range{} + var fernTestValueMin *string + obj.SetMin(fernTestValueMin) + assert.Equal(t, fernTestValueMin, obj.Min) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMax", func(t *testing.T) { + obj := &Range{} + var fernTestValueMax *string + obj.SetMax(fernTestValueMax) + assert.Equal(t, fernTestValueMax, obj.Max) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRange(t *testing.T) { + t.Run("GetMin", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Range{} + var expected *string + obj.Min = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMin(), "getter should return the property value") + }) + + t.Run("GetMin_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Range{} + obj.Min = nil + + // Act & Assert + assert.Nil(t, obj.GetMin(), "getter should return nil when property is nil") + }) + + t.Run("GetMin_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Range + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMin() // Should return zero value + }) + + t.Run("GetMax", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Range{} + var expected *string + obj.Max = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMax(), "getter should return the property value") + }) + + t.Run("GetMax_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Range{} + obj.Max = nil + + // Act & Assert + assert.Nil(t, obj.GetMax(), "getter should return nil when property is nil") + }) + + t.Run("GetMax_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Range + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMax() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRange(t *testing.T) { + t.Run("SetMin_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Range{} + var fernTestValueMin *string + + // Act + obj.SetMin(fernTestValueMin) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMax_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Range{} + var fernTestValueMax *string + + // Act + obj.SetMax(fernTestValueMax) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchCatalogItemsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &SearchCatalogItemsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetItems", func(t *testing.T) { + obj := &SearchCatalogItemsResponse{} + var fernTestValueItems []*CatalogObject + obj.SetItems(fernTestValueItems) + assert.Equal(t, fernTestValueItems, obj.Items) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchCatalogItemsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMatchedVariationIDs", func(t *testing.T) { + obj := &SearchCatalogItemsResponse{} + var fernTestValueMatchedVariationIDs []string + obj.SetMatchedVariationIDs(fernTestValueMatchedVariationIDs) + assert.Equal(t, fernTestValueMatchedVariationIDs, obj.MatchedVariationIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchCatalogItemsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogItemsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogItemsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchCatalogItemsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetItems", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogItemsResponse{} + var expected []*CatalogObject + obj.Items = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItems(), "getter should return the property value") + }) + + t.Run("GetItems_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogItemsResponse{} + obj.Items = nil + + // Act & Assert + assert.Nil(t, obj.GetItems(), "getter should return nil when property is nil") + }) + + t.Run("GetItems_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchCatalogItemsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItems() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogItemsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogItemsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchCatalogItemsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetMatchedVariationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogItemsResponse{} + var expected []string + obj.MatchedVariationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMatchedVariationIDs(), "getter should return the property value") + }) + + t.Run("GetMatchedVariationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogItemsResponse{} + obj.MatchedVariationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetMatchedVariationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetMatchedVariationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchCatalogItemsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMatchedVariationIDs() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchCatalogItemsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogItemsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetItems_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogItemsResponse{} + var fernTestValueItems []*CatalogObject + + // Act + obj.SetItems(fernTestValueItems) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogItemsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMatchedVariationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogItemsResponse{} + var fernTestValueMatchedVariationIDs []string + + // Act + obj.SetMatchedVariationIDs(fernTestValueMatchedVariationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchCatalogObjectsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &SearchCatalogObjectsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchCatalogObjectsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObjects", func(t *testing.T) { + obj := &SearchCatalogObjectsResponse{} + var fernTestValueObjects []*CatalogObject + obj.SetObjects(fernTestValueObjects) + assert.Equal(t, fernTestValueObjects, obj.Objects) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRelatedObjects", func(t *testing.T) { + obj := &SearchCatalogObjectsResponse{} + var fernTestValueRelatedObjects []*CatalogObject + obj.SetRelatedObjects(fernTestValueRelatedObjects) + assert.Equal(t, fernTestValueRelatedObjects, obj.RelatedObjects) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLatestTime", func(t *testing.T) { + obj := &SearchCatalogObjectsResponse{} + var fernTestValueLatestTime *string + obj.SetLatestTime(fernTestValueLatestTime) + assert.Equal(t, fernTestValueLatestTime, obj.LatestTime) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchCatalogObjectsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogObjectsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogObjectsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchCatalogObjectsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogObjectsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogObjectsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchCatalogObjectsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetObjects", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogObjectsResponse{} + var expected []*CatalogObject + obj.Objects = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObjects(), "getter should return the property value") + }) + + t.Run("GetObjects_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogObjectsResponse{} + obj.Objects = nil + + // Act & Assert + assert.Nil(t, obj.GetObjects(), "getter should return nil when property is nil") + }) + + t.Run("GetObjects_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchCatalogObjectsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObjects() // Should return zero value + }) + + t.Run("GetRelatedObjects", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogObjectsResponse{} + var expected []*CatalogObject + obj.RelatedObjects = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRelatedObjects(), "getter should return the property value") + }) + + t.Run("GetRelatedObjects_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogObjectsResponse{} + obj.RelatedObjects = nil + + // Act & Assert + assert.Nil(t, obj.GetRelatedObjects(), "getter should return nil when property is nil") + }) + + t.Run("GetRelatedObjects_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchCatalogObjectsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRelatedObjects() // Should return zero value + }) + + t.Run("GetLatestTime", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogObjectsResponse{} + var expected *string + obj.LatestTime = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLatestTime(), "getter should return the property value") + }) + + t.Run("GetLatestTime_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogObjectsResponse{} + obj.LatestTime = nil + + // Act & Assert + assert.Nil(t, obj.GetLatestTime(), "getter should return nil when property is nil") + }) + + t.Run("GetLatestTime_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchCatalogObjectsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLatestTime() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchCatalogObjectsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogObjectsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogObjectsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObjects_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogObjectsResponse{} + var fernTestValueObjects []*CatalogObject + + // Act + obj.SetObjects(fernTestValueObjects) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRelatedObjects_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogObjectsResponse{} + var fernTestValueRelatedObjects []*CatalogObject + + // Act + obj.SetRelatedObjects(fernTestValueRelatedObjects) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLatestTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogObjectsResponse{} + var fernTestValueLatestTime *string + + // Act + obj.SetLatestTime(fernTestValueLatestTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersStandardUnitDescription(t *testing.T) { + t.Run("SetUnit", func(t *testing.T) { + obj := &StandardUnitDescription{} + var fernTestValueUnit *MeasurementUnit + obj.SetUnit(fernTestValueUnit) + assert.Equal(t, fernTestValueUnit, obj.Unit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &StandardUnitDescription{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAbbreviation", func(t *testing.T) { + obj := &StandardUnitDescription{} + var fernTestValueAbbreviation *string + obj.SetAbbreviation(fernTestValueAbbreviation) + assert.Equal(t, fernTestValueAbbreviation, obj.Abbreviation) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersStandardUnitDescription(t *testing.T) { + t.Run("GetUnit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &StandardUnitDescription{} + var expected *MeasurementUnit + obj.Unit = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUnit(), "getter should return the property value") + }) + + t.Run("GetUnit_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &StandardUnitDescription{} + obj.Unit = nil + + // Act & Assert + assert.Nil(t, obj.GetUnit(), "getter should return nil when property is nil") + }) + + t.Run("GetUnit_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *StandardUnitDescription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUnit() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &StandardUnitDescription{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &StandardUnitDescription{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *StandardUnitDescription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetAbbreviation", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &StandardUnitDescription{} + var expected *string + obj.Abbreviation = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAbbreviation(), "getter should return the property value") + }) + + t.Run("GetAbbreviation_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &StandardUnitDescription{} + obj.Abbreviation = nil + + // Act & Assert + assert.Nil(t, obj.GetAbbreviation(), "getter should return nil when property is nil") + }) + + t.Run("GetAbbreviation_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *StandardUnitDescription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAbbreviation() // Should return zero value + }) + +} + +func TestSettersMarkExplicitStandardUnitDescription(t *testing.T) { + t.Run("SetUnit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &StandardUnitDescription{} + var fernTestValueUnit *MeasurementUnit + + // Act + obj.SetUnit(fernTestValueUnit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &StandardUnitDescription{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAbbreviation_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &StandardUnitDescription{} + var fernTestValueAbbreviation *string + + // Act + obj.SetAbbreviation(fernTestValueAbbreviation) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersStandardUnitDescriptionGroup(t *testing.T) { + t.Run("SetStandardUnitDescriptions", func(t *testing.T) { + obj := &StandardUnitDescriptionGroup{} + var fernTestValueStandardUnitDescriptions []*StandardUnitDescription + obj.SetStandardUnitDescriptions(fernTestValueStandardUnitDescriptions) + assert.Equal(t, fernTestValueStandardUnitDescriptions, obj.StandardUnitDescriptions) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLanguageCode", func(t *testing.T) { + obj := &StandardUnitDescriptionGroup{} + var fernTestValueLanguageCode *string + obj.SetLanguageCode(fernTestValueLanguageCode) + assert.Equal(t, fernTestValueLanguageCode, obj.LanguageCode) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersStandardUnitDescriptionGroup(t *testing.T) { + t.Run("GetStandardUnitDescriptions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &StandardUnitDescriptionGroup{} + var expected []*StandardUnitDescription + obj.StandardUnitDescriptions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStandardUnitDescriptions(), "getter should return the property value") + }) + + t.Run("GetStandardUnitDescriptions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &StandardUnitDescriptionGroup{} + obj.StandardUnitDescriptions = nil + + // Act & Assert + assert.Nil(t, obj.GetStandardUnitDescriptions(), "getter should return nil when property is nil") + }) + + t.Run("GetStandardUnitDescriptions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *StandardUnitDescriptionGroup + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStandardUnitDescriptions() // Should return zero value + }) + + t.Run("GetLanguageCode", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &StandardUnitDescriptionGroup{} + var expected *string + obj.LanguageCode = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLanguageCode(), "getter should return the property value") + }) + + t.Run("GetLanguageCode_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &StandardUnitDescriptionGroup{} + obj.LanguageCode = nil + + // Act & Assert + assert.Nil(t, obj.GetLanguageCode(), "getter should return nil when property is nil") + }) + + t.Run("GetLanguageCode_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *StandardUnitDescriptionGroup + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLanguageCode() // Should return zero value + }) + +} + +func TestSettersMarkExplicitStandardUnitDescriptionGroup(t *testing.T) { + t.Run("SetStandardUnitDescriptions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &StandardUnitDescriptionGroup{} + var fernTestValueStandardUnitDescriptions []*StandardUnitDescription + + // Act + obj.SetStandardUnitDescriptions(fernTestValueStandardUnitDescriptions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLanguageCode_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &StandardUnitDescriptionGroup{} + var fernTestValueLanguageCode *string + + // Act + obj.SetLanguageCode(fernTestValueLanguageCode) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateItemModifierListsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateItemModifierListsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &UpdateItemModifierListsResponse{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateItemModifierListsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateItemModifierListsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateItemModifierListsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateItemModifierListsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateItemModifierListsResponse{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateItemModifierListsResponse{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateItemModifierListsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateItemModifierListsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateItemModifierListsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateItemModifierListsResponse{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateItemTaxesResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateItemTaxesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &UpdateItemTaxesResponse{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateItemTaxesResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateItemTaxesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateItemTaxesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateItemTaxesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateItemTaxesResponse{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateItemTaxesResponse{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateItemTaxesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateItemTaxesResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateItemTaxesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateItemTaxesResponse{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingBatchDeleteCatalogObjectsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchDeleteCatalogObjectsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BatchDeleteCatalogObjectsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BatchDeleteCatalogObjectsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BatchDeleteCatalogObjectsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBatchGetCatalogObjectsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetCatalogObjectsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BatchGetCatalogObjectsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BatchGetCatalogObjectsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BatchGetCatalogObjectsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBatchUpsertCatalogObjectsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCatalogObjectsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BatchUpsertCatalogObjectsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BatchUpsertCatalogObjectsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BatchUpsertCatalogObjectsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogInfoResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogInfoResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogInfoResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogInfoResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogInfoResponseLimits(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogInfoResponseLimits{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogInfoResponseLimits + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogInfoResponseLimits + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogInfoResponseLimits + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogObjectBatch(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBatch{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogObjectBatch + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectBatch + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectBatch + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogQuery(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuery{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogQuery + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogQuery + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogQuery + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogQueryExact(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryExact{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogQueryExact + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogQueryExact + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogQueryExact + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogQueryItemVariationsForItemOptionValues(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryItemVariationsForItemOptionValues{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogQueryItemVariationsForItemOptionValues + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogQueryItemVariationsForItemOptionValues + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogQueryItemVariationsForItemOptionValues + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogQueryItemsForItemOptions(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryItemsForItemOptions{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogQueryItemsForItemOptions + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogQueryItemsForItemOptions + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogQueryItemsForItemOptions + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogQueryItemsForModifierList(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryItemsForModifierList{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogQueryItemsForModifierList + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogQueryItemsForModifierList + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogQueryItemsForModifierList + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogQueryItemsForTax(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryItemsForTax{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogQueryItemsForTax + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogQueryItemsForTax + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogQueryItemsForTax + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogQueryPrefix(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryPrefix{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogQueryPrefix + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogQueryPrefix + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogQueryPrefix + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogQueryRange(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryRange{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogQueryRange + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogQueryRange + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogQueryRange + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogQuerySet(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuerySet{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogQuerySet + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogQuerySet + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogQuerySet + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogQuerySortedAttribute(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuerySortedAttribute{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogQuerySortedAttribute + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogQuerySortedAttribute + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogQuerySortedAttribute + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogQueryText(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQueryText{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogQueryText + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogQueryText + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogQueryText + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomAttributeFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomAttributeFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomAttributeFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomAttributeFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListCatalogResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCatalogResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListCatalogResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListCatalogResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListCatalogResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRange(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Range{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Range + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Range + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Range + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchCatalogItemsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogItemsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchCatalogItemsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchCatalogItemsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchCatalogItemsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchCatalogObjectsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCatalogObjectsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchCatalogObjectsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchCatalogObjectsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchCatalogObjectsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingStandardUnitDescription(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &StandardUnitDescription{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled StandardUnitDescription + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj StandardUnitDescription + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj StandardUnitDescription + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingStandardUnitDescriptionGroup(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &StandardUnitDescriptionGroup{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled StandardUnitDescriptionGroup + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj StandardUnitDescriptionGroup + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj StandardUnitDescriptionGroup + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateItemModifierListsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateItemModifierListsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateItemModifierListsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateItemModifierListsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateItemModifierListsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateItemTaxesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateItemTaxesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateItemTaxesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateItemTaxesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateItemTaxesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringBatchDeleteCatalogObjectsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BatchDeleteCatalogObjectsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchDeleteCatalogObjectsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBatchGetCatalogObjectsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BatchGetCatalogObjectsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetCatalogObjectsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBatchUpsertCatalogObjectsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BatchUpsertCatalogObjectsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchUpsertCatalogObjectsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogInfoResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogInfoResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogInfoResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogInfoResponseLimits(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogInfoResponseLimits{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogInfoResponseLimits + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogObjectBatch(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectBatch{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectBatch + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogQuery(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogQuery{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuery + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogQueryExact(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogQueryExact{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQueryExact + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogQueryItemVariationsForItemOptionValues(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogQueryItemVariationsForItemOptionValues{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQueryItemVariationsForItemOptionValues + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogQueryItemsForItemOptions(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogQueryItemsForItemOptions{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQueryItemsForItemOptions + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogQueryItemsForModifierList(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogQueryItemsForModifierList{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQueryItemsForModifierList + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogQueryItemsForTax(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogQueryItemsForTax{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQueryItemsForTax + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogQueryPrefix(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogQueryPrefix{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQueryPrefix + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogQueryRange(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogQueryRange{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQueryRange + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogQuerySet(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogQuerySet{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuerySet + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogQuerySortedAttribute(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogQuerySortedAttribute{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuerySortedAttribute + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogQueryText(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogQueryText{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQueryText + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomAttributeFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomAttributeFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListCatalogResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListCatalogResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCatalogResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRange(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Range{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Range + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchCatalogItemsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchCatalogItemsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchCatalogItemsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchCatalogObjectsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchCatalogObjectsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchCatalogObjectsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringStandardUnitDescription(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &StandardUnitDescription{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *StandardUnitDescription + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringStandardUnitDescriptionGroup(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &StandardUnitDescriptionGroup{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *StandardUnitDescriptionGroup + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateItemModifierListsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateItemModifierListsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateItemModifierListsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateItemTaxesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateItemTaxesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateItemTaxesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestEnumArchivedState(t *testing.T) { + t.Run("NewFromString_ARCHIVED_STATE_NOT_ARCHIVED", func(t *testing.T) { + t.Parallel() + val, err := NewArchivedStateFromString("ARCHIVED_STATE_NOT_ARCHIVED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ArchivedState("ARCHIVED_STATE_NOT_ARCHIVED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ARCHIVED_STATE_ARCHIVED", func(t *testing.T) { + t.Parallel() + val, err := NewArchivedStateFromString("ARCHIVED_STATE_ARCHIVED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ArchivedState("ARCHIVED_STATE_ARCHIVED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ARCHIVED_STATE_ALL", func(t *testing.T) { + t.Parallel() + val, err := NewArchivedStateFromString("ARCHIVED_STATE_ALL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ArchivedState("ARCHIVED_STATE_ALL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewArchivedStateFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewArchivedStateFromString("ARCHIVED_STATE_NOT_ARCHIVED") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumSearchCatalogItemsRequestStockLevel(t *testing.T) { + t.Run("NewFromString_OUT", func(t *testing.T) { + t.Parallel() + val, err := NewSearchCatalogItemsRequestStockLevelFromString("OUT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SearchCatalogItemsRequestStockLevel("OUT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LOW", func(t *testing.T) { + t.Parallel() + val, err := NewSearchCatalogItemsRequestStockLevelFromString("LOW") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SearchCatalogItemsRequestStockLevel("LOW"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewSearchCatalogItemsRequestStockLevelFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewSearchCatalogItemsRequestStockLevelFromString("OUT") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestExtraPropertiesBatchDeleteCatalogObjectsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BatchDeleteCatalogObjectsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchDeleteCatalogObjectsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBatchGetCatalogObjectsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BatchGetCatalogObjectsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetCatalogObjectsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBatchUpsertCatalogObjectsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BatchUpsertCatalogObjectsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchUpsertCatalogObjectsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogInfoResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogInfoResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogInfoResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogInfoResponseLimits(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogInfoResponseLimits{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogInfoResponseLimits + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogObjectBatch(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectBatch{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectBatch + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogQuery(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogQuery{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuery + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogQueryExact(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogQueryExact{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQueryExact + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogQueryItemVariationsForItemOptionValues(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogQueryItemVariationsForItemOptionValues{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQueryItemVariationsForItemOptionValues + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogQueryItemsForItemOptions(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogQueryItemsForItemOptions{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQueryItemsForItemOptions + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogQueryItemsForModifierList(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogQueryItemsForModifierList{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQueryItemsForModifierList + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogQueryItemsForTax(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogQueryItemsForTax{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQueryItemsForTax + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogQueryPrefix(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogQueryPrefix{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQueryPrefix + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogQueryRange(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogQueryRange{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQueryRange + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogQuerySet(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogQuerySet{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuerySet + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogQuerySortedAttribute(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogQuerySortedAttribute{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuerySortedAttribute + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogQueryText(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogQueryText{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQueryText + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomAttributeFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomAttributeFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListCatalogResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListCatalogResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCatalogResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRange(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Range{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Range + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchCatalogItemsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchCatalogItemsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchCatalogItemsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchCatalogObjectsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchCatalogObjectsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchCatalogObjectsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesStandardUnitDescription(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &StandardUnitDescription{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *StandardUnitDescription + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesStandardUnitDescriptionGroup(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &StandardUnitDescriptionGroup{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *StandardUnitDescriptionGroup + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateItemModifierListsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateItemModifierListsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateItemModifierListsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateItemTaxesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateItemTaxesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateItemTaxesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/channels.go b/channels.go index ad043ba..841c8c5 100644 --- a/channels.go +++ b/channels.go @@ -14,7 +14,7 @@ var ( ) type BulkRetrieveChannelsRequest struct { - ChannelIDs []string `json:"channel_ids,omitempty" url:"-"` + ChannelIDs []string `json:"channel_ids" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -34,6 +34,27 @@ func (b *BulkRetrieveChannelsRequest) SetChannelIDs(channelIDs []string) { b.require(bulkRetrieveChannelsRequestFieldChannelIDs) } +func (b *BulkRetrieveChannelsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler BulkRetrieveChannelsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *b = BulkRetrieveChannelsRequest(body) + return nil +} + +func (b *BulkRetrieveChannelsRequest) MarshalJSON() ([]byte, error) { + type embed BulkRetrieveChannelsRequest + var marshaler = struct { + embed + }{ + embed: embed(*b), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, b.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( getChannelsRequestFieldChannelID = big.NewInt(1 << 0) ) @@ -165,6 +186,9 @@ func (b *BulkRetrieveChannelsResponse) GetResponses() map[string]*RetrieveChanne } func (b *BulkRetrieveChannelsResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -217,6 +241,9 @@ func (b *BulkRetrieveChannelsResponse) MarshalJSON() ([]byte, error) { } func (b *BulkRetrieveChannelsResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -324,6 +351,9 @@ func (c *Channel) GetUpdatedAt() *string { } func (c *Channel) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -418,6 +448,9 @@ func (c *Channel) MarshalJSON() ([]byte, error) { } func (c *Channel) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -494,6 +527,9 @@ func (l *ListChannelsResponse) GetCursor() *string { } func (l *ListChannelsResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -553,6 +589,9 @@ func (l *ListChannelsResponse) MarshalJSON() ([]byte, error) { } func (l *ListChannelsResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -598,6 +637,9 @@ func (r *Reference) GetID() *string { } func (r *Reference) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -650,6 +692,9 @@ func (r *Reference) MarshalJSON() ([]byte, error) { } func (r *Reference) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -756,6 +801,9 @@ func (r *RetrieveChannelResponse) GetChannel() *Channel { } func (r *RetrieveChannelResponse) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -808,6 +856,9 @@ func (r *RetrieveChannelResponse) MarshalJSON() ([]byte, error) { } func (r *RetrieveChannelResponse) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value diff --git a/channels/channels_test/channels_test.go b/channels/channels_test/channels_test.go new file mode 100644 index 0000000..70138c8 --- /dev/null +++ b/channels/channels_test/channels_test.go @@ -0,0 +1,152 @@ +// Code generated by Fern. DO NOT EDIT. + +package channels_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestChannelsListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.ListChannelsRequest{ + ReferenceType: square.ReferenceTypeUnknownType.Ptr(), + ReferenceID: square.String( + "reference_id", + ), + Status: square.ChannelStatusActive.Ptr(), + Cursor: square.String( + "cursor", + ), + Limit: square.Int( + 1, + ), + } + _, invocationErr := client.Channels.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestChannelsListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestChannelsListWithWireMock", "GET", "/v2/channels", map[string]string{"reference_type": "UNKNOWN_TYPE", "reference_id": "reference_id", "status": "ACTIVE", "cursor": "cursor", "limit": "1"}, 1) +} + +func TestChannelsBulkRetrieveWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.BulkRetrieveChannelsRequest{ + ChannelIDs: []string{ + "CH_9C03D0B59", + "CH_6X139B5MN", + "NOT_EXISTING", + }, + } + _, invocationErr := client.Channels.BulkRetrieve( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestChannelsBulkRetrieveWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestChannelsBulkRetrieveWithWireMock", "POST", "/v2/channels/bulk-retrieve", nil, 1) +} + +func TestChannelsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.GetChannelsRequest{ + ChannelID: "channel_id", + } + _, invocationErr := client.Channels.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestChannelsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestChannelsGetWithWireMock", "GET", "/v2/channels/channel_id", nil, 1) +} diff --git a/channels_test.go b/channels_test.go new file mode 100644 index 0000000..8adc9e5 --- /dev/null +++ b/channels_test.go @@ -0,0 +1,2079 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersBulkRetrieveChannelsRequest(t *testing.T) { + t.Run("SetChannelIDs", func(t *testing.T) { + obj := &BulkRetrieveChannelsRequest{} + var fernTestValueChannelIDs []string + obj.SetChannelIDs(fernTestValueChannelIDs) + assert.Equal(t, fernTestValueChannelIDs, obj.ChannelIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitBulkRetrieveChannelsRequest(t *testing.T) { + t.Run("SetChannelIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveChannelsRequest{} + var fernTestValueChannelIDs []string + + // Act + obj.SetChannelIDs(fernTestValueChannelIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetChannelsRequest(t *testing.T) { + t.Run("SetChannelID", func(t *testing.T) { + obj := &GetChannelsRequest{} + var fernTestValueChannelID string + obj.SetChannelID(fernTestValueChannelID) + assert.Equal(t, fernTestValueChannelID, obj.ChannelID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetChannelsRequest(t *testing.T) { + t.Run("SetChannelID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetChannelsRequest{} + var fernTestValueChannelID string + + // Act + obj.SetChannelID(fernTestValueChannelID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListChannelsRequest(t *testing.T) { + t.Run("SetReferenceType", func(t *testing.T) { + obj := &ListChannelsRequest{} + var fernTestValueReferenceType *ReferenceType + obj.SetReferenceType(fernTestValueReferenceType) + assert.Equal(t, fernTestValueReferenceType, obj.ReferenceType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReferenceID", func(t *testing.T) { + obj := &ListChannelsRequest{} + var fernTestValueReferenceID *string + obj.SetReferenceID(fernTestValueReferenceID) + assert.Equal(t, fernTestValueReferenceID, obj.ReferenceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &ListChannelsRequest{} + var fernTestValueStatus *ChannelStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListChannelsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListChannelsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListChannelsRequest(t *testing.T) { + t.Run("SetReferenceType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListChannelsRequest{} + var fernTestValueReferenceType *ReferenceType + + // Act + obj.SetReferenceType(fernTestValueReferenceType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReferenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListChannelsRequest{} + var fernTestValueReferenceID *string + + // Act + obj.SetReferenceID(fernTestValueReferenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListChannelsRequest{} + var fernTestValueStatus *ChannelStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListChannelsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListChannelsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkRetrieveChannelsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &BulkRetrieveChannelsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetResponses", func(t *testing.T) { + obj := &BulkRetrieveChannelsResponse{} + var fernTestValueResponses map[string]*RetrieveChannelResponse + obj.SetResponses(fernTestValueResponses) + assert.Equal(t, fernTestValueResponses, obj.Responses) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkRetrieveChannelsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveChannelsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveChannelsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkRetrieveChannelsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetResponses", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveChannelsResponse{} + var expected map[string]*RetrieveChannelResponse + obj.Responses = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetResponses(), "getter should return the property value") + }) + + t.Run("GetResponses_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveChannelsResponse{} + obj.Responses = nil + + // Act & Assert + assert.Nil(t, obj.GetResponses(), "getter should return nil when property is nil") + }) + + t.Run("GetResponses_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkRetrieveChannelsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetResponses() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkRetrieveChannelsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveChannelsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetResponses_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveChannelsResponse{} + var fernTestValueResponses map[string]*RetrieveChannelResponse + + // Act + obj.SetResponses(fernTestValueResponses) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersChannel(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &Channel{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMerchantID", func(t *testing.T) { + obj := &Channel{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &Channel{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &Channel{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReference", func(t *testing.T) { + obj := &Channel{} + var fernTestValueReference *Reference + obj.SetReference(fernTestValueReference) + assert.Equal(t, fernTestValueReference, obj.Reference) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &Channel{} + var fernTestValueStatus *ChannelStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &Channel{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &Channel{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersChannel(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Channel{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Channel{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Channel + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Channel{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Channel{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Channel + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Channel{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Channel{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Channel + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Channel{} + var expected *int + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Channel{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Channel + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetReference", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Channel{} + var expected *Reference + obj.Reference = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReference(), "getter should return the property value") + }) + + t.Run("GetReference_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Channel{} + obj.Reference = nil + + // Act & Assert + assert.Nil(t, obj.GetReference(), "getter should return nil when property is nil") + }) + + t.Run("GetReference_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Channel + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReference() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Channel{} + var expected *ChannelStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Channel{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Channel + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Channel{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Channel{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Channel + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Channel{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Channel{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Channel + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitChannel(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Channel{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Channel{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Channel{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Channel{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReference_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Channel{} + var fernTestValueReference *Reference + + // Act + obj.SetReference(fernTestValueReference) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Channel{} + var fernTestValueStatus *ChannelStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Channel{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Channel{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListChannelsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &ListChannelsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetChannels", func(t *testing.T) { + obj := &ListChannelsResponse{} + var fernTestValueChannels []*Channel + obj.SetChannels(fernTestValueChannels) + assert.Equal(t, fernTestValueChannels, obj.Channels) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListChannelsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListChannelsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListChannelsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListChannelsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListChannelsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetChannels", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListChannelsResponse{} + var expected []*Channel + obj.Channels = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetChannels(), "getter should return the property value") + }) + + t.Run("GetChannels_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListChannelsResponse{} + obj.Channels = nil + + // Act & Assert + assert.Nil(t, obj.GetChannels(), "getter should return nil when property is nil") + }) + + t.Run("GetChannels_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListChannelsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetChannels() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListChannelsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListChannelsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListChannelsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListChannelsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListChannelsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetChannels_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListChannelsResponse{} + var fernTestValueChannels []*Channel + + // Act + obj.SetChannels(fernTestValueChannels) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListChannelsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersReference(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &Reference{} + var fernTestValueType *ReferenceType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &Reference{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersReference(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Reference{} + var expected *ReferenceType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Reference{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Reference + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Reference{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Reference{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Reference + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitReference(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Reference{} + var fernTestValueType *ReferenceType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Reference{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRetrieveChannelResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &RetrieveChannelResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetChannel", func(t *testing.T) { + obj := &RetrieveChannelResponse{} + var fernTestValueChannel *Channel + obj.SetChannel(fernTestValueChannel) + assert.Equal(t, fernTestValueChannel, obj.Channel) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRetrieveChannelResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveChannelResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveChannelResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveChannelResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetChannel", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveChannelResponse{} + var expected *Channel + obj.Channel = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetChannel(), "getter should return the property value") + }) + + t.Run("GetChannel_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveChannelResponse{} + obj.Channel = nil + + // Act & Assert + assert.Nil(t, obj.GetChannel(), "getter should return nil when property is nil") + }) + + t.Run("GetChannel_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveChannelResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetChannel() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRetrieveChannelResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveChannelResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetChannel_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveChannelResponse{} + var fernTestValueChannel *Channel + + // Act + obj.SetChannel(fernTestValueChannel) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingBulkRetrieveChannelsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveChannelsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkRetrieveChannelsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkRetrieveChannelsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkRetrieveChannelsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingChannel(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Channel{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Channel + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Channel + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Channel + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListChannelsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListChannelsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListChannelsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListChannelsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListChannelsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingReference(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Reference{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Reference + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Reference + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Reference + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRetrieveChannelResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveChannelResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RetrieveChannelResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RetrieveChannelResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RetrieveChannelResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringBulkRetrieveChannelsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkRetrieveChannelsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkRetrieveChannelsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringChannel(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Channel{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Channel + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListChannelsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListChannelsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListChannelsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringReference(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Reference{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Reference + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRetrieveChannelResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RetrieveChannelResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveChannelResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestEnumChannelStatus(t *testing.T) { + t.Run("NewFromString_ACTIVE", func(t *testing.T) { + t.Parallel() + val, err := NewChannelStatusFromString("ACTIVE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ChannelStatus("ACTIVE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INACTIVE", func(t *testing.T) { + t.Parallel() + val, err := NewChannelStatusFromString("INACTIVE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ChannelStatus("INACTIVE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewChannelStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewChannelStatusFromString("ACTIVE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumReferenceType(t *testing.T) { + t.Run("NewFromString_UNKNOWN_TYPE", func(t *testing.T) { + t.Parallel() + val, err := NewReferenceTypeFromString("UNKNOWN_TYPE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ReferenceType("UNKNOWN_TYPE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LOCATION", func(t *testing.T) { + t.Parallel() + val, err := NewReferenceTypeFromString("LOCATION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ReferenceType("LOCATION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FIRST_PARTY_INTEGRATION", func(t *testing.T) { + t.Parallel() + val, err := NewReferenceTypeFromString("FIRST_PARTY_INTEGRATION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ReferenceType("FIRST_PARTY_INTEGRATION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_OAUTH_APPLICATION", func(t *testing.T) { + t.Parallel() + val, err := NewReferenceTypeFromString("OAUTH_APPLICATION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ReferenceType("OAUTH_APPLICATION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ONLINE_SITE", func(t *testing.T) { + t.Parallel() + val, err := NewReferenceTypeFromString("ONLINE_SITE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ReferenceType("ONLINE_SITE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ONLINE_CHECKOUT", func(t *testing.T) { + t.Parallel() + val, err := NewReferenceTypeFromString("ONLINE_CHECKOUT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ReferenceType("ONLINE_CHECKOUT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVOICE", func(t *testing.T) { + t.Parallel() + val, err := NewReferenceTypeFromString("INVOICE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ReferenceType("INVOICE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GIFT_CARD", func(t *testing.T) { + t.Parallel() + val, err := NewReferenceTypeFromString("GIFT_CARD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ReferenceType("GIFT_CARD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GIFT_CARD_MARKETPLACE", func(t *testing.T) { + t.Parallel() + val, err := NewReferenceTypeFromString("GIFT_CARD_MARKETPLACE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ReferenceType("GIFT_CARD_MARKETPLACE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RECURRING_SUBSCRIPTION", func(t *testing.T) { + t.Parallel() + val, err := NewReferenceTypeFromString("RECURRING_SUBSCRIPTION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ReferenceType("RECURRING_SUBSCRIPTION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ONLINE_BOOKING_FLOW", func(t *testing.T) { + t.Parallel() + val, err := NewReferenceTypeFromString("ONLINE_BOOKING_FLOW") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ReferenceType("ONLINE_BOOKING_FLOW"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SQUARE_ASSISTANT", func(t *testing.T) { + t.Parallel() + val, err := NewReferenceTypeFromString("SQUARE_ASSISTANT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ReferenceType("SQUARE_ASSISTANT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CASH_LOCAL", func(t *testing.T) { + t.Parallel() + val, err := NewReferenceTypeFromString("CASH_LOCAL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ReferenceType("CASH_LOCAL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_POINT_OF_SALE", func(t *testing.T) { + t.Parallel() + val, err := NewReferenceTypeFromString("POINT_OF_SALE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ReferenceType("POINT_OF_SALE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_KIOSK", func(t *testing.T) { + t.Parallel() + val, err := NewReferenceTypeFromString("KIOSK") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ReferenceType("KIOSK"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewReferenceTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewReferenceTypeFromString("UNKNOWN_TYPE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestExtraPropertiesBulkRetrieveChannelsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkRetrieveChannelsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkRetrieveChannelsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesChannel(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Channel{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Channel + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListChannelsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListChannelsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListChannelsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesReference(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Reference{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Reference + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRetrieveChannelResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RetrieveChannelResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveChannelResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/checkout.go b/checkout.go index b086247..cc7522b 100644 --- a/checkout.go +++ b/checkout.go @@ -44,7 +44,7 @@ type UpdateLocationSettingsRequest struct { // The ID of the location for which to retrieve settings. LocationID string `json:"-" url:"-"` // Describe your updates using the `location_settings` object. Make sure it contains only the fields that have changed. - LocationSettings *CheckoutLocationSettings `json:"location_settings,omitempty" url:"-"` + LocationSettings *CheckoutLocationSettings `json:"location_settings" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -71,13 +71,34 @@ func (u *UpdateLocationSettingsRequest) SetLocationSettings(locationSettings *Ch u.require(updateLocationSettingsRequestFieldLocationSettings) } +func (u *UpdateLocationSettingsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdateLocationSettingsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdateLocationSettingsRequest(body) + return nil +} + +func (u *UpdateLocationSettingsRequest) MarshalJSON() ([]byte, error) { + type embed UpdateLocationSettingsRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( updateMerchantSettingsRequestFieldMerchantSettings = big.NewInt(1 << 0) ) type UpdateMerchantSettingsRequest struct { // Describe your updates using the `merchant_settings` object. Make sure it contains only the fields that have changed. - MerchantSettings *CheckoutMerchantSettings `json:"merchant_settings,omitempty" url:"-"` + MerchantSettings *CheckoutMerchantSettings `json:"merchant_settings" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -97,6 +118,27 @@ func (u *UpdateMerchantSettingsRequest) SetMerchantSettings(merchantSettings *Ch u.require(updateMerchantSettingsRequestFieldMerchantSettings) } +func (u *UpdateMerchantSettingsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdateMerchantSettingsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdateMerchantSettingsRequest(body) + return nil +} + +func (u *UpdateMerchantSettingsRequest) MarshalJSON() ([]byte, error) { + type embed UpdateMerchantSettingsRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( checkoutLocationSettingsFieldLocationID = big.NewInt(1 << 0) checkoutLocationSettingsFieldCustomerNotesEnabled = big.NewInt(1 << 1) @@ -184,6 +226,9 @@ func (c *CheckoutLocationSettings) GetUpdatedAt() *string { } func (c *CheckoutLocationSettings) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -271,6 +316,9 @@ func (c *CheckoutLocationSettings) MarshalJSON() ([]byte, error) { } func (c *CheckoutLocationSettings) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -327,6 +375,9 @@ func (c *CheckoutLocationSettingsBranding) GetButtonShape() *CheckoutLocationSet } func (c *CheckoutLocationSettingsBranding) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -386,6 +437,9 @@ func (c *CheckoutLocationSettingsBranding) MarshalJSON() ([]byte, error) { } func (c *CheckoutLocationSettingsBranding) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -470,6 +524,9 @@ func (c *CheckoutLocationSettingsCoupons) GetEnabled() *bool { } func (c *CheckoutLocationSettingsCoupons) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -515,6 +572,9 @@ func (c *CheckoutLocationSettingsCoupons) MarshalJSON() ([]byte, error) { } func (c *CheckoutLocationSettingsCoupons) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -569,6 +629,9 @@ func (c *CheckoutLocationSettingsPolicy) GetDescription() *string { } func (c *CheckoutLocationSettingsPolicy) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -628,6 +691,9 @@ func (c *CheckoutLocationSettingsPolicy) MarshalJSON() ([]byte, error) { } func (c *CheckoutLocationSettingsPolicy) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -705,6 +771,9 @@ func (c *CheckoutLocationSettingsTipping) GetDefaultSmartTip() *Money { } func (c *CheckoutLocationSettingsTipping) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -778,6 +847,9 @@ func (c *CheckoutLocationSettingsTipping) MarshalJSON() ([]byte, error) { } func (c *CheckoutLocationSettingsTipping) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -825,6 +897,9 @@ func (c *CheckoutMerchantSettings) GetUpdatedAt() *string { } func (c *CheckoutMerchantSettings) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -877,6 +952,9 @@ func (c *CheckoutMerchantSettings) MarshalJSON() ([]byte, error) { } func (c *CheckoutMerchantSettings) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -937,6 +1015,9 @@ func (c *CheckoutMerchantSettingsPaymentMethods) GetAfterpayClearpay() *Checkout } func (c *CheckoutMerchantSettingsPaymentMethods) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -1003,6 +1084,9 @@ func (c *CheckoutMerchantSettingsPaymentMethods) MarshalJSON() ([]byte, error) { } func (c *CheckoutMerchantSettingsPaymentMethods) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -1058,6 +1142,9 @@ func (c *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay) GetEnabled() *b } func (c *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -1117,6 +1204,9 @@ func (c *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay) MarshalJSON() ( } func (c *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -1160,6 +1250,9 @@ func (c *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange) } func (c *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -1212,6 +1305,9 @@ func (c *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange) } func (c *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -1247,6 +1343,9 @@ func (c *CheckoutMerchantSettingsPaymentMethodsPaymentMethod) GetEnabled() *bool } func (c *CheckoutMerchantSettingsPaymentMethodsPaymentMethod) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -1292,6 +1391,9 @@ func (c *CheckoutMerchantSettingsPaymentMethodsPaymentMethod) MarshalJSON() ([]b } func (c *CheckoutMerchantSettingsPaymentMethodsPaymentMethod) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -1336,6 +1438,9 @@ func (r *RetrieveLocationSettingsResponse) GetLocationSettings() *CheckoutLocati } func (r *RetrieveLocationSettingsResponse) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -1388,6 +1493,9 @@ func (r *RetrieveLocationSettingsResponse) MarshalJSON() ([]byte, error) { } func (r *RetrieveLocationSettingsResponse) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -1432,6 +1540,9 @@ func (r *RetrieveMerchantSettingsResponse) GetMerchantSettings() *CheckoutMercha } func (r *RetrieveMerchantSettingsResponse) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -1484,6 +1595,9 @@ func (r *RetrieveMerchantSettingsResponse) MarshalJSON() ([]byte, error) { } func (r *RetrieveMerchantSettingsResponse) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -1528,6 +1642,9 @@ func (u *UpdateLocationSettingsResponse) GetLocationSettings() *CheckoutLocation } func (u *UpdateLocationSettingsResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -1580,6 +1697,9 @@ func (u *UpdateLocationSettingsResponse) MarshalJSON() ([]byte, error) { } func (u *UpdateLocationSettingsResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -1624,6 +1744,9 @@ func (u *UpdateMerchantSettingsResponse) GetMerchantSettings() *CheckoutMerchant } func (u *UpdateMerchantSettingsResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -1676,6 +1799,9 @@ func (u *UpdateMerchantSettingsResponse) MarshalJSON() ([]byte, error) { } func (u *UpdateMerchantSettingsResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value diff --git a/checkout/checkout_test/checkout_test.go b/checkout/checkout_test/checkout_test.go new file mode 100644 index 0000000..81ac718 --- /dev/null +++ b/checkout/checkout_test/checkout_test.go @@ -0,0 +1,160 @@ +// Code generated by Fern. DO NOT EDIT. + +package checkout_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestCheckoutRetrieveLocationSettingsWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.RetrieveLocationSettingsRequest{ + LocationID: "location_id", + } + _, invocationErr := client.Checkout.RetrieveLocationSettings( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCheckoutRetrieveLocationSettingsWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCheckoutRetrieveLocationSettingsWithWireMock", "GET", "/v2/online-checkout/location-settings/location_id", nil, 1) +} + +func TestCheckoutUpdateLocationSettingsWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.UpdateLocationSettingsRequest{ + LocationID: "location_id", + LocationSettings: &square.CheckoutLocationSettings{}, + } + _, invocationErr := client.Checkout.UpdateLocationSettings( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCheckoutUpdateLocationSettingsWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCheckoutUpdateLocationSettingsWithWireMock", "PUT", "/v2/online-checkout/location-settings/location_id", nil, 1) +} + +func TestCheckoutRetrieveMerchantSettingsWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + _, invocationErr := client.Checkout.RetrieveMerchantSettings( + context.TODO(), + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCheckoutRetrieveMerchantSettingsWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCheckoutRetrieveMerchantSettingsWithWireMock", "GET", "/v2/online-checkout/merchant-settings", nil, 1) +} + +func TestCheckoutUpdateMerchantSettingsWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.UpdateMerchantSettingsRequest{ + MerchantSettings: &square.CheckoutMerchantSettings{}, + } + _, invocationErr := client.Checkout.UpdateMerchantSettings( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCheckoutUpdateMerchantSettingsWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCheckoutUpdateMerchantSettingsWithWireMock", "PUT", "/v2/online-checkout/merchant-settings", nil, 1) +} diff --git a/checkout/payment_links.go b/checkout/payment_links.go index fedbf7b..4f135dd 100644 --- a/checkout/payment_links.go +++ b/checkout/payment_links.go @@ -3,7 +3,9 @@ package checkout import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" big "math/big" ) @@ -105,6 +107,27 @@ func (c *CreatePaymentLinkRequest) SetPaymentNote(paymentNote *string) { c.require(createPaymentLinkRequestFieldPaymentNote) } +func (c *CreatePaymentLinkRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreatePaymentLinkRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreatePaymentLinkRequest(body) + return nil +} + +func (c *CreatePaymentLinkRequest) MarshalJSON() ([]byte, error) { + type embed CreatePaymentLinkRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( deletePaymentLinksRequestFieldID = big.NewInt(1 << 0) ) @@ -210,7 +233,7 @@ type UpdatePaymentLinkRequest struct { ID string `json:"-" url:"-"` // The `payment_link` object describing the updates to apply. // For more information, see [Update a payment link](https://developer.squareup.com/docs/checkout-api/manage-checkout#update-a-payment-link). - PaymentLink *v3.PaymentLink `json:"payment_link,omitempty" url:"-"` + PaymentLink *v3.PaymentLink `json:"payment_link" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -236,3 +259,24 @@ func (u *UpdatePaymentLinkRequest) SetPaymentLink(paymentLink *v3.PaymentLink) { u.PaymentLink = paymentLink u.require(updatePaymentLinkRequestFieldPaymentLink) } + +func (u *UpdatePaymentLinkRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdatePaymentLinkRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdatePaymentLinkRequest(body) + return nil +} + +func (u *UpdatePaymentLinkRequest) MarshalJSON() ([]byte, error) { + type embed UpdatePaymentLinkRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/checkout/payment_links_test.go b/checkout/payment_links_test.go new file mode 100644 index 0000000..f1ba4de --- /dev/null +++ b/checkout/payment_links_test.go @@ -0,0 +1,352 @@ +// Code generated by Fern. DO NOT EDIT. + +package checkout + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersCreatePaymentLinkRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreatePaymentLinkRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDescription", func(t *testing.T) { + obj := &CreatePaymentLinkRequest{} + var fernTestValueDescription *string + obj.SetDescription(fernTestValueDescription) + assert.Equal(t, fernTestValueDescription, obj.Description) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPaymentNote", func(t *testing.T) { + obj := &CreatePaymentLinkRequest{} + var fernTestValuePaymentNote *string + obj.SetPaymentNote(fernTestValuePaymentNote) + assert.Equal(t, fernTestValuePaymentNote, obj.PaymentNote) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreatePaymentLinkRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentLinkRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDescription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentLinkRequest{} + var fernTestValueDescription *string + + // Act + obj.SetDescription(fernTestValueDescription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPaymentNote_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentLinkRequest{} + var fernTestValuePaymentNote *string + + // Act + obj.SetPaymentNote(fernTestValuePaymentNote) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeletePaymentLinksRequest(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &DeletePaymentLinksRequest{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDeletePaymentLinksRequest(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeletePaymentLinksRequest{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetPaymentLinksRequest(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &GetPaymentLinksRequest{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetPaymentLinksRequest(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPaymentLinksRequest{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListPaymentLinksRequest(t *testing.T) { + t.Run("SetCursor", func(t *testing.T) { + obj := &ListPaymentLinksRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListPaymentLinksRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListPaymentLinksRequest(t *testing.T) { + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentLinksRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentLinksRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdatePaymentLinkRequest(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &UpdatePaymentLinkRequest{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdatePaymentLinkRequest(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdatePaymentLinkRequest{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/checkout/paymentlinks/checkout_payment_links_test/checkout_payment_links_test.go b/checkout/paymentlinks/checkout_payment_links_test/checkout_payment_links_test.go new file mode 100644 index 0000000..f939d85 --- /dev/null +++ b/checkout/paymentlinks/checkout_payment_links_test/checkout_payment_links_test.go @@ -0,0 +1,214 @@ +// Code generated by Fern. DO NOT EDIT. + +package checkout_payment_links_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + checkout "github.com/square/square-go-sdk/v3/checkout" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestCheckoutPaymentLinksListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &checkout.ListPaymentLinksRequest{ + Cursor: square.String( + "cursor", + ), + Limit: square.Int( + 1, + ), + } + _, invocationErr := client.Checkout.PaymentLinks.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCheckoutPaymentLinksListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCheckoutPaymentLinksListWithWireMock", "GET", "/v2/online-checkout/payment-links", map[string]string{"cursor": "cursor", "limit": "1"}, 1) +} + +func TestCheckoutPaymentLinksCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &checkout.CreatePaymentLinkRequest{ + IdempotencyKey: square.String( + "cd9e25dc-d9f2-4430-aedb-61605070e95f", + ), + QuickPay: &square.QuickPay{ + Name: "Auto Detailing", + PriceMoney: &square.Money{ + Amount: square.Int64( + int64(10000), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + LocationID: "A9Y43N9ABXZBP", + }, + } + _, invocationErr := client.Checkout.PaymentLinks.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCheckoutPaymentLinksCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCheckoutPaymentLinksCreateWithWireMock", "POST", "/v2/online-checkout/payment-links", nil, 1) +} + +func TestCheckoutPaymentLinksGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &checkout.GetPaymentLinksRequest{ + ID: "id", + } + _, invocationErr := client.Checkout.PaymentLinks.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCheckoutPaymentLinksGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCheckoutPaymentLinksGetWithWireMock", "GET", "/v2/online-checkout/payment-links/id", nil, 1) +} + +func TestCheckoutPaymentLinksUpdateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &checkout.UpdatePaymentLinkRequest{ + ID: "id", + PaymentLink: &square.PaymentLink{ + Version: 1, + CheckoutOptions: &square.CheckoutOptions{ + AskForShippingAddress: square.Bool( + true, + ), + }, + }, + } + _, invocationErr := client.Checkout.PaymentLinks.Update( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCheckoutPaymentLinksUpdateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCheckoutPaymentLinksUpdateWithWireMock", "PUT", "/v2/online-checkout/payment-links/id", nil, 1) +} + +func TestCheckoutPaymentLinksDeleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &checkout.DeletePaymentLinksRequest{ + ID: "id", + } + _, invocationErr := client.Checkout.PaymentLinks.Delete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCheckoutPaymentLinksDeleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCheckoutPaymentLinksDeleteWithWireMock", "DELETE", "/v2/online-checkout/payment-links/id", nil, 1) +} diff --git a/checkout_test.go b/checkout_test.go new file mode 100644 index 0000000..c8fcb3b --- /dev/null +++ b/checkout_test.go @@ -0,0 +1,4198 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersRetrieveLocationSettingsRequest(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &RetrieveLocationSettingsRequest{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitRetrieveLocationSettingsRequest(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationSettingsRequest{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateLocationSettingsRequest(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &UpdateLocationSettingsRequest{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationSettings", func(t *testing.T) { + obj := &UpdateLocationSettingsRequest{} + var fernTestValueLocationSettings *CheckoutLocationSettings + obj.SetLocationSettings(fernTestValueLocationSettings) + assert.Equal(t, fernTestValueLocationSettings, obj.LocationSettings) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateLocationSettingsRequest(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateLocationSettingsRequest{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationSettings_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateLocationSettingsRequest{} + var fernTestValueLocationSettings *CheckoutLocationSettings + + // Act + obj.SetLocationSettings(fernTestValueLocationSettings) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateMerchantSettingsRequest(t *testing.T) { + t.Run("SetMerchantSettings", func(t *testing.T) { + obj := &UpdateMerchantSettingsRequest{} + var fernTestValueMerchantSettings *CheckoutMerchantSettings + obj.SetMerchantSettings(fernTestValueMerchantSettings) + assert.Equal(t, fernTestValueMerchantSettings, obj.MerchantSettings) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateMerchantSettingsRequest(t *testing.T) { + t.Run("SetMerchantSettings_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateMerchantSettingsRequest{} + var fernTestValueMerchantSettings *CheckoutMerchantSettings + + // Act + obj.SetMerchantSettings(fernTestValueMerchantSettings) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCheckoutLocationSettings(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &CheckoutLocationSettings{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerNotesEnabled", func(t *testing.T) { + obj := &CheckoutLocationSettings{} + var fernTestValueCustomerNotesEnabled *bool + obj.SetCustomerNotesEnabled(fernTestValueCustomerNotesEnabled) + assert.Equal(t, fernTestValueCustomerNotesEnabled, obj.CustomerNotesEnabled) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPolicies", func(t *testing.T) { + obj := &CheckoutLocationSettings{} + var fernTestValuePolicies []*CheckoutLocationSettingsPolicy + obj.SetPolicies(fernTestValuePolicies) + assert.Equal(t, fernTestValuePolicies, obj.Policies) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBranding", func(t *testing.T) { + obj := &CheckoutLocationSettings{} + var fernTestValueBranding *CheckoutLocationSettingsBranding + obj.SetBranding(fernTestValueBranding) + assert.Equal(t, fernTestValueBranding, obj.Branding) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTipping", func(t *testing.T) { + obj := &CheckoutLocationSettings{} + var fernTestValueTipping *CheckoutLocationSettingsTipping + obj.SetTipping(fernTestValueTipping) + assert.Equal(t, fernTestValueTipping, obj.Tipping) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCoupons", func(t *testing.T) { + obj := &CheckoutLocationSettings{} + var fernTestValueCoupons *CheckoutLocationSettingsCoupons + obj.SetCoupons(fernTestValueCoupons) + assert.Equal(t, fernTestValueCoupons, obj.Coupons) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CheckoutLocationSettings{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCheckoutLocationSettings(t *testing.T) { + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettings{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettings{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetCustomerNotesEnabled", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettings{} + var expected *bool + obj.CustomerNotesEnabled = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomerNotesEnabled(), "getter should return the property value") + }) + + t.Run("GetCustomerNotesEnabled_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettings{} + obj.CustomerNotesEnabled = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomerNotesEnabled(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomerNotesEnabled_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomerNotesEnabled() // Should return zero value + }) + + t.Run("GetPolicies", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettings{} + var expected []*CheckoutLocationSettingsPolicy + obj.Policies = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPolicies(), "getter should return the property value") + }) + + t.Run("GetPolicies_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettings{} + obj.Policies = nil + + // Act & Assert + assert.Nil(t, obj.GetPolicies(), "getter should return nil when property is nil") + }) + + t.Run("GetPolicies_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPolicies() // Should return zero value + }) + + t.Run("GetBranding", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettings{} + var expected *CheckoutLocationSettingsBranding + obj.Branding = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBranding(), "getter should return the property value") + }) + + t.Run("GetBranding_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettings{} + obj.Branding = nil + + // Act & Assert + assert.Nil(t, obj.GetBranding(), "getter should return nil when property is nil") + }) + + t.Run("GetBranding_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBranding() // Should return zero value + }) + + t.Run("GetTipping", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettings{} + var expected *CheckoutLocationSettingsTipping + obj.Tipping = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTipping(), "getter should return the property value") + }) + + t.Run("GetTipping_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettings{} + obj.Tipping = nil + + // Act & Assert + assert.Nil(t, obj.GetTipping(), "getter should return nil when property is nil") + }) + + t.Run("GetTipping_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTipping() // Should return zero value + }) + + t.Run("GetCoupons", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettings{} + var expected *CheckoutLocationSettingsCoupons + obj.Coupons = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCoupons(), "getter should return the property value") + }) + + t.Run("GetCoupons_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettings{} + obj.Coupons = nil + + // Act & Assert + assert.Nil(t, obj.GetCoupons(), "getter should return nil when property is nil") + }) + + t.Run("GetCoupons_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCoupons() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettings{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettings{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCheckoutLocationSettings(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettings{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerNotesEnabled_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettings{} + var fernTestValueCustomerNotesEnabled *bool + + // Act + obj.SetCustomerNotesEnabled(fernTestValueCustomerNotesEnabled) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPolicies_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettings{} + var fernTestValuePolicies []*CheckoutLocationSettingsPolicy + + // Act + obj.SetPolicies(fernTestValuePolicies) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBranding_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettings{} + var fernTestValueBranding *CheckoutLocationSettingsBranding + + // Act + obj.SetBranding(fernTestValueBranding) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTipping_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettings{} + var fernTestValueTipping *CheckoutLocationSettingsTipping + + // Act + obj.SetTipping(fernTestValueTipping) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCoupons_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettings{} + var fernTestValueCoupons *CheckoutLocationSettingsCoupons + + // Act + obj.SetCoupons(fernTestValueCoupons) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettings{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCheckoutLocationSettingsBranding(t *testing.T) { + t.Run("SetHeaderType", func(t *testing.T) { + obj := &CheckoutLocationSettingsBranding{} + var fernTestValueHeaderType *CheckoutLocationSettingsBrandingHeaderType + obj.SetHeaderType(fernTestValueHeaderType) + assert.Equal(t, fernTestValueHeaderType, obj.HeaderType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetButtonColor", func(t *testing.T) { + obj := &CheckoutLocationSettingsBranding{} + var fernTestValueButtonColor *string + obj.SetButtonColor(fernTestValueButtonColor) + assert.Equal(t, fernTestValueButtonColor, obj.ButtonColor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetButtonShape", func(t *testing.T) { + obj := &CheckoutLocationSettingsBranding{} + var fernTestValueButtonShape *CheckoutLocationSettingsBrandingButtonShape + obj.SetButtonShape(fernTestValueButtonShape) + assert.Equal(t, fernTestValueButtonShape, obj.ButtonShape) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCheckoutLocationSettingsBranding(t *testing.T) { + t.Run("GetHeaderType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsBranding{} + var expected *CheckoutLocationSettingsBrandingHeaderType + obj.HeaderType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetHeaderType(), "getter should return the property value") + }) + + t.Run("GetHeaderType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsBranding{} + obj.HeaderType = nil + + // Act & Assert + assert.Nil(t, obj.GetHeaderType(), "getter should return nil when property is nil") + }) + + t.Run("GetHeaderType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettingsBranding + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetHeaderType() // Should return zero value + }) + + t.Run("GetButtonColor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsBranding{} + var expected *string + obj.ButtonColor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetButtonColor(), "getter should return the property value") + }) + + t.Run("GetButtonColor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsBranding{} + obj.ButtonColor = nil + + // Act & Assert + assert.Nil(t, obj.GetButtonColor(), "getter should return nil when property is nil") + }) + + t.Run("GetButtonColor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettingsBranding + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetButtonColor() // Should return zero value + }) + + t.Run("GetButtonShape", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsBranding{} + var expected *CheckoutLocationSettingsBrandingButtonShape + obj.ButtonShape = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetButtonShape(), "getter should return the property value") + }) + + t.Run("GetButtonShape_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsBranding{} + obj.ButtonShape = nil + + // Act & Assert + assert.Nil(t, obj.GetButtonShape(), "getter should return nil when property is nil") + }) + + t.Run("GetButtonShape_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettingsBranding + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetButtonShape() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCheckoutLocationSettingsBranding(t *testing.T) { + t.Run("SetHeaderType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsBranding{} + var fernTestValueHeaderType *CheckoutLocationSettingsBrandingHeaderType + + // Act + obj.SetHeaderType(fernTestValueHeaderType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetButtonColor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsBranding{} + var fernTestValueButtonColor *string + + // Act + obj.SetButtonColor(fernTestValueButtonColor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetButtonShape_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsBranding{} + var fernTestValueButtonShape *CheckoutLocationSettingsBrandingButtonShape + + // Act + obj.SetButtonShape(fernTestValueButtonShape) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCheckoutLocationSettingsCoupons(t *testing.T) { + t.Run("SetEnabled", func(t *testing.T) { + obj := &CheckoutLocationSettingsCoupons{} + var fernTestValueEnabled *bool + obj.SetEnabled(fernTestValueEnabled) + assert.Equal(t, fernTestValueEnabled, obj.Enabled) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCheckoutLocationSettingsCoupons(t *testing.T) { + t.Run("GetEnabled", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsCoupons{} + var expected *bool + obj.Enabled = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEnabled(), "getter should return the property value") + }) + + t.Run("GetEnabled_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsCoupons{} + obj.Enabled = nil + + // Act & Assert + assert.Nil(t, obj.GetEnabled(), "getter should return nil when property is nil") + }) + + t.Run("GetEnabled_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettingsCoupons + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEnabled() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCheckoutLocationSettingsCoupons(t *testing.T) { + t.Run("SetEnabled_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsCoupons{} + var fernTestValueEnabled *bool + + // Act + obj.SetEnabled(fernTestValueEnabled) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCheckoutLocationSettingsPolicy(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &CheckoutLocationSettingsPolicy{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTitle", func(t *testing.T) { + obj := &CheckoutLocationSettingsPolicy{} + var fernTestValueTitle *string + obj.SetTitle(fernTestValueTitle) + assert.Equal(t, fernTestValueTitle, obj.Title) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDescription", func(t *testing.T) { + obj := &CheckoutLocationSettingsPolicy{} + var fernTestValueDescription *string + obj.SetDescription(fernTestValueDescription) + assert.Equal(t, fernTestValueDescription, obj.Description) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCheckoutLocationSettingsPolicy(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsPolicy{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsPolicy{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettingsPolicy + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetTitle", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsPolicy{} + var expected *string + obj.Title = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTitle(), "getter should return the property value") + }) + + t.Run("GetTitle_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsPolicy{} + obj.Title = nil + + // Act & Assert + assert.Nil(t, obj.GetTitle(), "getter should return nil when property is nil") + }) + + t.Run("GetTitle_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettingsPolicy + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTitle() // Should return zero value + }) + + t.Run("GetDescription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsPolicy{} + var expected *string + obj.Description = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDescription(), "getter should return the property value") + }) + + t.Run("GetDescription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsPolicy{} + obj.Description = nil + + // Act & Assert + assert.Nil(t, obj.GetDescription(), "getter should return nil when property is nil") + }) + + t.Run("GetDescription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettingsPolicy + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDescription() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCheckoutLocationSettingsPolicy(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsPolicy{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTitle_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsPolicy{} + var fernTestValueTitle *string + + // Act + obj.SetTitle(fernTestValueTitle) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDescription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsPolicy{} + var fernTestValueDescription *string + + // Act + obj.SetDescription(fernTestValueDescription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCheckoutLocationSettingsTipping(t *testing.T) { + t.Run("SetPercentages", func(t *testing.T) { + obj := &CheckoutLocationSettingsTipping{} + var fernTestValuePercentages []int + obj.SetPercentages(fernTestValuePercentages) + assert.Equal(t, fernTestValuePercentages, obj.Percentages) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSmartTippingEnabled", func(t *testing.T) { + obj := &CheckoutLocationSettingsTipping{} + var fernTestValueSmartTippingEnabled *bool + obj.SetSmartTippingEnabled(fernTestValueSmartTippingEnabled) + assert.Equal(t, fernTestValueSmartTippingEnabled, obj.SmartTippingEnabled) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDefaultPercent", func(t *testing.T) { + obj := &CheckoutLocationSettingsTipping{} + var fernTestValueDefaultPercent *int + obj.SetDefaultPercent(fernTestValueDefaultPercent) + assert.Equal(t, fernTestValueDefaultPercent, obj.DefaultPercent) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSmartTips", func(t *testing.T) { + obj := &CheckoutLocationSettingsTipping{} + var fernTestValueSmartTips []*Money + obj.SetSmartTips(fernTestValueSmartTips) + assert.Equal(t, fernTestValueSmartTips, obj.SmartTips) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDefaultSmartTip", func(t *testing.T) { + obj := &CheckoutLocationSettingsTipping{} + var fernTestValueDefaultSmartTip *Money + obj.SetDefaultSmartTip(fernTestValueDefaultSmartTip) + assert.Equal(t, fernTestValueDefaultSmartTip, obj.DefaultSmartTip) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCheckoutLocationSettingsTipping(t *testing.T) { + t.Run("GetPercentages", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsTipping{} + var expected []int + obj.Percentages = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPercentages(), "getter should return the property value") + }) + + t.Run("GetPercentages_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsTipping{} + obj.Percentages = nil + + // Act & Assert + assert.Nil(t, obj.GetPercentages(), "getter should return nil when property is nil") + }) + + t.Run("GetPercentages_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettingsTipping + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPercentages() // Should return zero value + }) + + t.Run("GetSmartTippingEnabled", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsTipping{} + var expected *bool + obj.SmartTippingEnabled = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSmartTippingEnabled(), "getter should return the property value") + }) + + t.Run("GetSmartTippingEnabled_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsTipping{} + obj.SmartTippingEnabled = nil + + // Act & Assert + assert.Nil(t, obj.GetSmartTippingEnabled(), "getter should return nil when property is nil") + }) + + t.Run("GetSmartTippingEnabled_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettingsTipping + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSmartTippingEnabled() // Should return zero value + }) + + t.Run("GetDefaultPercent", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsTipping{} + var expected *int + obj.DefaultPercent = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDefaultPercent(), "getter should return the property value") + }) + + t.Run("GetDefaultPercent_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsTipping{} + obj.DefaultPercent = nil + + // Act & Assert + assert.Nil(t, obj.GetDefaultPercent(), "getter should return nil when property is nil") + }) + + t.Run("GetDefaultPercent_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettingsTipping + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDefaultPercent() // Should return zero value + }) + + t.Run("GetSmartTips", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsTipping{} + var expected []*Money + obj.SmartTips = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSmartTips(), "getter should return the property value") + }) + + t.Run("GetSmartTips_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsTipping{} + obj.SmartTips = nil + + // Act & Assert + assert.Nil(t, obj.GetSmartTips(), "getter should return nil when property is nil") + }) + + t.Run("GetSmartTips_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettingsTipping + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSmartTips() // Should return zero value + }) + + t.Run("GetDefaultSmartTip", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsTipping{} + var expected *Money + obj.DefaultSmartTip = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDefaultSmartTip(), "getter should return the property value") + }) + + t.Run("GetDefaultSmartTip_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsTipping{} + obj.DefaultSmartTip = nil + + // Act & Assert + assert.Nil(t, obj.GetDefaultSmartTip(), "getter should return nil when property is nil") + }) + + t.Run("GetDefaultSmartTip_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettingsTipping + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDefaultSmartTip() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCheckoutLocationSettingsTipping(t *testing.T) { + t.Run("SetPercentages_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsTipping{} + var fernTestValuePercentages []int + + // Act + obj.SetPercentages(fernTestValuePercentages) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSmartTippingEnabled_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsTipping{} + var fernTestValueSmartTippingEnabled *bool + + // Act + obj.SetSmartTippingEnabled(fernTestValueSmartTippingEnabled) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDefaultPercent_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsTipping{} + var fernTestValueDefaultPercent *int + + // Act + obj.SetDefaultPercent(fernTestValueDefaultPercent) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSmartTips_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsTipping{} + var fernTestValueSmartTips []*Money + + // Act + obj.SetSmartTips(fernTestValueSmartTips) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDefaultSmartTip_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsTipping{} + var fernTestValueDefaultSmartTip *Money + + // Act + obj.SetDefaultSmartTip(fernTestValueDefaultSmartTip) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCheckoutMerchantSettings(t *testing.T) { + t.Run("SetPaymentMethods", func(t *testing.T) { + obj := &CheckoutMerchantSettings{} + var fernTestValuePaymentMethods *CheckoutMerchantSettingsPaymentMethods + obj.SetPaymentMethods(fernTestValuePaymentMethods) + assert.Equal(t, fernTestValuePaymentMethods, obj.PaymentMethods) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CheckoutMerchantSettings{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCheckoutMerchantSettings(t *testing.T) { + t.Run("GetPaymentMethods", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettings{} + var expected *CheckoutMerchantSettingsPaymentMethods + obj.PaymentMethods = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentMethods(), "getter should return the property value") + }) + + t.Run("GetPaymentMethods_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettings{} + obj.PaymentMethods = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentMethods(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentMethods_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutMerchantSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentMethods() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettings{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettings{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutMerchantSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCheckoutMerchantSettings(t *testing.T) { + t.Run("SetPaymentMethods_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettings{} + var fernTestValuePaymentMethods *CheckoutMerchantSettingsPaymentMethods + + // Act + obj.SetPaymentMethods(fernTestValuePaymentMethods) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettings{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCheckoutMerchantSettingsPaymentMethods(t *testing.T) { + t.Run("SetApplePay", func(t *testing.T) { + obj := &CheckoutMerchantSettingsPaymentMethods{} + var fernTestValueApplePay *CheckoutMerchantSettingsPaymentMethodsPaymentMethod + obj.SetApplePay(fernTestValueApplePay) + assert.Equal(t, fernTestValueApplePay, obj.ApplePay) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGooglePay", func(t *testing.T) { + obj := &CheckoutMerchantSettingsPaymentMethods{} + var fernTestValueGooglePay *CheckoutMerchantSettingsPaymentMethodsPaymentMethod + obj.SetGooglePay(fernTestValueGooglePay) + assert.Equal(t, fernTestValueGooglePay, obj.GooglePay) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCashApp", func(t *testing.T) { + obj := &CheckoutMerchantSettingsPaymentMethods{} + var fernTestValueCashApp *CheckoutMerchantSettingsPaymentMethodsPaymentMethod + obj.SetCashApp(fernTestValueCashApp) + assert.Equal(t, fernTestValueCashApp, obj.CashApp) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAfterpayClearpay", func(t *testing.T) { + obj := &CheckoutMerchantSettingsPaymentMethods{} + var fernTestValueAfterpayClearpay *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay + obj.SetAfterpayClearpay(fernTestValueAfterpayClearpay) + assert.Equal(t, fernTestValueAfterpayClearpay, obj.AfterpayClearpay) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCheckoutMerchantSettingsPaymentMethods(t *testing.T) { + t.Run("GetApplePay", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethods{} + var expected *CheckoutMerchantSettingsPaymentMethodsPaymentMethod + obj.ApplePay = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetApplePay(), "getter should return the property value") + }) + + t.Run("GetApplePay_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethods{} + obj.ApplePay = nil + + // Act & Assert + assert.Nil(t, obj.GetApplePay(), "getter should return nil when property is nil") + }) + + t.Run("GetApplePay_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutMerchantSettingsPaymentMethods + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetApplePay() // Should return zero value + }) + + t.Run("GetGooglePay", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethods{} + var expected *CheckoutMerchantSettingsPaymentMethodsPaymentMethod + obj.GooglePay = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGooglePay(), "getter should return the property value") + }) + + t.Run("GetGooglePay_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethods{} + obj.GooglePay = nil + + // Act & Assert + assert.Nil(t, obj.GetGooglePay(), "getter should return nil when property is nil") + }) + + t.Run("GetGooglePay_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutMerchantSettingsPaymentMethods + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGooglePay() // Should return zero value + }) + + t.Run("GetCashApp", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethods{} + var expected *CheckoutMerchantSettingsPaymentMethodsPaymentMethod + obj.CashApp = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCashApp(), "getter should return the property value") + }) + + t.Run("GetCashApp_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethods{} + obj.CashApp = nil + + // Act & Assert + assert.Nil(t, obj.GetCashApp(), "getter should return nil when property is nil") + }) + + t.Run("GetCashApp_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutMerchantSettingsPaymentMethods + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCashApp() // Should return zero value + }) + + t.Run("GetAfterpayClearpay", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethods{} + var expected *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay + obj.AfterpayClearpay = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAfterpayClearpay(), "getter should return the property value") + }) + + t.Run("GetAfterpayClearpay_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethods{} + obj.AfterpayClearpay = nil + + // Act & Assert + assert.Nil(t, obj.GetAfterpayClearpay(), "getter should return nil when property is nil") + }) + + t.Run("GetAfterpayClearpay_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutMerchantSettingsPaymentMethods + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAfterpayClearpay() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCheckoutMerchantSettingsPaymentMethods(t *testing.T) { + t.Run("SetApplePay_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethods{} + var fernTestValueApplePay *CheckoutMerchantSettingsPaymentMethodsPaymentMethod + + // Act + obj.SetApplePay(fernTestValueApplePay) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGooglePay_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethods{} + var fernTestValueGooglePay *CheckoutMerchantSettingsPaymentMethodsPaymentMethod + + // Act + obj.SetGooglePay(fernTestValueGooglePay) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCashApp_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethods{} + var fernTestValueCashApp *CheckoutMerchantSettingsPaymentMethodsPaymentMethod + + // Act + obj.SetCashApp(fernTestValueCashApp) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAfterpayClearpay_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethods{} + var fernTestValueAfterpayClearpay *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay + + // Act + obj.SetAfterpayClearpay(fernTestValueAfterpayClearpay) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCheckoutMerchantSettingsPaymentMethodsAfterpayClearpay(t *testing.T) { + t.Run("SetOrderEligibilityRange", func(t *testing.T) { + obj := &CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay{} + var fernTestValueOrderEligibilityRange *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange + obj.SetOrderEligibilityRange(fernTestValueOrderEligibilityRange) + assert.Equal(t, fernTestValueOrderEligibilityRange, obj.OrderEligibilityRange) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetItemEligibilityRange", func(t *testing.T) { + obj := &CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay{} + var fernTestValueItemEligibilityRange *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange + obj.SetItemEligibilityRange(fernTestValueItemEligibilityRange) + assert.Equal(t, fernTestValueItemEligibilityRange, obj.ItemEligibilityRange) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEnabled", func(t *testing.T) { + obj := &CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay{} + var fernTestValueEnabled *bool + obj.SetEnabled(fernTestValueEnabled) + assert.Equal(t, fernTestValueEnabled, obj.Enabled) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCheckoutMerchantSettingsPaymentMethodsAfterpayClearpay(t *testing.T) { + t.Run("GetOrderEligibilityRange", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay{} + var expected *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange + obj.OrderEligibilityRange = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderEligibilityRange(), "getter should return the property value") + }) + + t.Run("GetOrderEligibilityRange_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay{} + obj.OrderEligibilityRange = nil + + // Act & Assert + assert.Nil(t, obj.GetOrderEligibilityRange(), "getter should return nil when property is nil") + }) + + t.Run("GetOrderEligibilityRange_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderEligibilityRange() // Should return zero value + }) + + t.Run("GetItemEligibilityRange", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay{} + var expected *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange + obj.ItemEligibilityRange = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItemEligibilityRange(), "getter should return the property value") + }) + + t.Run("GetItemEligibilityRange_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay{} + obj.ItemEligibilityRange = nil + + // Act & Assert + assert.Nil(t, obj.GetItemEligibilityRange(), "getter should return nil when property is nil") + }) + + t.Run("GetItemEligibilityRange_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItemEligibilityRange() // Should return zero value + }) + + t.Run("GetEnabled", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay{} + var expected *bool + obj.Enabled = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEnabled(), "getter should return the property value") + }) + + t.Run("GetEnabled_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay{} + obj.Enabled = nil + + // Act & Assert + assert.Nil(t, obj.GetEnabled(), "getter should return nil when property is nil") + }) + + t.Run("GetEnabled_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEnabled() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCheckoutMerchantSettingsPaymentMethodsAfterpayClearpay(t *testing.T) { + t.Run("SetOrderEligibilityRange_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay{} + var fernTestValueOrderEligibilityRange *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange + + // Act + obj.SetOrderEligibilityRange(fernTestValueOrderEligibilityRange) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetItemEligibilityRange_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay{} + var fernTestValueItemEligibilityRange *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange + + // Act + obj.SetItemEligibilityRange(fernTestValueItemEligibilityRange) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEnabled_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay{} + var fernTestValueEnabled *bool + + // Act + obj.SetEnabled(fernTestValueEnabled) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange(t *testing.T) { + t.Run("SetMin", func(t *testing.T) { + obj := &CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange{} + var fernTestValueMin *Money + obj.SetMin(fernTestValueMin) + assert.Equal(t, fernTestValueMin, obj.Min) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMax", func(t *testing.T) { + obj := &CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange{} + var fernTestValueMax *Money + obj.SetMax(fernTestValueMax) + assert.Equal(t, fernTestValueMax, obj.Max) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange(t *testing.T) { + t.Run("GetMin", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange{} + var expected *Money + obj.Min = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMin(), "getter should return the property value") + }) + + t.Run("GetMin_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange{} + obj.Min = nil + + // Act & Assert + assert.Nil(t, obj.GetMin(), "getter should return nil when property is nil") + }) + + t.Run("GetMin_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMin() // Should return zero value + }) + + t.Run("GetMax", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange{} + var expected *Money + obj.Max = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMax(), "getter should return the property value") + }) + + t.Run("GetMax_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange{} + obj.Max = nil + + // Act & Assert + assert.Nil(t, obj.GetMax(), "getter should return nil when property is nil") + }) + + t.Run("GetMax_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMax() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange(t *testing.T) { + t.Run("SetMin_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange{} + var fernTestValueMin *Money + + // Act + obj.SetMin(fernTestValueMin) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMax_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange{} + var fernTestValueMax *Money + + // Act + obj.SetMax(fernTestValueMax) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCheckoutMerchantSettingsPaymentMethodsPaymentMethod(t *testing.T) { + t.Run("SetEnabled", func(t *testing.T) { + obj := &CheckoutMerchantSettingsPaymentMethodsPaymentMethod{} + var fernTestValueEnabled *bool + obj.SetEnabled(fernTestValueEnabled) + assert.Equal(t, fernTestValueEnabled, obj.Enabled) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCheckoutMerchantSettingsPaymentMethodsPaymentMethod(t *testing.T) { + t.Run("GetEnabled", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethodsPaymentMethod{} + var expected *bool + obj.Enabled = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEnabled(), "getter should return the property value") + }) + + t.Run("GetEnabled_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethodsPaymentMethod{} + obj.Enabled = nil + + // Act & Assert + assert.Nil(t, obj.GetEnabled(), "getter should return nil when property is nil") + }) + + t.Run("GetEnabled_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutMerchantSettingsPaymentMethodsPaymentMethod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEnabled() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCheckoutMerchantSettingsPaymentMethodsPaymentMethod(t *testing.T) { + t.Run("SetEnabled_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethodsPaymentMethod{} + var fernTestValueEnabled *bool + + // Act + obj.SetEnabled(fernTestValueEnabled) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRetrieveLocationSettingsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &RetrieveLocationSettingsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationSettings", func(t *testing.T) { + obj := &RetrieveLocationSettingsResponse{} + var fernTestValueLocationSettings *CheckoutLocationSettings + obj.SetLocationSettings(fernTestValueLocationSettings) + assert.Equal(t, fernTestValueLocationSettings, obj.LocationSettings) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRetrieveLocationSettingsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationSettingsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationSettingsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveLocationSettingsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetLocationSettings", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationSettingsResponse{} + var expected *CheckoutLocationSettings + obj.LocationSettings = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationSettings(), "getter should return the property value") + }) + + t.Run("GetLocationSettings_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationSettingsResponse{} + obj.LocationSettings = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationSettings(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationSettings_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveLocationSettingsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationSettings() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRetrieveLocationSettingsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationSettingsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationSettings_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationSettingsResponse{} + var fernTestValueLocationSettings *CheckoutLocationSettings + + // Act + obj.SetLocationSettings(fernTestValueLocationSettings) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRetrieveMerchantSettingsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &RetrieveMerchantSettingsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMerchantSettings", func(t *testing.T) { + obj := &RetrieveMerchantSettingsResponse{} + var fernTestValueMerchantSettings *CheckoutMerchantSettings + obj.SetMerchantSettings(fernTestValueMerchantSettings) + assert.Equal(t, fernTestValueMerchantSettings, obj.MerchantSettings) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRetrieveMerchantSettingsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveMerchantSettingsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveMerchantSettingsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveMerchantSettingsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetMerchantSettings", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveMerchantSettingsResponse{} + var expected *CheckoutMerchantSettings + obj.MerchantSettings = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantSettings(), "getter should return the property value") + }) + + t.Run("GetMerchantSettings_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveMerchantSettingsResponse{} + obj.MerchantSettings = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantSettings(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantSettings_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveMerchantSettingsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantSettings() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRetrieveMerchantSettingsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveMerchantSettingsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMerchantSettings_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveMerchantSettingsResponse{} + var fernTestValueMerchantSettings *CheckoutMerchantSettings + + // Act + obj.SetMerchantSettings(fernTestValueMerchantSettings) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateLocationSettingsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateLocationSettingsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationSettings", func(t *testing.T) { + obj := &UpdateLocationSettingsResponse{} + var fernTestValueLocationSettings *CheckoutLocationSettings + obj.SetLocationSettings(fernTestValueLocationSettings) + assert.Equal(t, fernTestValueLocationSettings, obj.LocationSettings) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateLocationSettingsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateLocationSettingsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateLocationSettingsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateLocationSettingsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetLocationSettings", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateLocationSettingsResponse{} + var expected *CheckoutLocationSettings + obj.LocationSettings = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationSettings(), "getter should return the property value") + }) + + t.Run("GetLocationSettings_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateLocationSettingsResponse{} + obj.LocationSettings = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationSettings(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationSettings_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateLocationSettingsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationSettings() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateLocationSettingsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateLocationSettingsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationSettings_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateLocationSettingsResponse{} + var fernTestValueLocationSettings *CheckoutLocationSettings + + // Act + obj.SetLocationSettings(fernTestValueLocationSettings) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateMerchantSettingsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateMerchantSettingsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMerchantSettings", func(t *testing.T) { + obj := &UpdateMerchantSettingsResponse{} + var fernTestValueMerchantSettings *CheckoutMerchantSettings + obj.SetMerchantSettings(fernTestValueMerchantSettings) + assert.Equal(t, fernTestValueMerchantSettings, obj.MerchantSettings) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateMerchantSettingsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateMerchantSettingsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateMerchantSettingsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateMerchantSettingsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetMerchantSettings", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateMerchantSettingsResponse{} + var expected *CheckoutMerchantSettings + obj.MerchantSettings = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantSettings(), "getter should return the property value") + }) + + t.Run("GetMerchantSettings_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateMerchantSettingsResponse{} + obj.MerchantSettings = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantSettings(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantSettings_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateMerchantSettingsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantSettings() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateMerchantSettingsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateMerchantSettingsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMerchantSettings_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateMerchantSettingsResponse{} + var fernTestValueMerchantSettings *CheckoutMerchantSettings + + // Act + obj.SetMerchantSettings(fernTestValueMerchantSettings) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingCheckoutLocationSettings(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettings{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CheckoutLocationSettings + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CheckoutLocationSettings + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CheckoutLocationSettings + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCheckoutLocationSettingsBranding(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsBranding{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CheckoutLocationSettingsBranding + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CheckoutLocationSettingsBranding + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CheckoutLocationSettingsBranding + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCheckoutLocationSettingsCoupons(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsCoupons{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CheckoutLocationSettingsCoupons + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CheckoutLocationSettingsCoupons + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CheckoutLocationSettingsCoupons + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCheckoutLocationSettingsPolicy(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsPolicy{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CheckoutLocationSettingsPolicy + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CheckoutLocationSettingsPolicy + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CheckoutLocationSettingsPolicy + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCheckoutLocationSettingsTipping(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutLocationSettingsTipping{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CheckoutLocationSettingsTipping + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CheckoutLocationSettingsTipping + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CheckoutLocationSettingsTipping + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCheckoutMerchantSettings(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettings{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CheckoutMerchantSettings + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CheckoutMerchantSettings + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CheckoutMerchantSettings + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCheckoutMerchantSettingsPaymentMethods(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethods{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CheckoutMerchantSettingsPaymentMethods + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CheckoutMerchantSettingsPaymentMethods + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CheckoutMerchantSettingsPaymentMethods + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCheckoutMerchantSettingsPaymentMethodsAfterpayClearpay(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCheckoutMerchantSettingsPaymentMethodsPaymentMethod(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutMerchantSettingsPaymentMethodsPaymentMethod{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CheckoutMerchantSettingsPaymentMethodsPaymentMethod + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CheckoutMerchantSettingsPaymentMethodsPaymentMethod + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CheckoutMerchantSettingsPaymentMethodsPaymentMethod + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRetrieveLocationSettingsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationSettingsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RetrieveLocationSettingsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RetrieveLocationSettingsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RetrieveLocationSettingsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRetrieveMerchantSettingsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveMerchantSettingsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RetrieveMerchantSettingsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RetrieveMerchantSettingsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RetrieveMerchantSettingsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateLocationSettingsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateLocationSettingsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateLocationSettingsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateLocationSettingsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateLocationSettingsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateMerchantSettingsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateMerchantSettingsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateMerchantSettingsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateMerchantSettingsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateMerchantSettingsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringCheckoutLocationSettings(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CheckoutLocationSettings{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettings + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCheckoutLocationSettingsBranding(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CheckoutLocationSettingsBranding{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettingsBranding + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCheckoutLocationSettingsCoupons(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CheckoutLocationSettingsCoupons{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettingsCoupons + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCheckoutLocationSettingsPolicy(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CheckoutLocationSettingsPolicy{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettingsPolicy + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCheckoutLocationSettingsTipping(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CheckoutLocationSettingsTipping{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettingsTipping + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCheckoutMerchantSettings(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CheckoutMerchantSettings{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutMerchantSettings + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCheckoutMerchantSettingsPaymentMethods(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CheckoutMerchantSettingsPaymentMethods{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutMerchantSettingsPaymentMethods + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCheckoutMerchantSettingsPaymentMethodsAfterpayClearpay(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCheckoutMerchantSettingsPaymentMethodsPaymentMethod(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CheckoutMerchantSettingsPaymentMethodsPaymentMethod{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutMerchantSettingsPaymentMethodsPaymentMethod + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRetrieveLocationSettingsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RetrieveLocationSettingsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveLocationSettingsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRetrieveMerchantSettingsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RetrieveMerchantSettingsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveMerchantSettingsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateLocationSettingsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateLocationSettingsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateLocationSettingsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateMerchantSettingsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateMerchantSettingsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateMerchantSettingsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestEnumCheckoutLocationSettingsBrandingButtonShape(t *testing.T) { + t.Run("NewFromString_SQUARED", func(t *testing.T) { + t.Parallel() + val, err := NewCheckoutLocationSettingsBrandingButtonShapeFromString("SQUARED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CheckoutLocationSettingsBrandingButtonShape("SQUARED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ROUNDED", func(t *testing.T) { + t.Parallel() + val, err := NewCheckoutLocationSettingsBrandingButtonShapeFromString("ROUNDED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CheckoutLocationSettingsBrandingButtonShape("ROUNDED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PILL", func(t *testing.T) { + t.Parallel() + val, err := NewCheckoutLocationSettingsBrandingButtonShapeFromString("PILL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CheckoutLocationSettingsBrandingButtonShape("PILL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCheckoutLocationSettingsBrandingButtonShapeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCheckoutLocationSettingsBrandingButtonShapeFromString("SQUARED") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCheckoutLocationSettingsBrandingHeaderType(t *testing.T) { + t.Run("NewFromString_BUSINESS_NAME", func(t *testing.T) { + t.Parallel() + val, err := NewCheckoutLocationSettingsBrandingHeaderTypeFromString("BUSINESS_NAME") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CheckoutLocationSettingsBrandingHeaderType("BUSINESS_NAME"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FRAMED_LOGO", func(t *testing.T) { + t.Parallel() + val, err := NewCheckoutLocationSettingsBrandingHeaderTypeFromString("FRAMED_LOGO") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CheckoutLocationSettingsBrandingHeaderType("FRAMED_LOGO"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FULL_WIDTH_LOGO", func(t *testing.T) { + t.Parallel() + val, err := NewCheckoutLocationSettingsBrandingHeaderTypeFromString("FULL_WIDTH_LOGO") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CheckoutLocationSettingsBrandingHeaderType("FULL_WIDTH_LOGO"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCheckoutLocationSettingsBrandingHeaderTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCheckoutLocationSettingsBrandingHeaderTypeFromString("BUSINESS_NAME") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestExtraPropertiesCheckoutLocationSettings(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CheckoutLocationSettings{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettings + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCheckoutLocationSettingsBranding(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CheckoutLocationSettingsBranding{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettingsBranding + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCheckoutLocationSettingsCoupons(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CheckoutLocationSettingsCoupons{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettingsCoupons + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCheckoutLocationSettingsPolicy(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CheckoutLocationSettingsPolicy{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettingsPolicy + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCheckoutLocationSettingsTipping(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CheckoutLocationSettingsTipping{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutLocationSettingsTipping + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCheckoutMerchantSettings(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CheckoutMerchantSettings{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutMerchantSettings + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCheckoutMerchantSettingsPaymentMethods(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CheckoutMerchantSettingsPaymentMethods{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutMerchantSettingsPaymentMethods + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCheckoutMerchantSettingsPaymentMethodsAfterpayClearpay(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpay + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutMerchantSettingsPaymentMethodsAfterpayClearpayEligibilityRange + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCheckoutMerchantSettingsPaymentMethodsPaymentMethod(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CheckoutMerchantSettingsPaymentMethodsPaymentMethod{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutMerchantSettingsPaymentMethodsPaymentMethod + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRetrieveLocationSettingsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RetrieveLocationSettingsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveLocationSettingsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRetrieveMerchantSettingsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RetrieveMerchantSettingsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveMerchantSettingsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateLocationSettingsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateLocationSettingsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateLocationSettingsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateMerchantSettingsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateMerchantSettingsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateMerchantSettingsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/core/request_option.go b/core/request_option.go index 8e42869..705b629 100644 --- a/core/request_option.go +++ b/core/request_option.go @@ -67,8 +67,8 @@ func (r *RequestOptions) cloneHeader() http.Header { headers := r.HTTPHeader.Clone() headers.Set("X-Fern-Language", "Go") headers.Set("X-Fern-SDK-Name", "github.com/square/square-go-sdk/v3") - headers.Set("X-Fern-SDK-Version", "v3.0.0") - headers.Set("User-Agent", "github.com/square/square-go-sdk/v3.0.0") + headers.Set("X-Fern-SDK-Version", "v3.0.1") + headers.Set("User-Agent", "github.com/square/square-go-sdk/3.0.1") return headers } diff --git a/customers.go b/customers.go index 8677c90..13345a2 100644 --- a/customers.go +++ b/customers.go @@ -15,7 +15,7 @@ var ( type BulkDeleteCustomersRequest struct { // The IDs of the [customer profiles](entity:Customer) to delete. - CustomerIDs []string `json:"customer_ids,omitempty" url:"-"` + CustomerIDs []string `json:"customer_ids" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -35,13 +35,34 @@ func (b *BulkDeleteCustomersRequest) SetCustomerIDs(customerIDs []string) { b.require(bulkDeleteCustomersRequestFieldCustomerIDs) } +func (b *BulkDeleteCustomersRequest) UnmarshalJSON(data []byte) error { + type unmarshaler BulkDeleteCustomersRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *b = BulkDeleteCustomersRequest(body) + return nil +} + +func (b *BulkDeleteCustomersRequest) MarshalJSON() ([]byte, error) { + type embed BulkDeleteCustomersRequest + var marshaler = struct { + embed + }{ + embed: embed(*b), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, b.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( bulkRetrieveCustomersRequestFieldCustomerIDs = big.NewInt(1 << 0) ) type BulkRetrieveCustomersRequest struct { // The IDs of the [customer profiles](entity:Customer) to retrieve. - CustomerIDs []string `json:"customer_ids,omitempty" url:"-"` + CustomerIDs []string `json:"customer_ids" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -61,6 +82,27 @@ func (b *BulkRetrieveCustomersRequest) SetCustomerIDs(customerIDs []string) { b.require(bulkRetrieveCustomersRequestFieldCustomerIDs) } +func (b *BulkRetrieveCustomersRequest) UnmarshalJSON(data []byte) error { + type unmarshaler BulkRetrieveCustomersRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *b = BulkRetrieveCustomersRequest(body) + return nil +} + +func (b *BulkRetrieveCustomersRequest) MarshalJSON() ([]byte, error) { + type embed BulkRetrieveCustomersRequest + var marshaler = struct { + embed + }{ + embed: embed(*b), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, b.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( bulkUpdateCustomersRequestFieldCustomers = big.NewInt(1 << 0) ) @@ -74,7 +116,7 @@ type BulkUpdateCustomersRequest struct { // // Each value contains the updated customer data. Only new or changed fields are required. To add or // update a field, specify the new value. To remove a field, specify `null`. - Customers map[string]*BulkUpdateCustomerData `json:"customers,omitempty" url:"-"` + Customers map[string]*BulkUpdateCustomerData `json:"customers" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -94,6 +136,27 @@ func (b *BulkUpdateCustomersRequest) SetCustomers(customers map[string]*BulkUpda b.require(bulkUpdateCustomersRequestFieldCustomers) } +func (b *BulkUpdateCustomersRequest) UnmarshalJSON(data []byte) error { + type unmarshaler BulkUpdateCustomersRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *b = BulkUpdateCustomersRequest(body) + return nil +} + +func (b *BulkUpdateCustomersRequest) MarshalJSON() ([]byte, error) { + type embed BulkUpdateCustomersRequest + var marshaler = struct { + embed + }{ + embed: embed(*b), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, b.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( bulkCreateCustomersRequestFieldCustomers = big.NewInt(1 << 0) ) @@ -105,7 +168,7 @@ type BulkCreateCustomersRequest struct { // Each key is an [idempotency key](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) // that uniquely identifies the create request. Each value contains the customer data used to create the // customer profile. - Customers map[string]*BulkCreateCustomerData `json:"customers,omitempty" url:"-"` + Customers map[string]*BulkCreateCustomerData `json:"customers" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -125,6 +188,27 @@ func (b *BulkCreateCustomersRequest) SetCustomers(customers map[string]*BulkCrea b.require(bulkCreateCustomersRequestFieldCustomers) } +func (b *BulkCreateCustomersRequest) UnmarshalJSON(data []byte) error { + type unmarshaler BulkCreateCustomersRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *b = BulkCreateCustomersRequest(body) + return nil +} + +func (b *BulkCreateCustomersRequest) MarshalJSON() ([]byte, error) { + type embed BulkCreateCustomersRequest + var marshaler = struct { + embed + }{ + embed: embed(*b), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, b.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( createCustomerRequestFieldIdempotencyKey = big.NewInt(1 << 0) createCustomerRequestFieldGivenName = big.NewInt(1 << 1) @@ -283,6 +367,27 @@ func (c *CreateCustomerRequest) SetTaxIDs(taxIDs *CustomerTaxIDs) { c.require(createCustomerRequestFieldTaxIDs) } +func (c *CreateCustomerRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateCustomerRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateCustomerRequest(body) + return nil +} + +func (c *CreateCustomerRequest) MarshalJSON() ([]byte, error) { + type embed CreateCustomerRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( deleteCustomersRequestFieldCustomerID = big.NewInt(1 << 0) deleteCustomersRequestFieldVersion = big.NewInt(1 << 1) @@ -491,6 +596,27 @@ func (s *SearchCustomersRequest) SetCount(count *bool) { s.require(searchCustomersRequestFieldCount) } +func (s *SearchCustomersRequest) UnmarshalJSON(data []byte) error { + type unmarshaler SearchCustomersRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *s = SearchCustomersRequest(body) + return nil +} + +func (s *SearchCustomersRequest) MarshalJSON() ([]byte, error) { + type embed SearchCustomersRequest + var marshaler = struct { + embed + }{ + embed: embed(*s), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, s.explicitFields) + return json.Marshal(explicitMarshaler) +} + // Defines the customer data provided in individual create requests for a // [BulkCreateCustomers](api-endpoint:Customers-BulkCreateCustomers) operation. var ( @@ -626,6 +752,9 @@ func (b *BulkCreateCustomerData) GetTaxIDs() *CustomerTaxIDs { } func (b *BulkCreateCustomerData) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -741,6 +870,9 @@ func (b *BulkCreateCustomerData) MarshalJSON() ([]byte, error) { } func (b *BulkCreateCustomerData) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -793,6 +925,9 @@ func (b *BulkCreateCustomersResponse) GetErrors() []*Error { } func (b *BulkCreateCustomersResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -845,6 +980,9 @@ func (b *BulkCreateCustomersResponse) MarshalJSON() ([]byte, error) { } func (b *BulkCreateCustomersResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -897,6 +1035,9 @@ func (b *BulkDeleteCustomersResponse) GetErrors() []*Error { } func (b *BulkDeleteCustomersResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -949,6 +1090,9 @@ func (b *BulkDeleteCustomersResponse) MarshalJSON() ([]byte, error) { } func (b *BulkDeleteCustomersResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -1001,6 +1145,9 @@ func (b *BulkRetrieveCustomersResponse) GetErrors() []*Error { } func (b *BulkRetrieveCustomersResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -1053,6 +1200,9 @@ func (b *BulkRetrieveCustomersResponse) MarshalJSON() ([]byte, error) { } func (b *BulkRetrieveCustomersResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -1213,6 +1363,9 @@ func (b *BulkUpdateCustomerData) GetVersion() *int64 { } func (b *BulkUpdateCustomerData) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -1335,6 +1488,9 @@ func (b *BulkUpdateCustomerData) MarshalJSON() ([]byte, error) { } func (b *BulkUpdateCustomerData) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -1387,6 +1543,9 @@ func (b *BulkUpdateCustomersResponse) GetErrors() []*Error { } func (b *BulkUpdateCustomersResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -1439,6 +1598,9 @@ func (b *BulkUpdateCustomersResponse) MarshalJSON() ([]byte, error) { } func (b *BulkUpdateCustomersResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -1488,6 +1650,9 @@ func (c *CreateCustomerResponse) GetCustomer() *Customer { } func (c *CreateCustomerResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -1540,6 +1705,9 @@ func (c *CreateCustomerResponse) MarshalJSON() ([]byte, error) { } func (c *CreateCustomerResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -1762,6 +1930,9 @@ func (c *Customer) GetTaxIDs() *CustomerTaxIDs { } func (c *Customer) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -1933,6 +2104,9 @@ func (c *Customer) MarshalJSON() ([]byte, error) { } func (c *Customer) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -1980,6 +2154,9 @@ func (c *CustomerAddressFilter) GetCountry() *Country { } func (c *CustomerAddressFilter) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -2032,6 +2209,9 @@ func (c *CustomerAddressFilter) MarshalJSON() ([]byte, error) { } func (c *CustomerAddressFilter) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -2159,6 +2339,9 @@ func (c *CustomerCreationSourceFilter) GetRule() *CustomerInclusionExclusion { } func (c *CustomerCreationSourceFilter) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -2211,6 +2394,9 @@ func (c *CustomerCreationSourceFilter) MarshalJSON() ([]byte, error) { } func (c *CustomerCreationSourceFilter) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -2275,6 +2461,9 @@ func (c *CustomerCustomAttributeFilter) GetUpdatedAt() *TimeRange { } func (c *CustomerCustomAttributeFilter) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -2334,6 +2523,9 @@ func (c *CustomerCustomAttributeFilter) MarshalJSON() ([]byte, error) { } func (c *CustomerCustomAttributeFilter) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -2481,6 +2673,9 @@ func (c *CustomerCustomAttributeFilterValue) GetAddress() *CustomerAddressFilter } func (c *CustomerCustomAttributeFilterValue) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -2575,6 +2770,9 @@ func (c *CustomerCustomAttributeFilterValue) MarshalJSON() ([]byte, error) { } func (c *CustomerCustomAttributeFilterValue) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -2613,6 +2811,9 @@ func (c *CustomerCustomAttributeFilters) GetFilters() []*CustomerCustomAttribute } func (c *CustomerCustomAttributeFilters) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -2658,6 +2859,9 @@ func (c *CustomerCustomAttributeFilters) MarshalJSON() ([]byte, error) { } func (c *CustomerCustomAttributeFilters) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -2859,6 +3063,9 @@ func (c *CustomerFilter) GetSegmentIDs() *FilterValue { } func (c *CustomerFilter) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -2960,6 +3167,9 @@ func (c *CustomerFilter) MarshalJSON() ([]byte, error) { } func (c *CustomerFilter) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -3019,6 +3229,9 @@ func (c *CustomerPreferences) GetEmailUnsubscribed() *bool { } func (c *CustomerPreferences) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -3064,6 +3277,9 @@ func (c *CustomerPreferences) MarshalJSON() ([]byte, error) { } func (c *CustomerPreferences) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -3114,6 +3330,9 @@ func (c *CustomerQuery) GetSort() *CustomerSort { } func (c *CustomerQuery) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -3166,6 +3385,9 @@ func (c *CustomerQuery) MarshalJSON() ([]byte, error) { } func (c *CustomerQuery) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -3220,6 +3442,9 @@ func (c *CustomerSort) GetOrder() *SortOrder { } func (c *CustomerSort) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -3272,6 +3497,9 @@ func (c *CustomerSort) MarshalJSON() ([]byte, error) { } func (c *CustomerSort) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -3331,6 +3559,9 @@ func (c *CustomerTaxIDs) GetEuVat() *string { } func (c *CustomerTaxIDs) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -3376,6 +3607,9 @@ func (c *CustomerTaxIDs) MarshalJSON() ([]byte, error) { } func (c *CustomerTaxIDs) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -3426,6 +3660,9 @@ func (c *CustomerTextFilter) GetFuzzy() *string { } func (c *CustomerTextFilter) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -3478,6 +3715,9 @@ func (c *CustomerTextFilter) MarshalJSON() ([]byte, error) { } func (c *CustomerTextFilter) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -3514,6 +3754,9 @@ func (d *DeleteCustomerResponse) GetErrors() []*Error { } func (d *DeleteCustomerResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -3559,6 +3802,9 @@ func (d *DeleteCustomerResponse) MarshalJSON() ([]byte, error) { } func (d *DeleteCustomerResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -3604,6 +3850,9 @@ func (f *FloatNumberRange) GetEndAt() *string { } func (f *FloatNumberRange) GetExtraProperties() map[string]interface{} { + if f == nil { + return nil + } return f.extraProperties } @@ -3656,6 +3905,9 @@ func (f *FloatNumberRange) MarshalJSON() ([]byte, error) { } func (f *FloatNumberRange) String() string { + if f == nil { + return "" + } if len(f.rawJSON) > 0 { if value, err := internal.StringifyJSON(f.rawJSON); err == nil { return value @@ -3704,6 +3956,9 @@ func (g *GetCustomerResponse) GetCustomer() *Customer { } func (g *GetCustomerResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -3756,6 +4011,9 @@ func (g *GetCustomerResponse) MarshalJSON() ([]byte, error) { } func (g *GetCustomerResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -3832,6 +4090,9 @@ func (l *ListCustomersResponse) GetCount() *int64 { } func (l *ListCustomersResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -3898,6 +4159,9 @@ func (l *ListCustomersResponse) MarshalJSON() ([]byte, error) { } func (l *ListCustomersResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -3975,6 +4239,9 @@ func (s *SearchCustomersResponse) GetCount() *int64 { } func (s *SearchCustomersResponse) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -4041,6 +4308,9 @@ func (s *SearchCustomersResponse) MarshalJSON() ([]byte, error) { } func (s *SearchCustomersResponse) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -4090,6 +4360,9 @@ func (u *UpdateCustomerResponse) GetCustomer() *Customer { } func (u *UpdateCustomerResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -4142,6 +4415,9 @@ func (u *UpdateCustomerResponse) MarshalJSON() ([]byte, error) { } func (u *UpdateCustomerResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -4322,3 +4598,24 @@ func (u *UpdateCustomerRequest) SetTaxIDs(taxIDs *CustomerTaxIDs) { u.TaxIDs = taxIDs u.require(updateCustomerRequestFieldTaxIDs) } + +func (u *UpdateCustomerRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdateCustomerRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdateCustomerRequest(body) + return nil +} + +func (u *UpdateCustomerRequest) MarshalJSON() ([]byte, error) { + type embed UpdateCustomerRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/customers/cards.go b/customers/cards.go index be78b05..7bfd4da 100644 --- a/customers/cards.go +++ b/customers/cards.go @@ -3,7 +3,9 @@ package customers import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" big "math/big" ) @@ -86,6 +88,27 @@ func (c *CreateCustomerCardRequest) SetVerificationToken(verificationToken *stri c.require(createCustomerCardRequestFieldVerificationToken) } +func (c *CreateCustomerCardRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateCustomerCardRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateCustomerCardRequest(body) + return nil +} + +func (c *CreateCustomerCardRequest) MarshalJSON() ([]byte, error) { + type embed CreateCustomerCardRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( deleteCardsRequestFieldCustomerID = big.NewInt(1 << 0) deleteCardsRequestFieldCardID = big.NewInt(1 << 1) diff --git a/customers/cards/customers_cards_test/customers_cards_test.go b/customers/cards/customers_cards_test/customers_cards_test.go new file mode 100644 index 0000000..39e1aa5 --- /dev/null +++ b/customers/cards/customers_cards_test/customers_cards_test.go @@ -0,0 +1,137 @@ +// Code generated by Fern. DO NOT EDIT. + +package customers_cards_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + customers "github.com/square/square-go-sdk/v3/customers" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestCustomersCardsCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &customers.CreateCustomerCardRequest{ + CustomerID: "customer_id", + CardNonce: "YOUR_CARD_NONCE", + BillingAddress: &square.Address{ + AddressLine1: square.String( + "500 Electric Ave", + ), + AddressLine2: square.String( + "Suite 600", + ), + Locality: square.String( + "New York", + ), + AdministrativeDistrictLevel1: square.String( + "NY", + ), + PostalCode: square.String( + "10003", + ), + Country: square.CountryUs.Ptr(), + }, + CardholderName: square.String( + "Amelia Earhart", + ), + } + _, invocationErr := client.Customers.Cards.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersCardsCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersCardsCreateWithWireMock", "POST", "/v2/customers/customer_id/cards", nil, 1) +} + +func TestCustomersCardsDeleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &customers.DeleteCardsRequest{ + CustomerID: "customer_id", + CardID: "card_id", + } + _, invocationErr := client.Customers.Cards.Delete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersCardsDeleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersCardsDeleteWithWireMock", "DELETE", "/v2/customers/customer_id/cards/card_id", nil, 1) +} diff --git a/customers/cards_test.go b/customers/cards_test.go new file mode 100644 index 0000000..2c76bfb --- /dev/null +++ b/customers/cards_test.go @@ -0,0 +1,256 @@ +// Code generated by Fern. DO NOT EDIT. + +package customers + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersCreateCustomerCardRequest(t *testing.T) { + t.Run("SetCustomerID", func(t *testing.T) { + obj := &CreateCustomerCardRequest{} + var fernTestValueCustomerID string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCardNonce", func(t *testing.T) { + obj := &CreateCustomerCardRequest{} + var fernTestValueCardNonce string + obj.SetCardNonce(fernTestValueCardNonce) + assert.Equal(t, fernTestValueCardNonce, obj.CardNonce) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCardholderName", func(t *testing.T) { + obj := &CreateCustomerCardRequest{} + var fernTestValueCardholderName *string + obj.SetCardholderName(fernTestValueCardholderName) + assert.Equal(t, fernTestValueCardholderName, obj.CardholderName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVerificationToken", func(t *testing.T) { + obj := &CreateCustomerCardRequest{} + var fernTestValueVerificationToken *string + obj.SetVerificationToken(fernTestValueVerificationToken) + assert.Equal(t, fernTestValueVerificationToken, obj.VerificationToken) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateCustomerCardRequest(t *testing.T) { + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerCardRequest{} + var fernTestValueCustomerID string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCardNonce_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerCardRequest{} + var fernTestValueCardNonce string + + // Act + obj.SetCardNonce(fernTestValueCardNonce) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCardholderName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerCardRequest{} + var fernTestValueCardholderName *string + + // Act + obj.SetCardholderName(fernTestValueCardholderName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVerificationToken_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerCardRequest{} + var fernTestValueVerificationToken *string + + // Act + obj.SetVerificationToken(fernTestValueVerificationToken) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteCardsRequest(t *testing.T) { + t.Run("SetCustomerID", func(t *testing.T) { + obj := &DeleteCardsRequest{} + var fernTestValueCustomerID string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCardID", func(t *testing.T) { + obj := &DeleteCardsRequest{} + var fernTestValueCardID string + obj.SetCardID(fernTestValueCardID) + assert.Equal(t, fernTestValueCardID, obj.CardID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDeleteCardsRequest(t *testing.T) { + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCardsRequest{} + var fernTestValueCustomerID string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCardID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCardsRequest{} + var fernTestValueCardID string + + // Act + obj.SetCardID(fernTestValueCardID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/customers/custom_attribute_definitions.go b/customers/custom_attribute_definitions.go index c9c7330..b4a4d56 100644 --- a/customers/custom_attribute_definitions.go +++ b/customers/custom_attribute_definitions.go @@ -3,7 +3,9 @@ package customers import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" big "math/big" ) @@ -15,7 +17,7 @@ type BatchUpsertCustomerCustomAttributesRequest struct { // A map containing 1 to 25 individual upsert requests. For each request, provide an // arbitrary ID that is unique for this `BulkUpsertCustomerCustomAttributes` request and the // information needed to create or update a custom attribute. - Values map[string]*v3.BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest `json:"values,omitempty" url:"-"` + Values map[string]*v3.BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest `json:"values" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -35,6 +37,27 @@ func (b *BatchUpsertCustomerCustomAttributesRequest) SetValues(values map[string b.require(batchUpsertCustomerCustomAttributesRequestFieldValues) } +func (b *BatchUpsertCustomerCustomAttributesRequest) UnmarshalJSON(data []byte) error { + type unmarshaler BatchUpsertCustomerCustomAttributesRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *b = BatchUpsertCustomerCustomAttributesRequest(body) + return nil +} + +func (b *BatchUpsertCustomerCustomAttributesRequest) MarshalJSON() ([]byte, error) { + type embed BatchUpsertCustomerCustomAttributesRequest + var marshaler = struct { + embed + }{ + embed: embed(*b), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, b.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( createCustomerCustomAttributeDefinitionRequestFieldCustomAttributeDefinition = big.NewInt(1 << 0) createCustomerCustomAttributeDefinitionRequestFieldIdempotencyKey = big.NewInt(1 << 1) @@ -47,7 +70,7 @@ type CreateCustomerCustomAttributeDefinitionRequest struct { // [Specifying the schema](https://developer.squareup.com/docs/customer-custom-attributes-api/custom-attribute-definitions#specify-schema). // - If provided, `name` must be unique (case-sensitive) across all visible customer-related custom attribute definitions for the seller. // - All custom attributes are visible in exported customer data, including those set to `VISIBILITY_HIDDEN`. - CustomAttributeDefinition *v3.CustomAttributeDefinition `json:"custom_attribute_definition,omitempty" url:"-"` + CustomAttributeDefinition *v3.CustomAttributeDefinition `json:"custom_attribute_definition" url:"-"` // A unique identifier for this request, used to ensure idempotency. For more information, // see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"` @@ -77,6 +100,27 @@ func (c *CreateCustomerCustomAttributeDefinitionRequest) SetIdempotencyKey(idemp c.require(createCustomerCustomAttributeDefinitionRequestFieldIdempotencyKey) } +func (c *CreateCustomerCustomAttributeDefinitionRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateCustomerCustomAttributeDefinitionRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateCustomerCustomAttributeDefinitionRequest(body) + return nil +} + +func (c *CreateCustomerCustomAttributeDefinitionRequest) MarshalJSON() ([]byte, error) { + type embed CreateCustomerCustomAttributeDefinitionRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( deleteCustomAttributeDefinitionsRequestFieldKey = big.NewInt(1 << 0) ) @@ -207,7 +251,7 @@ type UpdateCustomerCustomAttributeDefinitionRequest struct { // // To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) // control, include the optional `version` field and specify the current version of the custom attribute definition. - CustomAttributeDefinition *v3.CustomAttributeDefinition `json:"custom_attribute_definition,omitempty" url:"-"` + CustomAttributeDefinition *v3.CustomAttributeDefinition `json:"custom_attribute_definition" url:"-"` // A unique identifier for this request, used to ensure idempotency. For more information, // see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"` @@ -243,3 +287,24 @@ func (u *UpdateCustomerCustomAttributeDefinitionRequest) SetIdempotencyKey(idemp u.IdempotencyKey = idempotencyKey u.require(updateCustomerCustomAttributeDefinitionRequestFieldIdempotencyKey) } + +func (u *UpdateCustomerCustomAttributeDefinitionRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdateCustomerCustomAttributeDefinitionRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdateCustomerCustomAttributeDefinitionRequest(body) + return nil +} + +func (u *UpdateCustomerCustomAttributeDefinitionRequest) MarshalJSON() ([]byte, error) { + type embed UpdateCustomerCustomAttributeDefinitionRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/customers/custom_attribute_definitions_test.go b/customers/custom_attribute_definitions_test.go new file mode 100644 index 0000000..9edd85b --- /dev/null +++ b/customers/custom_attribute_definitions_test.go @@ -0,0 +1,352 @@ +// Code generated by Fern. DO NOT EDIT. + +package customers + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersCreateCustomerCustomAttributeDefinitionRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateCustomerCustomAttributeDefinitionRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateCustomerCustomAttributeDefinitionRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerCustomAttributeDefinitionRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetKey", func(t *testing.T) { + obj := &DeleteCustomAttributeDefinitionsRequest{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDeleteCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomAttributeDefinitionsRequest{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetKey", func(t *testing.T) { + obj := &GetCustomAttributeDefinitionsRequest{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &GetCustomAttributeDefinitionsRequest{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributeDefinitionsRequest{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributeDefinitionsRequest{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetLimit", func(t *testing.T) { + obj := &ListCustomAttributeDefinitionsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListCustomAttributeDefinitionsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributeDefinitionsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributeDefinitionsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateCustomerCustomAttributeDefinitionRequest(t *testing.T) { + t.Run("SetKey", func(t *testing.T) { + obj := &UpdateCustomerCustomAttributeDefinitionRequest{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &UpdateCustomerCustomAttributeDefinitionRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateCustomerCustomAttributeDefinitionRequest(t *testing.T) { + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerCustomAttributeDefinitionRequest{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerCustomAttributeDefinitionRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/customers/custom_attributes.go b/customers/custom_attributes.go index c795888..747984a 100644 --- a/customers/custom_attributes.go +++ b/customers/custom_attributes.go @@ -3,7 +3,9 @@ package customers import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" big "math/big" ) @@ -192,7 +194,7 @@ type UpsertCustomerCustomAttributeRequest struct { // - `version`. To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) // control for an update operation, include this optional field and specify the current version // of the custom attribute. - CustomAttribute *v3.CustomAttribute `json:"custom_attribute,omitempty" url:"-"` + CustomAttribute *v3.CustomAttribute `json:"custom_attribute" url:"-"` // A unique identifier for this request, used to ensure idempotency. For more information, // see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"` @@ -235,3 +237,24 @@ func (u *UpsertCustomerCustomAttributeRequest) SetIdempotencyKey(idempotencyKey u.IdempotencyKey = idempotencyKey u.require(upsertCustomerCustomAttributeRequestFieldIdempotencyKey) } + +func (u *UpsertCustomerCustomAttributeRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpsertCustomerCustomAttributeRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpsertCustomerCustomAttributeRequest(body) + return nil +} + +func (u *UpsertCustomerCustomAttributeRequest) MarshalJSON() ([]byte, error) { + type embed UpsertCustomerCustomAttributeRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/customers/custom_attributes_test.go b/customers/custom_attributes_test.go new file mode 100644 index 0000000..debb1ca --- /dev/null +++ b/customers/custom_attributes_test.go @@ -0,0 +1,541 @@ +// Code generated by Fern. DO NOT EDIT. + +package customers + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersDeleteCustomAttributesRequest(t *testing.T) { + t.Run("SetCustomerID", func(t *testing.T) { + obj := &DeleteCustomAttributesRequest{} + var fernTestValueCustomerID string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetKey", func(t *testing.T) { + obj := &DeleteCustomAttributesRequest{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDeleteCustomAttributesRequest(t *testing.T) { + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomAttributesRequest{} + var fernTestValueCustomerID string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomAttributesRequest{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetCustomAttributesRequest(t *testing.T) { + t.Run("SetCustomerID", func(t *testing.T) { + obj := &GetCustomAttributesRequest{} + var fernTestValueCustomerID string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetKey", func(t *testing.T) { + obj := &GetCustomAttributesRequest{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetWithDefinition", func(t *testing.T) { + obj := &GetCustomAttributesRequest{} + var fernTestValueWithDefinition *bool + obj.SetWithDefinition(fernTestValueWithDefinition) + assert.Equal(t, fernTestValueWithDefinition, obj.WithDefinition) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &GetCustomAttributesRequest{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetCustomAttributesRequest(t *testing.T) { + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributesRequest{} + var fernTestValueCustomerID string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributesRequest{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetWithDefinition_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributesRequest{} + var fernTestValueWithDefinition *bool + + // Act + obj.SetWithDefinition(fernTestValueWithDefinition) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributesRequest{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListCustomAttributesRequest(t *testing.T) { + t.Run("SetCustomerID", func(t *testing.T) { + obj := &ListCustomAttributesRequest{} + var fernTestValueCustomerID string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListCustomAttributesRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListCustomAttributesRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetWithDefinitions", func(t *testing.T) { + obj := &ListCustomAttributesRequest{} + var fernTestValueWithDefinitions *bool + obj.SetWithDefinitions(fernTestValueWithDefinitions) + assert.Equal(t, fernTestValueWithDefinitions, obj.WithDefinitions) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListCustomAttributesRequest(t *testing.T) { + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributesRequest{} + var fernTestValueCustomerID string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributesRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributesRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetWithDefinitions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributesRequest{} + var fernTestValueWithDefinitions *bool + + // Act + obj.SetWithDefinitions(fernTestValueWithDefinitions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpsertCustomerCustomAttributeRequest(t *testing.T) { + t.Run("SetCustomerID", func(t *testing.T) { + obj := &UpsertCustomerCustomAttributeRequest{} + var fernTestValueCustomerID string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetKey", func(t *testing.T) { + obj := &UpsertCustomerCustomAttributeRequest{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &UpsertCustomerCustomAttributeRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpsertCustomerCustomAttributeRequest(t *testing.T) { + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertCustomerCustomAttributeRequest{} + var fernTestValueCustomerID string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertCustomerCustomAttributeRequest{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertCustomerCustomAttributeRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/customers/customattributedefinitions/customers_custom_attribute_definitions_test/customers_custom_attribute_definitions_test.go b/customers/customattributedefinitions/customers_custom_attribute_definitions_test/customers_custom_attribute_definitions_test.go new file mode 100644 index 0000000..52495ef --- /dev/null +++ b/customers/customattributedefinitions/customers_custom_attribute_definitions_test/customers_custom_attribute_definitions_test.go @@ -0,0 +1,288 @@ +// Code generated by Fern. DO NOT EDIT. + +package customers_custom_attribute_definitions_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + customers "github.com/square/square-go-sdk/v3/customers" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestCustomersCustomAttributeDefinitionsListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &customers.ListCustomAttributeDefinitionsRequest{ + Limit: square.Int( + 1, + ), + Cursor: square.String( + "cursor", + ), + } + _, invocationErr := client.Customers.CustomAttributeDefinitions.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersCustomAttributeDefinitionsListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersCustomAttributeDefinitionsListWithWireMock", "GET", "/v2/customers/custom-attribute-definitions", map[string]string{"limit": "1", "cursor": "cursor"}, 1) +} + +func TestCustomersCustomAttributeDefinitionsCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &customers.CreateCustomerCustomAttributeDefinitionRequest{ + CustomAttributeDefinition: &square.CustomAttributeDefinition{ + Key: square.String( + "favoritemovie", + ), + Schema: map[string]any{ + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String", + }, + Name: square.String( + "Favorite Movie", + ), + Description: square.String( + "The favorite movie of the customer.", + ), + Visibility: square.CustomAttributeDefinitionVisibilityVisibilityHidden.Ptr(), + }, + } + _, invocationErr := client.Customers.CustomAttributeDefinitions.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersCustomAttributeDefinitionsCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersCustomAttributeDefinitionsCreateWithWireMock", "POST", "/v2/customers/custom-attribute-definitions", nil, 1) +} + +func TestCustomersCustomAttributeDefinitionsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &customers.GetCustomAttributeDefinitionsRequest{ + Key: "key", + Version: square.Int( + 1, + ), + } + _, invocationErr := client.Customers.CustomAttributeDefinitions.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersCustomAttributeDefinitionsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersCustomAttributeDefinitionsGetWithWireMock", "GET", "/v2/customers/custom-attribute-definitions/key", map[string]string{"version": "1"}, 1) +} + +func TestCustomersCustomAttributeDefinitionsUpdateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &customers.UpdateCustomerCustomAttributeDefinitionRequest{ + Key: "key", + CustomAttributeDefinition: &square.CustomAttributeDefinition{ + Description: square.String( + "Update the description as desired.", + ), + Visibility: square.CustomAttributeDefinitionVisibilityVisibilityReadOnly.Ptr(), + }, + } + _, invocationErr := client.Customers.CustomAttributeDefinitions.Update( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersCustomAttributeDefinitionsUpdateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersCustomAttributeDefinitionsUpdateWithWireMock", "PUT", "/v2/customers/custom-attribute-definitions/key", nil, 1) +} + +func TestCustomersCustomAttributeDefinitionsDeleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &customers.DeleteCustomAttributeDefinitionsRequest{ + Key: "key", + } + _, invocationErr := client.Customers.CustomAttributeDefinitions.Delete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersCustomAttributeDefinitionsDeleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersCustomAttributeDefinitionsDeleteWithWireMock", "DELETE", "/v2/customers/custom-attribute-definitions/key", nil, 1) +} + +func TestCustomersCustomAttributeDefinitionsBatchUpsertWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &customers.BatchUpsertCustomerCustomAttributesRequest{ + Values: map[string]*square.BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest{ + "id1": &square.BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest{ + CustomerID: "N3NCVYY3WS27HF0HKANA3R9FP8", + CustomAttribute: &square.CustomAttribute{ + Key: square.String( + "favoritemovie", + ), + Value: "Dune", + }, + }, + "id2": &square.BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest{ + CustomerID: "SY8EMWRNDN3TQDP2H4KS1QWMMM", + CustomAttribute: &square.CustomAttribute{ + Key: square.String( + "ownsmovie", + ), + Value: false, + }, + }, + "id3": &square.BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest{ + CustomerID: "SY8EMWRNDN3TQDP2H4KS1QWMMM", + CustomAttribute: &square.CustomAttribute{ + Key: square.String( + "favoritemovie", + ), + Value: "Star Wars", + }, + }, + "id4": &square.BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest{ + CustomerID: "N3NCVYY3WS27HF0HKANA3R9FP8", + CustomAttribute: &square.CustomAttribute{ + Key: square.String( + "square:a0f1505a-2aa1-490d-91a8-8d31ff181808", + ), + Value: "10.5", + }, + }, + "id5": &square.BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest{ + CustomerID: "70548QG1HN43B05G0KCZ4MMC1G", + CustomAttribute: &square.CustomAttribute{ + Key: square.String( + "sq0ids-0evKIskIGaY45fCyNL66aw:backupemail", + ), + Value: "fake-email@squareup.com", + }, + }, + }, + } + _, invocationErr := client.Customers.CustomAttributeDefinitions.BatchUpsert( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersCustomAttributeDefinitionsBatchUpsertWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersCustomAttributeDefinitionsBatchUpsertWithWireMock", "POST", "/v2/customers/custom-attributes/bulk-upsert", nil, 1) +} diff --git a/customers/customattributes/customers_custom_attributes_test/customers_custom_attributes_test.go b/customers/customattributes/customers_custom_attributes_test/customers_custom_attributes_test.go new file mode 100644 index 0000000..6db1ada --- /dev/null +++ b/customers/customattributes/customers_custom_attributes_test/customers_custom_attributes_test.go @@ -0,0 +1,185 @@ +// Code generated by Fern. DO NOT EDIT. + +package customers_custom_attributes_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + customers "github.com/square/square-go-sdk/v3/customers" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestCustomersCustomAttributesListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &customers.ListCustomAttributesRequest{ + CustomerID: "customer_id", + Limit: square.Int( + 1, + ), + Cursor: square.String( + "cursor", + ), + WithDefinitions: square.Bool( + true, + ), + } + _, invocationErr := client.Customers.CustomAttributes.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersCustomAttributesListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersCustomAttributesListWithWireMock", "GET", "/v2/customers/customer_id/custom-attributes", map[string]string{"limit": "1", "cursor": "cursor", "with_definitions": "true"}, 1) +} + +func TestCustomersCustomAttributesGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &customers.GetCustomAttributesRequest{ + CustomerID: "customer_id", + Key: "key", + WithDefinition: square.Bool( + true, + ), + Version: square.Int( + 1, + ), + } + _, invocationErr := client.Customers.CustomAttributes.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersCustomAttributesGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersCustomAttributesGetWithWireMock", "GET", "/v2/customers/customer_id/custom-attributes/key", map[string]string{"with_definition": "true", "version": "1"}, 1) +} + +func TestCustomersCustomAttributesUpsertWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &customers.UpsertCustomerCustomAttributeRequest{ + CustomerID: "customer_id", + Key: "key", + CustomAttribute: &square.CustomAttribute{ + Value: "Dune", + }, + } + _, invocationErr := client.Customers.CustomAttributes.Upsert( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersCustomAttributesUpsertWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersCustomAttributesUpsertWithWireMock", "POST", "/v2/customers/customer_id/custom-attributes/key", nil, 1) +} + +func TestCustomersCustomAttributesDeleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &customers.DeleteCustomAttributesRequest{ + CustomerID: "customer_id", + Key: "key", + } + _, invocationErr := client.Customers.CustomAttributes.Delete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersCustomAttributesDeleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersCustomAttributesDeleteWithWireMock", "DELETE", "/v2/customers/customer_id/custom-attributes/key", nil, 1) +} diff --git a/customers/customers_test/customers_test.go b/customers/customers_test/customers_test.go new file mode 100644 index 0000000..982c939 --- /dev/null +++ b/customers/customers_test/customers_test.go @@ -0,0 +1,512 @@ +// Code generated by Fern. DO NOT EDIT. + +package customers_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestCustomersListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.ListCustomersRequest{ + Cursor: square.String( + "cursor", + ), + Limit: square.Int( + 1, + ), + SortField: square.CustomerSortFieldDefault.Ptr(), + SortOrder: square.SortOrderDesc.Ptr(), + Count: square.Bool( + true, + ), + } + _, invocationErr := client.Customers.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersListWithWireMock", "GET", "/v2/customers", map[string]string{"cursor": "cursor", "limit": "1", "sort_field": "DEFAULT", "sort_order": "DESC", "count": "true"}, 1) +} + +func TestCustomersCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CreateCustomerRequest{ + GivenName: square.String( + "Amelia", + ), + FamilyName: square.String( + "Earhart", + ), + EmailAddress: square.String( + "Amelia.Earhart@example.com", + ), + Address: &square.Address{ + AddressLine1: square.String( + "500 Electric Ave", + ), + AddressLine2: square.String( + "Suite 600", + ), + Locality: square.String( + "New York", + ), + AdministrativeDistrictLevel1: square.String( + "NY", + ), + PostalCode: square.String( + "10003", + ), + Country: square.CountryUs.Ptr(), + }, + PhoneNumber: square.String( + "+1-212-555-4240", + ), + ReferenceID: square.String( + "YOUR_REFERENCE_ID", + ), + Note: square.String( + "a customer", + ), + } + _, invocationErr := client.Customers.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersCreateWithWireMock", "POST", "/v2/customers", nil, 1) +} + +func TestCustomersBatchCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.BulkCreateCustomersRequest{ + Customers: map[string]*square.BulkCreateCustomerData{ + "8bb76c4f-e35d-4c5b-90de-1194cd9179f0": &square.BulkCreateCustomerData{ + GivenName: square.String( + "Amelia", + ), + FamilyName: square.String( + "Earhart", + ), + EmailAddress: square.String( + "Amelia.Earhart@example.com", + ), + Address: &square.Address{ + AddressLine1: square.String( + "500 Electric Ave", + ), + AddressLine2: square.String( + "Suite 600", + ), + Locality: square.String( + "New York", + ), + AdministrativeDistrictLevel1: square.String( + "NY", + ), + PostalCode: square.String( + "10003", + ), + Country: square.CountryUs.Ptr(), + }, + PhoneNumber: square.String( + "+1-212-555-4240", + ), + ReferenceID: square.String( + "YOUR_REFERENCE_ID", + ), + Note: square.String( + "a customer", + ), + }, + "d1689f23-b25d-4932-b2f0-aed00f5e2029": &square.BulkCreateCustomerData{ + GivenName: square.String( + "Marie", + ), + FamilyName: square.String( + "Curie", + ), + EmailAddress: square.String( + "Marie.Curie@example.com", + ), + Address: &square.Address{ + AddressLine1: square.String( + "500 Electric Ave", + ), + AddressLine2: square.String( + "Suite 601", + ), + Locality: square.String( + "New York", + ), + AdministrativeDistrictLevel1: square.String( + "NY", + ), + PostalCode: square.String( + "10003", + ), + Country: square.CountryUs.Ptr(), + }, + PhoneNumber: square.String( + "+1-212-444-4240", + ), + ReferenceID: square.String( + "YOUR_REFERENCE_ID", + ), + Note: square.String( + "another customer", + ), + }, + }, + } + _, invocationErr := client.Customers.BatchCreate( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersBatchCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersBatchCreateWithWireMock", "POST", "/v2/customers/bulk-create", nil, 1) +} + +func TestCustomersBulkDeleteCustomersWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.BulkDeleteCustomersRequest{ + CustomerIDs: []string{ + "8DDA5NZVBZFGAX0V3HPF81HHE0", + "N18CPRVXR5214XPBBA6BZQWF3C", + "2GYD7WNXF7BJZW1PMGNXZ3Y8M8", + }, + } + _, invocationErr := client.Customers.BulkDeleteCustomers( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersBulkDeleteCustomersWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersBulkDeleteCustomersWithWireMock", "POST", "/v2/customers/bulk-delete", nil, 1) +} + +func TestCustomersBulkRetrieveCustomersWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.BulkRetrieveCustomersRequest{ + CustomerIDs: []string{ + "8DDA5NZVBZFGAX0V3HPF81HHE0", + "N18CPRVXR5214XPBBA6BZQWF3C", + "2GYD7WNXF7BJZW1PMGNXZ3Y8M8", + }, + } + _, invocationErr := client.Customers.BulkRetrieveCustomers( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersBulkRetrieveCustomersWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersBulkRetrieveCustomersWithWireMock", "POST", "/v2/customers/bulk-retrieve", nil, 1) +} + +func TestCustomersBulkUpdateCustomersWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.BulkUpdateCustomersRequest{ + Customers: map[string]*square.BulkUpdateCustomerData{ + "8DDA5NZVBZFGAX0V3HPF81HHE0": &square.BulkUpdateCustomerData{ + EmailAddress: square.String( + "New.Amelia.Earhart@example.com", + ), + Note: square.String( + "updated customer note", + ), + Version: square.Int64( + int64(2), + ), + }, + "N18CPRVXR5214XPBBA6BZQWF3C": &square.BulkUpdateCustomerData{ + GivenName: square.String( + "Marie", + ), + FamilyName: square.String( + "Curie", + ), + Version: square.Int64( + int64(0), + ), + }, + }, + } + _, invocationErr := client.Customers.BulkUpdateCustomers( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersBulkUpdateCustomersWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersBulkUpdateCustomersWithWireMock", "POST", "/v2/customers/bulk-update", nil, 1) +} + +func TestCustomersSearchWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.SearchCustomersRequest{ + Limit: square.Int64( + int64(2), + ), + Query: &square.CustomerQuery{ + Filter: &square.CustomerFilter{ + CreationSource: &square.CustomerCreationSourceFilter{ + Values: []square.CustomerCreationSource{ + square.CustomerCreationSourceThirdParty, + }, + Rule: square.CustomerInclusionExclusionInclude.Ptr(), + }, + CreatedAt: &square.TimeRange{ + StartAt: square.String( + "2018-01-01T00:00:00-00:00", + ), + EndAt: square.String( + "2018-02-01T00:00:00-00:00", + ), + }, + EmailAddress: &square.CustomerTextFilter{ + Fuzzy: square.String( + "example.com", + ), + }, + GroupIDs: &square.FilterValue{ + All: []string{ + "545AXB44B4XXWMVQ4W8SBT3HHF", + }, + }, + }, + Sort: &square.CustomerSort{ + Field: square.CustomerSortFieldCreatedAt.Ptr(), + Order: square.SortOrderAsc.Ptr(), + }, + }, + } + _, invocationErr := client.Customers.Search( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersSearchWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersSearchWithWireMock", "POST", "/v2/customers/search", nil, 1) +} + +func TestCustomersGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.GetCustomersRequest{ + CustomerID: "customer_id", + } + _, invocationErr := client.Customers.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersGetWithWireMock", "GET", "/v2/customers/customer_id", nil, 1) +} + +func TestCustomersUpdateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.UpdateCustomerRequest{ + CustomerID: "customer_id", + EmailAddress: square.String( + "New.Amelia.Earhart@example.com", + ), + Note: square.String( + "updated customer note", + ), + Version: square.Int64( + int64(2), + ), + } + _, invocationErr := client.Customers.Update( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersUpdateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersUpdateWithWireMock", "PUT", "/v2/customers/customer_id", nil, 1) +} + +func TestCustomersDeleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.DeleteCustomersRequest{ + CustomerID: "customer_id", + Version: square.Int64( + int64(1000000), + ), + } + _, invocationErr := client.Customers.Delete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersDeleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersDeleteWithWireMock", "DELETE", "/v2/customers/customer_id", map[string]string{"version": "1000000"}, 1) +} diff --git a/customers/groups.go b/customers/groups.go index eb4e0c9..f42cbaa 100644 --- a/customers/groups.go +++ b/customers/groups.go @@ -3,7 +3,9 @@ package customers import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" big "math/big" ) @@ -52,7 +54,7 @@ type CreateCustomerGroupRequest struct { // The idempotency key for the request. For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"` // The customer group to create. - Group *v3.CustomerGroup `json:"group,omitempty" url:"-"` + Group *v3.CustomerGroup `json:"group" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -79,6 +81,27 @@ func (c *CreateCustomerGroupRequest) SetGroup(group *v3.CustomerGroup) { c.require(createCustomerGroupRequestFieldGroup) } +func (c *CreateCustomerGroupRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateCustomerGroupRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateCustomerGroupRequest(body) + return nil +} + +func (c *CreateCustomerGroupRequest) MarshalJSON() ([]byte, error) { + type embed CreateCustomerGroupRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( deleteGroupsRequestFieldGroupID = big.NewInt(1 << 0) ) @@ -218,7 +241,7 @@ type UpdateCustomerGroupRequest struct { // The ID of the customer group to update. GroupID string `json:"-" url:"-"` // The `CustomerGroup` object including all the updates you want to make. - Group *v3.CustomerGroup `json:"group,omitempty" url:"-"` + Group *v3.CustomerGroup `json:"group" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -244,3 +267,24 @@ func (u *UpdateCustomerGroupRequest) SetGroup(group *v3.CustomerGroup) { u.Group = group u.require(updateCustomerGroupRequestFieldGroup) } + +func (u *UpdateCustomerGroupRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdateCustomerGroupRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdateCustomerGroupRequest(body) + return nil +} + +func (u *UpdateCustomerGroupRequest) MarshalJSON() ([]byte, error) { + type embed UpdateCustomerGroupRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/customers/groups/customers_groups_test/customers_groups_test.go b/customers/groups/customers_groups_test/customers_groups_test.go new file mode 100644 index 0000000..2b11683 --- /dev/null +++ b/customers/groups/customers_groups_test/customers_groups_test.go @@ -0,0 +1,251 @@ +// Code generated by Fern. DO NOT EDIT. + +package customers_groups_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + customers "github.com/square/square-go-sdk/v3/customers" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestCustomersGroupsListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &customers.ListGroupsRequest{ + Cursor: square.String( + "cursor", + ), + Limit: square.Int( + 1, + ), + } + _, invocationErr := client.Customers.Groups.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersGroupsListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersGroupsListWithWireMock", "GET", "/v2/customers/groups", map[string]string{"cursor": "cursor", "limit": "1"}, 1) +} + +func TestCustomersGroupsCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &customers.CreateCustomerGroupRequest{ + Group: &square.CustomerGroup{ + Name: "Loyal Customers", + }, + } + _, invocationErr := client.Customers.Groups.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersGroupsCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersGroupsCreateWithWireMock", "POST", "/v2/customers/groups", nil, 1) +} + +func TestCustomersGroupsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &customers.GetGroupsRequest{ + GroupID: "group_id", + } + _, invocationErr := client.Customers.Groups.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersGroupsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersGroupsGetWithWireMock", "GET", "/v2/customers/groups/group_id", nil, 1) +} + +func TestCustomersGroupsUpdateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &customers.UpdateCustomerGroupRequest{ + GroupID: "group_id", + Group: &square.CustomerGroup{ + Name: "Loyal Customers", + }, + } + _, invocationErr := client.Customers.Groups.Update( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersGroupsUpdateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersGroupsUpdateWithWireMock", "PUT", "/v2/customers/groups/group_id", nil, 1) +} + +func TestCustomersGroupsDeleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &customers.DeleteGroupsRequest{ + GroupID: "group_id", + } + _, invocationErr := client.Customers.Groups.Delete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersGroupsDeleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersGroupsDeleteWithWireMock", "DELETE", "/v2/customers/groups/group_id", nil, 1) +} + +func TestCustomersGroupsAddWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &customers.AddGroupsRequest{ + CustomerID: "customer_id", + GroupID: "group_id", + } + _, invocationErr := client.Customers.Groups.Add( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersGroupsAddWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersGroupsAddWithWireMock", "PUT", "/v2/customers/customer_id/groups/group_id", nil, 1) +} + +func TestCustomersGroupsRemoveWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &customers.RemoveGroupsRequest{ + CustomerID: "customer_id", + GroupID: "group_id", + } + _, invocationErr := client.Customers.Groups.Remove( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersGroupsRemoveWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersGroupsRemoveWithWireMock", "DELETE", "/v2/customers/customer_id/groups/group_id", nil, 1) +} diff --git a/customers/groups_test.go b/customers/groups_test.go new file mode 100644 index 0000000..17c5602 --- /dev/null +++ b/customers/groups_test.go @@ -0,0 +1,442 @@ +// Code generated by Fern. DO NOT EDIT. + +package customers + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersAddGroupsRequest(t *testing.T) { + t.Run("SetCustomerID", func(t *testing.T) { + obj := &AddGroupsRequest{} + var fernTestValueCustomerID string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGroupID", func(t *testing.T) { + obj := &AddGroupsRequest{} + var fernTestValueGroupID string + obj.SetGroupID(fernTestValueGroupID) + assert.Equal(t, fernTestValueGroupID, obj.GroupID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitAddGroupsRequest(t *testing.T) { + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AddGroupsRequest{} + var fernTestValueCustomerID string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGroupID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AddGroupsRequest{} + var fernTestValueGroupID string + + // Act + obj.SetGroupID(fernTestValueGroupID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateCustomerGroupRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateCustomerGroupRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateCustomerGroupRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerGroupRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteGroupsRequest(t *testing.T) { + t.Run("SetGroupID", func(t *testing.T) { + obj := &DeleteGroupsRequest{} + var fernTestValueGroupID string + obj.SetGroupID(fernTestValueGroupID) + assert.Equal(t, fernTestValueGroupID, obj.GroupID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDeleteGroupsRequest(t *testing.T) { + t.Run("SetGroupID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteGroupsRequest{} + var fernTestValueGroupID string + + // Act + obj.SetGroupID(fernTestValueGroupID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetGroupsRequest(t *testing.T) { + t.Run("SetGroupID", func(t *testing.T) { + obj := &GetGroupsRequest{} + var fernTestValueGroupID string + obj.SetGroupID(fernTestValueGroupID) + assert.Equal(t, fernTestValueGroupID, obj.GroupID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetGroupsRequest(t *testing.T) { + t.Run("SetGroupID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetGroupsRequest{} + var fernTestValueGroupID string + + // Act + obj.SetGroupID(fernTestValueGroupID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListGroupsRequest(t *testing.T) { + t.Run("SetCursor", func(t *testing.T) { + obj := &ListGroupsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListGroupsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListGroupsRequest(t *testing.T) { + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListGroupsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListGroupsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRemoveGroupsRequest(t *testing.T) { + t.Run("SetCustomerID", func(t *testing.T) { + obj := &RemoveGroupsRequest{} + var fernTestValueCustomerID string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGroupID", func(t *testing.T) { + obj := &RemoveGroupsRequest{} + var fernTestValueGroupID string + obj.SetGroupID(fernTestValueGroupID) + assert.Equal(t, fernTestValueGroupID, obj.GroupID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitRemoveGroupsRequest(t *testing.T) { + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RemoveGroupsRequest{} + var fernTestValueCustomerID string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGroupID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RemoveGroupsRequest{} + var fernTestValueGroupID string + + // Act + obj.SetGroupID(fernTestValueGroupID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateCustomerGroupRequest(t *testing.T) { + t.Run("SetGroupID", func(t *testing.T) { + obj := &UpdateCustomerGroupRequest{} + var fernTestValueGroupID string + obj.SetGroupID(fernTestValueGroupID) + assert.Equal(t, fernTestValueGroupID, obj.GroupID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateCustomerGroupRequest(t *testing.T) { + t.Run("SetGroupID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerGroupRequest{} + var fernTestValueGroupID string + + // Act + obj.SetGroupID(fernTestValueGroupID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/customers/segments/customers_segments_test/customers_segments_test.go b/customers/segments/customers_segments_test/customers_segments_test.go new file mode 100644 index 0000000..a910c61 --- /dev/null +++ b/customers/segments/customers_segments_test/customers_segments_test.go @@ -0,0 +1,119 @@ +// Code generated by Fern. DO NOT EDIT. + +package customers_segments_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + customers "github.com/square/square-go-sdk/v3/customers" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestCustomersSegmentsListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &customers.ListSegmentsRequest{ + Cursor: square.String( + "cursor", + ), + Limit: square.Int( + 1, + ), + } + _, invocationErr := client.Customers.Segments.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersSegmentsListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersSegmentsListWithWireMock", "GET", "/v2/customers/segments", map[string]string{"cursor": "cursor", "limit": "1"}, 1) +} + +func TestCustomersSegmentsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &customers.GetSegmentsRequest{ + SegmentID: "segment_id", + } + _, invocationErr := client.Customers.Segments.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestCustomersSegmentsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestCustomersSegmentsGetWithWireMock", "GET", "/v2/customers/segments/segment_id", nil, 1) +} diff --git a/customers/segments_test.go b/customers/segments_test.go new file mode 100644 index 0000000..5654545 --- /dev/null +++ b/customers/segments_test.go @@ -0,0 +1,139 @@ +// Code generated by Fern. DO NOT EDIT. + +package customers + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersGetSegmentsRequest(t *testing.T) { + t.Run("SetSegmentID", func(t *testing.T) { + obj := &GetSegmentsRequest{} + var fernTestValueSegmentID string + obj.SetSegmentID(fernTestValueSegmentID) + assert.Equal(t, fernTestValueSegmentID, obj.SegmentID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetSegmentsRequest(t *testing.T) { + t.Run("SetSegmentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetSegmentsRequest{} + var fernTestValueSegmentID string + + // Act + obj.SetSegmentID(fernTestValueSegmentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListSegmentsRequest(t *testing.T) { + t.Run("SetCursor", func(t *testing.T) { + obj := &ListSegmentsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListSegmentsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListSegmentsRequest(t *testing.T) { + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListSegmentsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListSegmentsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/customers_test.go b/customers_test.go new file mode 100644 index 0000000..132e139 --- /dev/null +++ b/customers_test.go @@ -0,0 +1,11090 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersBulkDeleteCustomersRequest(t *testing.T) { + t.Run("SetCustomerIDs", func(t *testing.T) { + obj := &BulkDeleteCustomersRequest{} + var fernTestValueCustomerIDs []string + obj.SetCustomerIDs(fernTestValueCustomerIDs) + assert.Equal(t, fernTestValueCustomerIDs, obj.CustomerIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitBulkDeleteCustomersRequest(t *testing.T) { + t.Run("SetCustomerIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteCustomersRequest{} + var fernTestValueCustomerIDs []string + + // Act + obj.SetCustomerIDs(fernTestValueCustomerIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkRetrieveCustomersRequest(t *testing.T) { + t.Run("SetCustomerIDs", func(t *testing.T) { + obj := &BulkRetrieveCustomersRequest{} + var fernTestValueCustomerIDs []string + obj.SetCustomerIDs(fernTestValueCustomerIDs) + assert.Equal(t, fernTestValueCustomerIDs, obj.CustomerIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitBulkRetrieveCustomersRequest(t *testing.T) { + t.Run("SetCustomerIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveCustomersRequest{} + var fernTestValueCustomerIDs []string + + // Act + obj.SetCustomerIDs(fernTestValueCustomerIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkUpdateCustomersRequest(t *testing.T) { + t.Run("SetCustomers", func(t *testing.T) { + obj := &BulkUpdateCustomersRequest{} + var fernTestValueCustomers map[string]*BulkUpdateCustomerData + obj.SetCustomers(fernTestValueCustomers) + assert.Equal(t, fernTestValueCustomers, obj.Customers) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitBulkUpdateCustomersRequest(t *testing.T) { + t.Run("SetCustomers_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomersRequest{} + var fernTestValueCustomers map[string]*BulkUpdateCustomerData + + // Act + obj.SetCustomers(fernTestValueCustomers) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkCreateCustomersRequest(t *testing.T) { + t.Run("SetCustomers", func(t *testing.T) { + obj := &BulkCreateCustomersRequest{} + var fernTestValueCustomers map[string]*BulkCreateCustomerData + obj.SetCustomers(fernTestValueCustomers) + assert.Equal(t, fernTestValueCustomers, obj.Customers) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitBulkCreateCustomersRequest(t *testing.T) { + t.Run("SetCustomers_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomersRequest{} + var fernTestValueCustomers map[string]*BulkCreateCustomerData + + // Act + obj.SetCustomers(fernTestValueCustomers) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateCustomerRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateCustomerRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGivenName", func(t *testing.T) { + obj := &CreateCustomerRequest{} + var fernTestValueGivenName *string + obj.SetGivenName(fernTestValueGivenName) + assert.Equal(t, fernTestValueGivenName, obj.GivenName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFamilyName", func(t *testing.T) { + obj := &CreateCustomerRequest{} + var fernTestValueFamilyName *string + obj.SetFamilyName(fernTestValueFamilyName) + assert.Equal(t, fernTestValueFamilyName, obj.FamilyName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCompanyName", func(t *testing.T) { + obj := &CreateCustomerRequest{} + var fernTestValueCompanyName *string + obj.SetCompanyName(fernTestValueCompanyName) + assert.Equal(t, fernTestValueCompanyName, obj.CompanyName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNickname", func(t *testing.T) { + obj := &CreateCustomerRequest{} + var fernTestValueNickname *string + obj.SetNickname(fernTestValueNickname) + assert.Equal(t, fernTestValueNickname, obj.Nickname) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEmailAddress", func(t *testing.T) { + obj := &CreateCustomerRequest{} + var fernTestValueEmailAddress *string + obj.SetEmailAddress(fernTestValueEmailAddress) + assert.Equal(t, fernTestValueEmailAddress, obj.EmailAddress) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAddress", func(t *testing.T) { + obj := &CreateCustomerRequest{} + var fernTestValueAddress *Address + obj.SetAddress(fernTestValueAddress) + assert.Equal(t, fernTestValueAddress, obj.Address) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPhoneNumber", func(t *testing.T) { + obj := &CreateCustomerRequest{} + var fernTestValuePhoneNumber *string + obj.SetPhoneNumber(fernTestValuePhoneNumber) + assert.Equal(t, fernTestValuePhoneNumber, obj.PhoneNumber) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReferenceID", func(t *testing.T) { + obj := &CreateCustomerRequest{} + var fernTestValueReferenceID *string + obj.SetReferenceID(fernTestValueReferenceID) + assert.Equal(t, fernTestValueReferenceID, obj.ReferenceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNote", func(t *testing.T) { + obj := &CreateCustomerRequest{} + var fernTestValueNote *string + obj.SetNote(fernTestValueNote) + assert.Equal(t, fernTestValueNote, obj.Note) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBirthday", func(t *testing.T) { + obj := &CreateCustomerRequest{} + var fernTestValueBirthday *string + obj.SetBirthday(fernTestValueBirthday) + assert.Equal(t, fernTestValueBirthday, obj.Birthday) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTaxIDs", func(t *testing.T) { + obj := &CreateCustomerRequest{} + var fernTestValueTaxIDs *CustomerTaxIDs + obj.SetTaxIDs(fernTestValueTaxIDs) + assert.Equal(t, fernTestValueTaxIDs, obj.TaxIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateCustomerRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGivenName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerRequest{} + var fernTestValueGivenName *string + + // Act + obj.SetGivenName(fernTestValueGivenName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFamilyName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerRequest{} + var fernTestValueFamilyName *string + + // Act + obj.SetFamilyName(fernTestValueFamilyName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCompanyName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerRequest{} + var fernTestValueCompanyName *string + + // Act + obj.SetCompanyName(fernTestValueCompanyName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNickname_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerRequest{} + var fernTestValueNickname *string + + // Act + obj.SetNickname(fernTestValueNickname) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEmailAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerRequest{} + var fernTestValueEmailAddress *string + + // Act + obj.SetEmailAddress(fernTestValueEmailAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerRequest{} + var fernTestValueAddress *Address + + // Act + obj.SetAddress(fernTestValueAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPhoneNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerRequest{} + var fernTestValuePhoneNumber *string + + // Act + obj.SetPhoneNumber(fernTestValuePhoneNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReferenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerRequest{} + var fernTestValueReferenceID *string + + // Act + obj.SetReferenceID(fernTestValueReferenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNote_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerRequest{} + var fernTestValueNote *string + + // Act + obj.SetNote(fernTestValueNote) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBirthday_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerRequest{} + var fernTestValueBirthday *string + + // Act + obj.SetBirthday(fernTestValueBirthday) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTaxIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerRequest{} + var fernTestValueTaxIDs *CustomerTaxIDs + + // Act + obj.SetTaxIDs(fernTestValueTaxIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteCustomersRequest(t *testing.T) { + t.Run("SetCustomerID", func(t *testing.T) { + obj := &DeleteCustomersRequest{} + var fernTestValueCustomerID string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &DeleteCustomersRequest{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDeleteCustomersRequest(t *testing.T) { + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomersRequest{} + var fernTestValueCustomerID string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomersRequest{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetCustomersRequest(t *testing.T) { + t.Run("SetCustomerID", func(t *testing.T) { + obj := &GetCustomersRequest{} + var fernTestValueCustomerID string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetCustomersRequest(t *testing.T) { + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomersRequest{} + var fernTestValueCustomerID string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListCustomersRequest(t *testing.T) { + t.Run("SetCursor", func(t *testing.T) { + obj := &ListCustomersRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListCustomersRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSortField", func(t *testing.T) { + obj := &ListCustomersRequest{} + var fernTestValueSortField *CustomerSortField + obj.SetSortField(fernTestValueSortField) + assert.Equal(t, fernTestValueSortField, obj.SortField) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSortOrder", func(t *testing.T) { + obj := &ListCustomersRequest{} + var fernTestValueSortOrder *SortOrder + obj.SetSortOrder(fernTestValueSortOrder) + assert.Equal(t, fernTestValueSortOrder, obj.SortOrder) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCount", func(t *testing.T) { + obj := &ListCustomersRequest{} + var fernTestValueCount *bool + obj.SetCount(fernTestValueCount) + assert.Equal(t, fernTestValueCount, obj.Count) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListCustomersRequest(t *testing.T) { + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomersRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomersRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSortField_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomersRequest{} + var fernTestValueSortField *CustomerSortField + + // Act + obj.SetSortField(fernTestValueSortField) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSortOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomersRequest{} + var fernTestValueSortOrder *SortOrder + + // Act + obj.SetSortOrder(fernTestValueSortOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCount_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomersRequest{} + var fernTestValueCount *bool + + // Act + obj.SetCount(fernTestValueCount) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchCustomersRequest(t *testing.T) { + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchCustomersRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &SearchCustomersRequest{} + var fernTestValueLimit *int64 + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuery", func(t *testing.T) { + obj := &SearchCustomersRequest{} + var fernTestValueQuery *CustomerQuery + obj.SetQuery(fernTestValueQuery) + assert.Equal(t, fernTestValueQuery, obj.Query) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCount", func(t *testing.T) { + obj := &SearchCustomersRequest{} + var fernTestValueCount *bool + obj.SetCount(fernTestValueCount) + assert.Equal(t, fernTestValueCount, obj.Count) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitSearchCustomersRequest(t *testing.T) { + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCustomersRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCustomersRequest{} + var fernTestValueLimit *int64 + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuery_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCustomersRequest{} + var fernTestValueQuery *CustomerQuery + + // Act + obj.SetQuery(fernTestValueQuery) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCount_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCustomersRequest{} + var fernTestValueCount *bool + + // Act + obj.SetCount(fernTestValueCount) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkCreateCustomerData(t *testing.T) { + t.Run("SetGivenName", func(t *testing.T) { + obj := &BulkCreateCustomerData{} + var fernTestValueGivenName *string + obj.SetGivenName(fernTestValueGivenName) + assert.Equal(t, fernTestValueGivenName, obj.GivenName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFamilyName", func(t *testing.T) { + obj := &BulkCreateCustomerData{} + var fernTestValueFamilyName *string + obj.SetFamilyName(fernTestValueFamilyName) + assert.Equal(t, fernTestValueFamilyName, obj.FamilyName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCompanyName", func(t *testing.T) { + obj := &BulkCreateCustomerData{} + var fernTestValueCompanyName *string + obj.SetCompanyName(fernTestValueCompanyName) + assert.Equal(t, fernTestValueCompanyName, obj.CompanyName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNickname", func(t *testing.T) { + obj := &BulkCreateCustomerData{} + var fernTestValueNickname *string + obj.SetNickname(fernTestValueNickname) + assert.Equal(t, fernTestValueNickname, obj.Nickname) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEmailAddress", func(t *testing.T) { + obj := &BulkCreateCustomerData{} + var fernTestValueEmailAddress *string + obj.SetEmailAddress(fernTestValueEmailAddress) + assert.Equal(t, fernTestValueEmailAddress, obj.EmailAddress) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAddress", func(t *testing.T) { + obj := &BulkCreateCustomerData{} + var fernTestValueAddress *Address + obj.SetAddress(fernTestValueAddress) + assert.Equal(t, fernTestValueAddress, obj.Address) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPhoneNumber", func(t *testing.T) { + obj := &BulkCreateCustomerData{} + var fernTestValuePhoneNumber *string + obj.SetPhoneNumber(fernTestValuePhoneNumber) + assert.Equal(t, fernTestValuePhoneNumber, obj.PhoneNumber) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReferenceID", func(t *testing.T) { + obj := &BulkCreateCustomerData{} + var fernTestValueReferenceID *string + obj.SetReferenceID(fernTestValueReferenceID) + assert.Equal(t, fernTestValueReferenceID, obj.ReferenceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNote", func(t *testing.T) { + obj := &BulkCreateCustomerData{} + var fernTestValueNote *string + obj.SetNote(fernTestValueNote) + assert.Equal(t, fernTestValueNote, obj.Note) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBirthday", func(t *testing.T) { + obj := &BulkCreateCustomerData{} + var fernTestValueBirthday *string + obj.SetBirthday(fernTestValueBirthday) + assert.Equal(t, fernTestValueBirthday, obj.Birthday) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTaxIDs", func(t *testing.T) { + obj := &BulkCreateCustomerData{} + var fernTestValueTaxIDs *CustomerTaxIDs + obj.SetTaxIDs(fernTestValueTaxIDs) + assert.Equal(t, fernTestValueTaxIDs, obj.TaxIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkCreateCustomerData(t *testing.T) { + t.Run("GetGivenName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + var expected *string + obj.GivenName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGivenName(), "getter should return the property value") + }) + + t.Run("GetGivenName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + obj.GivenName = nil + + // Act & Assert + assert.Nil(t, obj.GetGivenName(), "getter should return nil when property is nil") + }) + + t.Run("GetGivenName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkCreateCustomerData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGivenName() // Should return zero value + }) + + t.Run("GetFamilyName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + var expected *string + obj.FamilyName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFamilyName(), "getter should return the property value") + }) + + t.Run("GetFamilyName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + obj.FamilyName = nil + + // Act & Assert + assert.Nil(t, obj.GetFamilyName(), "getter should return nil when property is nil") + }) + + t.Run("GetFamilyName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkCreateCustomerData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFamilyName() // Should return zero value + }) + + t.Run("GetCompanyName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + var expected *string + obj.CompanyName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCompanyName(), "getter should return the property value") + }) + + t.Run("GetCompanyName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + obj.CompanyName = nil + + // Act & Assert + assert.Nil(t, obj.GetCompanyName(), "getter should return nil when property is nil") + }) + + t.Run("GetCompanyName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkCreateCustomerData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCompanyName() // Should return zero value + }) + + t.Run("GetNickname", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + var expected *string + obj.Nickname = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNickname(), "getter should return the property value") + }) + + t.Run("GetNickname_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + obj.Nickname = nil + + // Act & Assert + assert.Nil(t, obj.GetNickname(), "getter should return nil when property is nil") + }) + + t.Run("GetNickname_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkCreateCustomerData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNickname() // Should return zero value + }) + + t.Run("GetEmailAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + var expected *string + obj.EmailAddress = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEmailAddress(), "getter should return the property value") + }) + + t.Run("GetEmailAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + obj.EmailAddress = nil + + // Act & Assert + assert.Nil(t, obj.GetEmailAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetEmailAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkCreateCustomerData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEmailAddress() // Should return zero value + }) + + t.Run("GetAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + var expected *Address + obj.Address = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAddress(), "getter should return the property value") + }) + + t.Run("GetAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + obj.Address = nil + + // Act & Assert + assert.Nil(t, obj.GetAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkCreateCustomerData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAddress() // Should return zero value + }) + + t.Run("GetPhoneNumber", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + var expected *string + obj.PhoneNumber = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPhoneNumber(), "getter should return the property value") + }) + + t.Run("GetPhoneNumber_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + obj.PhoneNumber = nil + + // Act & Assert + assert.Nil(t, obj.GetPhoneNumber(), "getter should return nil when property is nil") + }) + + t.Run("GetPhoneNumber_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkCreateCustomerData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPhoneNumber() // Should return zero value + }) + + t.Run("GetReferenceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + var expected *string + obj.ReferenceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReferenceID(), "getter should return the property value") + }) + + t.Run("GetReferenceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + obj.ReferenceID = nil + + // Act & Assert + assert.Nil(t, obj.GetReferenceID(), "getter should return nil when property is nil") + }) + + t.Run("GetReferenceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkCreateCustomerData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReferenceID() // Should return zero value + }) + + t.Run("GetNote", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + var expected *string + obj.Note = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNote(), "getter should return the property value") + }) + + t.Run("GetNote_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + obj.Note = nil + + // Act & Assert + assert.Nil(t, obj.GetNote(), "getter should return nil when property is nil") + }) + + t.Run("GetNote_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkCreateCustomerData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNote() // Should return zero value + }) + + t.Run("GetBirthday", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + var expected *string + obj.Birthday = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBirthday(), "getter should return the property value") + }) + + t.Run("GetBirthday_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + obj.Birthday = nil + + // Act & Assert + assert.Nil(t, obj.GetBirthday(), "getter should return nil when property is nil") + }) + + t.Run("GetBirthday_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkCreateCustomerData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBirthday() // Should return zero value + }) + + t.Run("GetTaxIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + var expected *CustomerTaxIDs + obj.TaxIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTaxIDs(), "getter should return the property value") + }) + + t.Run("GetTaxIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + obj.TaxIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetTaxIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetTaxIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkCreateCustomerData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTaxIDs() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkCreateCustomerData(t *testing.T) { + t.Run("SetGivenName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + var fernTestValueGivenName *string + + // Act + obj.SetGivenName(fernTestValueGivenName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFamilyName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + var fernTestValueFamilyName *string + + // Act + obj.SetFamilyName(fernTestValueFamilyName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCompanyName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + var fernTestValueCompanyName *string + + // Act + obj.SetCompanyName(fernTestValueCompanyName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNickname_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + var fernTestValueNickname *string + + // Act + obj.SetNickname(fernTestValueNickname) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEmailAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + var fernTestValueEmailAddress *string + + // Act + obj.SetEmailAddress(fernTestValueEmailAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + var fernTestValueAddress *Address + + // Act + obj.SetAddress(fernTestValueAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPhoneNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + var fernTestValuePhoneNumber *string + + // Act + obj.SetPhoneNumber(fernTestValuePhoneNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReferenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + var fernTestValueReferenceID *string + + // Act + obj.SetReferenceID(fernTestValueReferenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNote_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + var fernTestValueNote *string + + // Act + obj.SetNote(fernTestValueNote) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBirthday_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + var fernTestValueBirthday *string + + // Act + obj.SetBirthday(fernTestValueBirthday) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTaxIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + var fernTestValueTaxIDs *CustomerTaxIDs + + // Act + obj.SetTaxIDs(fernTestValueTaxIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkCreateCustomersResponse(t *testing.T) { + t.Run("SetResponses", func(t *testing.T) { + obj := &BulkCreateCustomersResponse{} + var fernTestValueResponses map[string]*CreateCustomerResponse + obj.SetResponses(fernTestValueResponses) + assert.Equal(t, fernTestValueResponses, obj.Responses) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &BulkCreateCustomersResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkCreateCustomersResponse(t *testing.T) { + t.Run("GetResponses", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomersResponse{} + var expected map[string]*CreateCustomerResponse + obj.Responses = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetResponses(), "getter should return the property value") + }) + + t.Run("GetResponses_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomersResponse{} + obj.Responses = nil + + // Act & Assert + assert.Nil(t, obj.GetResponses(), "getter should return nil when property is nil") + }) + + t.Run("GetResponses_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkCreateCustomersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetResponses() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomersResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomersResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkCreateCustomersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkCreateCustomersResponse(t *testing.T) { + t.Run("SetResponses_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomersResponse{} + var fernTestValueResponses map[string]*CreateCustomerResponse + + // Act + obj.SetResponses(fernTestValueResponses) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomersResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkDeleteCustomersResponse(t *testing.T) { + t.Run("SetResponses", func(t *testing.T) { + obj := &BulkDeleteCustomersResponse{} + var fernTestValueResponses map[string]*DeleteCustomerResponse + obj.SetResponses(fernTestValueResponses) + assert.Equal(t, fernTestValueResponses, obj.Responses) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &BulkDeleteCustomersResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkDeleteCustomersResponse(t *testing.T) { + t.Run("GetResponses", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteCustomersResponse{} + var expected map[string]*DeleteCustomerResponse + obj.Responses = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetResponses(), "getter should return the property value") + }) + + t.Run("GetResponses_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteCustomersResponse{} + obj.Responses = nil + + // Act & Assert + assert.Nil(t, obj.GetResponses(), "getter should return nil when property is nil") + }) + + t.Run("GetResponses_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteCustomersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetResponses() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteCustomersResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteCustomersResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteCustomersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkDeleteCustomersResponse(t *testing.T) { + t.Run("SetResponses_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteCustomersResponse{} + var fernTestValueResponses map[string]*DeleteCustomerResponse + + // Act + obj.SetResponses(fernTestValueResponses) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteCustomersResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkRetrieveCustomersResponse(t *testing.T) { + t.Run("SetResponses", func(t *testing.T) { + obj := &BulkRetrieveCustomersResponse{} + var fernTestValueResponses map[string]*GetCustomerResponse + obj.SetResponses(fernTestValueResponses) + assert.Equal(t, fernTestValueResponses, obj.Responses) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &BulkRetrieveCustomersResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkRetrieveCustomersResponse(t *testing.T) { + t.Run("GetResponses", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveCustomersResponse{} + var expected map[string]*GetCustomerResponse + obj.Responses = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetResponses(), "getter should return the property value") + }) + + t.Run("GetResponses_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveCustomersResponse{} + obj.Responses = nil + + // Act & Assert + assert.Nil(t, obj.GetResponses(), "getter should return nil when property is nil") + }) + + t.Run("GetResponses_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkRetrieveCustomersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetResponses() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveCustomersResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveCustomersResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkRetrieveCustomersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkRetrieveCustomersResponse(t *testing.T) { + t.Run("SetResponses_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveCustomersResponse{} + var fernTestValueResponses map[string]*GetCustomerResponse + + // Act + obj.SetResponses(fernTestValueResponses) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveCustomersResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkUpdateCustomerData(t *testing.T) { + t.Run("SetGivenName", func(t *testing.T) { + obj := &BulkUpdateCustomerData{} + var fernTestValueGivenName *string + obj.SetGivenName(fernTestValueGivenName) + assert.Equal(t, fernTestValueGivenName, obj.GivenName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFamilyName", func(t *testing.T) { + obj := &BulkUpdateCustomerData{} + var fernTestValueFamilyName *string + obj.SetFamilyName(fernTestValueFamilyName) + assert.Equal(t, fernTestValueFamilyName, obj.FamilyName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCompanyName", func(t *testing.T) { + obj := &BulkUpdateCustomerData{} + var fernTestValueCompanyName *string + obj.SetCompanyName(fernTestValueCompanyName) + assert.Equal(t, fernTestValueCompanyName, obj.CompanyName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNickname", func(t *testing.T) { + obj := &BulkUpdateCustomerData{} + var fernTestValueNickname *string + obj.SetNickname(fernTestValueNickname) + assert.Equal(t, fernTestValueNickname, obj.Nickname) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEmailAddress", func(t *testing.T) { + obj := &BulkUpdateCustomerData{} + var fernTestValueEmailAddress *string + obj.SetEmailAddress(fernTestValueEmailAddress) + assert.Equal(t, fernTestValueEmailAddress, obj.EmailAddress) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAddress", func(t *testing.T) { + obj := &BulkUpdateCustomerData{} + var fernTestValueAddress *Address + obj.SetAddress(fernTestValueAddress) + assert.Equal(t, fernTestValueAddress, obj.Address) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPhoneNumber", func(t *testing.T) { + obj := &BulkUpdateCustomerData{} + var fernTestValuePhoneNumber *string + obj.SetPhoneNumber(fernTestValuePhoneNumber) + assert.Equal(t, fernTestValuePhoneNumber, obj.PhoneNumber) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReferenceID", func(t *testing.T) { + obj := &BulkUpdateCustomerData{} + var fernTestValueReferenceID *string + obj.SetReferenceID(fernTestValueReferenceID) + assert.Equal(t, fernTestValueReferenceID, obj.ReferenceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNote", func(t *testing.T) { + obj := &BulkUpdateCustomerData{} + var fernTestValueNote *string + obj.SetNote(fernTestValueNote) + assert.Equal(t, fernTestValueNote, obj.Note) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBirthday", func(t *testing.T) { + obj := &BulkUpdateCustomerData{} + var fernTestValueBirthday *string + obj.SetBirthday(fernTestValueBirthday) + assert.Equal(t, fernTestValueBirthday, obj.Birthday) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTaxIDs", func(t *testing.T) { + obj := &BulkUpdateCustomerData{} + var fernTestValueTaxIDs *CustomerTaxIDs + obj.SetTaxIDs(fernTestValueTaxIDs) + assert.Equal(t, fernTestValueTaxIDs, obj.TaxIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &BulkUpdateCustomerData{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkUpdateCustomerData(t *testing.T) { + t.Run("GetGivenName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + var expected *string + obj.GivenName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGivenName(), "getter should return the property value") + }) + + t.Run("GetGivenName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + obj.GivenName = nil + + // Act & Assert + assert.Nil(t, obj.GetGivenName(), "getter should return nil when property is nil") + }) + + t.Run("GetGivenName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpdateCustomerData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGivenName() // Should return zero value + }) + + t.Run("GetFamilyName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + var expected *string + obj.FamilyName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFamilyName(), "getter should return the property value") + }) + + t.Run("GetFamilyName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + obj.FamilyName = nil + + // Act & Assert + assert.Nil(t, obj.GetFamilyName(), "getter should return nil when property is nil") + }) + + t.Run("GetFamilyName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpdateCustomerData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFamilyName() // Should return zero value + }) + + t.Run("GetCompanyName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + var expected *string + obj.CompanyName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCompanyName(), "getter should return the property value") + }) + + t.Run("GetCompanyName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + obj.CompanyName = nil + + // Act & Assert + assert.Nil(t, obj.GetCompanyName(), "getter should return nil when property is nil") + }) + + t.Run("GetCompanyName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpdateCustomerData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCompanyName() // Should return zero value + }) + + t.Run("GetNickname", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + var expected *string + obj.Nickname = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNickname(), "getter should return the property value") + }) + + t.Run("GetNickname_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + obj.Nickname = nil + + // Act & Assert + assert.Nil(t, obj.GetNickname(), "getter should return nil when property is nil") + }) + + t.Run("GetNickname_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpdateCustomerData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNickname() // Should return zero value + }) + + t.Run("GetEmailAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + var expected *string + obj.EmailAddress = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEmailAddress(), "getter should return the property value") + }) + + t.Run("GetEmailAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + obj.EmailAddress = nil + + // Act & Assert + assert.Nil(t, obj.GetEmailAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetEmailAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpdateCustomerData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEmailAddress() // Should return zero value + }) + + t.Run("GetAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + var expected *Address + obj.Address = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAddress(), "getter should return the property value") + }) + + t.Run("GetAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + obj.Address = nil + + // Act & Assert + assert.Nil(t, obj.GetAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpdateCustomerData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAddress() // Should return zero value + }) + + t.Run("GetPhoneNumber", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + var expected *string + obj.PhoneNumber = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPhoneNumber(), "getter should return the property value") + }) + + t.Run("GetPhoneNumber_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + obj.PhoneNumber = nil + + // Act & Assert + assert.Nil(t, obj.GetPhoneNumber(), "getter should return nil when property is nil") + }) + + t.Run("GetPhoneNumber_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpdateCustomerData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPhoneNumber() // Should return zero value + }) + + t.Run("GetReferenceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + var expected *string + obj.ReferenceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReferenceID(), "getter should return the property value") + }) + + t.Run("GetReferenceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + obj.ReferenceID = nil + + // Act & Assert + assert.Nil(t, obj.GetReferenceID(), "getter should return nil when property is nil") + }) + + t.Run("GetReferenceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpdateCustomerData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReferenceID() // Should return zero value + }) + + t.Run("GetNote", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + var expected *string + obj.Note = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNote(), "getter should return the property value") + }) + + t.Run("GetNote_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + obj.Note = nil + + // Act & Assert + assert.Nil(t, obj.GetNote(), "getter should return nil when property is nil") + }) + + t.Run("GetNote_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpdateCustomerData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNote() // Should return zero value + }) + + t.Run("GetBirthday", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + var expected *string + obj.Birthday = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBirthday(), "getter should return the property value") + }) + + t.Run("GetBirthday_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + obj.Birthday = nil + + // Act & Assert + assert.Nil(t, obj.GetBirthday(), "getter should return nil when property is nil") + }) + + t.Run("GetBirthday_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpdateCustomerData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBirthday() // Should return zero value + }) + + t.Run("GetTaxIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + var expected *CustomerTaxIDs + obj.TaxIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTaxIDs(), "getter should return the property value") + }) + + t.Run("GetTaxIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + obj.TaxIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetTaxIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetTaxIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpdateCustomerData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTaxIDs() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + var expected *int64 + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpdateCustomerData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkUpdateCustomerData(t *testing.T) { + t.Run("SetGivenName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + var fernTestValueGivenName *string + + // Act + obj.SetGivenName(fernTestValueGivenName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFamilyName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + var fernTestValueFamilyName *string + + // Act + obj.SetFamilyName(fernTestValueFamilyName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCompanyName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + var fernTestValueCompanyName *string + + // Act + obj.SetCompanyName(fernTestValueCompanyName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNickname_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + var fernTestValueNickname *string + + // Act + obj.SetNickname(fernTestValueNickname) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEmailAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + var fernTestValueEmailAddress *string + + // Act + obj.SetEmailAddress(fernTestValueEmailAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + var fernTestValueAddress *Address + + // Act + obj.SetAddress(fernTestValueAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPhoneNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + var fernTestValuePhoneNumber *string + + // Act + obj.SetPhoneNumber(fernTestValuePhoneNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReferenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + var fernTestValueReferenceID *string + + // Act + obj.SetReferenceID(fernTestValueReferenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNote_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + var fernTestValueNote *string + + // Act + obj.SetNote(fernTestValueNote) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBirthday_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + var fernTestValueBirthday *string + + // Act + obj.SetBirthday(fernTestValueBirthday) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTaxIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + var fernTestValueTaxIDs *CustomerTaxIDs + + // Act + obj.SetTaxIDs(fernTestValueTaxIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkUpdateCustomersResponse(t *testing.T) { + t.Run("SetResponses", func(t *testing.T) { + obj := &BulkUpdateCustomersResponse{} + var fernTestValueResponses map[string]*UpdateCustomerResponse + obj.SetResponses(fernTestValueResponses) + assert.Equal(t, fernTestValueResponses, obj.Responses) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &BulkUpdateCustomersResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkUpdateCustomersResponse(t *testing.T) { + t.Run("GetResponses", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomersResponse{} + var expected map[string]*UpdateCustomerResponse + obj.Responses = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetResponses(), "getter should return the property value") + }) + + t.Run("GetResponses_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomersResponse{} + obj.Responses = nil + + // Act & Assert + assert.Nil(t, obj.GetResponses(), "getter should return nil when property is nil") + }) + + t.Run("GetResponses_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpdateCustomersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetResponses() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomersResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomersResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpdateCustomersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkUpdateCustomersResponse(t *testing.T) { + t.Run("SetResponses_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomersResponse{} + var fernTestValueResponses map[string]*UpdateCustomerResponse + + // Act + obj.SetResponses(fernTestValueResponses) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomersResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateCustomerResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateCustomerResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomer", func(t *testing.T) { + obj := &CreateCustomerResponse{} + var fernTestValueCustomer *Customer + obj.SetCustomer(fernTestValueCustomer) + assert.Equal(t, fernTestValueCustomer, obj.Customer) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateCustomerResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCustomerResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetCustomer", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerResponse{} + var expected *Customer + obj.Customer = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomer(), "getter should return the property value") + }) + + t.Run("GetCustomer_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerResponse{} + obj.Customer = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomer(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomer_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCustomerResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomer() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateCustomerResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomer_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerResponse{} + var fernTestValueCustomer *Customer + + // Act + obj.SetCustomer(fernTestValueCustomer) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomer(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &Customer{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &Customer{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &Customer{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGivenName", func(t *testing.T) { + obj := &Customer{} + var fernTestValueGivenName *string + obj.SetGivenName(fernTestValueGivenName) + assert.Equal(t, fernTestValueGivenName, obj.GivenName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFamilyName", func(t *testing.T) { + obj := &Customer{} + var fernTestValueFamilyName *string + obj.SetFamilyName(fernTestValueFamilyName) + assert.Equal(t, fernTestValueFamilyName, obj.FamilyName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNickname", func(t *testing.T) { + obj := &Customer{} + var fernTestValueNickname *string + obj.SetNickname(fernTestValueNickname) + assert.Equal(t, fernTestValueNickname, obj.Nickname) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCompanyName", func(t *testing.T) { + obj := &Customer{} + var fernTestValueCompanyName *string + obj.SetCompanyName(fernTestValueCompanyName) + assert.Equal(t, fernTestValueCompanyName, obj.CompanyName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEmailAddress", func(t *testing.T) { + obj := &Customer{} + var fernTestValueEmailAddress *string + obj.SetEmailAddress(fernTestValueEmailAddress) + assert.Equal(t, fernTestValueEmailAddress, obj.EmailAddress) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAddress", func(t *testing.T) { + obj := &Customer{} + var fernTestValueAddress *Address + obj.SetAddress(fernTestValueAddress) + assert.Equal(t, fernTestValueAddress, obj.Address) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPhoneNumber", func(t *testing.T) { + obj := &Customer{} + var fernTestValuePhoneNumber *string + obj.SetPhoneNumber(fernTestValuePhoneNumber) + assert.Equal(t, fernTestValuePhoneNumber, obj.PhoneNumber) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBirthday", func(t *testing.T) { + obj := &Customer{} + var fernTestValueBirthday *string + obj.SetBirthday(fernTestValueBirthday) + assert.Equal(t, fernTestValueBirthday, obj.Birthday) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReferenceID", func(t *testing.T) { + obj := &Customer{} + var fernTestValueReferenceID *string + obj.SetReferenceID(fernTestValueReferenceID) + assert.Equal(t, fernTestValueReferenceID, obj.ReferenceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNote", func(t *testing.T) { + obj := &Customer{} + var fernTestValueNote *string + obj.SetNote(fernTestValueNote) + assert.Equal(t, fernTestValueNote, obj.Note) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPreferences", func(t *testing.T) { + obj := &Customer{} + var fernTestValuePreferences *CustomerPreferences + obj.SetPreferences(fernTestValuePreferences) + assert.Equal(t, fernTestValuePreferences, obj.Preferences) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreationSource", func(t *testing.T) { + obj := &Customer{} + var fernTestValueCreationSource *CustomerCreationSource + obj.SetCreationSource(fernTestValueCreationSource) + assert.Equal(t, fernTestValueCreationSource, obj.CreationSource) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGroupIDs", func(t *testing.T) { + obj := &Customer{} + var fernTestValueGroupIDs []string + obj.SetGroupIDs(fernTestValueGroupIDs) + assert.Equal(t, fernTestValueGroupIDs, obj.GroupIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSegmentIDs", func(t *testing.T) { + obj := &Customer{} + var fernTestValueSegmentIDs []string + obj.SetSegmentIDs(fernTestValueSegmentIDs) + assert.Equal(t, fernTestValueSegmentIDs, obj.SegmentIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &Customer{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTaxIDs", func(t *testing.T) { + obj := &Customer{} + var fernTestValueTaxIDs *CustomerTaxIDs + obj.SetTaxIDs(fernTestValueTaxIDs) + assert.Equal(t, fernTestValueTaxIDs, obj.TaxIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomer(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Customer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Customer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Customer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetGivenName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var expected *string + obj.GivenName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGivenName(), "getter should return the property value") + }) + + t.Run("GetGivenName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + obj.GivenName = nil + + // Act & Assert + assert.Nil(t, obj.GetGivenName(), "getter should return nil when property is nil") + }) + + t.Run("GetGivenName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Customer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGivenName() // Should return zero value + }) + + t.Run("GetFamilyName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var expected *string + obj.FamilyName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFamilyName(), "getter should return the property value") + }) + + t.Run("GetFamilyName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + obj.FamilyName = nil + + // Act & Assert + assert.Nil(t, obj.GetFamilyName(), "getter should return nil when property is nil") + }) + + t.Run("GetFamilyName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Customer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFamilyName() // Should return zero value + }) + + t.Run("GetNickname", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var expected *string + obj.Nickname = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNickname(), "getter should return the property value") + }) + + t.Run("GetNickname_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + obj.Nickname = nil + + // Act & Assert + assert.Nil(t, obj.GetNickname(), "getter should return nil when property is nil") + }) + + t.Run("GetNickname_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Customer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNickname() // Should return zero value + }) + + t.Run("GetCompanyName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var expected *string + obj.CompanyName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCompanyName(), "getter should return the property value") + }) + + t.Run("GetCompanyName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + obj.CompanyName = nil + + // Act & Assert + assert.Nil(t, obj.GetCompanyName(), "getter should return nil when property is nil") + }) + + t.Run("GetCompanyName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Customer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCompanyName() // Should return zero value + }) + + t.Run("GetEmailAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var expected *string + obj.EmailAddress = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEmailAddress(), "getter should return the property value") + }) + + t.Run("GetEmailAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + obj.EmailAddress = nil + + // Act & Assert + assert.Nil(t, obj.GetEmailAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetEmailAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Customer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEmailAddress() // Should return zero value + }) + + t.Run("GetAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var expected *Address + obj.Address = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAddress(), "getter should return the property value") + }) + + t.Run("GetAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + obj.Address = nil + + // Act & Assert + assert.Nil(t, obj.GetAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Customer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAddress() // Should return zero value + }) + + t.Run("GetPhoneNumber", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var expected *string + obj.PhoneNumber = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPhoneNumber(), "getter should return the property value") + }) + + t.Run("GetPhoneNumber_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + obj.PhoneNumber = nil + + // Act & Assert + assert.Nil(t, obj.GetPhoneNumber(), "getter should return nil when property is nil") + }) + + t.Run("GetPhoneNumber_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Customer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPhoneNumber() // Should return zero value + }) + + t.Run("GetBirthday", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var expected *string + obj.Birthday = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBirthday(), "getter should return the property value") + }) + + t.Run("GetBirthday_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + obj.Birthday = nil + + // Act & Assert + assert.Nil(t, obj.GetBirthday(), "getter should return nil when property is nil") + }) + + t.Run("GetBirthday_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Customer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBirthday() // Should return zero value + }) + + t.Run("GetReferenceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var expected *string + obj.ReferenceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReferenceID(), "getter should return the property value") + }) + + t.Run("GetReferenceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + obj.ReferenceID = nil + + // Act & Assert + assert.Nil(t, obj.GetReferenceID(), "getter should return nil when property is nil") + }) + + t.Run("GetReferenceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Customer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReferenceID() // Should return zero value + }) + + t.Run("GetNote", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var expected *string + obj.Note = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNote(), "getter should return the property value") + }) + + t.Run("GetNote_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + obj.Note = nil + + // Act & Assert + assert.Nil(t, obj.GetNote(), "getter should return nil when property is nil") + }) + + t.Run("GetNote_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Customer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNote() // Should return zero value + }) + + t.Run("GetPreferences", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var expected *CustomerPreferences + obj.Preferences = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPreferences(), "getter should return the property value") + }) + + t.Run("GetPreferences_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + obj.Preferences = nil + + // Act & Assert + assert.Nil(t, obj.GetPreferences(), "getter should return nil when property is nil") + }) + + t.Run("GetPreferences_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Customer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPreferences() // Should return zero value + }) + + t.Run("GetCreationSource", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var expected *CustomerCreationSource + obj.CreationSource = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreationSource(), "getter should return the property value") + }) + + t.Run("GetCreationSource_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + obj.CreationSource = nil + + // Act & Assert + assert.Nil(t, obj.GetCreationSource(), "getter should return nil when property is nil") + }) + + t.Run("GetCreationSource_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Customer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreationSource() // Should return zero value + }) + + t.Run("GetGroupIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var expected []string + obj.GroupIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGroupIDs(), "getter should return the property value") + }) + + t.Run("GetGroupIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + obj.GroupIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetGroupIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetGroupIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Customer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGroupIDs() // Should return zero value + }) + + t.Run("GetSegmentIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var expected []string + obj.SegmentIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSegmentIDs(), "getter should return the property value") + }) + + t.Run("GetSegmentIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + obj.SegmentIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetSegmentIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetSegmentIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Customer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSegmentIDs() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var expected *int64 + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Customer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetTaxIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var expected *CustomerTaxIDs + obj.TaxIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTaxIDs(), "getter should return the property value") + }) + + t.Run("GetTaxIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + obj.TaxIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetTaxIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetTaxIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Customer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTaxIDs() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomer(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGivenName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var fernTestValueGivenName *string + + // Act + obj.SetGivenName(fernTestValueGivenName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFamilyName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var fernTestValueFamilyName *string + + // Act + obj.SetFamilyName(fernTestValueFamilyName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNickname_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var fernTestValueNickname *string + + // Act + obj.SetNickname(fernTestValueNickname) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCompanyName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var fernTestValueCompanyName *string + + // Act + obj.SetCompanyName(fernTestValueCompanyName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEmailAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var fernTestValueEmailAddress *string + + // Act + obj.SetEmailAddress(fernTestValueEmailAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var fernTestValueAddress *Address + + // Act + obj.SetAddress(fernTestValueAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPhoneNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var fernTestValuePhoneNumber *string + + // Act + obj.SetPhoneNumber(fernTestValuePhoneNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBirthday_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var fernTestValueBirthday *string + + // Act + obj.SetBirthday(fernTestValueBirthday) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReferenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var fernTestValueReferenceID *string + + // Act + obj.SetReferenceID(fernTestValueReferenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNote_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var fernTestValueNote *string + + // Act + obj.SetNote(fernTestValueNote) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPreferences_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var fernTestValuePreferences *CustomerPreferences + + // Act + obj.SetPreferences(fernTestValuePreferences) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreationSource_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var fernTestValueCreationSource *CustomerCreationSource + + // Act + obj.SetCreationSource(fernTestValueCreationSource) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGroupIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var fernTestValueGroupIDs []string + + // Act + obj.SetGroupIDs(fernTestValueGroupIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSegmentIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var fernTestValueSegmentIDs []string + + // Act + obj.SetSegmentIDs(fernTestValueSegmentIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTaxIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + var fernTestValueTaxIDs *CustomerTaxIDs + + // Act + obj.SetTaxIDs(fernTestValueTaxIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerAddressFilter(t *testing.T) { + t.Run("SetPostalCode", func(t *testing.T) { + obj := &CustomerAddressFilter{} + var fernTestValuePostalCode *CustomerTextFilter + obj.SetPostalCode(fernTestValuePostalCode) + assert.Equal(t, fernTestValuePostalCode, obj.PostalCode) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCountry", func(t *testing.T) { + obj := &CustomerAddressFilter{} + var fernTestValueCountry *Country + obj.SetCountry(fernTestValueCountry) + assert.Equal(t, fernTestValueCountry, obj.Country) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerAddressFilter(t *testing.T) { + t.Run("GetPostalCode", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerAddressFilter{} + var expected *CustomerTextFilter + obj.PostalCode = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPostalCode(), "getter should return the property value") + }) + + t.Run("GetPostalCode_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerAddressFilter{} + obj.PostalCode = nil + + // Act & Assert + assert.Nil(t, obj.GetPostalCode(), "getter should return nil when property is nil") + }) + + t.Run("GetPostalCode_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerAddressFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPostalCode() // Should return zero value + }) + + t.Run("GetCountry", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerAddressFilter{} + var expected *Country + obj.Country = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCountry(), "getter should return the property value") + }) + + t.Run("GetCountry_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerAddressFilter{} + obj.Country = nil + + // Act & Assert + assert.Nil(t, obj.GetCountry(), "getter should return nil when property is nil") + }) + + t.Run("GetCountry_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerAddressFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCountry() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerAddressFilter(t *testing.T) { + t.Run("SetPostalCode_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerAddressFilter{} + var fernTestValuePostalCode *CustomerTextFilter + + // Act + obj.SetPostalCode(fernTestValuePostalCode) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCountry_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerAddressFilter{} + var fernTestValueCountry *Country + + // Act + obj.SetCountry(fernTestValueCountry) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCreationSourceFilter(t *testing.T) { + t.Run("SetValues", func(t *testing.T) { + obj := &CustomerCreationSourceFilter{} + var fernTestValueValues []CustomerCreationSource + obj.SetValues(fernTestValueValues) + assert.Equal(t, fernTestValueValues, obj.Values) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRule", func(t *testing.T) { + obj := &CustomerCreationSourceFilter{} + var fernTestValueRule *CustomerInclusionExclusion + obj.SetRule(fernTestValueRule) + assert.Equal(t, fernTestValueRule, obj.Rule) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCreationSourceFilter(t *testing.T) { + t.Run("GetValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreationSourceFilter{} + var expected []CustomerCreationSource + obj.Values = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetValues(), "getter should return the property value") + }) + + t.Run("GetValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreationSourceFilter{} + obj.Values = nil + + // Act & Assert + assert.Nil(t, obj.GetValues(), "getter should return nil when property is nil") + }) + + t.Run("GetValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCreationSourceFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetValues() // Should return zero value + }) + + t.Run("GetRule", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreationSourceFilter{} + var expected *CustomerInclusionExclusion + obj.Rule = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRule(), "getter should return the property value") + }) + + t.Run("GetRule_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreationSourceFilter{} + obj.Rule = nil + + // Act & Assert + assert.Nil(t, obj.GetRule(), "getter should return nil when property is nil") + }) + + t.Run("GetRule_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCreationSourceFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRule() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCreationSourceFilter(t *testing.T) { + t.Run("SetValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreationSourceFilter{} + var fernTestValueValues []CustomerCreationSource + + // Act + obj.SetValues(fernTestValueValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRule_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreationSourceFilter{} + var fernTestValueRule *CustomerInclusionExclusion + + // Act + obj.SetRule(fernTestValueRule) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCustomAttributeFilter(t *testing.T) { + t.Run("SetKey", func(t *testing.T) { + obj := &CustomerCustomAttributeFilter{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFilter", func(t *testing.T) { + obj := &CustomerCustomAttributeFilter{} + var fernTestValueFilter *CustomerCustomAttributeFilterValue + obj.SetFilter(fernTestValueFilter) + assert.Equal(t, fernTestValueFilter, obj.Filter) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CustomerCustomAttributeFilter{} + var fernTestValueUpdatedAt *TimeRange + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCustomAttributeFilter(t *testing.T) { + t.Run("GetKey", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilter{} + var expected string + obj.Key = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetKey(), "getter should return the property value") + }) + + t.Run("GetKey_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetKey() // Should return zero value + }) + + t.Run("GetFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilter{} + var expected *CustomerCustomAttributeFilterValue + obj.Filter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFilter(), "getter should return the property value") + }) + + t.Run("GetFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilter{} + obj.Filter = nil + + // Act & Assert + assert.Nil(t, obj.GetFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFilter() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilter{} + var expected *TimeRange + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilter{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCustomAttributeFilter(t *testing.T) { + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilter{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilter{} + var fernTestValueFilter *CustomerCustomAttributeFilterValue + + // Act + obj.SetFilter(fernTestValueFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilter{} + var fernTestValueUpdatedAt *TimeRange + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCustomAttributeFilterValue(t *testing.T) { + t.Run("SetEmail", func(t *testing.T) { + obj := &CustomerCustomAttributeFilterValue{} + var fernTestValueEmail *CustomerTextFilter + obj.SetEmail(fernTestValueEmail) + assert.Equal(t, fernTestValueEmail, obj.Email) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPhone", func(t *testing.T) { + obj := &CustomerCustomAttributeFilterValue{} + var fernTestValuePhone *CustomerTextFilter + obj.SetPhone(fernTestValuePhone) + assert.Equal(t, fernTestValuePhone, obj.Phone) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetText", func(t *testing.T) { + obj := &CustomerCustomAttributeFilterValue{} + var fernTestValueText *CustomerTextFilter + obj.SetText(fernTestValueText) + assert.Equal(t, fernTestValueText, obj.Text) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSelection", func(t *testing.T) { + obj := &CustomerCustomAttributeFilterValue{} + var fernTestValueSelection *FilterValue + obj.SetSelection(fernTestValueSelection) + assert.Equal(t, fernTestValueSelection, obj.Selection) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDate", func(t *testing.T) { + obj := &CustomerCustomAttributeFilterValue{} + var fernTestValueDate *TimeRange + obj.SetDate(fernTestValueDate) + assert.Equal(t, fernTestValueDate, obj.Date) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNumber", func(t *testing.T) { + obj := &CustomerCustomAttributeFilterValue{} + var fernTestValueNumber *FloatNumberRange + obj.SetNumber(fernTestValueNumber) + assert.Equal(t, fernTestValueNumber, obj.Number) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBoolean", func(t *testing.T) { + obj := &CustomerCustomAttributeFilterValue{} + var fernTestValueBoolean *bool + obj.SetBoolean(fernTestValueBoolean) + assert.Equal(t, fernTestValueBoolean, obj.Boolean) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAddress", func(t *testing.T) { + obj := &CustomerCustomAttributeFilterValue{} + var fernTestValueAddress *CustomerAddressFilter + obj.SetAddress(fernTestValueAddress) + assert.Equal(t, fernTestValueAddress, obj.Address) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCustomAttributeFilterValue(t *testing.T) { + t.Run("GetEmail", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilterValue{} + var expected *CustomerTextFilter + obj.Email = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEmail(), "getter should return the property value") + }) + + t.Run("GetEmail_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilterValue{} + obj.Email = nil + + // Act & Assert + assert.Nil(t, obj.GetEmail(), "getter should return nil when property is nil") + }) + + t.Run("GetEmail_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeFilterValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEmail() // Should return zero value + }) + + t.Run("GetPhone", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilterValue{} + var expected *CustomerTextFilter + obj.Phone = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPhone(), "getter should return the property value") + }) + + t.Run("GetPhone_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilterValue{} + obj.Phone = nil + + // Act & Assert + assert.Nil(t, obj.GetPhone(), "getter should return nil when property is nil") + }) + + t.Run("GetPhone_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeFilterValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPhone() // Should return zero value + }) + + t.Run("GetText", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilterValue{} + var expected *CustomerTextFilter + obj.Text = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetText(), "getter should return the property value") + }) + + t.Run("GetText_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilterValue{} + obj.Text = nil + + // Act & Assert + assert.Nil(t, obj.GetText(), "getter should return nil when property is nil") + }) + + t.Run("GetText_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeFilterValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetText() // Should return zero value + }) + + t.Run("GetSelection", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilterValue{} + var expected *FilterValue + obj.Selection = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSelection(), "getter should return the property value") + }) + + t.Run("GetSelection_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilterValue{} + obj.Selection = nil + + // Act & Assert + assert.Nil(t, obj.GetSelection(), "getter should return nil when property is nil") + }) + + t.Run("GetSelection_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeFilterValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSelection() // Should return zero value + }) + + t.Run("GetDate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilterValue{} + var expected *TimeRange + obj.Date = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDate(), "getter should return the property value") + }) + + t.Run("GetDate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilterValue{} + obj.Date = nil + + // Act & Assert + assert.Nil(t, obj.GetDate(), "getter should return nil when property is nil") + }) + + t.Run("GetDate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeFilterValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDate() // Should return zero value + }) + + t.Run("GetNumber", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilterValue{} + var expected *FloatNumberRange + obj.Number = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNumber(), "getter should return the property value") + }) + + t.Run("GetNumber_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilterValue{} + obj.Number = nil + + // Act & Assert + assert.Nil(t, obj.GetNumber(), "getter should return nil when property is nil") + }) + + t.Run("GetNumber_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeFilterValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNumber() // Should return zero value + }) + + t.Run("GetBoolean", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilterValue{} + var expected *bool + obj.Boolean = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBoolean(), "getter should return the property value") + }) + + t.Run("GetBoolean_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilterValue{} + obj.Boolean = nil + + // Act & Assert + assert.Nil(t, obj.GetBoolean(), "getter should return nil when property is nil") + }) + + t.Run("GetBoolean_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeFilterValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBoolean() // Should return zero value + }) + + t.Run("GetAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilterValue{} + var expected *CustomerAddressFilter + obj.Address = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAddress(), "getter should return the property value") + }) + + t.Run("GetAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilterValue{} + obj.Address = nil + + // Act & Assert + assert.Nil(t, obj.GetAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeFilterValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAddress() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCustomAttributeFilterValue(t *testing.T) { + t.Run("SetEmail_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilterValue{} + var fernTestValueEmail *CustomerTextFilter + + // Act + obj.SetEmail(fernTestValueEmail) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPhone_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilterValue{} + var fernTestValuePhone *CustomerTextFilter + + // Act + obj.SetPhone(fernTestValuePhone) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetText_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilterValue{} + var fernTestValueText *CustomerTextFilter + + // Act + obj.SetText(fernTestValueText) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSelection_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilterValue{} + var fernTestValueSelection *FilterValue + + // Act + obj.SetSelection(fernTestValueSelection) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilterValue{} + var fernTestValueDate *TimeRange + + // Act + obj.SetDate(fernTestValueDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilterValue{} + var fernTestValueNumber *FloatNumberRange + + // Act + obj.SetNumber(fernTestValueNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBoolean_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilterValue{} + var fernTestValueBoolean *bool + + // Act + obj.SetBoolean(fernTestValueBoolean) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilterValue{} + var fernTestValueAddress *CustomerAddressFilter + + // Act + obj.SetAddress(fernTestValueAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCustomAttributeFilters(t *testing.T) { + t.Run("SetFilters", func(t *testing.T) { + obj := &CustomerCustomAttributeFilters{} + var fernTestValueFilters []*CustomerCustomAttributeFilter + obj.SetFilters(fernTestValueFilters) + assert.Equal(t, fernTestValueFilters, obj.Filters) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCustomAttributeFilters(t *testing.T) { + t.Run("GetFilters", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilters{} + var expected []*CustomerCustomAttributeFilter + obj.Filters = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFilters(), "getter should return the property value") + }) + + t.Run("GetFilters_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilters{} + obj.Filters = nil + + // Act & Assert + assert.Nil(t, obj.GetFilters(), "getter should return nil when property is nil") + }) + + t.Run("GetFilters_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeFilters + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFilters() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCustomAttributeFilters(t *testing.T) { + t.Run("SetFilters_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilters{} + var fernTestValueFilters []*CustomerCustomAttributeFilter + + // Act + obj.SetFilters(fernTestValueFilters) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerFilter(t *testing.T) { + t.Run("SetCreationSource", func(t *testing.T) { + obj := &CustomerFilter{} + var fernTestValueCreationSource *CustomerCreationSourceFilter + obj.SetCreationSource(fernTestValueCreationSource) + assert.Equal(t, fernTestValueCreationSource, obj.CreationSource) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CustomerFilter{} + var fernTestValueCreatedAt *TimeRange + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CustomerFilter{} + var fernTestValueUpdatedAt *TimeRange + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEmailAddress", func(t *testing.T) { + obj := &CustomerFilter{} + var fernTestValueEmailAddress *CustomerTextFilter + obj.SetEmailAddress(fernTestValueEmailAddress) + assert.Equal(t, fernTestValueEmailAddress, obj.EmailAddress) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPhoneNumber", func(t *testing.T) { + obj := &CustomerFilter{} + var fernTestValuePhoneNumber *CustomerTextFilter + obj.SetPhoneNumber(fernTestValuePhoneNumber) + assert.Equal(t, fernTestValuePhoneNumber, obj.PhoneNumber) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReferenceID", func(t *testing.T) { + obj := &CustomerFilter{} + var fernTestValueReferenceID *CustomerTextFilter + obj.SetReferenceID(fernTestValueReferenceID) + assert.Equal(t, fernTestValueReferenceID, obj.ReferenceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGroupIDs", func(t *testing.T) { + obj := &CustomerFilter{} + var fernTestValueGroupIDs *FilterValue + obj.SetGroupIDs(fernTestValueGroupIDs) + assert.Equal(t, fernTestValueGroupIDs, obj.GroupIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttribute", func(t *testing.T) { + obj := &CustomerFilter{} + var fernTestValueCustomAttribute *CustomerCustomAttributeFilters + obj.SetCustomAttribute(fernTestValueCustomAttribute) + assert.Equal(t, fernTestValueCustomAttribute, obj.CustomAttribute) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSegmentIDs", func(t *testing.T) { + obj := &CustomerFilter{} + var fernTestValueSegmentIDs *FilterValue + obj.SetSegmentIDs(fernTestValueSegmentIDs) + assert.Equal(t, fernTestValueSegmentIDs, obj.SegmentIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerFilter(t *testing.T) { + t.Run("GetCreationSource", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerFilter{} + var expected *CustomerCreationSourceFilter + obj.CreationSource = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreationSource(), "getter should return the property value") + }) + + t.Run("GetCreationSource_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerFilter{} + obj.CreationSource = nil + + // Act & Assert + assert.Nil(t, obj.GetCreationSource(), "getter should return nil when property is nil") + }) + + t.Run("GetCreationSource_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreationSource() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerFilter{} + var expected *TimeRange + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerFilter{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerFilter{} + var expected *TimeRange + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerFilter{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetEmailAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerFilter{} + var expected *CustomerTextFilter + obj.EmailAddress = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEmailAddress(), "getter should return the property value") + }) + + t.Run("GetEmailAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerFilter{} + obj.EmailAddress = nil + + // Act & Assert + assert.Nil(t, obj.GetEmailAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetEmailAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEmailAddress() // Should return zero value + }) + + t.Run("GetPhoneNumber", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerFilter{} + var expected *CustomerTextFilter + obj.PhoneNumber = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPhoneNumber(), "getter should return the property value") + }) + + t.Run("GetPhoneNumber_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerFilter{} + obj.PhoneNumber = nil + + // Act & Assert + assert.Nil(t, obj.GetPhoneNumber(), "getter should return nil when property is nil") + }) + + t.Run("GetPhoneNumber_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPhoneNumber() // Should return zero value + }) + + t.Run("GetReferenceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerFilter{} + var expected *CustomerTextFilter + obj.ReferenceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReferenceID(), "getter should return the property value") + }) + + t.Run("GetReferenceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerFilter{} + obj.ReferenceID = nil + + // Act & Assert + assert.Nil(t, obj.GetReferenceID(), "getter should return nil when property is nil") + }) + + t.Run("GetReferenceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReferenceID() // Should return zero value + }) + + t.Run("GetGroupIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerFilter{} + var expected *FilterValue + obj.GroupIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGroupIDs(), "getter should return the property value") + }) + + t.Run("GetGroupIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerFilter{} + obj.GroupIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetGroupIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetGroupIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGroupIDs() // Should return zero value + }) + + t.Run("GetCustomAttribute", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerFilter{} + var expected *CustomerCustomAttributeFilters + obj.CustomAttribute = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttribute(), "getter should return the property value") + }) + + t.Run("GetCustomAttribute_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerFilter{} + obj.CustomAttribute = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttribute(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttribute_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttribute() // Should return zero value + }) + + t.Run("GetSegmentIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerFilter{} + var expected *FilterValue + obj.SegmentIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSegmentIDs(), "getter should return the property value") + }) + + t.Run("GetSegmentIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerFilter{} + obj.SegmentIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetSegmentIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetSegmentIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSegmentIDs() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerFilter(t *testing.T) { + t.Run("SetCreationSource_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerFilter{} + var fernTestValueCreationSource *CustomerCreationSourceFilter + + // Act + obj.SetCreationSource(fernTestValueCreationSource) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerFilter{} + var fernTestValueCreatedAt *TimeRange + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerFilter{} + var fernTestValueUpdatedAt *TimeRange + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEmailAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerFilter{} + var fernTestValueEmailAddress *CustomerTextFilter + + // Act + obj.SetEmailAddress(fernTestValueEmailAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPhoneNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerFilter{} + var fernTestValuePhoneNumber *CustomerTextFilter + + // Act + obj.SetPhoneNumber(fernTestValuePhoneNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReferenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerFilter{} + var fernTestValueReferenceID *CustomerTextFilter + + // Act + obj.SetReferenceID(fernTestValueReferenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGroupIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerFilter{} + var fernTestValueGroupIDs *FilterValue + + // Act + obj.SetGroupIDs(fernTestValueGroupIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttribute_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerFilter{} + var fernTestValueCustomAttribute *CustomerCustomAttributeFilters + + // Act + obj.SetCustomAttribute(fernTestValueCustomAttribute) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSegmentIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerFilter{} + var fernTestValueSegmentIDs *FilterValue + + // Act + obj.SetSegmentIDs(fernTestValueSegmentIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerPreferences(t *testing.T) { + t.Run("SetEmailUnsubscribed", func(t *testing.T) { + obj := &CustomerPreferences{} + var fernTestValueEmailUnsubscribed *bool + obj.SetEmailUnsubscribed(fernTestValueEmailUnsubscribed) + assert.Equal(t, fernTestValueEmailUnsubscribed, obj.EmailUnsubscribed) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerPreferences(t *testing.T) { + t.Run("GetEmailUnsubscribed", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerPreferences{} + var expected *bool + obj.EmailUnsubscribed = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEmailUnsubscribed(), "getter should return the property value") + }) + + t.Run("GetEmailUnsubscribed_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerPreferences{} + obj.EmailUnsubscribed = nil + + // Act & Assert + assert.Nil(t, obj.GetEmailUnsubscribed(), "getter should return nil when property is nil") + }) + + t.Run("GetEmailUnsubscribed_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerPreferences + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEmailUnsubscribed() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerPreferences(t *testing.T) { + t.Run("SetEmailUnsubscribed_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerPreferences{} + var fernTestValueEmailUnsubscribed *bool + + // Act + obj.SetEmailUnsubscribed(fernTestValueEmailUnsubscribed) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerQuery(t *testing.T) { + t.Run("SetFilter", func(t *testing.T) { + obj := &CustomerQuery{} + var fernTestValueFilter *CustomerFilter + obj.SetFilter(fernTestValueFilter) + assert.Equal(t, fernTestValueFilter, obj.Filter) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSort", func(t *testing.T) { + obj := &CustomerQuery{} + var fernTestValueSort *CustomerSort + obj.SetSort(fernTestValueSort) + assert.Equal(t, fernTestValueSort, obj.Sort) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerQuery(t *testing.T) { + t.Run("GetFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerQuery{} + var expected *CustomerFilter + obj.Filter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFilter(), "getter should return the property value") + }) + + t.Run("GetFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerQuery{} + obj.Filter = nil + + // Act & Assert + assert.Nil(t, obj.GetFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFilter() // Should return zero value + }) + + t.Run("GetSort", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerQuery{} + var expected *CustomerSort + obj.Sort = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSort(), "getter should return the property value") + }) + + t.Run("GetSort_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerQuery{} + obj.Sort = nil + + // Act & Assert + assert.Nil(t, obj.GetSort(), "getter should return nil when property is nil") + }) + + t.Run("GetSort_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSort() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerQuery(t *testing.T) { + t.Run("SetFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerQuery{} + var fernTestValueFilter *CustomerFilter + + // Act + obj.SetFilter(fernTestValueFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSort_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerQuery{} + var fernTestValueSort *CustomerSort + + // Act + obj.SetSort(fernTestValueSort) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerSort(t *testing.T) { + t.Run("SetField", func(t *testing.T) { + obj := &CustomerSort{} + var fernTestValueField *CustomerSortField + obj.SetField(fernTestValueField) + assert.Equal(t, fernTestValueField, obj.Field) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrder", func(t *testing.T) { + obj := &CustomerSort{} + var fernTestValueOrder *SortOrder + obj.SetOrder(fernTestValueOrder) + assert.Equal(t, fernTestValueOrder, obj.Order) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerSort(t *testing.T) { + t.Run("GetField", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerSort{} + var expected *CustomerSortField + obj.Field = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetField(), "getter should return the property value") + }) + + t.Run("GetField_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerSort{} + obj.Field = nil + + // Act & Assert + assert.Nil(t, obj.GetField(), "getter should return nil when property is nil") + }) + + t.Run("GetField_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerSort + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetField() // Should return zero value + }) + + t.Run("GetOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerSort{} + var expected *SortOrder + obj.Order = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrder(), "getter should return the property value") + }) + + t.Run("GetOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerSort{} + obj.Order = nil + + // Act & Assert + assert.Nil(t, obj.GetOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerSort + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrder() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerSort(t *testing.T) { + t.Run("SetField_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerSort{} + var fernTestValueField *CustomerSortField + + // Act + obj.SetField(fernTestValueField) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerSort{} + var fernTestValueOrder *SortOrder + + // Act + obj.SetOrder(fernTestValueOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerTaxIDs(t *testing.T) { + t.Run("SetEuVat", func(t *testing.T) { + obj := &CustomerTaxIDs{} + var fernTestValueEuVat *string + obj.SetEuVat(fernTestValueEuVat) + assert.Equal(t, fernTestValueEuVat, obj.EuVat) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerTaxIDs(t *testing.T) { + t.Run("GetEuVat", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerTaxIDs{} + var expected *string + obj.EuVat = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEuVat(), "getter should return the property value") + }) + + t.Run("GetEuVat_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerTaxIDs{} + obj.EuVat = nil + + // Act & Assert + assert.Nil(t, obj.GetEuVat(), "getter should return nil when property is nil") + }) + + t.Run("GetEuVat_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerTaxIDs + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEuVat() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerTaxIDs(t *testing.T) { + t.Run("SetEuVat_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerTaxIDs{} + var fernTestValueEuVat *string + + // Act + obj.SetEuVat(fernTestValueEuVat) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerTextFilter(t *testing.T) { + t.Run("SetExact", func(t *testing.T) { + obj := &CustomerTextFilter{} + var fernTestValueExact *string + obj.SetExact(fernTestValueExact) + assert.Equal(t, fernTestValueExact, obj.Exact) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFuzzy", func(t *testing.T) { + obj := &CustomerTextFilter{} + var fernTestValueFuzzy *string + obj.SetFuzzy(fernTestValueFuzzy) + assert.Equal(t, fernTestValueFuzzy, obj.Fuzzy) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerTextFilter(t *testing.T) { + t.Run("GetExact", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerTextFilter{} + var expected *string + obj.Exact = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExact(), "getter should return the property value") + }) + + t.Run("GetExact_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerTextFilter{} + obj.Exact = nil + + // Act & Assert + assert.Nil(t, obj.GetExact(), "getter should return nil when property is nil") + }) + + t.Run("GetExact_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerTextFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExact() // Should return zero value + }) + + t.Run("GetFuzzy", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerTextFilter{} + var expected *string + obj.Fuzzy = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFuzzy(), "getter should return the property value") + }) + + t.Run("GetFuzzy_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerTextFilter{} + obj.Fuzzy = nil + + // Act & Assert + assert.Nil(t, obj.GetFuzzy(), "getter should return nil when property is nil") + }) + + t.Run("GetFuzzy_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerTextFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFuzzy() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerTextFilter(t *testing.T) { + t.Run("SetExact_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerTextFilter{} + var fernTestValueExact *string + + // Act + obj.SetExact(fernTestValueExact) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFuzzy_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerTextFilter{} + var fernTestValueFuzzy *string + + // Act + obj.SetFuzzy(fernTestValueFuzzy) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteCustomerResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DeleteCustomerResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeleteCustomerResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomerResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomerResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteCustomerResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeleteCustomerResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomerResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersFloatNumberRange(t *testing.T) { + t.Run("SetStartAt", func(t *testing.T) { + obj := &FloatNumberRange{} + var fernTestValueStartAt *string + obj.SetStartAt(fernTestValueStartAt) + assert.Equal(t, fernTestValueStartAt, obj.StartAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEndAt", func(t *testing.T) { + obj := &FloatNumberRange{} + var fernTestValueEndAt *string + obj.SetEndAt(fernTestValueEndAt) + assert.Equal(t, fernTestValueEndAt, obj.EndAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersFloatNumberRange(t *testing.T) { + t.Run("GetStartAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FloatNumberRange{} + var expected *string + obj.StartAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStartAt(), "getter should return the property value") + }) + + t.Run("GetStartAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FloatNumberRange{} + obj.StartAt = nil + + // Act & Assert + assert.Nil(t, obj.GetStartAt(), "getter should return nil when property is nil") + }) + + t.Run("GetStartAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FloatNumberRange + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStartAt() // Should return zero value + }) + + t.Run("GetEndAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FloatNumberRange{} + var expected *string + obj.EndAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEndAt(), "getter should return the property value") + }) + + t.Run("GetEndAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FloatNumberRange{} + obj.EndAt = nil + + // Act & Assert + assert.Nil(t, obj.GetEndAt(), "getter should return nil when property is nil") + }) + + t.Run("GetEndAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FloatNumberRange + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEndAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitFloatNumberRange(t *testing.T) { + t.Run("SetStartAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FloatNumberRange{} + var fernTestValueStartAt *string + + // Act + obj.SetStartAt(fernTestValueStartAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEndAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FloatNumberRange{} + var fernTestValueEndAt *string + + // Act + obj.SetEndAt(fernTestValueEndAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetCustomerResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetCustomerResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomer", func(t *testing.T) { + obj := &GetCustomerResponse{} + var fernTestValueCustomer *Customer + obj.SetCustomer(fernTestValueCustomer) + assert.Equal(t, fernTestValueCustomer, obj.Customer) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetCustomerResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCustomerResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetCustomer", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerResponse{} + var expected *Customer + obj.Customer = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomer(), "getter should return the property value") + }) + + t.Run("GetCustomer_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerResponse{} + obj.Customer = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomer(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomer_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCustomerResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomer() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetCustomerResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomer_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerResponse{} + var fernTestValueCustomer *Customer + + // Act + obj.SetCustomer(fernTestValueCustomer) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListCustomersResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &ListCustomersResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomers", func(t *testing.T) { + obj := &ListCustomersResponse{} + var fernTestValueCustomers []*Customer + obj.SetCustomers(fernTestValueCustomers) + assert.Equal(t, fernTestValueCustomers, obj.Customers) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListCustomersResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCount", func(t *testing.T) { + obj := &ListCustomersResponse{} + var fernTestValueCount *int64 + obj.SetCount(fernTestValueCount) + assert.Equal(t, fernTestValueCount, obj.Count) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListCustomersResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomersResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomersResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCustomersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetCustomers", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomersResponse{} + var expected []*Customer + obj.Customers = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomers(), "getter should return the property value") + }) + + t.Run("GetCustomers_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomersResponse{} + obj.Customers = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomers(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomers_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCustomersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomers() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomersResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomersResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCustomersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetCount", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomersResponse{} + var expected *int64 + obj.Count = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCount(), "getter should return the property value") + }) + + t.Run("GetCount_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomersResponse{} + obj.Count = nil + + // Act & Assert + assert.Nil(t, obj.GetCount(), "getter should return nil when property is nil") + }) + + t.Run("GetCount_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCustomersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCount() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListCustomersResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomersResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomers_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomersResponse{} + var fernTestValueCustomers []*Customer + + // Act + obj.SetCustomers(fernTestValueCustomers) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomersResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCount_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomersResponse{} + var fernTestValueCount *int64 + + // Act + obj.SetCount(fernTestValueCount) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchCustomersResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &SearchCustomersResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomers", func(t *testing.T) { + obj := &SearchCustomersResponse{} + var fernTestValueCustomers []*Customer + obj.SetCustomers(fernTestValueCustomers) + assert.Equal(t, fernTestValueCustomers, obj.Customers) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchCustomersResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCount", func(t *testing.T) { + obj := &SearchCustomersResponse{} + var fernTestValueCount *int64 + obj.SetCount(fernTestValueCount) + assert.Equal(t, fernTestValueCount, obj.Count) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchCustomersResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCustomersResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCustomersResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchCustomersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetCustomers", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCustomersResponse{} + var expected []*Customer + obj.Customers = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomers(), "getter should return the property value") + }) + + t.Run("GetCustomers_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCustomersResponse{} + obj.Customers = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomers(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomers_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchCustomersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomers() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCustomersResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCustomersResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchCustomersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetCount", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCustomersResponse{} + var expected *int64 + obj.Count = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCount(), "getter should return the property value") + }) + + t.Run("GetCount_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCustomersResponse{} + obj.Count = nil + + // Act & Assert + assert.Nil(t, obj.GetCount(), "getter should return nil when property is nil") + }) + + t.Run("GetCount_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchCustomersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCount() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchCustomersResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCustomersResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomers_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCustomersResponse{} + var fernTestValueCustomers []*Customer + + // Act + obj.SetCustomers(fernTestValueCustomers) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCustomersResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCount_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCustomersResponse{} + var fernTestValueCount *int64 + + // Act + obj.SetCount(fernTestValueCount) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateCustomerResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateCustomerResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomer", func(t *testing.T) { + obj := &UpdateCustomerResponse{} + var fernTestValueCustomer *Customer + obj.SetCustomer(fernTestValueCustomer) + assert.Equal(t, fernTestValueCustomer, obj.Customer) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateCustomerResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateCustomerResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetCustomer", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerResponse{} + var expected *Customer + obj.Customer = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomer(), "getter should return the property value") + }) + + t.Run("GetCustomer_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerResponse{} + obj.Customer = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomer(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomer_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateCustomerResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomer() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateCustomerResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomer_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerResponse{} + var fernTestValueCustomer *Customer + + // Act + obj.SetCustomer(fernTestValueCustomer) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateCustomerRequest(t *testing.T) { + t.Run("SetCustomerID", func(t *testing.T) { + obj := &UpdateCustomerRequest{} + var fernTestValueCustomerID string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGivenName", func(t *testing.T) { + obj := &UpdateCustomerRequest{} + var fernTestValueGivenName *string + obj.SetGivenName(fernTestValueGivenName) + assert.Equal(t, fernTestValueGivenName, obj.GivenName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFamilyName", func(t *testing.T) { + obj := &UpdateCustomerRequest{} + var fernTestValueFamilyName *string + obj.SetFamilyName(fernTestValueFamilyName) + assert.Equal(t, fernTestValueFamilyName, obj.FamilyName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCompanyName", func(t *testing.T) { + obj := &UpdateCustomerRequest{} + var fernTestValueCompanyName *string + obj.SetCompanyName(fernTestValueCompanyName) + assert.Equal(t, fernTestValueCompanyName, obj.CompanyName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNickname", func(t *testing.T) { + obj := &UpdateCustomerRequest{} + var fernTestValueNickname *string + obj.SetNickname(fernTestValueNickname) + assert.Equal(t, fernTestValueNickname, obj.Nickname) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEmailAddress", func(t *testing.T) { + obj := &UpdateCustomerRequest{} + var fernTestValueEmailAddress *string + obj.SetEmailAddress(fernTestValueEmailAddress) + assert.Equal(t, fernTestValueEmailAddress, obj.EmailAddress) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAddress", func(t *testing.T) { + obj := &UpdateCustomerRequest{} + var fernTestValueAddress *Address + obj.SetAddress(fernTestValueAddress) + assert.Equal(t, fernTestValueAddress, obj.Address) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPhoneNumber", func(t *testing.T) { + obj := &UpdateCustomerRequest{} + var fernTestValuePhoneNumber *string + obj.SetPhoneNumber(fernTestValuePhoneNumber) + assert.Equal(t, fernTestValuePhoneNumber, obj.PhoneNumber) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReferenceID", func(t *testing.T) { + obj := &UpdateCustomerRequest{} + var fernTestValueReferenceID *string + obj.SetReferenceID(fernTestValueReferenceID) + assert.Equal(t, fernTestValueReferenceID, obj.ReferenceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNote", func(t *testing.T) { + obj := &UpdateCustomerRequest{} + var fernTestValueNote *string + obj.SetNote(fernTestValueNote) + assert.Equal(t, fernTestValueNote, obj.Note) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBirthday", func(t *testing.T) { + obj := &UpdateCustomerRequest{} + var fernTestValueBirthday *string + obj.SetBirthday(fernTestValueBirthday) + assert.Equal(t, fernTestValueBirthday, obj.Birthday) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &UpdateCustomerRequest{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTaxIDs", func(t *testing.T) { + obj := &UpdateCustomerRequest{} + var fernTestValueTaxIDs *CustomerTaxIDs + obj.SetTaxIDs(fernTestValueTaxIDs) + assert.Equal(t, fernTestValueTaxIDs, obj.TaxIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateCustomerRequest(t *testing.T) { + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerRequest{} + var fernTestValueCustomerID string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGivenName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerRequest{} + var fernTestValueGivenName *string + + // Act + obj.SetGivenName(fernTestValueGivenName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFamilyName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerRequest{} + var fernTestValueFamilyName *string + + // Act + obj.SetFamilyName(fernTestValueFamilyName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCompanyName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerRequest{} + var fernTestValueCompanyName *string + + // Act + obj.SetCompanyName(fernTestValueCompanyName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNickname_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerRequest{} + var fernTestValueNickname *string + + // Act + obj.SetNickname(fernTestValueNickname) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEmailAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerRequest{} + var fernTestValueEmailAddress *string + + // Act + obj.SetEmailAddress(fernTestValueEmailAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerRequest{} + var fernTestValueAddress *Address + + // Act + obj.SetAddress(fernTestValueAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPhoneNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerRequest{} + var fernTestValuePhoneNumber *string + + // Act + obj.SetPhoneNumber(fernTestValuePhoneNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReferenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerRequest{} + var fernTestValueReferenceID *string + + // Act + obj.SetReferenceID(fernTestValueReferenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNote_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerRequest{} + var fernTestValueNote *string + + // Act + obj.SetNote(fernTestValueNote) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBirthday_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerRequest{} + var fernTestValueBirthday *string + + // Act + obj.SetBirthday(fernTestValueBirthday) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerRequest{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTaxIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerRequest{} + var fernTestValueTaxIDs *CustomerTaxIDs + + // Act + obj.SetTaxIDs(fernTestValueTaxIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingBulkCreateCustomerData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomerData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkCreateCustomerData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkCreateCustomerData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkCreateCustomerData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBulkCreateCustomersResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkCreateCustomersResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkCreateCustomersResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkCreateCustomersResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkCreateCustomersResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBulkDeleteCustomersResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteCustomersResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkDeleteCustomersResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkDeleteCustomersResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkDeleteCustomersResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBulkRetrieveCustomersResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkRetrieveCustomersResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkRetrieveCustomersResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkRetrieveCustomersResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkRetrieveCustomersResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBulkUpdateCustomerData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomerData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkUpdateCustomerData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkUpdateCustomerData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkUpdateCustomerData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBulkUpdateCustomersResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpdateCustomersResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkUpdateCustomersResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkUpdateCustomersResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkUpdateCustomersResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateCustomerResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateCustomerResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateCustomerResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateCustomerResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomer(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Customer{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Customer + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Customer + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Customer + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerAddressFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerAddressFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerAddressFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerAddressFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerAddressFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCreationSourceFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreationSourceFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCreationSourceFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCreationSourceFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCreationSourceFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCustomAttributeFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCustomAttributeFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCustomAttributeFilterValue(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilterValue{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCustomAttributeFilterValue + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeFilterValue + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeFilterValue + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCustomAttributeFilters(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeFilters{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCustomAttributeFilters + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeFilters + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeFilters + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerPreferences(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerPreferences{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerPreferences + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerPreferences + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerPreferences + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerQuery(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerQuery{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerQuery + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerQuery + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerQuery + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerSort(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerSort{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerSort + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerSort + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerSort + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerTaxIDs(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerTaxIDs{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerTaxIDs + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerTaxIDs + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerTaxIDs + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerTextFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerTextFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerTextFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerTextFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerTextFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeleteCustomerResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomerResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeleteCustomerResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeleteCustomerResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeleteCustomerResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingFloatNumberRange(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FloatNumberRange{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled FloatNumberRange + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj FloatNumberRange + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj FloatNumberRange + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetCustomerResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetCustomerResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetCustomerResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetCustomerResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListCustomersResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomersResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListCustomersResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListCustomersResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListCustomersResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchCustomersResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchCustomersResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchCustomersResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchCustomersResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchCustomersResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateCustomerResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateCustomerResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateCustomerResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateCustomerResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringBulkCreateCustomerData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkCreateCustomerData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkCreateCustomerData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBulkCreateCustomersResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkCreateCustomersResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkCreateCustomersResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBulkDeleteCustomersResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkDeleteCustomersResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteCustomersResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBulkRetrieveCustomersResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkRetrieveCustomersResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkRetrieveCustomersResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBulkUpdateCustomerData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkUpdateCustomerData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpdateCustomerData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBulkUpdateCustomersResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkUpdateCustomersResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpdateCustomersResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateCustomerResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateCustomerResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCustomerResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomer(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Customer{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Customer + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerAddressFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerAddressFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerAddressFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCreationSourceFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCreationSourceFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCreationSourceFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCustomAttributeFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCustomAttributeFilterValue(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeFilterValue{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeFilterValue + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCustomAttributeFilters(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeFilters{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeFilters + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerPreferences(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerPreferences{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerPreferences + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerQuery(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerQuery{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerQuery + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerSort(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerSort{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerSort + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerTaxIDs(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerTaxIDs{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerTaxIDs + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerTextFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerTextFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerTextFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeleteCustomerResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeleteCustomerResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteCustomerResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringFloatNumberRange(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &FloatNumberRange{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FloatNumberRange + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetCustomerResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetCustomerResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCustomerResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListCustomersResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListCustomersResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCustomersResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchCustomersResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchCustomersResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchCustomersResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateCustomerResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateCustomerResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateCustomerResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestEnumCustomerCreationSource(t *testing.T) { + t.Run("NewFromString_OTHER", func(t *testing.T) { + t.Parallel() + val, err := NewCustomerCreationSourceFromString("OTHER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CustomerCreationSource("OTHER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_APPOINTMENTS", func(t *testing.T) { + t.Parallel() + val, err := NewCustomerCreationSourceFromString("APPOINTMENTS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CustomerCreationSource("APPOINTMENTS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_COUPON", func(t *testing.T) { + t.Parallel() + val, err := NewCustomerCreationSourceFromString("COUPON") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CustomerCreationSource("COUPON"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DELETION_RECOVERY", func(t *testing.T) { + t.Parallel() + val, err := NewCustomerCreationSourceFromString("DELETION_RECOVERY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CustomerCreationSource("DELETION_RECOVERY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DIRECTORY", func(t *testing.T) { + t.Parallel() + val, err := NewCustomerCreationSourceFromString("DIRECTORY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CustomerCreationSource("DIRECTORY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EGIFTING", func(t *testing.T) { + t.Parallel() + val, err := NewCustomerCreationSourceFromString("EGIFTING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CustomerCreationSource("EGIFTING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EMAIL_COLLECTION", func(t *testing.T) { + t.Parallel() + val, err := NewCustomerCreationSourceFromString("EMAIL_COLLECTION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CustomerCreationSource("EMAIL_COLLECTION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FEEDBACK", func(t *testing.T) { + t.Parallel() + val, err := NewCustomerCreationSourceFromString("FEEDBACK") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CustomerCreationSource("FEEDBACK"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IMPORT", func(t *testing.T) { + t.Parallel() + val, err := NewCustomerCreationSourceFromString("IMPORT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CustomerCreationSource("IMPORT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVOICES", func(t *testing.T) { + t.Parallel() + val, err := NewCustomerCreationSourceFromString("INVOICES") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CustomerCreationSource("INVOICES"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LOYALTY", func(t *testing.T) { + t.Parallel() + val, err := NewCustomerCreationSourceFromString("LOYALTY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CustomerCreationSource("LOYALTY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MARKETING", func(t *testing.T) { + t.Parallel() + val, err := NewCustomerCreationSourceFromString("MARKETING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CustomerCreationSource("MARKETING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MERGE", func(t *testing.T) { + t.Parallel() + val, err := NewCustomerCreationSourceFromString("MERGE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CustomerCreationSource("MERGE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ONLINE_STORE", func(t *testing.T) { + t.Parallel() + val, err := NewCustomerCreationSourceFromString("ONLINE_STORE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CustomerCreationSource("ONLINE_STORE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INSTANT_PROFILE", func(t *testing.T) { + t.Parallel() + val, err := NewCustomerCreationSourceFromString("INSTANT_PROFILE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CustomerCreationSource("INSTANT_PROFILE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TERMINAL", func(t *testing.T) { + t.Parallel() + val, err := NewCustomerCreationSourceFromString("TERMINAL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CustomerCreationSource("TERMINAL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_THIRD_PARTY", func(t *testing.T) { + t.Parallel() + val, err := NewCustomerCreationSourceFromString("THIRD_PARTY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CustomerCreationSource("THIRD_PARTY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_THIRD_PARTY_IMPORT", func(t *testing.T) { + t.Parallel() + val, err := NewCustomerCreationSourceFromString("THIRD_PARTY_IMPORT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CustomerCreationSource("THIRD_PARTY_IMPORT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UNMERGE_RECOVERY", func(t *testing.T) { + t.Parallel() + val, err := NewCustomerCreationSourceFromString("UNMERGE_RECOVERY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CustomerCreationSource("UNMERGE_RECOVERY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCustomerCreationSourceFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCustomerCreationSourceFromString("OTHER") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCustomerInclusionExclusion(t *testing.T) { + t.Run("NewFromString_INCLUDE", func(t *testing.T) { + t.Parallel() + val, err := NewCustomerInclusionExclusionFromString("INCLUDE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CustomerInclusionExclusion("INCLUDE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EXCLUDE", func(t *testing.T) { + t.Parallel() + val, err := NewCustomerInclusionExclusionFromString("EXCLUDE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CustomerInclusionExclusion("EXCLUDE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCustomerInclusionExclusionFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCustomerInclusionExclusionFromString("INCLUDE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCustomerSortField(t *testing.T) { + t.Run("NewFromString_DEFAULT", func(t *testing.T) { + t.Parallel() + val, err := NewCustomerSortFieldFromString("DEFAULT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CustomerSortField("DEFAULT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CREATED_AT", func(t *testing.T) { + t.Parallel() + val, err := NewCustomerSortFieldFromString("CREATED_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CustomerSortField("CREATED_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCustomerSortFieldFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCustomerSortFieldFromString("DEFAULT") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestExtraPropertiesBulkCreateCustomerData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkCreateCustomerData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkCreateCustomerData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBulkCreateCustomersResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkCreateCustomersResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkCreateCustomersResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBulkDeleteCustomersResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkDeleteCustomersResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteCustomersResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBulkRetrieveCustomersResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkRetrieveCustomersResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkRetrieveCustomersResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBulkUpdateCustomerData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkUpdateCustomerData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpdateCustomerData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBulkUpdateCustomersResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkUpdateCustomersResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpdateCustomersResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateCustomerResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateCustomerResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCustomerResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomer(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Customer{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Customer + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerAddressFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerAddressFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerAddressFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCreationSourceFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCreationSourceFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCreationSourceFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCustomAttributeFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCustomAttributeFilterValue(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeFilterValue{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeFilterValue + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCustomAttributeFilters(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeFilters{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeFilters + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerPreferences(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerPreferences{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerPreferences + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerQuery(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerQuery{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerQuery + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerSort(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerSort{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerSort + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerTaxIDs(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerTaxIDs{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerTaxIDs + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerTextFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerTextFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerTextFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeleteCustomerResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeleteCustomerResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteCustomerResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesFloatNumberRange(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &FloatNumberRange{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FloatNumberRange + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetCustomerResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetCustomerResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCustomerResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListCustomersResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListCustomersResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCustomersResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchCustomersResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchCustomersResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchCustomersResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateCustomerResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateCustomerResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateCustomerResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/devices.go b/devices.go index f535dea..39c229f 100644 --- a/devices.go +++ b/devices.go @@ -173,6 +173,9 @@ func (c *Component) GetEthernetDetails() *DeviceComponentDetailsEthernetDetails } func (c *Component) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -253,6 +256,9 @@ func (c *Component) MarshalJSON() ([]byte, error) { } func (c *Component) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -353,6 +359,9 @@ func (d *Device) GetStatus() *DeviceStatus { } func (d *Device) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -419,6 +428,9 @@ func (d *Device) MarshalJSON() ([]byte, error) { } func (d *Device) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -526,6 +538,9 @@ func (d *DeviceAttributes) GetMerchantToken() *string { } func (d *DeviceAttributes) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -620,6 +635,9 @@ func (d *DeviceAttributes) MarshalJSON() ([]byte, error) { } func (d *DeviceAttributes) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -701,6 +719,9 @@ func (d *DeviceComponentDetailsApplicationDetails) GetDeviceCodeID() *string { } func (d *DeviceComponentDetailsApplicationDetails) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -767,6 +788,9 @@ func (d *DeviceComponentDetailsApplicationDetails) MarshalJSON() ([]byte, error) } func (d *DeviceComponentDetailsApplicationDetails) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -812,6 +836,9 @@ func (d *DeviceComponentDetailsBatteryDetails) GetExternalPower() *DeviceCompone } func (d *DeviceComponentDetailsBatteryDetails) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -864,6 +891,9 @@ func (d *DeviceComponentDetailsBatteryDetails) MarshalJSON() ([]byte, error) { } func (d *DeviceComponentDetailsBatteryDetails) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -898,6 +928,9 @@ func (d *DeviceComponentDetailsCardReaderDetails) GetVersion() *string { } func (d *DeviceComponentDetailsCardReaderDetails) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -943,6 +976,9 @@ func (d *DeviceComponentDetailsCardReaderDetails) MarshalJSON() ([]byte, error) } func (d *DeviceComponentDetailsCardReaderDetails) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -997,6 +1033,9 @@ func (d *DeviceComponentDetailsEthernetDetails) GetMacAddress() *string { } func (d *DeviceComponentDetailsEthernetDetails) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -1056,6 +1095,9 @@ func (d *DeviceComponentDetailsEthernetDetails) MarshalJSON() ([]byte, error) { } func (d *DeviceComponentDetailsEthernetDetails) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -1120,6 +1162,9 @@ func (d *DeviceComponentDetailsMeasurement) GetValue() *int { } func (d *DeviceComponentDetailsMeasurement) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -1165,6 +1210,9 @@ func (d *DeviceComponentDetailsMeasurement) MarshalJSON() ([]byte, error) { } func (d *DeviceComponentDetailsMeasurement) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -1250,6 +1298,9 @@ func (d *DeviceComponentDetailsWiFiDetails) GetMacAddress() *string { } func (d *DeviceComponentDetailsWiFiDetails) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -1330,6 +1381,9 @@ func (d *DeviceComponentDetailsWiFiDetails) MarshalJSON() ([]byte, error) { } func (d *DeviceComponentDetailsWiFiDetails) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -1365,6 +1419,9 @@ func (d *DeviceStatus) GetCategory() *DeviceStatusCategory { } func (d *DeviceStatus) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -1410,6 +1467,9 @@ func (d *DeviceStatus) MarshalJSON() ([]byte, error) { } func (d *DeviceStatus) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -1479,6 +1539,9 @@ func (g *GetDeviceResponse) GetDevice() *Device { } func (g *GetDeviceResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -1531,6 +1594,9 @@ func (g *GetDeviceResponse) MarshalJSON() ([]byte, error) { } func (g *GetDeviceResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -1587,6 +1653,9 @@ func (l *ListDevicesResponse) GetCursor() *string { } func (l *ListDevicesResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -1646,6 +1715,9 @@ func (l *ListDevicesResponse) MarshalJSON() ([]byte, error) { } func (l *ListDevicesResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value diff --git a/devices/codes.go b/devices/codes.go index 3d4a87d..0a2c9a7 100644 --- a/devices/codes.go +++ b/devices/codes.go @@ -3,7 +3,9 @@ package devices import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" big "math/big" ) @@ -19,7 +21,7 @@ type CreateDeviceCodeRequest struct { // See [Idempotency keys](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) for more information. IdempotencyKey string `json:"idempotency_key" url:"-"` // The device code to create. - DeviceCode *v3.DeviceCode `json:"device_code,omitempty" url:"-"` + DeviceCode *v3.DeviceCode `json:"device_code" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -46,6 +48,27 @@ func (c *CreateDeviceCodeRequest) SetDeviceCode(deviceCode *v3.DeviceCode) { c.require(createDeviceCodeRequestFieldDeviceCode) } +func (c *CreateDeviceCodeRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateDeviceCodeRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateDeviceCodeRequest(body) + return nil +} + +func (c *CreateDeviceCodeRequest) MarshalJSON() ([]byte, error) { + type embed CreateDeviceCodeRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( getCodesRequestFieldID = big.NewInt(1 << 0) ) diff --git a/devices/codes/devices_codes_test/devices_codes_test.go b/devices/codes/devices_codes_test/devices_codes_test.go new file mode 100644 index 0000000..3181242 --- /dev/null +++ b/devices/codes/devices_codes_test/devices_codes_test.go @@ -0,0 +1,159 @@ +// Code generated by Fern. DO NOT EDIT. + +package devices_codes_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + devices "github.com/square/square-go-sdk/v3/devices" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestDevicesCodesListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &devices.ListCodesRequest{ + Cursor: square.String( + "cursor", + ), + LocationID: square.String( + "location_id", + ), + ProductType: square.String( + "TERMINAL_API", + ), + Status: square.DeviceCodeStatusUnknown.Ptr(), + } + _, invocationErr := client.Devices.Codes.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestDevicesCodesListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestDevicesCodesListWithWireMock", "GET", "/v2/devices/codes", map[string]string{"cursor": "cursor", "location_id": "location_id", "product_type": "TERMINAL_API", "status": "UNKNOWN"}, 1) +} + +func TestDevicesCodesCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &devices.CreateDeviceCodeRequest{ + IdempotencyKey: "01bb00a6-0c86-4770-94ed-f5fca973cd56", + DeviceCode: &square.DeviceCode{ + Name: square.String( + "Counter 1", + ), + ProductType: square.ProductType( + "TERMINAL_API", + ), + LocationID: square.String( + "B5E4484SHHNYH", + ), + }, + } + _, invocationErr := client.Devices.Codes.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestDevicesCodesCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestDevicesCodesCreateWithWireMock", "POST", "/v2/devices/codes", nil, 1) +} + +func TestDevicesCodesGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &devices.GetCodesRequest{ + ID: "id", + } + _, invocationErr := client.Devices.Codes.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestDevicesCodesGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestDevicesCodesGetWithWireMock", "GET", "/v2/devices/codes/id", nil, 1) +} diff --git a/devices/codes_test.go b/devices/codes_test.go new file mode 100644 index 0000000..7057597 --- /dev/null +++ b/devices/codes_test.go @@ -0,0 +1,184 @@ +// Code generated by Fern. DO NOT EDIT. + +package devices + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersCreateDeviceCodeRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateDeviceCodeRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateDeviceCodeRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDeviceCodeRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetCodesRequest(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &GetCodesRequest{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetCodesRequest(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCodesRequest{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListCodesRequest(t *testing.T) { + t.Run("SetCursor", func(t *testing.T) { + obj := &ListCodesRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &ListCodesRequest{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListCodesRequest(t *testing.T) { + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCodesRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCodesRequest{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/devices/devices_test/devices_test.go b/devices/devices_test/devices_test.go new file mode 100644 index 0000000..04e104b --- /dev/null +++ b/devices/devices_test/devices_test.go @@ -0,0 +1,122 @@ +// Code generated by Fern. DO NOT EDIT. + +package devices_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestDevicesListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.ListDevicesRequest{ + Cursor: square.String( + "cursor", + ), + SortOrder: square.SortOrderDesc.Ptr(), + Limit: square.Int( + 1, + ), + LocationID: square.String( + "location_id", + ), + } + _, invocationErr := client.Devices.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestDevicesListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestDevicesListWithWireMock", "GET", "/v2/devices", map[string]string{"cursor": "cursor", "sort_order": "DESC", "limit": "1", "location_id": "location_id"}, 1) +} + +func TestDevicesGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.GetDevicesRequest{ + DeviceID: "device_id", + } + _, invocationErr := client.Devices.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestDevicesGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestDevicesGetWithWireMock", "GET", "/v2/devices/device_id", nil, 1) +} diff --git a/devices_test.go b/devices_test.go new file mode 100644 index 0000000..efa17f0 --- /dev/null +++ b/devices_test.go @@ -0,0 +1,4204 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersGetDevicesRequest(t *testing.T) { + t.Run("SetDeviceID", func(t *testing.T) { + obj := &GetDevicesRequest{} + var fernTestValueDeviceID string + obj.SetDeviceID(fernTestValueDeviceID) + assert.Equal(t, fernTestValueDeviceID, obj.DeviceID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetDevicesRequest(t *testing.T) { + t.Run("SetDeviceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDevicesRequest{} + var fernTestValueDeviceID string + + // Act + obj.SetDeviceID(fernTestValueDeviceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListDevicesRequest(t *testing.T) { + t.Run("SetCursor", func(t *testing.T) { + obj := &ListDevicesRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSortOrder", func(t *testing.T) { + obj := &ListDevicesRequest{} + var fernTestValueSortOrder *SortOrder + obj.SetSortOrder(fernTestValueSortOrder) + assert.Equal(t, fernTestValueSortOrder, obj.SortOrder) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListDevicesRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &ListDevicesRequest{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListDevicesRequest(t *testing.T) { + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDevicesRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSortOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDevicesRequest{} + var fernTestValueSortOrder *SortOrder + + // Act + obj.SetSortOrder(fernTestValueSortOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDevicesRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDevicesRequest{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersComponent(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &Component{} + var fernTestValueType ComponentComponentType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetApplicationDetails", func(t *testing.T) { + obj := &Component{} + var fernTestValueApplicationDetails *DeviceComponentDetailsApplicationDetails + obj.SetApplicationDetails(fernTestValueApplicationDetails) + assert.Equal(t, fernTestValueApplicationDetails, obj.ApplicationDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCardReaderDetails", func(t *testing.T) { + obj := &Component{} + var fernTestValueCardReaderDetails *DeviceComponentDetailsCardReaderDetails + obj.SetCardReaderDetails(fernTestValueCardReaderDetails) + assert.Equal(t, fernTestValueCardReaderDetails, obj.CardReaderDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBatteryDetails", func(t *testing.T) { + obj := &Component{} + var fernTestValueBatteryDetails *DeviceComponentDetailsBatteryDetails + obj.SetBatteryDetails(fernTestValueBatteryDetails) + assert.Equal(t, fernTestValueBatteryDetails, obj.BatteryDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetWifiDetails", func(t *testing.T) { + obj := &Component{} + var fernTestValueWifiDetails *DeviceComponentDetailsWiFiDetails + obj.SetWifiDetails(fernTestValueWifiDetails) + assert.Equal(t, fernTestValueWifiDetails, obj.WifiDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEthernetDetails", func(t *testing.T) { + obj := &Component{} + var fernTestValueEthernetDetails *DeviceComponentDetailsEthernetDetails + obj.SetEthernetDetails(fernTestValueEthernetDetails) + assert.Equal(t, fernTestValueEthernetDetails, obj.EthernetDetails) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersComponent(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Component{} + var expected ComponentComponentType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Component + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetApplicationDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Component{} + var expected *DeviceComponentDetailsApplicationDetails + obj.ApplicationDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetApplicationDetails(), "getter should return the property value") + }) + + t.Run("GetApplicationDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Component{} + obj.ApplicationDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetApplicationDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetApplicationDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Component + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetApplicationDetails() // Should return zero value + }) + + t.Run("GetCardReaderDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Component{} + var expected *DeviceComponentDetailsCardReaderDetails + obj.CardReaderDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCardReaderDetails(), "getter should return the property value") + }) + + t.Run("GetCardReaderDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Component{} + obj.CardReaderDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetCardReaderDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetCardReaderDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Component + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCardReaderDetails() // Should return zero value + }) + + t.Run("GetBatteryDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Component{} + var expected *DeviceComponentDetailsBatteryDetails + obj.BatteryDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBatteryDetails(), "getter should return the property value") + }) + + t.Run("GetBatteryDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Component{} + obj.BatteryDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetBatteryDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetBatteryDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Component + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBatteryDetails() // Should return zero value + }) + + t.Run("GetWifiDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Component{} + var expected *DeviceComponentDetailsWiFiDetails + obj.WifiDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetWifiDetails(), "getter should return the property value") + }) + + t.Run("GetWifiDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Component{} + obj.WifiDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetWifiDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetWifiDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Component + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetWifiDetails() // Should return zero value + }) + + t.Run("GetEthernetDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Component{} + var expected *DeviceComponentDetailsEthernetDetails + obj.EthernetDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEthernetDetails(), "getter should return the property value") + }) + + t.Run("GetEthernetDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Component{} + obj.EthernetDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetEthernetDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetEthernetDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Component + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEthernetDetails() // Should return zero value + }) + +} + +func TestSettersMarkExplicitComponent(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Component{} + var fernTestValueType ComponentComponentType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetApplicationDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Component{} + var fernTestValueApplicationDetails *DeviceComponentDetailsApplicationDetails + + // Act + obj.SetApplicationDetails(fernTestValueApplicationDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCardReaderDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Component{} + var fernTestValueCardReaderDetails *DeviceComponentDetailsCardReaderDetails + + // Act + obj.SetCardReaderDetails(fernTestValueCardReaderDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBatteryDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Component{} + var fernTestValueBatteryDetails *DeviceComponentDetailsBatteryDetails + + // Act + obj.SetBatteryDetails(fernTestValueBatteryDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetWifiDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Component{} + var fernTestValueWifiDetails *DeviceComponentDetailsWiFiDetails + + // Act + obj.SetWifiDetails(fernTestValueWifiDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEthernetDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Component{} + var fernTestValueEthernetDetails *DeviceComponentDetailsEthernetDetails + + // Act + obj.SetEthernetDetails(fernTestValueEthernetDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDevice(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &Device{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAttributes", func(t *testing.T) { + obj := &Device{} + var fernTestValueAttributes *DeviceAttributes + obj.SetAttributes(fernTestValueAttributes) + assert.Equal(t, fernTestValueAttributes, obj.Attributes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetComponents", func(t *testing.T) { + obj := &Device{} + var fernTestValueComponents []*Component + obj.SetComponents(fernTestValueComponents) + assert.Equal(t, fernTestValueComponents, obj.Components) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &Device{} + var fernTestValueStatus *DeviceStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDevice(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Device{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Device{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Device + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetAttributes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Device{} + var expected *DeviceAttributes + obj.Attributes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAttributes(), "getter should return the property value") + }) + + t.Run("GetAttributes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Device{} + obj.Attributes = nil + + // Act & Assert + assert.Nil(t, obj.GetAttributes(), "getter should return nil when property is nil") + }) + + t.Run("GetAttributes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Device + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAttributes() // Should return zero value + }) + + t.Run("GetComponents", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Device{} + var expected []*Component + obj.Components = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetComponents(), "getter should return the property value") + }) + + t.Run("GetComponents_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Device{} + obj.Components = nil + + // Act & Assert + assert.Nil(t, obj.GetComponents(), "getter should return nil when property is nil") + }) + + t.Run("GetComponents_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Device + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetComponents() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Device{} + var expected *DeviceStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Device{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Device + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDevice(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Device{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAttributes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Device{} + var fernTestValueAttributes *DeviceAttributes + + // Act + obj.SetAttributes(fernTestValueAttributes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetComponents_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Device{} + var fernTestValueComponents []*Component + + // Act + obj.SetComponents(fernTestValueComponents) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Device{} + var fernTestValueStatus *DeviceStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeviceAttributes(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &DeviceAttributes{} + var fernTestValueType DeviceAttributesDeviceType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetManufacturer", func(t *testing.T) { + obj := &DeviceAttributes{} + var fernTestValueManufacturer string + obj.SetManufacturer(fernTestValueManufacturer) + assert.Equal(t, fernTestValueManufacturer, obj.Manufacturer) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetModel", func(t *testing.T) { + obj := &DeviceAttributes{} + var fernTestValueModel *string + obj.SetModel(fernTestValueModel) + assert.Equal(t, fernTestValueModel, obj.Model) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &DeviceAttributes{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetManufacturersID", func(t *testing.T) { + obj := &DeviceAttributes{} + var fernTestValueManufacturersID *string + obj.SetManufacturersID(fernTestValueManufacturersID) + assert.Equal(t, fernTestValueManufacturersID, obj.ManufacturersID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &DeviceAttributes{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &DeviceAttributes{} + var fernTestValueVersion *string + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMerchantToken", func(t *testing.T) { + obj := &DeviceAttributes{} + var fernTestValueMerchantToken *string + obj.SetMerchantToken(fernTestValueMerchantToken) + assert.Equal(t, fernTestValueMerchantToken, obj.MerchantToken) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeviceAttributes(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceAttributes{} + var expected DeviceAttributesDeviceType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceAttributes + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetManufacturer", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceAttributes{} + var expected string + obj.Manufacturer = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetManufacturer(), "getter should return the property value") + }) + + t.Run("GetManufacturer_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceAttributes + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetManufacturer() // Should return zero value + }) + + t.Run("GetModel", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceAttributes{} + var expected *string + obj.Model = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetModel(), "getter should return the property value") + }) + + t.Run("GetModel_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceAttributes{} + obj.Model = nil + + // Act & Assert + assert.Nil(t, obj.GetModel(), "getter should return nil when property is nil") + }) + + t.Run("GetModel_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceAttributes + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetModel() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceAttributes{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceAttributes{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceAttributes + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetManufacturersID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceAttributes{} + var expected *string + obj.ManufacturersID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetManufacturersID(), "getter should return the property value") + }) + + t.Run("GetManufacturersID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceAttributes{} + obj.ManufacturersID = nil + + // Act & Assert + assert.Nil(t, obj.GetManufacturersID(), "getter should return nil when property is nil") + }) + + t.Run("GetManufacturersID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceAttributes + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetManufacturersID() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceAttributes{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceAttributes{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceAttributes + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceAttributes{} + var expected *string + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceAttributes{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceAttributes + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetMerchantToken", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceAttributes{} + var expected *string + obj.MerchantToken = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantToken(), "getter should return the property value") + }) + + t.Run("GetMerchantToken_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceAttributes{} + obj.MerchantToken = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantToken(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantToken_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceAttributes + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantToken() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeviceAttributes(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceAttributes{} + var fernTestValueType DeviceAttributesDeviceType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetManufacturer_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceAttributes{} + var fernTestValueManufacturer string + + // Act + obj.SetManufacturer(fernTestValueManufacturer) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetModel_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceAttributes{} + var fernTestValueModel *string + + // Act + obj.SetModel(fernTestValueModel) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceAttributes{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetManufacturersID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceAttributes{} + var fernTestValueManufacturersID *string + + // Act + obj.SetManufacturersID(fernTestValueManufacturersID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceAttributes{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceAttributes{} + var fernTestValueVersion *string + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMerchantToken_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceAttributes{} + var fernTestValueMerchantToken *string + + // Act + obj.SetMerchantToken(fernTestValueMerchantToken) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeviceComponentDetailsApplicationDetails(t *testing.T) { + t.Run("SetVersion", func(t *testing.T) { + obj := &DeviceComponentDetailsApplicationDetails{} + var fernTestValueVersion *string + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSessionLocation", func(t *testing.T) { + obj := &DeviceComponentDetailsApplicationDetails{} + var fernTestValueSessionLocation *string + obj.SetSessionLocation(fernTestValueSessionLocation) + assert.Equal(t, fernTestValueSessionLocation, obj.SessionLocation) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeviceCodeID", func(t *testing.T) { + obj := &DeviceComponentDetailsApplicationDetails{} + var fernTestValueDeviceCodeID *string + obj.SetDeviceCodeID(fernTestValueDeviceCodeID) + assert.Equal(t, fernTestValueDeviceCodeID, obj.DeviceCodeID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeviceComponentDetailsApplicationDetails(t *testing.T) { + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsApplicationDetails{} + var expected *string + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsApplicationDetails{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceComponentDetailsApplicationDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetSessionLocation", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsApplicationDetails{} + var expected *string + obj.SessionLocation = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSessionLocation(), "getter should return the property value") + }) + + t.Run("GetSessionLocation_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsApplicationDetails{} + obj.SessionLocation = nil + + // Act & Assert + assert.Nil(t, obj.GetSessionLocation(), "getter should return nil when property is nil") + }) + + t.Run("GetSessionLocation_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceComponentDetailsApplicationDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSessionLocation() // Should return zero value + }) + + t.Run("GetDeviceCodeID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsApplicationDetails{} + var expected *string + obj.DeviceCodeID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeviceCodeID(), "getter should return the property value") + }) + + t.Run("GetDeviceCodeID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsApplicationDetails{} + obj.DeviceCodeID = nil + + // Act & Assert + assert.Nil(t, obj.GetDeviceCodeID(), "getter should return nil when property is nil") + }) + + t.Run("GetDeviceCodeID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceComponentDetailsApplicationDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeviceCodeID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeviceComponentDetailsApplicationDetails(t *testing.T) { + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsApplicationDetails{} + var fernTestValueVersion *string + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSessionLocation_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsApplicationDetails{} + var fernTestValueSessionLocation *string + + // Act + obj.SetSessionLocation(fernTestValueSessionLocation) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeviceCodeID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsApplicationDetails{} + var fernTestValueDeviceCodeID *string + + // Act + obj.SetDeviceCodeID(fernTestValueDeviceCodeID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeviceComponentDetailsBatteryDetails(t *testing.T) { + t.Run("SetVisiblePercent", func(t *testing.T) { + obj := &DeviceComponentDetailsBatteryDetails{} + var fernTestValueVisiblePercent *int + obj.SetVisiblePercent(fernTestValueVisiblePercent) + assert.Equal(t, fernTestValueVisiblePercent, obj.VisiblePercent) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExternalPower", func(t *testing.T) { + obj := &DeviceComponentDetailsBatteryDetails{} + var fernTestValueExternalPower *DeviceComponentDetailsExternalPower + obj.SetExternalPower(fernTestValueExternalPower) + assert.Equal(t, fernTestValueExternalPower, obj.ExternalPower) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeviceComponentDetailsBatteryDetails(t *testing.T) { + t.Run("GetVisiblePercent", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsBatteryDetails{} + var expected *int + obj.VisiblePercent = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVisiblePercent(), "getter should return the property value") + }) + + t.Run("GetVisiblePercent_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsBatteryDetails{} + obj.VisiblePercent = nil + + // Act & Assert + assert.Nil(t, obj.GetVisiblePercent(), "getter should return nil when property is nil") + }) + + t.Run("GetVisiblePercent_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceComponentDetailsBatteryDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVisiblePercent() // Should return zero value + }) + + t.Run("GetExternalPower", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsBatteryDetails{} + var expected *DeviceComponentDetailsExternalPower + obj.ExternalPower = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExternalPower(), "getter should return the property value") + }) + + t.Run("GetExternalPower_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsBatteryDetails{} + obj.ExternalPower = nil + + // Act & Assert + assert.Nil(t, obj.GetExternalPower(), "getter should return nil when property is nil") + }) + + t.Run("GetExternalPower_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceComponentDetailsBatteryDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExternalPower() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeviceComponentDetailsBatteryDetails(t *testing.T) { + t.Run("SetVisiblePercent_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsBatteryDetails{} + var fernTestValueVisiblePercent *int + + // Act + obj.SetVisiblePercent(fernTestValueVisiblePercent) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExternalPower_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsBatteryDetails{} + var fernTestValueExternalPower *DeviceComponentDetailsExternalPower + + // Act + obj.SetExternalPower(fernTestValueExternalPower) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeviceComponentDetailsCardReaderDetails(t *testing.T) { + t.Run("SetVersion", func(t *testing.T) { + obj := &DeviceComponentDetailsCardReaderDetails{} + var fernTestValueVersion *string + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeviceComponentDetailsCardReaderDetails(t *testing.T) { + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsCardReaderDetails{} + var expected *string + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsCardReaderDetails{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceComponentDetailsCardReaderDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeviceComponentDetailsCardReaderDetails(t *testing.T) { + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsCardReaderDetails{} + var fernTestValueVersion *string + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeviceComponentDetailsEthernetDetails(t *testing.T) { + t.Run("SetActive", func(t *testing.T) { + obj := &DeviceComponentDetailsEthernetDetails{} + var fernTestValueActive *bool + obj.SetActive(fernTestValueActive) + assert.Equal(t, fernTestValueActive, obj.Active) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIPAddressV4", func(t *testing.T) { + obj := &DeviceComponentDetailsEthernetDetails{} + var fernTestValueIPAddressV4 *string + obj.SetIPAddressV4(fernTestValueIPAddressV4) + assert.Equal(t, fernTestValueIPAddressV4, obj.IPAddressV4) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMacAddress", func(t *testing.T) { + obj := &DeviceComponentDetailsEthernetDetails{} + var fernTestValueMacAddress *string + obj.SetMacAddress(fernTestValueMacAddress) + assert.Equal(t, fernTestValueMacAddress, obj.MacAddress) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeviceComponentDetailsEthernetDetails(t *testing.T) { + t.Run("GetActive", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsEthernetDetails{} + var expected *bool + obj.Active = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetActive(), "getter should return the property value") + }) + + t.Run("GetActive_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsEthernetDetails{} + obj.Active = nil + + // Act & Assert + assert.Nil(t, obj.GetActive(), "getter should return nil when property is nil") + }) + + t.Run("GetActive_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceComponentDetailsEthernetDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetActive() // Should return zero value + }) + + t.Run("GetIPAddressV4", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsEthernetDetails{} + var expected *string + obj.IPAddressV4 = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIPAddressV4(), "getter should return the property value") + }) + + t.Run("GetIPAddressV4_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsEthernetDetails{} + obj.IPAddressV4 = nil + + // Act & Assert + assert.Nil(t, obj.GetIPAddressV4(), "getter should return nil when property is nil") + }) + + t.Run("GetIPAddressV4_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceComponentDetailsEthernetDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIPAddressV4() // Should return zero value + }) + + t.Run("GetMacAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsEthernetDetails{} + var expected *string + obj.MacAddress = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMacAddress(), "getter should return the property value") + }) + + t.Run("GetMacAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsEthernetDetails{} + obj.MacAddress = nil + + // Act & Assert + assert.Nil(t, obj.GetMacAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetMacAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceComponentDetailsEthernetDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMacAddress() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeviceComponentDetailsEthernetDetails(t *testing.T) { + t.Run("SetActive_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsEthernetDetails{} + var fernTestValueActive *bool + + // Act + obj.SetActive(fernTestValueActive) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIPAddressV4_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsEthernetDetails{} + var fernTestValueIPAddressV4 *string + + // Act + obj.SetIPAddressV4(fernTestValueIPAddressV4) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMacAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsEthernetDetails{} + var fernTestValueMacAddress *string + + // Act + obj.SetMacAddress(fernTestValueMacAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeviceComponentDetailsMeasurement(t *testing.T) { + t.Run("SetValue", func(t *testing.T) { + obj := &DeviceComponentDetailsMeasurement{} + var fernTestValueValue *int + obj.SetValue(fernTestValueValue) + assert.Equal(t, fernTestValueValue, obj.Value) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeviceComponentDetailsMeasurement(t *testing.T) { + t.Run("GetValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsMeasurement{} + var expected *int + obj.Value = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetValue(), "getter should return the property value") + }) + + t.Run("GetValue_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsMeasurement{} + obj.Value = nil + + // Act & Assert + assert.Nil(t, obj.GetValue(), "getter should return nil when property is nil") + }) + + t.Run("GetValue_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceComponentDetailsMeasurement + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetValue() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeviceComponentDetailsMeasurement(t *testing.T) { + t.Run("SetValue_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsMeasurement{} + var fernTestValueValue *int + + // Act + obj.SetValue(fernTestValueValue) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeviceComponentDetailsWiFiDetails(t *testing.T) { + t.Run("SetActive", func(t *testing.T) { + obj := &DeviceComponentDetailsWiFiDetails{} + var fernTestValueActive *bool + obj.SetActive(fernTestValueActive) + assert.Equal(t, fernTestValueActive, obj.Active) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSsid", func(t *testing.T) { + obj := &DeviceComponentDetailsWiFiDetails{} + var fernTestValueSsid *string + obj.SetSsid(fernTestValueSsid) + assert.Equal(t, fernTestValueSsid, obj.Ssid) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIPAddressV4", func(t *testing.T) { + obj := &DeviceComponentDetailsWiFiDetails{} + var fernTestValueIPAddressV4 *string + obj.SetIPAddressV4(fernTestValueIPAddressV4) + assert.Equal(t, fernTestValueIPAddressV4, obj.IPAddressV4) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSecureConnection", func(t *testing.T) { + obj := &DeviceComponentDetailsWiFiDetails{} + var fernTestValueSecureConnection *string + obj.SetSecureConnection(fernTestValueSecureConnection) + assert.Equal(t, fernTestValueSecureConnection, obj.SecureConnection) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSignalStrength", func(t *testing.T) { + obj := &DeviceComponentDetailsWiFiDetails{} + var fernTestValueSignalStrength *DeviceComponentDetailsMeasurement + obj.SetSignalStrength(fernTestValueSignalStrength) + assert.Equal(t, fernTestValueSignalStrength, obj.SignalStrength) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMacAddress", func(t *testing.T) { + obj := &DeviceComponentDetailsWiFiDetails{} + var fernTestValueMacAddress *string + obj.SetMacAddress(fernTestValueMacAddress) + assert.Equal(t, fernTestValueMacAddress, obj.MacAddress) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeviceComponentDetailsWiFiDetails(t *testing.T) { + t.Run("GetActive", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsWiFiDetails{} + var expected *bool + obj.Active = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetActive(), "getter should return the property value") + }) + + t.Run("GetActive_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsWiFiDetails{} + obj.Active = nil + + // Act & Assert + assert.Nil(t, obj.GetActive(), "getter should return nil when property is nil") + }) + + t.Run("GetActive_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceComponentDetailsWiFiDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetActive() // Should return zero value + }) + + t.Run("GetSsid", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsWiFiDetails{} + var expected *string + obj.Ssid = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSsid(), "getter should return the property value") + }) + + t.Run("GetSsid_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsWiFiDetails{} + obj.Ssid = nil + + // Act & Assert + assert.Nil(t, obj.GetSsid(), "getter should return nil when property is nil") + }) + + t.Run("GetSsid_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceComponentDetailsWiFiDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSsid() // Should return zero value + }) + + t.Run("GetIPAddressV4", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsWiFiDetails{} + var expected *string + obj.IPAddressV4 = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIPAddressV4(), "getter should return the property value") + }) + + t.Run("GetIPAddressV4_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsWiFiDetails{} + obj.IPAddressV4 = nil + + // Act & Assert + assert.Nil(t, obj.GetIPAddressV4(), "getter should return nil when property is nil") + }) + + t.Run("GetIPAddressV4_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceComponentDetailsWiFiDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIPAddressV4() // Should return zero value + }) + + t.Run("GetSecureConnection", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsWiFiDetails{} + var expected *string + obj.SecureConnection = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSecureConnection(), "getter should return the property value") + }) + + t.Run("GetSecureConnection_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsWiFiDetails{} + obj.SecureConnection = nil + + // Act & Assert + assert.Nil(t, obj.GetSecureConnection(), "getter should return nil when property is nil") + }) + + t.Run("GetSecureConnection_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceComponentDetailsWiFiDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSecureConnection() // Should return zero value + }) + + t.Run("GetSignalStrength", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsWiFiDetails{} + var expected *DeviceComponentDetailsMeasurement + obj.SignalStrength = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSignalStrength(), "getter should return the property value") + }) + + t.Run("GetSignalStrength_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsWiFiDetails{} + obj.SignalStrength = nil + + // Act & Assert + assert.Nil(t, obj.GetSignalStrength(), "getter should return nil when property is nil") + }) + + t.Run("GetSignalStrength_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceComponentDetailsWiFiDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSignalStrength() // Should return zero value + }) + + t.Run("GetMacAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsWiFiDetails{} + var expected *string + obj.MacAddress = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMacAddress(), "getter should return the property value") + }) + + t.Run("GetMacAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsWiFiDetails{} + obj.MacAddress = nil + + // Act & Assert + assert.Nil(t, obj.GetMacAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetMacAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceComponentDetailsWiFiDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMacAddress() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeviceComponentDetailsWiFiDetails(t *testing.T) { + t.Run("SetActive_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsWiFiDetails{} + var fernTestValueActive *bool + + // Act + obj.SetActive(fernTestValueActive) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSsid_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsWiFiDetails{} + var fernTestValueSsid *string + + // Act + obj.SetSsid(fernTestValueSsid) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIPAddressV4_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsWiFiDetails{} + var fernTestValueIPAddressV4 *string + + // Act + obj.SetIPAddressV4(fernTestValueIPAddressV4) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSecureConnection_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsWiFiDetails{} + var fernTestValueSecureConnection *string + + // Act + obj.SetSecureConnection(fernTestValueSecureConnection) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSignalStrength_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsWiFiDetails{} + var fernTestValueSignalStrength *DeviceComponentDetailsMeasurement + + // Act + obj.SetSignalStrength(fernTestValueSignalStrength) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMacAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsWiFiDetails{} + var fernTestValueMacAddress *string + + // Act + obj.SetMacAddress(fernTestValueMacAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeviceStatus(t *testing.T) { + t.Run("SetCategory", func(t *testing.T) { + obj := &DeviceStatus{} + var fernTestValueCategory *DeviceStatusCategory + obj.SetCategory(fernTestValueCategory) + assert.Equal(t, fernTestValueCategory, obj.Category) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeviceStatus(t *testing.T) { + t.Run("GetCategory", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceStatus{} + var expected *DeviceStatusCategory + obj.Category = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCategory(), "getter should return the property value") + }) + + t.Run("GetCategory_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceStatus{} + obj.Category = nil + + // Act & Assert + assert.Nil(t, obj.GetCategory(), "getter should return nil when property is nil") + }) + + t.Run("GetCategory_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceStatus + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCategory() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeviceStatus(t *testing.T) { + t.Run("SetCategory_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceStatus{} + var fernTestValueCategory *DeviceStatusCategory + + // Act + obj.SetCategory(fernTestValueCategory) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetDeviceResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetDeviceResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDevice", func(t *testing.T) { + obj := &GetDeviceResponse{} + var fernTestValueDevice *Device + obj.SetDevice(fernTestValueDevice) + assert.Equal(t, fernTestValueDevice, obj.Device) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetDeviceResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDeviceResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDeviceResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetDeviceResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetDevice", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDeviceResponse{} + var expected *Device + obj.Device = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDevice(), "getter should return the property value") + }) + + t.Run("GetDevice_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDeviceResponse{} + obj.Device = nil + + // Act & Assert + assert.Nil(t, obj.GetDevice(), "getter should return nil when property is nil") + }) + + t.Run("GetDevice_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetDeviceResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDevice() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetDeviceResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDeviceResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDevice_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDeviceResponse{} + var fernTestValueDevice *Device + + // Act + obj.SetDevice(fernTestValueDevice) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListDevicesResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &ListDevicesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDevices", func(t *testing.T) { + obj := &ListDevicesResponse{} + var fernTestValueDevices []*Device + obj.SetDevices(fernTestValueDevices) + assert.Equal(t, fernTestValueDevices, obj.Devices) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListDevicesResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListDevicesResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDevicesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDevicesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListDevicesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetDevices", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDevicesResponse{} + var expected []*Device + obj.Devices = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDevices(), "getter should return the property value") + }) + + t.Run("GetDevices_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDevicesResponse{} + obj.Devices = nil + + // Act & Assert + assert.Nil(t, obj.GetDevices(), "getter should return nil when property is nil") + }) + + t.Run("GetDevices_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListDevicesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDevices() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDevicesResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDevicesResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListDevicesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListDevicesResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDevicesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDevices_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDevicesResponse{} + var fernTestValueDevices []*Device + + // Act + obj.SetDevices(fernTestValueDevices) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDevicesResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingComponent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Component{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Component + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Component + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Component + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDevice(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Device{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Device + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Device + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Device + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeviceAttributes(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceAttributes{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeviceAttributes + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeviceAttributes + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeviceAttributes + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeviceComponentDetailsApplicationDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsApplicationDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeviceComponentDetailsApplicationDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeviceComponentDetailsApplicationDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeviceComponentDetailsApplicationDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeviceComponentDetailsBatteryDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsBatteryDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeviceComponentDetailsBatteryDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeviceComponentDetailsBatteryDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeviceComponentDetailsBatteryDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeviceComponentDetailsCardReaderDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsCardReaderDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeviceComponentDetailsCardReaderDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeviceComponentDetailsCardReaderDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeviceComponentDetailsCardReaderDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeviceComponentDetailsEthernetDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsEthernetDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeviceComponentDetailsEthernetDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeviceComponentDetailsEthernetDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeviceComponentDetailsEthernetDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeviceComponentDetailsMeasurement(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsMeasurement{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeviceComponentDetailsMeasurement + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeviceComponentDetailsMeasurement + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeviceComponentDetailsMeasurement + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeviceComponentDetailsWiFiDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceComponentDetailsWiFiDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeviceComponentDetailsWiFiDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeviceComponentDetailsWiFiDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeviceComponentDetailsWiFiDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeviceStatus(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceStatus{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeviceStatus + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeviceStatus + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeviceStatus + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetDeviceResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDeviceResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetDeviceResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetDeviceResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetDeviceResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListDevicesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDevicesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListDevicesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListDevicesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListDevicesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringComponent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Component{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Component + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDevice(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Device{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Device + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeviceAttributes(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeviceAttributes{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceAttributes + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeviceComponentDetailsApplicationDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeviceComponentDetailsApplicationDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceComponentDetailsApplicationDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeviceComponentDetailsBatteryDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeviceComponentDetailsBatteryDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceComponentDetailsBatteryDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeviceComponentDetailsCardReaderDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeviceComponentDetailsCardReaderDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceComponentDetailsCardReaderDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeviceComponentDetailsEthernetDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeviceComponentDetailsEthernetDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceComponentDetailsEthernetDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeviceComponentDetailsMeasurement(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeviceComponentDetailsMeasurement{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceComponentDetailsMeasurement + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeviceComponentDetailsWiFiDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeviceComponentDetailsWiFiDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceComponentDetailsWiFiDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeviceStatus(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeviceStatus{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceStatus + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetDeviceResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetDeviceResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetDeviceResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListDevicesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListDevicesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListDevicesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestEnumComponentComponentType(t *testing.T) { + t.Run("NewFromString_APPLICATION", func(t *testing.T) { + t.Parallel() + val, err := NewComponentComponentTypeFromString("APPLICATION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ComponentComponentType("APPLICATION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CARD_READER", func(t *testing.T) { + t.Parallel() + val, err := NewComponentComponentTypeFromString("CARD_READER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ComponentComponentType("CARD_READER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BATTERY", func(t *testing.T) { + t.Parallel() + val, err := NewComponentComponentTypeFromString("BATTERY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ComponentComponentType("BATTERY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_WIFI", func(t *testing.T) { + t.Parallel() + val, err := NewComponentComponentTypeFromString("WIFI") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ComponentComponentType("WIFI"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ETHERNET", func(t *testing.T) { + t.Parallel() + val, err := NewComponentComponentTypeFromString("ETHERNET") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ComponentComponentType("ETHERNET"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PRINTER", func(t *testing.T) { + t.Parallel() + val, err := NewComponentComponentTypeFromString("PRINTER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ComponentComponentType("PRINTER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewComponentComponentTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewComponentComponentTypeFromString("APPLICATION") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumDeviceAttributesDeviceType(t *testing.T) { + t.Run("NewFromString_TERMINAL", func(t *testing.T) { + t.Parallel() + val, err := NewDeviceAttributesDeviceTypeFromString("TERMINAL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DeviceAttributesDeviceType("TERMINAL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_HANDHELD", func(t *testing.T) { + t.Parallel() + val, err := NewDeviceAttributesDeviceTypeFromString("HANDHELD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DeviceAttributesDeviceType("HANDHELD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewDeviceAttributesDeviceTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewDeviceAttributesDeviceTypeFromString("TERMINAL") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumDeviceComponentDetailsExternalPower(t *testing.T) { + t.Run("NewFromString_AVAILABLE_CHARGING", func(t *testing.T) { + t.Parallel() + val, err := NewDeviceComponentDetailsExternalPowerFromString("AVAILABLE_CHARGING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DeviceComponentDetailsExternalPower("AVAILABLE_CHARGING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AVAILABLE_NOT_IN_USE", func(t *testing.T) { + t.Parallel() + val, err := NewDeviceComponentDetailsExternalPowerFromString("AVAILABLE_NOT_IN_USE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DeviceComponentDetailsExternalPower("AVAILABLE_NOT_IN_USE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UNAVAILABLE", func(t *testing.T) { + t.Parallel() + val, err := NewDeviceComponentDetailsExternalPowerFromString("UNAVAILABLE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DeviceComponentDetailsExternalPower("UNAVAILABLE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AVAILABLE_INSUFFICIENT", func(t *testing.T) { + t.Parallel() + val, err := NewDeviceComponentDetailsExternalPowerFromString("AVAILABLE_INSUFFICIENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DeviceComponentDetailsExternalPower("AVAILABLE_INSUFFICIENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewDeviceComponentDetailsExternalPowerFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewDeviceComponentDetailsExternalPowerFromString("AVAILABLE_CHARGING") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumDeviceStatusCategory(t *testing.T) { + t.Run("NewFromString_AVAILABLE", func(t *testing.T) { + t.Parallel() + val, err := NewDeviceStatusCategoryFromString("AVAILABLE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DeviceStatusCategory("AVAILABLE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NEEDS_ATTENTION", func(t *testing.T) { + t.Parallel() + val, err := NewDeviceStatusCategoryFromString("NEEDS_ATTENTION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DeviceStatusCategory("NEEDS_ATTENTION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_OFFLINE", func(t *testing.T) { + t.Parallel() + val, err := NewDeviceStatusCategoryFromString("OFFLINE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DeviceStatusCategory("OFFLINE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewDeviceStatusCategoryFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewDeviceStatusCategoryFromString("AVAILABLE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestExtraPropertiesComponent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Component{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Component + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDevice(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Device{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Device + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeviceAttributes(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeviceAttributes{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceAttributes + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeviceComponentDetailsApplicationDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeviceComponentDetailsApplicationDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceComponentDetailsApplicationDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeviceComponentDetailsBatteryDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeviceComponentDetailsBatteryDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceComponentDetailsBatteryDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeviceComponentDetailsCardReaderDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeviceComponentDetailsCardReaderDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceComponentDetailsCardReaderDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeviceComponentDetailsEthernetDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeviceComponentDetailsEthernetDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceComponentDetailsEthernetDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeviceComponentDetailsMeasurement(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeviceComponentDetailsMeasurement{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceComponentDetailsMeasurement + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeviceComponentDetailsWiFiDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeviceComponentDetailsWiFiDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceComponentDetailsWiFiDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeviceStatus(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeviceStatus{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceStatus + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetDeviceResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetDeviceResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetDeviceResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListDevicesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListDevicesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListDevicesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/disputes.go b/disputes.go index e99d990..63820fd 100644 --- a/disputes.go +++ b/disputes.go @@ -38,6 +38,27 @@ func (c *CreateEvidenceFileDisputesRequest) SetDisputeID(disputeID string) { c.require(createEvidenceFileDisputesRequestFieldDisputeID) } +func (c *CreateEvidenceFileDisputesRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateEvidenceFileDisputesRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateEvidenceFileDisputesRequest(body) + return nil +} + +func (c *CreateEvidenceFileDisputesRequest) MarshalJSON() ([]byte, error) { + type embed CreateEvidenceFileDisputesRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( createDisputeEvidenceTextRequestFieldDisputeID = big.NewInt(1 << 0) createDisputeEvidenceTextRequestFieldIdempotencyKey = big.NewInt(1 << 1) @@ -95,6 +116,27 @@ func (c *CreateDisputeEvidenceTextRequest) SetEvidenceText(evidenceText string) c.require(createDisputeEvidenceTextRequestFieldEvidenceText) } +func (c *CreateDisputeEvidenceTextRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateDisputeEvidenceTextRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateDisputeEvidenceTextRequest(body) + return nil +} + +func (c *CreateDisputeEvidenceTextRequest) MarshalJSON() ([]byte, error) { + type embed CreateDisputeEvidenceTextRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( submitEvidenceDisputesRequestFieldDisputeID = big.NewInt(1 << 0) ) @@ -256,6 +298,9 @@ func (a *AcceptDisputeResponse) GetDispute() *Dispute { } func (a *AcceptDisputeResponse) GetExtraProperties() map[string]interface{} { + if a == nil { + return nil + } return a.extraProperties } @@ -308,6 +353,9 @@ func (a *AcceptDisputeResponse) MarshalJSON() ([]byte, error) { } func (a *AcceptDisputeResponse) String() string { + if a == nil { + return "" + } if len(a.rawJSON) > 0 { if value, err := internal.StringifyJSON(a.rawJSON); err == nil { return value @@ -365,6 +413,9 @@ func (c *CreateDisputeEvidenceFileRequest) GetContentType() *string { } func (c *CreateDisputeEvidenceFileRequest) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -424,6 +475,9 @@ func (c *CreateDisputeEvidenceFileRequest) MarshalJSON() ([]byte, error) { } func (c *CreateDisputeEvidenceFileRequest) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -469,6 +523,9 @@ func (c *CreateDisputeEvidenceFileResponse) GetEvidence() *DisputeEvidence { } func (c *CreateDisputeEvidenceFileResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -521,6 +578,9 @@ func (c *CreateDisputeEvidenceFileResponse) MarshalJSON() ([]byte, error) { } func (c *CreateDisputeEvidenceFileResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -566,6 +626,9 @@ func (c *CreateDisputeEvidenceTextResponse) GetEvidence() *DisputeEvidence { } func (c *CreateDisputeEvidenceTextResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -618,6 +681,9 @@ func (c *CreateDisputeEvidenceTextResponse) MarshalJSON() ([]byte, error) { } func (c *CreateDisputeEvidenceTextResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -807,6 +873,9 @@ func (d *Dispute) GetLocationID() *string { } func (d *Dispute) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -957,6 +1026,9 @@ func (d *Dispute) MarshalJSON() ([]byte, error) { } func (d *Dispute) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -1078,6 +1150,9 @@ func (d *DisputedPayment) GetPaymentID() *string { } func (d *DisputedPayment) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -1123,6 +1198,9 @@ func (d *DisputedPayment) MarshalJSON() ([]byte, error) { } func (d *DisputedPayment) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -1168,6 +1246,9 @@ func (g *GetDisputeResponse) GetDispute() *Dispute { } func (g *GetDisputeResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -1220,6 +1301,9 @@ func (g *GetDisputeResponse) MarshalJSON() ([]byte, error) { } func (g *GetDisputeResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -1276,6 +1360,9 @@ func (l *ListDisputesResponse) GetCursor() *string { } func (l *ListDisputesResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -1335,6 +1422,9 @@ func (l *ListDisputesResponse) MarshalJSON() ([]byte, error) { } func (l *ListDisputesResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -1380,6 +1470,9 @@ func (s *SubmitEvidenceResponse) GetDispute() *Dispute { } func (s *SubmitEvidenceResponse) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -1432,6 +1525,9 @@ func (s *SubmitEvidenceResponse) MarshalJSON() ([]byte, error) { } func (s *SubmitEvidenceResponse) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value diff --git a/disputes/disputes_test/disputes_test.go b/disputes/disputes_test/disputes_test.go new file mode 100644 index 0000000..3081a9b --- /dev/null +++ b/disputes/disputes_test/disputes_test.go @@ -0,0 +1,226 @@ +// Code generated by Fern. DO NOT EDIT. + +package disputes_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + strings "strings" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestDisputesListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.ListDisputesRequest{ + Cursor: square.String( + "cursor", + ), + States: square.DisputeStateInquiryEvidenceRequired.Ptr(), + LocationID: square.String( + "location_id", + ), + } + _, invocationErr := client.Disputes.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestDisputesListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestDisputesListWithWireMock", "GET", "/v2/disputes", map[string]string{"cursor": "cursor", "states": "INQUIRY_EVIDENCE_REQUIRED", "location_id": "location_id"}, 1) +} + +func TestDisputesGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.GetDisputesRequest{ + DisputeID: "dispute_id", + } + _, invocationErr := client.Disputes.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestDisputesGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestDisputesGetWithWireMock", "GET", "/v2/disputes/dispute_id", nil, 1) +} + +func TestDisputesAcceptWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.AcceptDisputesRequest{ + DisputeID: "dispute_id", + } + _, invocationErr := client.Disputes.Accept( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestDisputesAcceptWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestDisputesAcceptWithWireMock", "POST", "/v2/disputes/dispute_id/accept", nil, 1) +} + +func TestDisputesCreateEvidenceFileWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CreateEvidenceFileDisputesRequest{ + DisputeID: "dispute_id", + ImageFile: strings.NewReader( + "", + ), + } + _, invocationErr := client.Disputes.CreateEvidenceFile( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestDisputesCreateEvidenceFileWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestDisputesCreateEvidenceFileWithWireMock", "POST", "/v2/disputes/dispute_id/evidence-files", nil, 1) +} + +func TestDisputesCreateEvidenceTextWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CreateDisputeEvidenceTextRequest{ + DisputeID: "dispute_id", + IdempotencyKey: "ed3ee3933d946f1514d505d173c82648", + EvidenceType: square.DisputeEvidenceTypeTrackingNumber.Ptr(), + EvidenceText: "1Z8888888888888888", + } + _, invocationErr := client.Disputes.CreateEvidenceText( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestDisputesCreateEvidenceTextWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestDisputesCreateEvidenceTextWithWireMock", "POST", "/v2/disputes/dispute_id/evidence-text", nil, 1) +} + +func TestDisputesSubmitEvidenceWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.SubmitEvidenceDisputesRequest{ + DisputeID: "dispute_id", + } + _, invocationErr := client.Disputes.SubmitEvidence( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestDisputesSubmitEvidenceWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestDisputesSubmitEvidenceWithWireMock", "POST", "/v2/disputes/dispute_id/submit-evidence", nil, 1) +} diff --git a/disputes/evidence/disputes_evidence_test/disputes_evidence_test.go b/disputes/evidence/disputes_evidence_test/disputes_evidence_test.go new file mode 100644 index 0000000..02ba014 --- /dev/null +++ b/disputes/evidence/disputes_evidence_test/disputes_evidence_test.go @@ -0,0 +1,144 @@ +// Code generated by Fern. DO NOT EDIT. + +package disputes_evidence_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + disputes "github.com/square/square-go-sdk/v3/disputes" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestDisputesEvidenceListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &disputes.ListEvidenceRequest{ + DisputeID: "dispute_id", + Cursor: square.String( + "cursor", + ), + } + _, invocationErr := client.Disputes.Evidence.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestDisputesEvidenceListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestDisputesEvidenceListWithWireMock", "GET", "/v2/disputes/dispute_id/evidence", map[string]string{"cursor": "cursor"}, 1) +} + +func TestDisputesEvidenceGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &disputes.GetEvidenceRequest{ + DisputeID: "dispute_id", + EvidenceID: "evidence_id", + } + _, invocationErr := client.Disputes.Evidence.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestDisputesEvidenceGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestDisputesEvidenceGetWithWireMock", "GET", "/v2/disputes/dispute_id/evidence/evidence_id", nil, 1) +} + +func TestDisputesEvidenceDeleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &disputes.DeleteEvidenceRequest{ + DisputeID: "dispute_id", + EvidenceID: "evidence_id", + } + _, invocationErr := client.Disputes.Evidence.Delete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestDisputesEvidenceDeleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestDisputesEvidenceDeleteWithWireMock", "DELETE", "/v2/disputes/dispute_id/evidence/evidence_id", nil, 1) +} diff --git a/disputes/evidence_test.go b/disputes/evidence_test.go new file mode 100644 index 0000000..d9be31e --- /dev/null +++ b/disputes/evidence_test.go @@ -0,0 +1,262 @@ +// Code generated by Fern. DO NOT EDIT. + +package disputes + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersDeleteEvidenceRequest(t *testing.T) { + t.Run("SetDisputeID", func(t *testing.T) { + obj := &DeleteEvidenceRequest{} + var fernTestValueDisputeID string + obj.SetDisputeID(fernTestValueDisputeID) + assert.Equal(t, fernTestValueDisputeID, obj.DisputeID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEvidenceID", func(t *testing.T) { + obj := &DeleteEvidenceRequest{} + var fernTestValueEvidenceID string + obj.SetEvidenceID(fernTestValueEvidenceID) + assert.Equal(t, fernTestValueEvidenceID, obj.EvidenceID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDeleteEvidenceRequest(t *testing.T) { + t.Run("SetDisputeID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteEvidenceRequest{} + var fernTestValueDisputeID string + + // Act + obj.SetDisputeID(fernTestValueDisputeID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEvidenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteEvidenceRequest{} + var fernTestValueEvidenceID string + + // Act + obj.SetEvidenceID(fernTestValueEvidenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetEvidenceRequest(t *testing.T) { + t.Run("SetDisputeID", func(t *testing.T) { + obj := &GetEvidenceRequest{} + var fernTestValueDisputeID string + obj.SetDisputeID(fernTestValueDisputeID) + assert.Equal(t, fernTestValueDisputeID, obj.DisputeID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEvidenceID", func(t *testing.T) { + obj := &GetEvidenceRequest{} + var fernTestValueEvidenceID string + obj.SetEvidenceID(fernTestValueEvidenceID) + assert.Equal(t, fernTestValueEvidenceID, obj.EvidenceID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetEvidenceRequest(t *testing.T) { + t.Run("SetDisputeID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetEvidenceRequest{} + var fernTestValueDisputeID string + + // Act + obj.SetDisputeID(fernTestValueDisputeID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEvidenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetEvidenceRequest{} + var fernTestValueEvidenceID string + + // Act + obj.SetEvidenceID(fernTestValueEvidenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListEvidenceRequest(t *testing.T) { + t.Run("SetDisputeID", func(t *testing.T) { + obj := &ListEvidenceRequest{} + var fernTestValueDisputeID string + obj.SetDisputeID(fernTestValueDisputeID) + assert.Equal(t, fernTestValueDisputeID, obj.DisputeID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListEvidenceRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListEvidenceRequest(t *testing.T) { + t.Run("SetDisputeID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEvidenceRequest{} + var fernTestValueDisputeID string + + // Act + obj.SetDisputeID(fernTestValueDisputeID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEvidenceRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/disputes_test.go b/disputes_test.go new file mode 100644 index 0000000..eb1b1e0 --- /dev/null +++ b/disputes_test.go @@ -0,0 +1,3719 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersCreateEvidenceFileDisputesRequest(t *testing.T) { + t.Run("SetDisputeID", func(t *testing.T) { + obj := &CreateEvidenceFileDisputesRequest{} + var fernTestValueDisputeID string + obj.SetDisputeID(fernTestValueDisputeID) + assert.Equal(t, fernTestValueDisputeID, obj.DisputeID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateEvidenceFileDisputesRequest(t *testing.T) { + t.Run("SetDisputeID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateEvidenceFileDisputesRequest{} + var fernTestValueDisputeID string + + // Act + obj.SetDisputeID(fernTestValueDisputeID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateDisputeEvidenceTextRequest(t *testing.T) { + t.Run("SetDisputeID", func(t *testing.T) { + obj := &CreateDisputeEvidenceTextRequest{} + var fernTestValueDisputeID string + obj.SetDisputeID(fernTestValueDisputeID) + assert.Equal(t, fernTestValueDisputeID, obj.DisputeID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateDisputeEvidenceTextRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEvidenceType", func(t *testing.T) { + obj := &CreateDisputeEvidenceTextRequest{} + var fernTestValueEvidenceType *DisputeEvidenceType + obj.SetEvidenceType(fernTestValueEvidenceType) + assert.Equal(t, fernTestValueEvidenceType, obj.EvidenceType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEvidenceText", func(t *testing.T) { + obj := &CreateDisputeEvidenceTextRequest{} + var fernTestValueEvidenceText string + obj.SetEvidenceText(fernTestValueEvidenceText) + assert.Equal(t, fernTestValueEvidenceText, obj.EvidenceText) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateDisputeEvidenceTextRequest(t *testing.T) { + t.Run("SetDisputeID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDisputeEvidenceTextRequest{} + var fernTestValueDisputeID string + + // Act + obj.SetDisputeID(fernTestValueDisputeID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDisputeEvidenceTextRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEvidenceType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDisputeEvidenceTextRequest{} + var fernTestValueEvidenceType *DisputeEvidenceType + + // Act + obj.SetEvidenceType(fernTestValueEvidenceType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEvidenceText_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDisputeEvidenceTextRequest{} + var fernTestValueEvidenceText string + + // Act + obj.SetEvidenceText(fernTestValueEvidenceText) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSubmitEvidenceDisputesRequest(t *testing.T) { + t.Run("SetDisputeID", func(t *testing.T) { + obj := &SubmitEvidenceDisputesRequest{} + var fernTestValueDisputeID string + obj.SetDisputeID(fernTestValueDisputeID) + assert.Equal(t, fernTestValueDisputeID, obj.DisputeID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitSubmitEvidenceDisputesRequest(t *testing.T) { + t.Run("SetDisputeID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubmitEvidenceDisputesRequest{} + var fernTestValueDisputeID string + + // Act + obj.SetDisputeID(fernTestValueDisputeID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersAcceptDisputesRequest(t *testing.T) { + t.Run("SetDisputeID", func(t *testing.T) { + obj := &AcceptDisputesRequest{} + var fernTestValueDisputeID string + obj.SetDisputeID(fernTestValueDisputeID) + assert.Equal(t, fernTestValueDisputeID, obj.DisputeID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitAcceptDisputesRequest(t *testing.T) { + t.Run("SetDisputeID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AcceptDisputesRequest{} + var fernTestValueDisputeID string + + // Act + obj.SetDisputeID(fernTestValueDisputeID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetDisputesRequest(t *testing.T) { + t.Run("SetDisputeID", func(t *testing.T) { + obj := &GetDisputesRequest{} + var fernTestValueDisputeID string + obj.SetDisputeID(fernTestValueDisputeID) + assert.Equal(t, fernTestValueDisputeID, obj.DisputeID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetDisputesRequest(t *testing.T) { + t.Run("SetDisputeID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDisputesRequest{} + var fernTestValueDisputeID string + + // Act + obj.SetDisputeID(fernTestValueDisputeID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListDisputesRequest(t *testing.T) { + t.Run("SetCursor", func(t *testing.T) { + obj := &ListDisputesRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStates", func(t *testing.T) { + obj := &ListDisputesRequest{} + var fernTestValueStates *DisputeState + obj.SetStates(fernTestValueStates) + assert.Equal(t, fernTestValueStates, obj.States) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &ListDisputesRequest{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListDisputesRequest(t *testing.T) { + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDisputesRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStates_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDisputesRequest{} + var fernTestValueStates *DisputeState + + // Act + obj.SetStates(fernTestValueStates) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDisputesRequest{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersAcceptDisputeResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &AcceptDisputeResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDispute", func(t *testing.T) { + obj := &AcceptDisputeResponse{} + var fernTestValueDispute *Dispute + obj.SetDispute(fernTestValueDispute) + assert.Equal(t, fernTestValueDispute, obj.Dispute) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersAcceptDisputeResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AcceptDisputeResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AcceptDisputeResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AcceptDisputeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetDispute", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AcceptDisputeResponse{} + var expected *Dispute + obj.Dispute = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDispute(), "getter should return the property value") + }) + + t.Run("GetDispute_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AcceptDisputeResponse{} + obj.Dispute = nil + + // Act & Assert + assert.Nil(t, obj.GetDispute(), "getter should return nil when property is nil") + }) + + t.Run("GetDispute_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AcceptDisputeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDispute() // Should return zero value + }) + +} + +func TestSettersMarkExplicitAcceptDisputeResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AcceptDisputeResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDispute_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AcceptDisputeResponse{} + var fernTestValueDispute *Dispute + + // Act + obj.SetDispute(fernTestValueDispute) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateDisputeEvidenceFileRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateDisputeEvidenceFileRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEvidenceType", func(t *testing.T) { + obj := &CreateDisputeEvidenceFileRequest{} + var fernTestValueEvidenceType *DisputeEvidenceType + obj.SetEvidenceType(fernTestValueEvidenceType) + assert.Equal(t, fernTestValueEvidenceType, obj.EvidenceType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetContentType", func(t *testing.T) { + obj := &CreateDisputeEvidenceFileRequest{} + var fernTestValueContentType *string + obj.SetContentType(fernTestValueContentType) + assert.Equal(t, fernTestValueContentType, obj.ContentType) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateDisputeEvidenceFileRequest(t *testing.T) { + t.Run("GetIdempotencyKey", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDisputeEvidenceFileRequest{} + var expected string + obj.IdempotencyKey = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIdempotencyKey(), "getter should return the property value") + }) + + t.Run("GetIdempotencyKey_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateDisputeEvidenceFileRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIdempotencyKey() // Should return zero value + }) + + t.Run("GetEvidenceType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDisputeEvidenceFileRequest{} + var expected *DisputeEvidenceType + obj.EvidenceType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEvidenceType(), "getter should return the property value") + }) + + t.Run("GetEvidenceType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDisputeEvidenceFileRequest{} + obj.EvidenceType = nil + + // Act & Assert + assert.Nil(t, obj.GetEvidenceType(), "getter should return nil when property is nil") + }) + + t.Run("GetEvidenceType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateDisputeEvidenceFileRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEvidenceType() // Should return zero value + }) + + t.Run("GetContentType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDisputeEvidenceFileRequest{} + var expected *string + obj.ContentType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetContentType(), "getter should return the property value") + }) + + t.Run("GetContentType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDisputeEvidenceFileRequest{} + obj.ContentType = nil + + // Act & Assert + assert.Nil(t, obj.GetContentType(), "getter should return nil when property is nil") + }) + + t.Run("GetContentType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateDisputeEvidenceFileRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetContentType() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateDisputeEvidenceFileRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDisputeEvidenceFileRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEvidenceType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDisputeEvidenceFileRequest{} + var fernTestValueEvidenceType *DisputeEvidenceType + + // Act + obj.SetEvidenceType(fernTestValueEvidenceType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetContentType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDisputeEvidenceFileRequest{} + var fernTestValueContentType *string + + // Act + obj.SetContentType(fernTestValueContentType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateDisputeEvidenceFileResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateDisputeEvidenceFileResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEvidence", func(t *testing.T) { + obj := &CreateDisputeEvidenceFileResponse{} + var fernTestValueEvidence *DisputeEvidence + obj.SetEvidence(fernTestValueEvidence) + assert.Equal(t, fernTestValueEvidence, obj.Evidence) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateDisputeEvidenceFileResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDisputeEvidenceFileResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDisputeEvidenceFileResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateDisputeEvidenceFileResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetEvidence", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDisputeEvidenceFileResponse{} + var expected *DisputeEvidence + obj.Evidence = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEvidence(), "getter should return the property value") + }) + + t.Run("GetEvidence_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDisputeEvidenceFileResponse{} + obj.Evidence = nil + + // Act & Assert + assert.Nil(t, obj.GetEvidence(), "getter should return nil when property is nil") + }) + + t.Run("GetEvidence_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateDisputeEvidenceFileResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEvidence() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateDisputeEvidenceFileResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDisputeEvidenceFileResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEvidence_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDisputeEvidenceFileResponse{} + var fernTestValueEvidence *DisputeEvidence + + // Act + obj.SetEvidence(fernTestValueEvidence) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateDisputeEvidenceTextResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateDisputeEvidenceTextResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEvidence", func(t *testing.T) { + obj := &CreateDisputeEvidenceTextResponse{} + var fernTestValueEvidence *DisputeEvidence + obj.SetEvidence(fernTestValueEvidence) + assert.Equal(t, fernTestValueEvidence, obj.Evidence) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateDisputeEvidenceTextResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDisputeEvidenceTextResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDisputeEvidenceTextResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateDisputeEvidenceTextResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetEvidence", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDisputeEvidenceTextResponse{} + var expected *DisputeEvidence + obj.Evidence = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEvidence(), "getter should return the property value") + }) + + t.Run("GetEvidence_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDisputeEvidenceTextResponse{} + obj.Evidence = nil + + // Act & Assert + assert.Nil(t, obj.GetEvidence(), "getter should return nil when property is nil") + }) + + t.Run("GetEvidence_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateDisputeEvidenceTextResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEvidence() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateDisputeEvidenceTextResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDisputeEvidenceTextResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEvidence_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDisputeEvidenceTextResponse{} + var fernTestValueEvidence *DisputeEvidence + + // Act + obj.SetEvidence(fernTestValueEvidence) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDispute(t *testing.T) { + t.Run("SetDisputeID", func(t *testing.T) { + obj := &Dispute{} + var fernTestValueDisputeID *string + obj.SetDisputeID(fernTestValueDisputeID) + assert.Equal(t, fernTestValueDisputeID, obj.DisputeID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &Dispute{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &Dispute{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReason", func(t *testing.T) { + obj := &Dispute{} + var fernTestValueReason *DisputeReason + obj.SetReason(fernTestValueReason) + assert.Equal(t, fernTestValueReason, obj.Reason) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetState", func(t *testing.T) { + obj := &Dispute{} + var fernTestValueState *DisputeState + obj.SetState(fernTestValueState) + assert.Equal(t, fernTestValueState, obj.State) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDueAt", func(t *testing.T) { + obj := &Dispute{} + var fernTestValueDueAt *string + obj.SetDueAt(fernTestValueDueAt) + assert.Equal(t, fernTestValueDueAt, obj.DueAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDisputedPayment", func(t *testing.T) { + obj := &Dispute{} + var fernTestValueDisputedPayment *DisputedPayment + obj.SetDisputedPayment(fernTestValueDisputedPayment) + assert.Equal(t, fernTestValueDisputedPayment, obj.DisputedPayment) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEvidenceIDs", func(t *testing.T) { + obj := &Dispute{} + var fernTestValueEvidenceIDs []string + obj.SetEvidenceIDs(fernTestValueEvidenceIDs) + assert.Equal(t, fernTestValueEvidenceIDs, obj.EvidenceIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCardBrand", func(t *testing.T) { + obj := &Dispute{} + var fernTestValueCardBrand *CardBrand + obj.SetCardBrand(fernTestValueCardBrand) + assert.Equal(t, fernTestValueCardBrand, obj.CardBrand) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &Dispute{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &Dispute{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBrandDisputeID", func(t *testing.T) { + obj := &Dispute{} + var fernTestValueBrandDisputeID *string + obj.SetBrandDisputeID(fernTestValueBrandDisputeID) + assert.Equal(t, fernTestValueBrandDisputeID, obj.BrandDisputeID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReportedDate", func(t *testing.T) { + obj := &Dispute{} + var fernTestValueReportedDate *string + obj.SetReportedDate(fernTestValueReportedDate) + assert.Equal(t, fernTestValueReportedDate, obj.ReportedDate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReportedAt", func(t *testing.T) { + obj := &Dispute{} + var fernTestValueReportedAt *string + obj.SetReportedAt(fernTestValueReportedAt) + assert.Equal(t, fernTestValueReportedAt, obj.ReportedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &Dispute{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &Dispute{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDispute(t *testing.T) { + t.Run("GetDisputeID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var expected *string + obj.DisputeID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDisputeID(), "getter should return the property value") + }) + + t.Run("GetDisputeID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + obj.DisputeID = nil + + // Act & Assert + assert.Nil(t, obj.GetDisputeID(), "getter should return nil when property is nil") + }) + + t.Run("GetDisputeID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Dispute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDisputeID() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Dispute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Dispute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + + t.Run("GetReason", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var expected *DisputeReason + obj.Reason = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReason(), "getter should return the property value") + }) + + t.Run("GetReason_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + obj.Reason = nil + + // Act & Assert + assert.Nil(t, obj.GetReason(), "getter should return nil when property is nil") + }) + + t.Run("GetReason_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Dispute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReason() // Should return zero value + }) + + t.Run("GetState", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var expected *DisputeState + obj.State = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetState(), "getter should return the property value") + }) + + t.Run("GetState_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + obj.State = nil + + // Act & Assert + assert.Nil(t, obj.GetState(), "getter should return nil when property is nil") + }) + + t.Run("GetState_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Dispute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetState() // Should return zero value + }) + + t.Run("GetDueAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var expected *string + obj.DueAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDueAt(), "getter should return the property value") + }) + + t.Run("GetDueAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + obj.DueAt = nil + + // Act & Assert + assert.Nil(t, obj.GetDueAt(), "getter should return nil when property is nil") + }) + + t.Run("GetDueAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Dispute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDueAt() // Should return zero value + }) + + t.Run("GetDisputedPayment", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var expected *DisputedPayment + obj.DisputedPayment = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDisputedPayment(), "getter should return the property value") + }) + + t.Run("GetDisputedPayment_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + obj.DisputedPayment = nil + + // Act & Assert + assert.Nil(t, obj.GetDisputedPayment(), "getter should return nil when property is nil") + }) + + t.Run("GetDisputedPayment_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Dispute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDisputedPayment() // Should return zero value + }) + + t.Run("GetEvidenceIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var expected []string + obj.EvidenceIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEvidenceIDs(), "getter should return the property value") + }) + + t.Run("GetEvidenceIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + obj.EvidenceIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetEvidenceIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetEvidenceIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Dispute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEvidenceIDs() // Should return zero value + }) + + t.Run("GetCardBrand", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var expected *CardBrand + obj.CardBrand = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCardBrand(), "getter should return the property value") + }) + + t.Run("GetCardBrand_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + obj.CardBrand = nil + + // Act & Assert + assert.Nil(t, obj.GetCardBrand(), "getter should return nil when property is nil") + }) + + t.Run("GetCardBrand_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Dispute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCardBrand() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Dispute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Dispute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetBrandDisputeID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var expected *string + obj.BrandDisputeID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBrandDisputeID(), "getter should return the property value") + }) + + t.Run("GetBrandDisputeID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + obj.BrandDisputeID = nil + + // Act & Assert + assert.Nil(t, obj.GetBrandDisputeID(), "getter should return nil when property is nil") + }) + + t.Run("GetBrandDisputeID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Dispute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBrandDisputeID() // Should return zero value + }) + + t.Run("GetReportedDate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var expected *string + obj.ReportedDate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReportedDate(), "getter should return the property value") + }) + + t.Run("GetReportedDate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + obj.ReportedDate = nil + + // Act & Assert + assert.Nil(t, obj.GetReportedDate(), "getter should return nil when property is nil") + }) + + t.Run("GetReportedDate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Dispute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReportedDate() // Should return zero value + }) + + t.Run("GetReportedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var expected *string + obj.ReportedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReportedAt(), "getter should return the property value") + }) + + t.Run("GetReportedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + obj.ReportedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetReportedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetReportedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Dispute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReportedAt() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var expected *int + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Dispute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Dispute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDispute(t *testing.T) { + t.Run("SetDisputeID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var fernTestValueDisputeID *string + + // Act + obj.SetDisputeID(fernTestValueDisputeID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReason_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var fernTestValueReason *DisputeReason + + // Act + obj.SetReason(fernTestValueReason) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetState_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var fernTestValueState *DisputeState + + // Act + obj.SetState(fernTestValueState) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDueAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var fernTestValueDueAt *string + + // Act + obj.SetDueAt(fernTestValueDueAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDisputedPayment_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var fernTestValueDisputedPayment *DisputedPayment + + // Act + obj.SetDisputedPayment(fernTestValueDisputedPayment) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEvidenceIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var fernTestValueEvidenceIDs []string + + // Act + obj.SetEvidenceIDs(fernTestValueEvidenceIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCardBrand_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var fernTestValueCardBrand *CardBrand + + // Act + obj.SetCardBrand(fernTestValueCardBrand) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBrandDisputeID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var fernTestValueBrandDisputeID *string + + // Act + obj.SetBrandDisputeID(fernTestValueBrandDisputeID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReportedDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var fernTestValueReportedDate *string + + // Act + obj.SetReportedDate(fernTestValueReportedDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReportedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var fernTestValueReportedAt *string + + // Act + obj.SetReportedAt(fernTestValueReportedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisputedPayment(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &DisputedPayment{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDisputedPayment(t *testing.T) { + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputedPayment{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputedPayment{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputedPayment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDisputedPayment(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputedPayment{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetDisputeResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetDisputeResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDispute", func(t *testing.T) { + obj := &GetDisputeResponse{} + var fernTestValueDispute *Dispute + obj.SetDispute(fernTestValueDispute) + assert.Equal(t, fernTestValueDispute, obj.Dispute) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetDisputeResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDisputeResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDisputeResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetDisputeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetDispute", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDisputeResponse{} + var expected *Dispute + obj.Dispute = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDispute(), "getter should return the property value") + }) + + t.Run("GetDispute_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDisputeResponse{} + obj.Dispute = nil + + // Act & Assert + assert.Nil(t, obj.GetDispute(), "getter should return nil when property is nil") + }) + + t.Run("GetDispute_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetDisputeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDispute() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetDisputeResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDisputeResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDispute_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDisputeResponse{} + var fernTestValueDispute *Dispute + + // Act + obj.SetDispute(fernTestValueDispute) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListDisputesResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &ListDisputesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDisputes", func(t *testing.T) { + obj := &ListDisputesResponse{} + var fernTestValueDisputes []*Dispute + obj.SetDisputes(fernTestValueDisputes) + assert.Equal(t, fernTestValueDisputes, obj.Disputes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListDisputesResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListDisputesResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDisputesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDisputesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListDisputesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetDisputes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDisputesResponse{} + var expected []*Dispute + obj.Disputes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDisputes(), "getter should return the property value") + }) + + t.Run("GetDisputes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDisputesResponse{} + obj.Disputes = nil + + // Act & Assert + assert.Nil(t, obj.GetDisputes(), "getter should return nil when property is nil") + }) + + t.Run("GetDisputes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListDisputesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDisputes() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDisputesResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDisputesResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListDisputesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListDisputesResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDisputesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDisputes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDisputesResponse{} + var fernTestValueDisputes []*Dispute + + // Act + obj.SetDisputes(fernTestValueDisputes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDisputesResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSubmitEvidenceResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &SubmitEvidenceResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDispute", func(t *testing.T) { + obj := &SubmitEvidenceResponse{} + var fernTestValueDispute *Dispute + obj.SetDispute(fernTestValueDispute) + assert.Equal(t, fernTestValueDispute, obj.Dispute) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSubmitEvidenceResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubmitEvidenceResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubmitEvidenceResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubmitEvidenceResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetDispute", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubmitEvidenceResponse{} + var expected *Dispute + obj.Dispute = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDispute(), "getter should return the property value") + }) + + t.Run("GetDispute_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubmitEvidenceResponse{} + obj.Dispute = nil + + // Act & Assert + assert.Nil(t, obj.GetDispute(), "getter should return nil when property is nil") + }) + + t.Run("GetDispute_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubmitEvidenceResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDispute() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSubmitEvidenceResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubmitEvidenceResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDispute_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubmitEvidenceResponse{} + var fernTestValueDispute *Dispute + + // Act + obj.SetDispute(fernTestValueDispute) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingAcceptDisputeResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AcceptDisputeResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled AcceptDisputeResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj AcceptDisputeResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj AcceptDisputeResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateDisputeEvidenceFileRequest(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDisputeEvidenceFileRequest{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateDisputeEvidenceFileRequest + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateDisputeEvidenceFileRequest + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateDisputeEvidenceFileRequest + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateDisputeEvidenceFileResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDisputeEvidenceFileResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateDisputeEvidenceFileResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateDisputeEvidenceFileResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateDisputeEvidenceFileResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateDisputeEvidenceTextResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDisputeEvidenceTextResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateDisputeEvidenceTextResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateDisputeEvidenceTextResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateDisputeEvidenceTextResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDispute(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Dispute{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Dispute + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Dispute + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Dispute + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDisputedPayment(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputedPayment{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DisputedPayment + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DisputedPayment + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DisputedPayment + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetDisputeResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDisputeResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetDisputeResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetDisputeResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetDisputeResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListDisputesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDisputesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListDisputesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListDisputesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListDisputesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSubmitEvidenceResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubmitEvidenceResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SubmitEvidenceResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SubmitEvidenceResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SubmitEvidenceResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringAcceptDisputeResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &AcceptDisputeResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AcceptDisputeResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateDisputeEvidenceFileRequest(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateDisputeEvidenceFileRequest{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateDisputeEvidenceFileRequest + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateDisputeEvidenceFileResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateDisputeEvidenceFileResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateDisputeEvidenceFileResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateDisputeEvidenceTextResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateDisputeEvidenceTextResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateDisputeEvidenceTextResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDispute(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Dispute{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Dispute + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDisputedPayment(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DisputedPayment{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputedPayment + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetDisputeResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetDisputeResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetDisputeResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListDisputesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListDisputesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListDisputesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSubmitEvidenceResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SubmitEvidenceResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubmitEvidenceResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestEnumDisputeReason(t *testing.T) { + t.Run("NewFromString_AMOUNT_DIFFERS", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeReasonFromString("AMOUNT_DIFFERS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeReason("AMOUNT_DIFFERS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CANCELLED", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeReasonFromString("CANCELLED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeReason("CANCELLED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DUPLICATE", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeReasonFromString("DUPLICATE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeReason("DUPLICATE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NO_KNOWLEDGE", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeReasonFromString("NO_KNOWLEDGE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeReason("NO_KNOWLEDGE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NOT_AS_DESCRIBED", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeReasonFromString("NOT_AS_DESCRIBED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeReason("NOT_AS_DESCRIBED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NOT_RECEIVED", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeReasonFromString("NOT_RECEIVED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeReason("NOT_RECEIVED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PAID_BY_OTHER_MEANS", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeReasonFromString("PAID_BY_OTHER_MEANS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeReason("PAID_BY_OTHER_MEANS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CUSTOMER_REQUESTS_CREDIT", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeReasonFromString("CUSTOMER_REQUESTS_CREDIT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeReason("CUSTOMER_REQUESTS_CREDIT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EMV_LIABILITY_SHIFT", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeReasonFromString("EMV_LIABILITY_SHIFT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeReason("EMV_LIABILITY_SHIFT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewDisputeReasonFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewDisputeReasonFromString("AMOUNT_DIFFERS") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumDisputeState(t *testing.T) { + t.Run("NewFromString_INQUIRY_EVIDENCE_REQUIRED", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeStateFromString("INQUIRY_EVIDENCE_REQUIRED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeState("INQUIRY_EVIDENCE_REQUIRED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INQUIRY_PROCESSING", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeStateFromString("INQUIRY_PROCESSING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeState("INQUIRY_PROCESSING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INQUIRY_CLOSED", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeStateFromString("INQUIRY_CLOSED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeState("INQUIRY_CLOSED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EVIDENCE_REQUIRED", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeStateFromString("EVIDENCE_REQUIRED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeState("EVIDENCE_REQUIRED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PROCESSING", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeStateFromString("PROCESSING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeState("PROCESSING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_WON", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeStateFromString("WON") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeState("WON"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LOST", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeStateFromString("LOST") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeState("LOST"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ACCEPTED", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeStateFromString("ACCEPTED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeState("ACCEPTED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewDisputeStateFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewDisputeStateFromString("INQUIRY_EVIDENCE_REQUIRED") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestExtraPropertiesAcceptDisputeResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &AcceptDisputeResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AcceptDisputeResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateDisputeEvidenceFileRequest(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateDisputeEvidenceFileRequest{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateDisputeEvidenceFileRequest + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateDisputeEvidenceFileResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateDisputeEvidenceFileResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateDisputeEvidenceFileResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateDisputeEvidenceTextResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateDisputeEvidenceTextResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateDisputeEvidenceTextResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDispute(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Dispute{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Dispute + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDisputedPayment(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DisputedPayment{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputedPayment + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetDisputeResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetDisputeResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetDisputeResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListDisputesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListDisputesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListDisputesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSubmitEvidenceResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SubmitEvidenceResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubmitEvidenceResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/employees.go b/employees.go index a33749d..5cdd542 100644 --- a/employees.go +++ b/employees.go @@ -209,6 +209,9 @@ func (e *Employee) GetUpdatedAt() *string { } func (e *Employee) GetExtraProperties() map[string]interface{} { + if e == nil { + return nil + } return e.extraProperties } @@ -317,6 +320,9 @@ func (e *Employee) MarshalJSON() ([]byte, error) { } func (e *Employee) String() string { + if e == nil { + return "" + } if len(e.rawJSON) > 0 { if value, err := internal.StringifyJSON(e.rawJSON); err == nil { return value @@ -385,6 +391,9 @@ func (g *GetEmployeeResponse) GetErrors() []*Error { } func (g *GetEmployeeResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -437,6 +446,9 @@ func (g *GetEmployeeResponse) MarshalJSON() ([]byte, error) { } func (g *GetEmployeeResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -490,6 +502,9 @@ func (l *ListEmployeesResponse) GetErrors() []*Error { } func (l *ListEmployeesResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -549,6 +564,9 @@ func (l *ListEmployeesResponse) MarshalJSON() ([]byte, error) { } func (l *ListEmployeesResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value diff --git a/employees/employees_test/employees_test.go b/employees/employees_test/employees_test.go new file mode 100644 index 0000000..afa7a9b --- /dev/null +++ b/employees/employees_test/employees_test.go @@ -0,0 +1,122 @@ +// Code generated by Fern. DO NOT EDIT. + +package employees_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestEmployeesListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.ListEmployeesRequest{ + LocationID: square.String( + "location_id", + ), + Status: square.EmployeeStatusActive.Ptr(), + Limit: square.Int( + 1, + ), + Cursor: square.String( + "cursor", + ), + } + _, invocationErr := client.Employees.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestEmployeesListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestEmployeesListWithWireMock", "GET", "/v2/employees", map[string]string{"location_id": "location_id", "status": "ACTIVE", "limit": "1", "cursor": "cursor"}, 1) +} + +func TestEmployeesGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.GetEmployeesRequest{ + ID: "id", + } + _, invocationErr := client.Employees.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestEmployeesGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestEmployeesGetWithWireMock", "GET", "/v2/employees/id", nil, 1) +} diff --git a/employees_test.go b/employees_test.go new file mode 100644 index 0000000..f96bd1c --- /dev/null +++ b/employees_test.go @@ -0,0 +1,1569 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersGetEmployeesRequest(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &GetEmployeesRequest{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetEmployeesRequest(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetEmployeesRequest{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListEmployeesRequest(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &ListEmployeesRequest{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &ListEmployeesRequest{} + var fernTestValueStatus *EmployeeStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListEmployeesRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListEmployeesRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListEmployeesRequest(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEmployeesRequest{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEmployeesRequest{} + var fernTestValueStatus *EmployeeStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEmployeesRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEmployeesRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersEmployee(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &Employee{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFirstName", func(t *testing.T) { + obj := &Employee{} + var fernTestValueFirstName *string + obj.SetFirstName(fernTestValueFirstName) + assert.Equal(t, fernTestValueFirstName, obj.FirstName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLastName", func(t *testing.T) { + obj := &Employee{} + var fernTestValueLastName *string + obj.SetLastName(fernTestValueLastName) + assert.Equal(t, fernTestValueLastName, obj.LastName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEmail", func(t *testing.T) { + obj := &Employee{} + var fernTestValueEmail *string + obj.SetEmail(fernTestValueEmail) + assert.Equal(t, fernTestValueEmail, obj.Email) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPhoneNumber", func(t *testing.T) { + obj := &Employee{} + var fernTestValuePhoneNumber *string + obj.SetPhoneNumber(fernTestValuePhoneNumber) + assert.Equal(t, fernTestValuePhoneNumber, obj.PhoneNumber) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationIDs", func(t *testing.T) { + obj := &Employee{} + var fernTestValueLocationIDs []string + obj.SetLocationIDs(fernTestValueLocationIDs) + assert.Equal(t, fernTestValueLocationIDs, obj.LocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &Employee{} + var fernTestValueStatus *EmployeeStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsOwner", func(t *testing.T) { + obj := &Employee{} + var fernTestValueIsOwner *bool + obj.SetIsOwner(fernTestValueIsOwner) + assert.Equal(t, fernTestValueIsOwner, obj.IsOwner) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &Employee{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &Employee{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersEmployee(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Employee + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetFirstName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + var expected *string + obj.FirstName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFirstName(), "getter should return the property value") + }) + + t.Run("GetFirstName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + obj.FirstName = nil + + // Act & Assert + assert.Nil(t, obj.GetFirstName(), "getter should return nil when property is nil") + }) + + t.Run("GetFirstName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Employee + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFirstName() // Should return zero value + }) + + t.Run("GetLastName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + var expected *string + obj.LastName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLastName(), "getter should return the property value") + }) + + t.Run("GetLastName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + obj.LastName = nil + + // Act & Assert + assert.Nil(t, obj.GetLastName(), "getter should return nil when property is nil") + }) + + t.Run("GetLastName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Employee + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLastName() // Should return zero value + }) + + t.Run("GetEmail", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + var expected *string + obj.Email = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEmail(), "getter should return the property value") + }) + + t.Run("GetEmail_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + obj.Email = nil + + // Act & Assert + assert.Nil(t, obj.GetEmail(), "getter should return nil when property is nil") + }) + + t.Run("GetEmail_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Employee + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEmail() // Should return zero value + }) + + t.Run("GetPhoneNumber", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + var expected *string + obj.PhoneNumber = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPhoneNumber(), "getter should return the property value") + }) + + t.Run("GetPhoneNumber_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + obj.PhoneNumber = nil + + // Act & Assert + assert.Nil(t, obj.GetPhoneNumber(), "getter should return nil when property is nil") + }) + + t.Run("GetPhoneNumber_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Employee + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPhoneNumber() // Should return zero value + }) + + t.Run("GetLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + var expected []string + obj.LocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationIDs(), "getter should return the property value") + }) + + t.Run("GetLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + obj.LocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Employee + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationIDs() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + var expected *EmployeeStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Employee + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetIsOwner", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + var expected *bool + obj.IsOwner = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsOwner(), "getter should return the property value") + }) + + t.Run("GetIsOwner_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + obj.IsOwner = nil + + // Act & Assert + assert.Nil(t, obj.GetIsOwner(), "getter should return nil when property is nil") + }) + + t.Run("GetIsOwner_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Employee + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsOwner() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Employee + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Employee + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitEmployee(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFirstName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + var fernTestValueFirstName *string + + // Act + obj.SetFirstName(fernTestValueFirstName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLastName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + var fernTestValueLastName *string + + // Act + obj.SetLastName(fernTestValueLastName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEmail_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + var fernTestValueEmail *string + + // Act + obj.SetEmail(fernTestValueEmail) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPhoneNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + var fernTestValuePhoneNumber *string + + // Act + obj.SetPhoneNumber(fernTestValuePhoneNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + var fernTestValueLocationIDs []string + + // Act + obj.SetLocationIDs(fernTestValueLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + var fernTestValueStatus *EmployeeStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsOwner_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + var fernTestValueIsOwner *bool + + // Act + obj.SetIsOwner(fernTestValueIsOwner) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetEmployeeResponse(t *testing.T) { + t.Run("SetEmployee", func(t *testing.T) { + obj := &GetEmployeeResponse{} + var fernTestValueEmployee *Employee + obj.SetEmployee(fernTestValueEmployee) + assert.Equal(t, fernTestValueEmployee, obj.Employee) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &GetEmployeeResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetEmployeeResponse(t *testing.T) { + t.Run("GetEmployee", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetEmployeeResponse{} + var expected *Employee + obj.Employee = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEmployee(), "getter should return the property value") + }) + + t.Run("GetEmployee_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetEmployeeResponse{} + obj.Employee = nil + + // Act & Assert + assert.Nil(t, obj.GetEmployee(), "getter should return nil when property is nil") + }) + + t.Run("GetEmployee_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetEmployeeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEmployee() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetEmployeeResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetEmployeeResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetEmployeeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetEmployeeResponse(t *testing.T) { + t.Run("SetEmployee_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetEmployeeResponse{} + var fernTestValueEmployee *Employee + + // Act + obj.SetEmployee(fernTestValueEmployee) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetEmployeeResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListEmployeesResponse(t *testing.T) { + t.Run("SetEmployees", func(t *testing.T) { + obj := &ListEmployeesResponse{} + var fernTestValueEmployees []*Employee + obj.SetEmployees(fernTestValueEmployees) + assert.Equal(t, fernTestValueEmployees, obj.Employees) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListEmployeesResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &ListEmployeesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListEmployeesResponse(t *testing.T) { + t.Run("GetEmployees", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEmployeesResponse{} + var expected []*Employee + obj.Employees = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEmployees(), "getter should return the property value") + }) + + t.Run("GetEmployees_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEmployeesResponse{} + obj.Employees = nil + + // Act & Assert + assert.Nil(t, obj.GetEmployees(), "getter should return nil when property is nil") + }) + + t.Run("GetEmployees_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListEmployeesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEmployees() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEmployeesResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEmployeesResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListEmployeesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEmployeesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEmployeesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListEmployeesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListEmployeesResponse(t *testing.T) { + t.Run("SetEmployees_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEmployeesResponse{} + var fernTestValueEmployees []*Employee + + // Act + obj.SetEmployees(fernTestValueEmployees) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEmployeesResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEmployeesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingEmployee(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Employee{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Employee + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Employee + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Employee + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetEmployeeResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetEmployeeResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetEmployeeResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetEmployeeResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetEmployeeResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListEmployeesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEmployeesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListEmployeesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListEmployeesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListEmployeesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringEmployee(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Employee{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Employee + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetEmployeeResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetEmployeeResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetEmployeeResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListEmployeesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListEmployeesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListEmployeesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestEnumEmployeeStatus(t *testing.T) { + t.Run("NewFromString_ACTIVE", func(t *testing.T) { + t.Parallel() + val, err := NewEmployeeStatusFromString("ACTIVE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, EmployeeStatus("ACTIVE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INACTIVE", func(t *testing.T) { + t.Parallel() + val, err := NewEmployeeStatusFromString("INACTIVE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, EmployeeStatus("INACTIVE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewEmployeeStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewEmployeeStatusFromString("ACTIVE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestExtraPropertiesEmployee(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Employee{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Employee + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetEmployeeResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetEmployeeResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetEmployeeResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListEmployeesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListEmployeesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListEmployeesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/events.go b/events.go index f2a8ac1..f5f425c 100644 --- a/events.go +++ b/events.go @@ -87,6 +87,27 @@ func (s *SearchEventsRequest) SetQuery(query *SearchEventsQuery) { s.require(searchEventsRequestFieldQuery) } +func (s *SearchEventsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler SearchEventsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *s = SearchEventsRequest(body) + return nil +} + +func (s *SearchEventsRequest) MarshalJSON() ([]byte, error) { + type embed SearchEventsRequest + var marshaler = struct { + embed + }{ + embed: embed(*s), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, s.explicitFields) + return json.Marshal(explicitMarshaler) +} + // Defines the fields that are included in the response body of // a request to the [DisableEvents](api-endpoint:Events-DisableEvents) endpoint. // @@ -115,6 +136,9 @@ func (d *DisableEventsResponse) GetErrors() []*Error { } func (d *DisableEventsResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -160,6 +184,9 @@ func (d *DisableEventsResponse) MarshalJSON() ([]byte, error) { } func (d *DisableEventsResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -199,6 +226,9 @@ func (e *EnableEventsResponse) GetErrors() []*Error { } func (e *EnableEventsResponse) GetExtraProperties() map[string]interface{} { + if e == nil { + return nil + } return e.extraProperties } @@ -244,6 +274,9 @@ func (e *EnableEventsResponse) MarshalJSON() ([]byte, error) { } func (e *EnableEventsResponse) String() string { + if e == nil { + return "" + } if len(e.rawJSON) > 0 { if value, err := internal.StringifyJSON(e.rawJSON); err == nil { return value @@ -328,6 +361,9 @@ func (e *Event) GetData() *EventData { } func (e *Event) GetExtraProperties() map[string]interface{} { + if e == nil { + return nil + } return e.extraProperties } @@ -408,6 +444,9 @@ func (e *Event) MarshalJSON() ([]byte, error) { } func (e *Event) String() string { + if e == nil { + return "" + } if len(e.rawJSON) > 0 { if value, err := internal.StringifyJSON(e.rawJSON); err == nil { return value @@ -472,6 +511,9 @@ func (e *EventData) GetObject() map[string]interface{} { } func (e *EventData) GetExtraProperties() map[string]interface{} { + if e == nil { + return nil + } return e.extraProperties } @@ -538,6 +580,9 @@ func (e *EventData) MarshalJSON() ([]byte, error) { } func (e *EventData) String() string { + if e == nil { + return "" + } if len(e.rawJSON) > 0 { if value, err := internal.StringifyJSON(e.rawJSON); err == nil { return value @@ -583,6 +628,9 @@ func (e *EventMetadata) GetAPIVersion() *string { } func (e *EventMetadata) GetExtraProperties() map[string]interface{} { + if e == nil { + return nil + } return e.extraProperties } @@ -635,6 +683,9 @@ func (e *EventMetadata) MarshalJSON() ([]byte, error) { } func (e *EventMetadata) String() string { + if e == nil { + return "" + } if len(e.rawJSON) > 0 { if value, err := internal.StringifyJSON(e.rawJSON); err == nil { return value @@ -694,6 +745,9 @@ func (l *ListEventTypesResponse) GetMetadata() []*EventTypeMetadata { } func (l *ListEventTypesResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -753,6 +807,9 @@ func (l *ListEventTypesResponse) MarshalJSON() ([]byte, error) { } func (l *ListEventTypesResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -818,6 +875,9 @@ func (s *SearchEventsFilter) GetCreatedAt() *TimeRange { } func (s *SearchEventsFilter) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -884,6 +944,9 @@ func (s *SearchEventsFilter) MarshalJSON() ([]byte, error) { } func (s *SearchEventsFilter) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -929,6 +992,9 @@ func (s *SearchEventsQuery) GetSort() *SearchEventsSort { } func (s *SearchEventsQuery) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -981,6 +1047,9 @@ func (s *SearchEventsQuery) MarshalJSON() ([]byte, error) { } func (s *SearchEventsQuery) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -1052,6 +1121,9 @@ func (s *SearchEventsResponse) GetCursor() *string { } func (s *SearchEventsResponse) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -1118,6 +1190,9 @@ func (s *SearchEventsResponse) MarshalJSON() ([]byte, error) { } func (s *SearchEventsResponse) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -1158,6 +1233,9 @@ func (s *SearchEventsSort) GetOrder() *SortOrder { } func (s *SearchEventsSort) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -1210,6 +1288,9 @@ func (s *SearchEventsSort) MarshalJSON() ([]byte, error) { } func (s *SearchEventsSort) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value diff --git a/events/events_test/events_test.go b/events/events_test/events_test.go new file mode 100644 index 0000000..9625a98 --- /dev/null +++ b/events/events_test/events_test.go @@ -0,0 +1,155 @@ +// Code generated by Fern. DO NOT EDIT. + +package events_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestEventsSearchEventsWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.SearchEventsRequest{} + _, invocationErr := client.Events.SearchEvents( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestEventsSearchEventsWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestEventsSearchEventsWithWireMock", "POST", "/v2/events", nil, 1) +} + +func TestEventsDisableEventsWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + _, invocationErr := client.Events.DisableEvents( + context.TODO(), + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestEventsDisableEventsWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestEventsDisableEventsWithWireMock", "PUT", "/v2/events/disable", nil, 1) +} + +func TestEventsEnableEventsWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + _, invocationErr := client.Events.EnableEvents( + context.TODO(), + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestEventsEnableEventsWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestEventsEnableEventsWithWireMock", "PUT", "/v2/events/enable", nil, 1) +} + +func TestEventsListEventTypesWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.ListEventTypesRequest{ + APIVersion: square.String( + "api_version", + ), + } + _, invocationErr := client.Events.ListEventTypes( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestEventsListEventTypesWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestEventsListEventTypesWithWireMock", "GET", "/v2/events/types", map[string]string{"api_version": "api_version"}, 1) +} diff --git a/events_test.go b/events_test.go new file mode 100644 index 0000000..ffcf171 --- /dev/null +++ b/events_test.go @@ -0,0 +1,3004 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersListEventTypesRequest(t *testing.T) { + t.Run("SetAPIVersion", func(t *testing.T) { + obj := &ListEventTypesRequest{} + var fernTestValueAPIVersion *string + obj.SetAPIVersion(fernTestValueAPIVersion) + assert.Equal(t, fernTestValueAPIVersion, obj.APIVersion) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListEventTypesRequest(t *testing.T) { + t.Run("SetAPIVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEventTypesRequest{} + var fernTestValueAPIVersion *string + + // Act + obj.SetAPIVersion(fernTestValueAPIVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchEventsRequest(t *testing.T) { + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchEventsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &SearchEventsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuery", func(t *testing.T) { + obj := &SearchEventsRequest{} + var fernTestValueQuery *SearchEventsQuery + obj.SetQuery(fernTestValueQuery) + assert.Equal(t, fernTestValueQuery, obj.Query) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitSearchEventsRequest(t *testing.T) { + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuery_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsRequest{} + var fernTestValueQuery *SearchEventsQuery + + // Act + obj.SetQuery(fernTestValueQuery) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisableEventsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DisableEventsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDisableEventsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisableEventsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisableEventsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisableEventsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDisableEventsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisableEventsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersEnableEventsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &EnableEventsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersEnableEventsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EnableEventsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EnableEventsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *EnableEventsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitEnableEventsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EnableEventsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &Event{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &Event{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &Event{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &Event{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &Event{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &Event{} + var fernTestValueData *EventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Event{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Event{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Event + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Event{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Event{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Event + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Event{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Event{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Event + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Event{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Event{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Event + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Event{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Event{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Event + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Event{} + var expected *EventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Event{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Event + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Event{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Event{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Event{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Event{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Event{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Event{} + var fernTestValueData *EventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &EventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &EventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeleted", func(t *testing.T) { + obj := &EventData{} + var fernTestValueDeleted *bool + obj.SetDeleted(fernTestValueDeleted) + assert.Equal(t, fernTestValueDeleted, obj.Deleted) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &EventData{} + var fernTestValueObject map[string]interface{} + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *EventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *EventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetDeleted", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventData{} + var expected *bool + obj.Deleted = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeleted(), "getter should return the property value") + }) + + t.Run("GetDeleted_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventData{} + obj.Deleted = nil + + // Act & Assert + assert.Nil(t, obj.GetDeleted(), "getter should return nil when property is nil") + }) + + t.Run("GetDeleted_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *EventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeleted() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventData{} + var expected map[string]interface{} + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *EventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeleted_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventData{} + var fernTestValueDeleted *bool + + // Act + obj.SetDeleted(fernTestValueDeleted) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventData{} + var fernTestValueObject map[string]interface{} + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersEventMetadata(t *testing.T) { + t.Run("SetEventID", func(t *testing.T) { + obj := &EventMetadata{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAPIVersion", func(t *testing.T) { + obj := &EventMetadata{} + var fernTestValueAPIVersion *string + obj.SetAPIVersion(fernTestValueAPIVersion) + assert.Equal(t, fernTestValueAPIVersion, obj.APIVersion) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersEventMetadata(t *testing.T) { + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventMetadata{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventMetadata{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *EventMetadata + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetAPIVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventMetadata{} + var expected *string + obj.APIVersion = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAPIVersion(), "getter should return the property value") + }) + + t.Run("GetAPIVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventMetadata{} + obj.APIVersion = nil + + // Act & Assert + assert.Nil(t, obj.GetAPIVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetAPIVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *EventMetadata + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAPIVersion() // Should return zero value + }) + +} + +func TestSettersMarkExplicitEventMetadata(t *testing.T) { + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventMetadata{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAPIVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventMetadata{} + var fernTestValueAPIVersion *string + + // Act + obj.SetAPIVersion(fernTestValueAPIVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListEventTypesResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &ListEventTypesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventTypes", func(t *testing.T) { + obj := &ListEventTypesResponse{} + var fernTestValueEventTypes []string + obj.SetEventTypes(fernTestValueEventTypes) + assert.Equal(t, fernTestValueEventTypes, obj.EventTypes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMetadata", func(t *testing.T) { + obj := &ListEventTypesResponse{} + var fernTestValueMetadata []*EventTypeMetadata + obj.SetMetadata(fernTestValueMetadata) + assert.Equal(t, fernTestValueMetadata, obj.Metadata) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListEventTypesResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEventTypesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEventTypesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListEventTypesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetEventTypes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEventTypesResponse{} + var expected []string + obj.EventTypes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventTypes(), "getter should return the property value") + }) + + t.Run("GetEventTypes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEventTypesResponse{} + obj.EventTypes = nil + + // Act & Assert + assert.Nil(t, obj.GetEventTypes(), "getter should return nil when property is nil") + }) + + t.Run("GetEventTypes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListEventTypesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventTypes() // Should return zero value + }) + + t.Run("GetMetadata", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEventTypesResponse{} + var expected []*EventTypeMetadata + obj.Metadata = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMetadata(), "getter should return the property value") + }) + + t.Run("GetMetadata_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEventTypesResponse{} + obj.Metadata = nil + + // Act & Assert + assert.Nil(t, obj.GetMetadata(), "getter should return nil when property is nil") + }) + + t.Run("GetMetadata_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListEventTypesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMetadata() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListEventTypesResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEventTypesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventTypes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEventTypesResponse{} + var fernTestValueEventTypes []string + + // Act + obj.SetEventTypes(fernTestValueEventTypes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMetadata_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEventTypesResponse{} + var fernTestValueMetadata []*EventTypeMetadata + + // Act + obj.SetMetadata(fernTestValueMetadata) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchEventsFilter(t *testing.T) { + t.Run("SetEventTypes", func(t *testing.T) { + obj := &SearchEventsFilter{} + var fernTestValueEventTypes []string + obj.SetEventTypes(fernTestValueEventTypes) + assert.Equal(t, fernTestValueEventTypes, obj.EventTypes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMerchantIDs", func(t *testing.T) { + obj := &SearchEventsFilter{} + var fernTestValueMerchantIDs []string + obj.SetMerchantIDs(fernTestValueMerchantIDs) + assert.Equal(t, fernTestValueMerchantIDs, obj.MerchantIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationIDs", func(t *testing.T) { + obj := &SearchEventsFilter{} + var fernTestValueLocationIDs []string + obj.SetLocationIDs(fernTestValueLocationIDs) + assert.Equal(t, fernTestValueLocationIDs, obj.LocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &SearchEventsFilter{} + var fernTestValueCreatedAt *TimeRange + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchEventsFilter(t *testing.T) { + t.Run("GetEventTypes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsFilter{} + var expected []string + obj.EventTypes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventTypes(), "getter should return the property value") + }) + + t.Run("GetEventTypes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsFilter{} + obj.EventTypes = nil + + // Act & Assert + assert.Nil(t, obj.GetEventTypes(), "getter should return nil when property is nil") + }) + + t.Run("GetEventTypes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchEventsFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventTypes() // Should return zero value + }) + + t.Run("GetMerchantIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsFilter{} + var expected []string + obj.MerchantIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantIDs(), "getter should return the property value") + }) + + t.Run("GetMerchantIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsFilter{} + obj.MerchantIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchEventsFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantIDs() // Should return zero value + }) + + t.Run("GetLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsFilter{} + var expected []string + obj.LocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationIDs(), "getter should return the property value") + }) + + t.Run("GetLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsFilter{} + obj.LocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchEventsFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationIDs() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsFilter{} + var expected *TimeRange + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsFilter{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchEventsFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchEventsFilter(t *testing.T) { + t.Run("SetEventTypes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsFilter{} + var fernTestValueEventTypes []string + + // Act + obj.SetEventTypes(fernTestValueEventTypes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMerchantIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsFilter{} + var fernTestValueMerchantIDs []string + + // Act + obj.SetMerchantIDs(fernTestValueMerchantIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsFilter{} + var fernTestValueLocationIDs []string + + // Act + obj.SetLocationIDs(fernTestValueLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsFilter{} + var fernTestValueCreatedAt *TimeRange + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchEventsQuery(t *testing.T) { + t.Run("SetFilter", func(t *testing.T) { + obj := &SearchEventsQuery{} + var fernTestValueFilter *SearchEventsFilter + obj.SetFilter(fernTestValueFilter) + assert.Equal(t, fernTestValueFilter, obj.Filter) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSort", func(t *testing.T) { + obj := &SearchEventsQuery{} + var fernTestValueSort *SearchEventsSort + obj.SetSort(fernTestValueSort) + assert.Equal(t, fernTestValueSort, obj.Sort) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchEventsQuery(t *testing.T) { + t.Run("GetFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsQuery{} + var expected *SearchEventsFilter + obj.Filter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFilter(), "getter should return the property value") + }) + + t.Run("GetFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsQuery{} + obj.Filter = nil + + // Act & Assert + assert.Nil(t, obj.GetFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchEventsQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFilter() // Should return zero value + }) + + t.Run("GetSort", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsQuery{} + var expected *SearchEventsSort + obj.Sort = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSort(), "getter should return the property value") + }) + + t.Run("GetSort_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsQuery{} + obj.Sort = nil + + // Act & Assert + assert.Nil(t, obj.GetSort(), "getter should return nil when property is nil") + }) + + t.Run("GetSort_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchEventsQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSort() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchEventsQuery(t *testing.T) { + t.Run("SetFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsQuery{} + var fernTestValueFilter *SearchEventsFilter + + // Act + obj.SetFilter(fernTestValueFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSort_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsQuery{} + var fernTestValueSort *SearchEventsSort + + // Act + obj.SetSort(fernTestValueSort) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchEventsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &SearchEventsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEvents", func(t *testing.T) { + obj := &SearchEventsResponse{} + var fernTestValueEvents []*Event + obj.SetEvents(fernTestValueEvents) + assert.Equal(t, fernTestValueEvents, obj.Events) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMetadata", func(t *testing.T) { + obj := &SearchEventsResponse{} + var fernTestValueMetadata []*EventMetadata + obj.SetMetadata(fernTestValueMetadata) + assert.Equal(t, fernTestValueMetadata, obj.Metadata) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchEventsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchEventsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchEventsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetEvents", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsResponse{} + var expected []*Event + obj.Events = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEvents(), "getter should return the property value") + }) + + t.Run("GetEvents_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsResponse{} + obj.Events = nil + + // Act & Assert + assert.Nil(t, obj.GetEvents(), "getter should return nil when property is nil") + }) + + t.Run("GetEvents_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchEventsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEvents() // Should return zero value + }) + + t.Run("GetMetadata", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsResponse{} + var expected []*EventMetadata + obj.Metadata = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMetadata(), "getter should return the property value") + }) + + t.Run("GetMetadata_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsResponse{} + obj.Metadata = nil + + // Act & Assert + assert.Nil(t, obj.GetMetadata(), "getter should return nil when property is nil") + }) + + t.Run("GetMetadata_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchEventsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMetadata() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchEventsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchEventsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEvents_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsResponse{} + var fernTestValueEvents []*Event + + // Act + obj.SetEvents(fernTestValueEvents) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMetadata_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsResponse{} + var fernTestValueMetadata []*EventMetadata + + // Act + obj.SetMetadata(fernTestValueMetadata) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchEventsSort(t *testing.T) { + t.Run("SetOrder", func(t *testing.T) { + obj := &SearchEventsSort{} + var fernTestValueOrder *SortOrder + obj.SetOrder(fernTestValueOrder) + assert.Equal(t, fernTestValueOrder, obj.Order) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchEventsSort(t *testing.T) { + t.Run("GetOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsSort{} + var expected *SortOrder + obj.Order = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrder(), "getter should return the property value") + }) + + t.Run("GetOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsSort{} + obj.Order = nil + + // Act & Assert + assert.Nil(t, obj.GetOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchEventsSort + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrder() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchEventsSort(t *testing.T) { + t.Run("SetOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsSort{} + var fernTestValueOrder *SortOrder + + // Act + obj.SetOrder(fernTestValueOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingDisableEventsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisableEventsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DisableEventsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DisableEventsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DisableEventsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingEnableEventsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EnableEventsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled EnableEventsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj EnableEventsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj EnableEventsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Event{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Event + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Event + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Event + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled EventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj EventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj EventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingEventMetadata(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventMetadata{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled EventMetadata + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj EventMetadata + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj EventMetadata + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListEventTypesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEventTypesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListEventTypesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListEventTypesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListEventTypesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchEventsFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchEventsFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchEventsFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchEventsFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchEventsQuery(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsQuery{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchEventsQuery + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchEventsQuery + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchEventsQuery + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchEventsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchEventsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchEventsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchEventsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchEventsSort(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchEventsSort{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchEventsSort + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchEventsSort + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchEventsSort + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringDisableEventsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DisableEventsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisableEventsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringEnableEventsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &EnableEventsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *EnableEventsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Event{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Event + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &EventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *EventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringEventMetadata(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &EventMetadata{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *EventMetadata + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListEventTypesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListEventTypesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListEventTypesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchEventsFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchEventsFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchEventsFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchEventsQuery(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchEventsQuery{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchEventsQuery + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchEventsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchEventsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchEventsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchEventsSort(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchEventsSort{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchEventsSort + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestExtraPropertiesDisableEventsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DisableEventsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisableEventsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesEnableEventsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &EnableEventsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *EnableEventsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Event{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Event + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &EventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *EventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesEventMetadata(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &EventMetadata{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *EventMetadata + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListEventTypesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListEventTypesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListEventTypesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchEventsFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchEventsFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchEventsFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchEventsQuery(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchEventsQuery{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchEventsQuery + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchEventsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchEventsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchEventsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchEventsSort(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchEventsSort{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchEventsSort + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/gift_cards.go b/gift_cards.go index 74942e0..d8c669e 100644 --- a/gift_cards.go +++ b/gift_cards.go @@ -45,6 +45,27 @@ func (l *LinkCustomerToGiftCardRequest) SetCustomerID(customerID string) { l.require(linkCustomerToGiftCardRequestFieldCustomerID) } +func (l *LinkCustomerToGiftCardRequest) UnmarshalJSON(data []byte) error { + type unmarshaler LinkCustomerToGiftCardRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *l = LinkCustomerToGiftCardRequest(body) + return nil +} + +func (l *LinkCustomerToGiftCardRequest) MarshalJSON() ([]byte, error) { + type embed LinkCustomerToGiftCardRequest + var marshaler = struct { + embed + }{ + embed: embed(*l), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, l.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( unlinkCustomerFromGiftCardRequestFieldGiftCardID = big.NewInt(1 << 0) unlinkCustomerFromGiftCardRequestFieldCustomerID = big.NewInt(1 << 1) @@ -81,6 +102,27 @@ func (u *UnlinkCustomerFromGiftCardRequest) SetCustomerID(customerID string) { u.require(unlinkCustomerFromGiftCardRequestFieldCustomerID) } +func (u *UnlinkCustomerFromGiftCardRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UnlinkCustomerFromGiftCardRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UnlinkCustomerFromGiftCardRequest(body) + return nil +} + +func (u *UnlinkCustomerFromGiftCardRequest) MarshalJSON() ([]byte, error) { + type embed UnlinkCustomerFromGiftCardRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( createGiftCardRequestFieldIdempotencyKey = big.NewInt(1 << 0) createGiftCardRequestFieldLocationID = big.NewInt(1 << 1) @@ -110,7 +152,7 @@ type CreateGiftCardRequest struct { // // To register an unused, physical gift card that the seller previously ordered from Square, // include `gan` and provide the GAN that is printed on the gift card. - GiftCard *GiftCard `json:"gift_card,omitempty" url:"-"` + GiftCard *GiftCard `json:"gift_card" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -144,6 +186,27 @@ func (c *CreateGiftCardRequest) SetGiftCard(giftCard *GiftCard) { c.require(createGiftCardRequestFieldGiftCard) } +func (c *CreateGiftCardRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateGiftCardRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateGiftCardRequest(body) + return nil +} + +func (c *CreateGiftCardRequest) MarshalJSON() ([]byte, error) { + type embed CreateGiftCardRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( getGiftCardsRequestFieldID = big.NewInt(1 << 0) ) @@ -198,6 +261,27 @@ func (g *GetGiftCardFromGanRequest) SetGan(gan string) { g.require(getGiftCardFromGanRequestFieldGan) } +func (g *GetGiftCardFromGanRequest) UnmarshalJSON(data []byte) error { + type unmarshaler GetGiftCardFromGanRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *g = GetGiftCardFromGanRequest(body) + return nil +} + +func (g *GetGiftCardFromGanRequest) MarshalJSON() ([]byte, error) { + type embed GetGiftCardFromGanRequest + var marshaler = struct { + embed + }{ + embed: embed(*g), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, g.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( getGiftCardFromNonceRequestFieldNonce = big.NewInt(1 << 0) ) @@ -225,6 +309,27 @@ func (g *GetGiftCardFromNonceRequest) SetNonce(nonce string) { g.require(getGiftCardFromNonceRequestFieldNonce) } +func (g *GetGiftCardFromNonceRequest) UnmarshalJSON(data []byte) error { + type unmarshaler GetGiftCardFromNonceRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *g = GetGiftCardFromNonceRequest(body) + return nil +} + +func (g *GetGiftCardFromNonceRequest) MarshalJSON() ([]byte, error) { + type embed GetGiftCardFromNonceRequest + var marshaler = struct { + embed + }{ + embed: embed(*g), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, g.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( listGiftCardsRequestFieldType = big.NewInt(1 << 0) listGiftCardsRequestFieldState = big.NewInt(1 << 1) @@ -333,6 +438,9 @@ func (c *CreateGiftCardResponse) GetGiftCard() *GiftCard { } func (c *CreateGiftCardResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -385,6 +493,9 @@ func (c *CreateGiftCardResponse) MarshalJSON() ([]byte, error) { } func (c *CreateGiftCardResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -431,6 +542,9 @@ func (g *GetGiftCardFromGanResponse) GetGiftCard() *GiftCard { } func (g *GetGiftCardFromGanResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -483,6 +597,9 @@ func (g *GetGiftCardFromGanResponse) MarshalJSON() ([]byte, error) { } func (g *GetGiftCardFromGanResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -529,6 +646,9 @@ func (g *GetGiftCardFromNonceResponse) GetGiftCard() *GiftCard { } func (g *GetGiftCardFromNonceResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -581,6 +701,9 @@ func (g *GetGiftCardFromNonceResponse) MarshalJSON() ([]byte, error) { } func (g *GetGiftCardFromNonceResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -627,6 +750,9 @@ func (g *GetGiftCardResponse) GetGiftCard() *GiftCard { } func (g *GetGiftCardResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -679,6 +805,9 @@ func (g *GetGiftCardResponse) MarshalJSON() ([]byte, error) { } func (g *GetGiftCardResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -792,6 +921,9 @@ func (g *GiftCard) GetCustomerIDs() []string { } func (g *GiftCard) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -886,6 +1018,9 @@ func (g *GiftCard) MarshalJSON() ([]byte, error) { } func (g *GiftCard) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -1008,6 +1143,9 @@ func (l *LinkCustomerToGiftCardResponse) GetGiftCard() *GiftCard { } func (l *LinkCustomerToGiftCardResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -1060,6 +1198,9 @@ func (l *LinkCustomerToGiftCardResponse) MarshalJSON() ([]byte, error) { } func (l *LinkCustomerToGiftCardResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -1119,6 +1260,9 @@ func (l *ListGiftCardsResponse) GetCursor() *string { } func (l *ListGiftCardsResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -1178,6 +1322,9 @@ func (l *ListGiftCardsResponse) MarshalJSON() ([]byte, error) { } func (l *ListGiftCardsResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -1225,6 +1372,9 @@ func (u *UnlinkCustomerFromGiftCardResponse) GetGiftCard() *GiftCard { } func (u *UnlinkCustomerFromGiftCardResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -1277,6 +1427,9 @@ func (u *UnlinkCustomerFromGiftCardResponse) MarshalJSON() ([]byte, error) { } func (u *UnlinkCustomerFromGiftCardResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value diff --git a/gift_cards_test.go b/gift_cards_test.go new file mode 100644 index 0000000..aa54b61 --- /dev/null +++ b/gift_cards_test.go @@ -0,0 +1,3032 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersLinkCustomerToGiftCardRequest(t *testing.T) { + t.Run("SetGiftCardID", func(t *testing.T) { + obj := &LinkCustomerToGiftCardRequest{} + var fernTestValueGiftCardID string + obj.SetGiftCardID(fernTestValueGiftCardID) + assert.Equal(t, fernTestValueGiftCardID, obj.GiftCardID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerID", func(t *testing.T) { + obj := &LinkCustomerToGiftCardRequest{} + var fernTestValueCustomerID string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitLinkCustomerToGiftCardRequest(t *testing.T) { + t.Run("SetGiftCardID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LinkCustomerToGiftCardRequest{} + var fernTestValueGiftCardID string + + // Act + obj.SetGiftCardID(fernTestValueGiftCardID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LinkCustomerToGiftCardRequest{} + var fernTestValueCustomerID string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUnlinkCustomerFromGiftCardRequest(t *testing.T) { + t.Run("SetGiftCardID", func(t *testing.T) { + obj := &UnlinkCustomerFromGiftCardRequest{} + var fernTestValueGiftCardID string + obj.SetGiftCardID(fernTestValueGiftCardID) + assert.Equal(t, fernTestValueGiftCardID, obj.GiftCardID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerID", func(t *testing.T) { + obj := &UnlinkCustomerFromGiftCardRequest{} + var fernTestValueCustomerID string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUnlinkCustomerFromGiftCardRequest(t *testing.T) { + t.Run("SetGiftCardID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UnlinkCustomerFromGiftCardRequest{} + var fernTestValueGiftCardID string + + // Act + obj.SetGiftCardID(fernTestValueGiftCardID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UnlinkCustomerFromGiftCardRequest{} + var fernTestValueCustomerID string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateGiftCardRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateGiftCardRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &CreateGiftCardRequest{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGiftCard", func(t *testing.T) { + obj := &CreateGiftCardRequest{} + var fernTestValueGiftCard *GiftCard + obj.SetGiftCard(fernTestValueGiftCard) + assert.Equal(t, fernTestValueGiftCard, obj.GiftCard) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateGiftCardRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateGiftCardRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateGiftCardRequest{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGiftCard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateGiftCardRequest{} + var fernTestValueGiftCard *GiftCard + + // Act + obj.SetGiftCard(fernTestValueGiftCard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetGiftCardsRequest(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &GetGiftCardsRequest{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetGiftCardsRequest(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetGiftCardsRequest{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetGiftCardFromGanRequest(t *testing.T) { + t.Run("SetGan", func(t *testing.T) { + obj := &GetGiftCardFromGanRequest{} + var fernTestValueGan string + obj.SetGan(fernTestValueGan) + assert.Equal(t, fernTestValueGan, obj.Gan) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetGiftCardFromGanRequest(t *testing.T) { + t.Run("SetGan_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetGiftCardFromGanRequest{} + var fernTestValueGan string + + // Act + obj.SetGan(fernTestValueGan) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetGiftCardFromNonceRequest(t *testing.T) { + t.Run("SetNonce", func(t *testing.T) { + obj := &GetGiftCardFromNonceRequest{} + var fernTestValueNonce string + obj.SetNonce(fernTestValueNonce) + assert.Equal(t, fernTestValueNonce, obj.Nonce) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetGiftCardFromNonceRequest(t *testing.T) { + t.Run("SetNonce_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetGiftCardFromNonceRequest{} + var fernTestValueNonce string + + // Act + obj.SetNonce(fernTestValueNonce) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListGiftCardsRequest(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &ListGiftCardsRequest{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetState", func(t *testing.T) { + obj := &ListGiftCardsRequest{} + var fernTestValueState *string + obj.SetState(fernTestValueState) + assert.Equal(t, fernTestValueState, obj.State) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListGiftCardsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListGiftCardsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerID", func(t *testing.T) { + obj := &ListGiftCardsRequest{} + var fernTestValueCustomerID *string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListGiftCardsRequest(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListGiftCardsRequest{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetState_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListGiftCardsRequest{} + var fernTestValueState *string + + // Act + obj.SetState(fernTestValueState) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListGiftCardsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListGiftCardsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListGiftCardsRequest{} + var fernTestValueCustomerID *string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateGiftCardResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateGiftCardResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGiftCard", func(t *testing.T) { + obj := &CreateGiftCardResponse{} + var fernTestValueGiftCard *GiftCard + obj.SetGiftCard(fernTestValueGiftCard) + assert.Equal(t, fernTestValueGiftCard, obj.GiftCard) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateGiftCardResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateGiftCardResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateGiftCardResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateGiftCardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetGiftCard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateGiftCardResponse{} + var expected *GiftCard + obj.GiftCard = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGiftCard(), "getter should return the property value") + }) + + t.Run("GetGiftCard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateGiftCardResponse{} + obj.GiftCard = nil + + // Act & Assert + assert.Nil(t, obj.GetGiftCard(), "getter should return nil when property is nil") + }) + + t.Run("GetGiftCard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateGiftCardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGiftCard() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateGiftCardResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateGiftCardResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGiftCard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateGiftCardResponse{} + var fernTestValueGiftCard *GiftCard + + // Act + obj.SetGiftCard(fernTestValueGiftCard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetGiftCardFromGanResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetGiftCardFromGanResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGiftCard", func(t *testing.T) { + obj := &GetGiftCardFromGanResponse{} + var fernTestValueGiftCard *GiftCard + obj.SetGiftCard(fernTestValueGiftCard) + assert.Equal(t, fernTestValueGiftCard, obj.GiftCard) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetGiftCardFromGanResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetGiftCardFromGanResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetGiftCardFromGanResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetGiftCardFromGanResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetGiftCard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetGiftCardFromGanResponse{} + var expected *GiftCard + obj.GiftCard = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGiftCard(), "getter should return the property value") + }) + + t.Run("GetGiftCard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetGiftCardFromGanResponse{} + obj.GiftCard = nil + + // Act & Assert + assert.Nil(t, obj.GetGiftCard(), "getter should return nil when property is nil") + }) + + t.Run("GetGiftCard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetGiftCardFromGanResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGiftCard() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetGiftCardFromGanResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetGiftCardFromGanResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGiftCard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetGiftCardFromGanResponse{} + var fernTestValueGiftCard *GiftCard + + // Act + obj.SetGiftCard(fernTestValueGiftCard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetGiftCardFromNonceResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetGiftCardFromNonceResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGiftCard", func(t *testing.T) { + obj := &GetGiftCardFromNonceResponse{} + var fernTestValueGiftCard *GiftCard + obj.SetGiftCard(fernTestValueGiftCard) + assert.Equal(t, fernTestValueGiftCard, obj.GiftCard) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetGiftCardFromNonceResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetGiftCardFromNonceResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetGiftCardFromNonceResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetGiftCardFromNonceResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetGiftCard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetGiftCardFromNonceResponse{} + var expected *GiftCard + obj.GiftCard = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGiftCard(), "getter should return the property value") + }) + + t.Run("GetGiftCard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetGiftCardFromNonceResponse{} + obj.GiftCard = nil + + // Act & Assert + assert.Nil(t, obj.GetGiftCard(), "getter should return nil when property is nil") + }) + + t.Run("GetGiftCard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetGiftCardFromNonceResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGiftCard() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetGiftCardFromNonceResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetGiftCardFromNonceResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGiftCard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetGiftCardFromNonceResponse{} + var fernTestValueGiftCard *GiftCard + + // Act + obj.SetGiftCard(fernTestValueGiftCard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetGiftCardResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetGiftCardResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGiftCard", func(t *testing.T) { + obj := &GetGiftCardResponse{} + var fernTestValueGiftCard *GiftCard + obj.SetGiftCard(fernTestValueGiftCard) + assert.Equal(t, fernTestValueGiftCard, obj.GiftCard) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetGiftCardResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetGiftCardResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetGiftCardResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetGiftCardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetGiftCard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetGiftCardResponse{} + var expected *GiftCard + obj.GiftCard = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGiftCard(), "getter should return the property value") + }) + + t.Run("GetGiftCard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetGiftCardResponse{} + obj.GiftCard = nil + + // Act & Assert + assert.Nil(t, obj.GetGiftCard(), "getter should return nil when property is nil") + }) + + t.Run("GetGiftCard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetGiftCardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGiftCard() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetGiftCardResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetGiftCardResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGiftCard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetGiftCardResponse{} + var fernTestValueGiftCard *GiftCard + + // Act + obj.SetGiftCard(fernTestValueGiftCard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCard(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &GiftCard{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &GiftCard{} + var fernTestValueType GiftCardType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGanSource", func(t *testing.T) { + obj := &GiftCard{} + var fernTestValueGanSource *GiftCardGanSource + obj.SetGanSource(fernTestValueGanSource) + assert.Equal(t, fernTestValueGanSource, obj.GanSource) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetState", func(t *testing.T) { + obj := &GiftCard{} + var fernTestValueState *GiftCardStatus + obj.SetState(fernTestValueState) + assert.Equal(t, fernTestValueState, obj.State) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBalanceMoney", func(t *testing.T) { + obj := &GiftCard{} + var fernTestValueBalanceMoney *Money + obj.SetBalanceMoney(fernTestValueBalanceMoney) + assert.Equal(t, fernTestValueBalanceMoney, obj.BalanceMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGan", func(t *testing.T) { + obj := &GiftCard{} + var fernTestValueGan *string + obj.SetGan(fernTestValueGan) + assert.Equal(t, fernTestValueGan, obj.Gan) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &GiftCard{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerIDs", func(t *testing.T) { + obj := &GiftCard{} + var fernTestValueCustomerIDs []string + obj.SetCustomerIDs(fernTestValueCustomerIDs) + assert.Equal(t, fernTestValueCustomerIDs, obj.CustomerIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCard(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCard{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCard{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCard + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCard{} + var expected GiftCardType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCard + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetGanSource", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCard{} + var expected *GiftCardGanSource + obj.GanSource = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGanSource(), "getter should return the property value") + }) + + t.Run("GetGanSource_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCard{} + obj.GanSource = nil + + // Act & Assert + assert.Nil(t, obj.GetGanSource(), "getter should return nil when property is nil") + }) + + t.Run("GetGanSource_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCard + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGanSource() // Should return zero value + }) + + t.Run("GetState", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCard{} + var expected *GiftCardStatus + obj.State = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetState(), "getter should return the property value") + }) + + t.Run("GetState_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCard{} + obj.State = nil + + // Act & Assert + assert.Nil(t, obj.GetState(), "getter should return nil when property is nil") + }) + + t.Run("GetState_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCard + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetState() // Should return zero value + }) + + t.Run("GetBalanceMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCard{} + var expected *Money + obj.BalanceMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBalanceMoney(), "getter should return the property value") + }) + + t.Run("GetBalanceMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCard{} + obj.BalanceMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetBalanceMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetBalanceMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCard + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBalanceMoney() // Should return zero value + }) + + t.Run("GetGan", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCard{} + var expected *string + obj.Gan = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGan(), "getter should return the property value") + }) + + t.Run("GetGan_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCard{} + obj.Gan = nil + + // Act & Assert + assert.Nil(t, obj.GetGan(), "getter should return nil when property is nil") + }) + + t.Run("GetGan_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCard + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGan() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCard{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCard{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCard + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetCustomerIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCard{} + var expected []string + obj.CustomerIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomerIDs(), "getter should return the property value") + }) + + t.Run("GetCustomerIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCard{} + obj.CustomerIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomerIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomerIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCard + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomerIDs() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCard(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCard{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCard{} + var fernTestValueType GiftCardType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGanSource_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCard{} + var fernTestValueGanSource *GiftCardGanSource + + // Act + obj.SetGanSource(fernTestValueGanSource) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetState_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCard{} + var fernTestValueState *GiftCardStatus + + // Act + obj.SetState(fernTestValueState) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBalanceMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCard{} + var fernTestValueBalanceMoney *Money + + // Act + obj.SetBalanceMoney(fernTestValueBalanceMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGan_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCard{} + var fernTestValueGan *string + + // Act + obj.SetGan(fernTestValueGan) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCard{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCard{} + var fernTestValueCustomerIDs []string + + // Act + obj.SetCustomerIDs(fernTestValueCustomerIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLinkCustomerToGiftCardResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &LinkCustomerToGiftCardResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGiftCard", func(t *testing.T) { + obj := &LinkCustomerToGiftCardResponse{} + var fernTestValueGiftCard *GiftCard + obj.SetGiftCard(fernTestValueGiftCard) + assert.Equal(t, fernTestValueGiftCard, obj.GiftCard) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLinkCustomerToGiftCardResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LinkCustomerToGiftCardResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LinkCustomerToGiftCardResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LinkCustomerToGiftCardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetGiftCard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LinkCustomerToGiftCardResponse{} + var expected *GiftCard + obj.GiftCard = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGiftCard(), "getter should return the property value") + }) + + t.Run("GetGiftCard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LinkCustomerToGiftCardResponse{} + obj.GiftCard = nil + + // Act & Assert + assert.Nil(t, obj.GetGiftCard(), "getter should return nil when property is nil") + }) + + t.Run("GetGiftCard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LinkCustomerToGiftCardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGiftCard() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLinkCustomerToGiftCardResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LinkCustomerToGiftCardResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGiftCard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LinkCustomerToGiftCardResponse{} + var fernTestValueGiftCard *GiftCard + + // Act + obj.SetGiftCard(fernTestValueGiftCard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListGiftCardsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &ListGiftCardsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGiftCards", func(t *testing.T) { + obj := &ListGiftCardsResponse{} + var fernTestValueGiftCards []*GiftCard + obj.SetGiftCards(fernTestValueGiftCards) + assert.Equal(t, fernTestValueGiftCards, obj.GiftCards) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListGiftCardsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListGiftCardsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListGiftCardsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListGiftCardsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListGiftCardsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetGiftCards", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListGiftCardsResponse{} + var expected []*GiftCard + obj.GiftCards = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGiftCards(), "getter should return the property value") + }) + + t.Run("GetGiftCards_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListGiftCardsResponse{} + obj.GiftCards = nil + + // Act & Assert + assert.Nil(t, obj.GetGiftCards(), "getter should return nil when property is nil") + }) + + t.Run("GetGiftCards_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListGiftCardsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGiftCards() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListGiftCardsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListGiftCardsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListGiftCardsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListGiftCardsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListGiftCardsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGiftCards_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListGiftCardsResponse{} + var fernTestValueGiftCards []*GiftCard + + // Act + obj.SetGiftCards(fernTestValueGiftCards) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListGiftCardsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUnlinkCustomerFromGiftCardResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &UnlinkCustomerFromGiftCardResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGiftCard", func(t *testing.T) { + obj := &UnlinkCustomerFromGiftCardResponse{} + var fernTestValueGiftCard *GiftCard + obj.SetGiftCard(fernTestValueGiftCard) + assert.Equal(t, fernTestValueGiftCard, obj.GiftCard) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUnlinkCustomerFromGiftCardResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UnlinkCustomerFromGiftCardResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UnlinkCustomerFromGiftCardResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UnlinkCustomerFromGiftCardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetGiftCard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UnlinkCustomerFromGiftCardResponse{} + var expected *GiftCard + obj.GiftCard = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGiftCard(), "getter should return the property value") + }) + + t.Run("GetGiftCard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UnlinkCustomerFromGiftCardResponse{} + obj.GiftCard = nil + + // Act & Assert + assert.Nil(t, obj.GetGiftCard(), "getter should return nil when property is nil") + }) + + t.Run("GetGiftCard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UnlinkCustomerFromGiftCardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGiftCard() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUnlinkCustomerFromGiftCardResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UnlinkCustomerFromGiftCardResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGiftCard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UnlinkCustomerFromGiftCardResponse{} + var fernTestValueGiftCard *GiftCard + + // Act + obj.SetGiftCard(fernTestValueGiftCard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingCreateGiftCardResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateGiftCardResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateGiftCardResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateGiftCardResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateGiftCardResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetGiftCardFromGanResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetGiftCardFromGanResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetGiftCardFromGanResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetGiftCardFromGanResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetGiftCardFromGanResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetGiftCardFromNonceResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetGiftCardFromNonceResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetGiftCardFromNonceResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetGiftCardFromNonceResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetGiftCardFromNonceResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetGiftCardResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetGiftCardResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetGiftCardResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetGiftCardResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetGiftCardResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCard(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCard{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCard + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCard + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCard + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLinkCustomerToGiftCardResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LinkCustomerToGiftCardResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LinkCustomerToGiftCardResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LinkCustomerToGiftCardResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LinkCustomerToGiftCardResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListGiftCardsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListGiftCardsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListGiftCardsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListGiftCardsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListGiftCardsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUnlinkCustomerFromGiftCardResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UnlinkCustomerFromGiftCardResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UnlinkCustomerFromGiftCardResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UnlinkCustomerFromGiftCardResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UnlinkCustomerFromGiftCardResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringCreateGiftCardResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateGiftCardResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateGiftCardResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetGiftCardFromGanResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetGiftCardFromGanResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetGiftCardFromGanResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetGiftCardFromNonceResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetGiftCardFromNonceResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetGiftCardFromNonceResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetGiftCardResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetGiftCardResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetGiftCardResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCard(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCard{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCard + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLinkCustomerToGiftCardResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LinkCustomerToGiftCardResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LinkCustomerToGiftCardResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListGiftCardsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListGiftCardsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListGiftCardsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUnlinkCustomerFromGiftCardResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UnlinkCustomerFromGiftCardResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UnlinkCustomerFromGiftCardResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestEnumGiftCardGanSource(t *testing.T) { + t.Run("NewFromString_SQUARE", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardGanSourceFromString("SQUARE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardGanSource("SQUARE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_OTHER", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardGanSourceFromString("OTHER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardGanSource("OTHER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewGiftCardGanSourceFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewGiftCardGanSourceFromString("SQUARE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumGiftCardStatus(t *testing.T) { + t.Run("NewFromString_ACTIVE", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardStatusFromString("ACTIVE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardStatus("ACTIVE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DEACTIVATED", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardStatusFromString("DEACTIVATED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardStatus("DEACTIVATED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BLOCKED", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardStatusFromString("BLOCKED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardStatus("BLOCKED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PENDING", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardStatusFromString("PENDING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardStatus("PENDING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewGiftCardStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewGiftCardStatusFromString("ACTIVE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumGiftCardType(t *testing.T) { + t.Run("NewFromString_PHYSICAL", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardTypeFromString("PHYSICAL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardType("PHYSICAL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DIGITAL", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardTypeFromString("DIGITAL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardType("DIGITAL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewGiftCardTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewGiftCardTypeFromString("PHYSICAL") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestExtraPropertiesCreateGiftCardResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateGiftCardResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateGiftCardResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetGiftCardFromGanResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetGiftCardFromGanResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetGiftCardFromGanResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetGiftCardFromNonceResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetGiftCardFromNonceResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetGiftCardFromNonceResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetGiftCardResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetGiftCardResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetGiftCardResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCard(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCard{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCard + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLinkCustomerToGiftCardResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LinkCustomerToGiftCardResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LinkCustomerToGiftCardResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListGiftCardsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListGiftCardsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListGiftCardsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUnlinkCustomerFromGiftCardResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UnlinkCustomerFromGiftCardResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UnlinkCustomerFromGiftCardResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/giftcards/activities.go b/giftcards/activities.go index 7908e26..bfbfaad 100644 --- a/giftcards/activities.go +++ b/giftcards/activities.go @@ -3,7 +3,9 @@ package giftcards import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" big "math/big" ) @@ -17,7 +19,7 @@ type CreateGiftCardActivityRequest struct { IdempotencyKey string `json:"idempotency_key" url:"-"` // The activity to create for the gift card. This activity must specify `gift_card_id` or `gift_card_gan` for the target // gift card, the `location_id` where the activity occurred, and the activity `type` along with the corresponding activity details. - GiftCardActivity *v3.GiftCardActivity `json:"gift_card_activity,omitempty" url:"-"` + GiftCardActivity *v3.GiftCardActivity `json:"gift_card_activity" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -44,6 +46,27 @@ func (c *CreateGiftCardActivityRequest) SetGiftCardActivity(giftCardActivity *v3 c.require(createGiftCardActivityRequestFieldGiftCardActivity) } +func (c *CreateGiftCardActivityRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateGiftCardActivityRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateGiftCardActivityRequest(body) + return nil +} + +func (c *CreateGiftCardActivityRequest) MarshalJSON() ([]byte, error) { + type embed CreateGiftCardActivityRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( listActivitiesRequestFieldGiftCardID = big.NewInt(1 << 0) listActivitiesRequestFieldType = big.NewInt(1 << 1) diff --git a/giftcards/activities/gift_cards_activities_test/gift_cards_activities_test.go b/giftcards/activities/gift_cards_activities_test/gift_cards_activities_test.go new file mode 100644 index 0000000..9d70970 --- /dev/null +++ b/giftcards/activities/gift_cards_activities_test/gift_cards_activities_test.go @@ -0,0 +1,152 @@ +// Code generated by Fern. DO NOT EDIT. + +package gift_cards_activities_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + giftcards "github.com/square/square-go-sdk/v3/giftcards" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestGiftCardsActivitiesListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &giftcards.ListActivitiesRequest{ + GiftCardID: square.String( + "gift_card_id", + ), + Type: square.String( + "type", + ), + LocationID: square.String( + "location_id", + ), + BeginTime: square.String( + "begin_time", + ), + EndTime: square.String( + "end_time", + ), + Limit: square.Int( + 1, + ), + Cursor: square.String( + "cursor", + ), + SortOrder: square.String( + "sort_order", + ), + } + _, invocationErr := client.GiftCards.Activities.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestGiftCardsActivitiesListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestGiftCardsActivitiesListWithWireMock", "GET", "/v2/gift-cards/activities", map[string]string{"gift_card_id": "gift_card_id", "type": "type", "location_id": "location_id", "begin_time": "begin_time", "end_time": "end_time", "limit": "1", "cursor": "cursor", "sort_order": "sort_order"}, 1) +} + +func TestGiftCardsActivitiesCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &giftcards.CreateGiftCardActivityRequest{ + IdempotencyKey: "U16kfr-kA70er-q4Rsym-7U7NnY", + GiftCardActivity: &square.GiftCardActivity{ + Type: square.GiftCardActivityTypeActivate, + LocationID: "81FN9BNFZTKS4", + GiftCardID: square.String( + "gftc:6d55a72470d940c6ba09c0ab8ad08d20", + ), + ActivateActivityDetails: &square.GiftCardActivityActivate{ + OrderID: square.String( + "jJNGHm4gLI6XkFbwtiSLqK72KkAZY", + ), + LineItemUID: square.String( + "eIWl7X0nMuO9Ewbh0ChIx", + ), + }, + }, + } + _, invocationErr := client.GiftCards.Activities.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestGiftCardsActivitiesCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestGiftCardsActivitiesCreateWithWireMock", "POST", "/v2/gift-cards/activities", nil, 1) +} diff --git a/giftcards/activities_test.go b/giftcards/activities_test.go new file mode 100644 index 0000000..d9fc634 --- /dev/null +++ b/giftcards/activities_test.go @@ -0,0 +1,373 @@ +// Code generated by Fern. DO NOT EDIT. + +package giftcards + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersCreateGiftCardActivityRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateGiftCardActivityRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateGiftCardActivityRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateGiftCardActivityRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListActivitiesRequest(t *testing.T) { + t.Run("SetGiftCardID", func(t *testing.T) { + obj := &ListActivitiesRequest{} + var fernTestValueGiftCardID *string + obj.SetGiftCardID(fernTestValueGiftCardID) + assert.Equal(t, fernTestValueGiftCardID, obj.GiftCardID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &ListActivitiesRequest{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &ListActivitiesRequest{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBeginTime", func(t *testing.T) { + obj := &ListActivitiesRequest{} + var fernTestValueBeginTime *string + obj.SetBeginTime(fernTestValueBeginTime) + assert.Equal(t, fernTestValueBeginTime, obj.BeginTime) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEndTime", func(t *testing.T) { + obj := &ListActivitiesRequest{} + var fernTestValueEndTime *string + obj.SetEndTime(fernTestValueEndTime) + assert.Equal(t, fernTestValueEndTime, obj.EndTime) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListActivitiesRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListActivitiesRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSortOrder", func(t *testing.T) { + obj := &ListActivitiesRequest{} + var fernTestValueSortOrder *string + obj.SetSortOrder(fernTestValueSortOrder) + assert.Equal(t, fernTestValueSortOrder, obj.SortOrder) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListActivitiesRequest(t *testing.T) { + t.Run("SetGiftCardID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListActivitiesRequest{} + var fernTestValueGiftCardID *string + + // Act + obj.SetGiftCardID(fernTestValueGiftCardID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListActivitiesRequest{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListActivitiesRequest{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBeginTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListActivitiesRequest{} + var fernTestValueBeginTime *string + + // Act + obj.SetBeginTime(fernTestValueBeginTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEndTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListActivitiesRequest{} + var fernTestValueEndTime *string + + // Act + obj.SetEndTime(fernTestValueEndTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListActivitiesRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListActivitiesRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSortOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListActivitiesRequest{} + var fernTestValueSortOrder *string + + // Act + obj.SetSortOrder(fernTestValueSortOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/giftcards/gift_cards_test/gift_cards_test.go b/giftcards/gift_cards_test/gift_cards_test.go new file mode 100644 index 0000000..6827596 --- /dev/null +++ b/giftcards/gift_cards_test/gift_cards_test.go @@ -0,0 +1,258 @@ +// Code generated by Fern. DO NOT EDIT. + +package gift_cards_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestGiftCardsListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.ListGiftCardsRequest{ + Type: square.String( + "type", + ), + State: square.String( + "state", + ), + Limit: square.Int( + 1, + ), + Cursor: square.String( + "cursor", + ), + CustomerID: square.String( + "customer_id", + ), + } + _, invocationErr := client.GiftCards.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestGiftCardsListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestGiftCardsListWithWireMock", "GET", "/v2/gift-cards", map[string]string{"type": "type", "state": "state", "limit": "1", "cursor": "cursor", "customer_id": "customer_id"}, 1) +} + +func TestGiftCardsCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CreateGiftCardRequest{ + IdempotencyKey: "NC9Tm69EjbjtConu", + LocationID: "81FN9BNFZTKS4", + GiftCard: &square.GiftCard{ + Type: square.GiftCardTypeDigital, + }, + } + _, invocationErr := client.GiftCards.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestGiftCardsCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestGiftCardsCreateWithWireMock", "POST", "/v2/gift-cards", nil, 1) +} + +func TestGiftCardsGetFromGanWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.GetGiftCardFromGanRequest{ + Gan: "7783320001001635", + } + _, invocationErr := client.GiftCards.GetFromGan( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestGiftCardsGetFromGanWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestGiftCardsGetFromGanWithWireMock", "POST", "/v2/gift-cards/from-gan", nil, 1) +} + +func TestGiftCardsGetFromNonceWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.GetGiftCardFromNonceRequest{ + Nonce: "cnon:7783322135245171", + } + _, invocationErr := client.GiftCards.GetFromNonce( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestGiftCardsGetFromNonceWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestGiftCardsGetFromNonceWithWireMock", "POST", "/v2/gift-cards/from-nonce", nil, 1) +} + +func TestGiftCardsLinkCustomerWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.LinkCustomerToGiftCardRequest{ + GiftCardID: "gift_card_id", + CustomerID: "GKY0FZ3V717AH8Q2D821PNT2ZW", + } + _, invocationErr := client.GiftCards.LinkCustomer( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestGiftCardsLinkCustomerWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestGiftCardsLinkCustomerWithWireMock", "POST", "/v2/gift-cards/gift_card_id/link-customer", nil, 1) +} + +func TestGiftCardsUnlinkCustomerWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.UnlinkCustomerFromGiftCardRequest{ + GiftCardID: "gift_card_id", + CustomerID: "GKY0FZ3V717AH8Q2D821PNT2ZW", + } + _, invocationErr := client.GiftCards.UnlinkCustomer( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestGiftCardsUnlinkCustomerWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestGiftCardsUnlinkCustomerWithWireMock", "POST", "/v2/gift-cards/gift_card_id/unlink-customer", nil, 1) +} + +func TestGiftCardsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.GetGiftCardsRequest{ + ID: "id", + } + _, invocationErr := client.GiftCards.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestGiftCardsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestGiftCardsGetWithWireMock", "GET", "/v2/gift-cards/id", nil, 1) +} diff --git a/internal/explicit_fields_test.go b/internal/explicit_fields_test.go index 3d05e88..fb67558 100644 --- a/internal/explicit_fields_test.go +++ b/internal/explicit_fields_test.go @@ -483,6 +483,155 @@ func TestHandleExplicitFieldsNestedStruct(t *testing.T) { } } +// Test for setter method documentation and behavior +func TestSetterMethodsDocumentation(t *testing.T) { + t.Run("setter prevents omitempty for nil values", func(t *testing.T) { + s := &testExplicitFieldsStruct{} + + // Use setter to explicitly set nil - this should prevent omitempty + s.SetName(nil) + s.SetCode(nil) + + bytes, err := s.MarshalJSON() + require.NoError(t, err) + + // Both fields should be included as null, not omitted + assert.JSONEq(t, `{"name":null,"code":null}`, string(bytes)) + }) + + t.Run("setter prevents omitempty for empty slice", func(t *testing.T) { + s := &testExplicitFieldsStruct{} + + // Use setter to explicitly set empty slice + s.SetTags([]string{}) + + bytes, err := s.MarshalJSON() + require.NoError(t, err) + + // Empty slice should be included as [], not omitted + assert.JSONEq(t, `{"tags":[]}`, string(bytes)) + }) + + t.Run("setter prevents omitempty for zero values", func(t *testing.T) { + s := &testExplicitFieldsStruct{} + + // Use setter to explicitly set zero values + s.SetCount(intPtr(0)) + s.SetEnabled(boolPtr(false)) + + bytes, err := s.MarshalJSON() + require.NoError(t, err) + + // Zero values should be included, not omitted + assert.JSONEq(t, `{"count":0,"enabled":false}`, string(bytes)) + }) + + t.Run("direct assignment is omitted when nil", func(t *testing.T) { + s := &testExplicitFieldsStruct{ + Name: nil, // Direct assignment, not using setter + Code: nil, // Direct assignment, not using setter + } + + bytes, err := s.MarshalJSON() + require.NoError(t, err) + + // Fields not set via setter should be omitted when nil + assert.JSONEq(t, `{}`, string(bytes)) + }) + + t.Run("mix of setter and direct assignment", func(t *testing.T) { + s := &testExplicitFieldsStruct{ + Name: stringPtr("direct"), // Direct assignment + Count: intPtr(42), // Direct assignment + } + s.SetCode(nil) // Setter with nil + s.SetEnabled(boolPtr(false)) // Setter with zero value + + bytes, err := s.MarshalJSON() + require.NoError(t, err) + + // Direct assignments included if non-nil, setter fields always included + assert.JSONEq(t, `{"name":"direct","code":null,"count":42,"enabled":false}`, string(bytes)) + }) +} + +// Test for complex scenarios with multiple setters +func TestComplexSetterScenarios(t *testing.T) { + t.Run("multiple setter calls on same field", func(t *testing.T) { + s := &testExplicitFieldsStruct{} + + // Call setter multiple times - last one should win + s.SetName(stringPtr("first")) + s.SetName(stringPtr("second")) + s.SetName(nil) // Final value is nil + + bytes, err := s.MarshalJSON() + require.NoError(t, err) + + // Should serialize the last set value (nil) + assert.JSONEq(t, `{"name":null}`, string(bytes)) + }) + + t.Run("setter after direct assignment", func(t *testing.T) { + s := &testExplicitFieldsStruct{ + Name: stringPtr("direct"), + } + + // Override with setter + s.SetName(nil) + + bytes, err := s.MarshalJSON() + require.NoError(t, err) + + // Setter should mark field as explicit, so nil is serialized + assert.JSONEq(t, `{"name":null}`, string(bytes)) + }) + + t.Run("all fields set via setters", func(t *testing.T) { + s := &testExplicitFieldsStruct{} + s.SetName(nil) + s.SetCode(stringPtr("")) // Empty string + s.SetCount(intPtr(0)) // Zero + s.SetEnabled(boolPtr(false)) // False + s.SetTags(nil) // Nil slice + + bytes, err := s.MarshalJSON() + require.NoError(t, err) + + // All fields should be present even with nil/zero values + assert.JSONEq(t, `{"name":null,"code":"","count":0,"enabled":false,"tags":null}`, string(bytes)) + }) +} + +// Test for backwards compatibility +func TestBackwardsCompatibility(t *testing.T) { + t.Run("struct without setters behaves normally", func(t *testing.T) { + s := &testStructWithoutExplicitFields{ + Name: stringPtr("test"), + Code: nil, // This should be omitted + } + + bytes, err := json.Marshal(s) + require.NoError(t, err) + + // Without setters, omitempty works normally + assert.JSONEq(t, `{"name":"test"}`, string(bytes)) + }) + + t.Run("struct with explicit fields works with standard json.Marshal", func(t *testing.T) { + s := &testExplicitFieldsStruct{ + Name: stringPtr("test"), + } + s.SetCode(nil) + + // Using the custom MarshalJSON + bytes, err := s.MarshalJSON() + require.NoError(t, err) + + assert.JSONEq(t, `{"name":"test","code":null}`, string(bytes)) + }) +} + // Helper functions func stringPtr(s string) *string { return &s diff --git a/internal/multipart.go b/internal/multipart.go index 67a2229..d8d9955 100644 --- a/internal/multipart.go +++ b/internal/multipart.go @@ -119,6 +119,9 @@ func (w *MultipartWriter) writeFile( filename = getFilename(file) contentType = getContentType(file) ) + if filename == "" { + filename = field + } if contentType == "" { contentType = defaultContentType } diff --git a/internal/multipart_test.go b/internal/multipart_test.go index 07008dd..13201f7 100644 --- a/internal/multipart_test.go +++ b/internal/multipart_test.go @@ -1,6 +1,7 @@ package internal import ( + "bytes" "encoding/json" "io" "mime/multipart" @@ -174,6 +175,81 @@ func TestMultipartWriter(t *testing.T) { } }) + t.Run("write file without name", func(t *testing.T) { + tests := []struct { + desc string + giveField string + giveReader func(content string) io.Reader + giveContent string + wantFilename string + }{ + { + desc: "strings.Reader without name uses field name as filename", + giveField: "file", + giveReader: func(content string) io.Reader { + return strings.NewReader(content) + }, + giveContent: "test content", + wantFilename: "file", + }, + { + desc: "bytes.Reader without name uses field name as filename", + giveField: "document", + giveReader: func(content string) io.Reader { + return bytes.NewReader([]byte(content)) + }, + giveContent: "some data", + wantFilename: "document", + }, + { + desc: "bytes.Buffer without name uses field name as filename", + giveField: "upload", + giveReader: func(content string) io.Reader { + return bytes.NewBufferString(content) + }, + giveContent: "buffer content", + wantFilename: "upload", + }, + } + + for _, tt := range tests { + t.Run(tt.desc, func(t *testing.T) { + w := NewMultipartWriter() + + reader := tt.giveReader(tt.giveContent) + require.NoError(t, w.WriteFile(tt.giveField, reader)) + require.NoError(t, w.Close()) + + multipartReader := multipart.NewReader(w.Buffer(), w.writer.Boundary()) + form, err := multipartReader.ReadForm(maxFormMemory) + require.NoError(t, err) + defer func() { + require.NoError(t, form.RemoveAll()) + }() + + files := form.File[tt.giveField] + require.Len(t, files, 1) + + file := files[0] + assert.Equal(t, tt.wantFilename, file.Filename) + + // Verify the Content-Disposition header includes the filename attribute + contentDisposition := file.Header.Get("Content-Disposition") + assert.Contains(t, contentDisposition, `filename="`+tt.wantFilename+`"`) + + f, err := file.Open() + require.NoError(t, err) + defer func() { + require.NoError(t, f.Close()) + }() + + content, err := io.ReadAll(f) + require.NoError(t, err) + assert.Equal(t, tt.giveContent, string(content)) + }) + } + }) + t.Run("write JSON", func(t *testing.T) { type testStruct struct { Name string `json:"name"` diff --git a/inventory.go b/inventory.go index 8e0a67b..23427ab 100644 --- a/inventory.go +++ b/inventory.go @@ -292,6 +292,9 @@ func (b *BatchChangeInventoryRequest) GetIgnoreUnchangedCounts() *bool { } func (b *BatchChangeInventoryRequest) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -351,6 +354,9 @@ func (b *BatchChangeInventoryRequest) MarshalJSON() ([]byte, error) { } func (b *BatchChangeInventoryRequest) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -405,6 +411,9 @@ func (b *BatchChangeInventoryResponse) GetChanges() []*InventoryChange { } func (b *BatchChangeInventoryResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -464,6 +473,9 @@ func (b *BatchChangeInventoryResponse) MarshalJSON() ([]byte, error) { } func (b *BatchChangeInventoryResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -521,6 +533,9 @@ func (b *BatchGetInventoryChangesResponse) GetCursor() *string { } func (b *BatchGetInventoryChangesResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -580,6 +595,9 @@ func (b *BatchGetInventoryChangesResponse) MarshalJSON() ([]byte, error) { } func (b *BatchGetInventoryChangesResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -673,6 +691,9 @@ func (b *BatchGetInventoryCountsRequest) GetLimit() *int { } func (b *BatchGetInventoryCountsRequest) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -753,6 +774,9 @@ func (b *BatchGetInventoryCountsRequest) MarshalJSON() ([]byte, error) { } func (b *BatchGetInventoryCountsRequest) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -811,6 +835,9 @@ func (b *BatchGetInventoryCountsResponse) GetCursor() *string { } func (b *BatchGetInventoryCountsResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -870,6 +897,9 @@ func (b *BatchGetInventoryCountsResponse) MarshalJSON() ([]byte, error) { } func (b *BatchGetInventoryCountsResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -986,6 +1016,9 @@ func (b *BatchRetrieveInventoryChangesRequest) GetLimit() *int { } func (b *BatchRetrieveInventoryChangesRequest) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -1080,6 +1113,9 @@ func (b *BatchRetrieveInventoryChangesRequest) MarshalJSON() ([]byte, error) { } func (b *BatchRetrieveInventoryChangesRequest) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -1124,6 +1160,9 @@ func (g *GetInventoryAdjustmentResponse) GetAdjustment() *InventoryAdjustment { } func (g *GetInventoryAdjustmentResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -1176,6 +1215,9 @@ func (g *GetInventoryAdjustmentResponse) MarshalJSON() ([]byte, error) { } func (g *GetInventoryAdjustmentResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -1233,6 +1275,9 @@ func (g *GetInventoryChangesResponse) GetCursor() *string { } func (g *GetInventoryChangesResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -1292,6 +1337,9 @@ func (g *GetInventoryChangesResponse) MarshalJSON() ([]byte, error) { } func (g *GetInventoryChangesResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -1350,6 +1398,9 @@ func (g *GetInventoryCountResponse) GetCursor() *string { } func (g *GetInventoryCountResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -1409,6 +1460,9 @@ func (g *GetInventoryCountResponse) MarshalJSON() ([]byte, error) { } func (g *GetInventoryCountResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -1453,6 +1507,9 @@ func (g *GetInventoryPhysicalCountResponse) GetCount() *InventoryPhysicalCount { } func (g *GetInventoryPhysicalCountResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -1505,6 +1562,9 @@ func (g *GetInventoryPhysicalCountResponse) MarshalJSON() ([]byte, error) { } func (g *GetInventoryPhysicalCountResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -1549,6 +1609,9 @@ func (g *GetInventoryTransferResponse) GetTransfer() *InventoryTransfer { } func (g *GetInventoryTransferResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -1601,6 +1664,9 @@ func (g *GetInventoryTransferResponse) MarshalJSON() ([]byte, error) { } func (g *GetInventoryTransferResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -1846,6 +1912,9 @@ func (i *InventoryAdjustment) GetAdjustmentGroup() *InventoryAdjustmentGroup { } func (i *InventoryAdjustment) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -2017,6 +2086,9 @@ func (i *InventoryAdjustment) MarshalJSON() ([]byte, error) { } func (i *InventoryAdjustment) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -2088,6 +2160,9 @@ func (i *InventoryAdjustmentGroup) GetToState() *InventoryState { } func (i *InventoryAdjustmentGroup) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -2154,6 +2229,9 @@ func (i *InventoryAdjustmentGroup) MarshalJSON() ([]byte, error) { } func (i *InventoryAdjustmentGroup) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -2249,6 +2327,9 @@ func (i *InventoryChange) GetMeasurementUnitID() *string { } func (i *InventoryChange) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -2329,6 +2410,9 @@ func (i *InventoryChange) MarshalJSON() ([]byte, error) { } func (i *InventoryChange) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -2465,6 +2549,9 @@ func (i *InventoryCount) GetIsEstimated() *bool { } func (i *InventoryCount) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -2552,6 +2639,9 @@ func (i *InventoryCount) MarshalJSON() ([]byte, error) { } func (i *InventoryCount) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -2717,6 +2807,9 @@ func (i *InventoryPhysicalCount) GetCreatedAt() *string { } func (i *InventoryPhysicalCount) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -2839,6 +2932,9 @@ func (i *InventoryPhysicalCount) MarshalJSON() ([]byte, error) { } func (i *InventoryPhysicalCount) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -3078,6 +3174,9 @@ func (i *InventoryTransfer) GetTeamMemberID() *string { } func (i *InventoryTransfer) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -3207,6 +3306,9 @@ func (i *InventoryTransfer) MarshalJSON() ([]byte, error) { } func (i *InventoryTransfer) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value diff --git a/inventory/inventory_test/inventory_test.go b/inventory/inventory_test/inventory_test.go new file mode 100644 index 0000000..a0b87a4 --- /dev/null +++ b/inventory/inventory_test/inventory_test.go @@ -0,0 +1,508 @@ +// Code generated by Fern. DO NOT EDIT. + +package inventory_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestInventoryDeprecatedGetAdjustmentWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.DeprecatedGetAdjustmentInventoryRequest{ + AdjustmentID: "adjustment_id", + } + _, invocationErr := client.Inventory.DeprecatedGetAdjustment( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestInventoryDeprecatedGetAdjustmentWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestInventoryDeprecatedGetAdjustmentWithWireMock", "GET", "/v2/inventory/adjustment/adjustment_id", nil, 1) +} + +func TestInventoryGetAdjustmentWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.GetAdjustmentInventoryRequest{ + AdjustmentID: "adjustment_id", + } + _, invocationErr := client.Inventory.GetAdjustment( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestInventoryGetAdjustmentWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestInventoryGetAdjustmentWithWireMock", "GET", "/v2/inventory/adjustments/adjustment_id", nil, 1) +} + +func TestInventoryDeprecatedBatchChangeWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.BatchChangeInventoryRequest{ + IdempotencyKey: "8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe", + Changes: []*square.InventoryChange{ + &square.InventoryChange{ + Type: square.InventoryChangeTypePhysicalCount.Ptr(), + PhysicalCount: &square.InventoryPhysicalCount{ + ReferenceID: square.String( + "1536bfbf-efed-48bf-b17d-a197141b2a92", + ), + CatalogObjectID: square.String( + "W62UWFY35CWMYGVWK6TWJDNI", + ), + State: square.InventoryStateInStock.Ptr(), + LocationID: square.String( + "C6W5YS5QM06F5", + ), + Quantity: square.String( + "53", + ), + TeamMemberID: square.String( + "LRK57NSQ5X7PUD05", + ), + OccurredAt: square.String( + "2016-11-16T22:25:24.878Z", + ), + }, + }, + }, + IgnoreUnchangedCounts: square.Bool( + true, + ), + } + _, invocationErr := client.Inventory.DeprecatedBatchChange( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestInventoryDeprecatedBatchChangeWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestInventoryDeprecatedBatchChangeWithWireMock", "POST", "/v2/inventory/batch-change", nil, 1) +} + +func TestInventoryDeprecatedBatchGetChangesWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.BatchRetrieveInventoryChangesRequest{ + CatalogObjectIDs: []string{ + "W62UWFY35CWMYGVWK6TWJDNI", + }, + LocationIDs: []string{ + "C6W5YS5QM06F5", + }, + Types: []square.InventoryChangeType{ + square.InventoryChangeTypePhysicalCount, + }, + States: []square.InventoryState{ + square.InventoryStateInStock, + }, + UpdatedAfter: square.String( + "2016-11-01T00:00:00.000Z", + ), + UpdatedBefore: square.String( + "2016-12-01T00:00:00.000Z", + ), + } + _, invocationErr := client.Inventory.DeprecatedBatchGetChanges( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestInventoryDeprecatedBatchGetChangesWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestInventoryDeprecatedBatchGetChangesWithWireMock", "POST", "/v2/inventory/batch-retrieve-changes", nil, 1) +} + +func TestInventoryDeprecatedBatchGetCountsWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.BatchGetInventoryCountsRequest{ + CatalogObjectIDs: []string{ + "W62UWFY35CWMYGVWK6TWJDNI", + }, + LocationIDs: []string{ + "59TNP9SA8VGDA", + }, + UpdatedAfter: square.String( + "2016-11-16T00:00:00.000Z", + ), + } + _, invocationErr := client.Inventory.DeprecatedBatchGetCounts( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestInventoryDeprecatedBatchGetCountsWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestInventoryDeprecatedBatchGetCountsWithWireMock", "POST", "/v2/inventory/batch-retrieve-counts", nil, 1) +} + +func TestInventoryBatchCreateChangesWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.BatchChangeInventoryRequest{ + IdempotencyKey: "8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe", + Changes: []*square.InventoryChange{ + &square.InventoryChange{ + Type: square.InventoryChangeTypePhysicalCount.Ptr(), + PhysicalCount: &square.InventoryPhysicalCount{ + ReferenceID: square.String( + "1536bfbf-efed-48bf-b17d-a197141b2a92", + ), + CatalogObjectID: square.String( + "W62UWFY35CWMYGVWK6TWJDNI", + ), + State: square.InventoryStateInStock.Ptr(), + LocationID: square.String( + "C6W5YS5QM06F5", + ), + Quantity: square.String( + "53", + ), + TeamMemberID: square.String( + "LRK57NSQ5X7PUD05", + ), + OccurredAt: square.String( + "2016-11-16T22:25:24.878Z", + ), + }, + }, + }, + IgnoreUnchangedCounts: square.Bool( + true, + ), + } + _, invocationErr := client.Inventory.BatchCreateChanges( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestInventoryBatchCreateChangesWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestInventoryBatchCreateChangesWithWireMock", "POST", "/v2/inventory/changes/batch-create", nil, 1) +} + +func TestInventoryBatchGetChangesWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.BatchRetrieveInventoryChangesRequest{ + CatalogObjectIDs: []string{ + "W62UWFY35CWMYGVWK6TWJDNI", + }, + LocationIDs: []string{ + "C6W5YS5QM06F5", + }, + Types: []square.InventoryChangeType{ + square.InventoryChangeTypePhysicalCount, + }, + States: []square.InventoryState{ + square.InventoryStateInStock, + }, + UpdatedAfter: square.String( + "2016-11-01T00:00:00.000Z", + ), + UpdatedBefore: square.String( + "2016-12-01T00:00:00.000Z", + ), + } + _, invocationErr := client.Inventory.BatchGetChanges( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestInventoryBatchGetChangesWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestInventoryBatchGetChangesWithWireMock", "POST", "/v2/inventory/changes/batch-retrieve", nil, 1) +} + +func TestInventoryBatchGetCountsWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.BatchGetInventoryCountsRequest{ + CatalogObjectIDs: []string{ + "W62UWFY35CWMYGVWK6TWJDNI", + }, + LocationIDs: []string{ + "59TNP9SA8VGDA", + }, + UpdatedAfter: square.String( + "2016-11-16T00:00:00.000Z", + ), + } + _, invocationErr := client.Inventory.BatchGetCounts( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestInventoryBatchGetCountsWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestInventoryBatchGetCountsWithWireMock", "POST", "/v2/inventory/counts/batch-retrieve", nil, 1) +} + +func TestInventoryDeprecatedGetPhysicalCountWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.DeprecatedGetPhysicalCountInventoryRequest{ + PhysicalCountID: "physical_count_id", + } + _, invocationErr := client.Inventory.DeprecatedGetPhysicalCount( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestInventoryDeprecatedGetPhysicalCountWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestInventoryDeprecatedGetPhysicalCountWithWireMock", "GET", "/v2/inventory/physical-count/physical_count_id", nil, 1) +} + +func TestInventoryGetPhysicalCountWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.GetPhysicalCountInventoryRequest{ + PhysicalCountID: "physical_count_id", + } + _, invocationErr := client.Inventory.GetPhysicalCount( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestInventoryGetPhysicalCountWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestInventoryGetPhysicalCountWithWireMock", "GET", "/v2/inventory/physical-counts/physical_count_id", nil, 1) +} + +func TestInventoryGetTransferWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.GetTransferInventoryRequest{ + TransferID: "transfer_id", + } + _, invocationErr := client.Inventory.GetTransfer( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestInventoryGetTransferWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestInventoryGetTransferWithWireMock", "GET", "/v2/inventory/transfers/transfer_id", nil, 1) +} + +func TestInventoryGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.GetInventoryRequest{ + CatalogObjectID: "catalog_object_id", + LocationIDs: square.String( + "location_ids", + ), + Cursor: square.String( + "cursor", + ), + } + _, invocationErr := client.Inventory.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestInventoryGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestInventoryGetWithWireMock", "GET", "/v2/inventory/catalog_object_id", map[string]string{"location_ids": "location_ids", "cursor": "cursor"}, 1) +} + +func TestInventoryChangesWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.ChangesInventoryRequest{ + CatalogObjectID: "catalog_object_id", + LocationIDs: square.String( + "location_ids", + ), + Cursor: square.String( + "cursor", + ), + } + _, invocationErr := client.Inventory.Changes( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestInventoryChangesWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestInventoryChangesWithWireMock", "GET", "/v2/inventory/catalog_object_id/changes", map[string]string{"location_ids": "location_ids", "cursor": "cursor"}, 1) +} diff --git a/inventory_test.go b/inventory_test.go new file mode 100644 index 0000000..e4b02ab --- /dev/null +++ b/inventory_test.go @@ -0,0 +1,9139 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersDeprecatedGetAdjustmentInventoryRequest(t *testing.T) { + t.Run("SetAdjustmentID", func(t *testing.T) { + obj := &DeprecatedGetAdjustmentInventoryRequest{} + var fernTestValueAdjustmentID string + obj.SetAdjustmentID(fernTestValueAdjustmentID) + assert.Equal(t, fernTestValueAdjustmentID, obj.AdjustmentID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDeprecatedGetAdjustmentInventoryRequest(t *testing.T) { + t.Run("SetAdjustmentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeprecatedGetAdjustmentInventoryRequest{} + var fernTestValueAdjustmentID string + + // Act + obj.SetAdjustmentID(fernTestValueAdjustmentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersChangesInventoryRequest(t *testing.T) { + t.Run("SetCatalogObjectID", func(t *testing.T) { + obj := &ChangesInventoryRequest{} + var fernTestValueCatalogObjectID string + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + assert.Equal(t, fernTestValueCatalogObjectID, obj.CatalogObjectID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationIDs", func(t *testing.T) { + obj := &ChangesInventoryRequest{} + var fernTestValueLocationIDs *string + obj.SetLocationIDs(fernTestValueLocationIDs) + assert.Equal(t, fernTestValueLocationIDs, obj.LocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ChangesInventoryRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitChangesInventoryRequest(t *testing.T) { + t.Run("SetCatalogObjectID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ChangesInventoryRequest{} + var fernTestValueCatalogObjectID string + + // Act + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ChangesInventoryRequest{} + var fernTestValueLocationIDs *string + + // Act + obj.SetLocationIDs(fernTestValueLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ChangesInventoryRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeprecatedGetPhysicalCountInventoryRequest(t *testing.T) { + t.Run("SetPhysicalCountID", func(t *testing.T) { + obj := &DeprecatedGetPhysicalCountInventoryRequest{} + var fernTestValuePhysicalCountID string + obj.SetPhysicalCountID(fernTestValuePhysicalCountID) + assert.Equal(t, fernTestValuePhysicalCountID, obj.PhysicalCountID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDeprecatedGetPhysicalCountInventoryRequest(t *testing.T) { + t.Run("SetPhysicalCountID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeprecatedGetPhysicalCountInventoryRequest{} + var fernTestValuePhysicalCountID string + + // Act + obj.SetPhysicalCountID(fernTestValuePhysicalCountID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetInventoryRequest(t *testing.T) { + t.Run("SetCatalogObjectID", func(t *testing.T) { + obj := &GetInventoryRequest{} + var fernTestValueCatalogObjectID string + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + assert.Equal(t, fernTestValueCatalogObjectID, obj.CatalogObjectID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationIDs", func(t *testing.T) { + obj := &GetInventoryRequest{} + var fernTestValueLocationIDs *string + obj.SetLocationIDs(fernTestValueLocationIDs) + assert.Equal(t, fernTestValueLocationIDs, obj.LocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &GetInventoryRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetInventoryRequest(t *testing.T) { + t.Run("SetCatalogObjectID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryRequest{} + var fernTestValueCatalogObjectID string + + // Act + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryRequest{} + var fernTestValueLocationIDs *string + + // Act + obj.SetLocationIDs(fernTestValueLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetAdjustmentInventoryRequest(t *testing.T) { + t.Run("SetAdjustmentID", func(t *testing.T) { + obj := &GetAdjustmentInventoryRequest{} + var fernTestValueAdjustmentID string + obj.SetAdjustmentID(fernTestValueAdjustmentID) + assert.Equal(t, fernTestValueAdjustmentID, obj.AdjustmentID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetAdjustmentInventoryRequest(t *testing.T) { + t.Run("SetAdjustmentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetAdjustmentInventoryRequest{} + var fernTestValueAdjustmentID string + + // Act + obj.SetAdjustmentID(fernTestValueAdjustmentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetPhysicalCountInventoryRequest(t *testing.T) { + t.Run("SetPhysicalCountID", func(t *testing.T) { + obj := &GetPhysicalCountInventoryRequest{} + var fernTestValuePhysicalCountID string + obj.SetPhysicalCountID(fernTestValuePhysicalCountID) + assert.Equal(t, fernTestValuePhysicalCountID, obj.PhysicalCountID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetPhysicalCountInventoryRequest(t *testing.T) { + t.Run("SetPhysicalCountID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPhysicalCountInventoryRequest{} + var fernTestValuePhysicalCountID string + + // Act + obj.SetPhysicalCountID(fernTestValuePhysicalCountID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetTransferInventoryRequest(t *testing.T) { + t.Run("SetTransferID", func(t *testing.T) { + obj := &GetTransferInventoryRequest{} + var fernTestValueTransferID string + obj.SetTransferID(fernTestValueTransferID) + assert.Equal(t, fernTestValueTransferID, obj.TransferID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetTransferInventoryRequest(t *testing.T) { + t.Run("SetTransferID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTransferInventoryRequest{} + var fernTestValueTransferID string + + // Act + obj.SetTransferID(fernTestValueTransferID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBatchChangeInventoryRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &BatchChangeInventoryRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetChanges", func(t *testing.T) { + obj := &BatchChangeInventoryRequest{} + var fernTestValueChanges []*InventoryChange + obj.SetChanges(fernTestValueChanges) + assert.Equal(t, fernTestValueChanges, obj.Changes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIgnoreUnchangedCounts", func(t *testing.T) { + obj := &BatchChangeInventoryRequest{} + var fernTestValueIgnoreUnchangedCounts *bool + obj.SetIgnoreUnchangedCounts(fernTestValueIgnoreUnchangedCounts) + assert.Equal(t, fernTestValueIgnoreUnchangedCounts, obj.IgnoreUnchangedCounts) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBatchChangeInventoryRequest(t *testing.T) { + t.Run("GetIdempotencyKey", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchChangeInventoryRequest{} + var expected string + obj.IdempotencyKey = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIdempotencyKey(), "getter should return the property value") + }) + + t.Run("GetIdempotencyKey_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchChangeInventoryRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIdempotencyKey() // Should return zero value + }) + + t.Run("GetChanges", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchChangeInventoryRequest{} + var expected []*InventoryChange + obj.Changes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetChanges(), "getter should return the property value") + }) + + t.Run("GetChanges_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchChangeInventoryRequest{} + obj.Changes = nil + + // Act & Assert + assert.Nil(t, obj.GetChanges(), "getter should return nil when property is nil") + }) + + t.Run("GetChanges_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchChangeInventoryRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetChanges() // Should return zero value + }) + + t.Run("GetIgnoreUnchangedCounts", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchChangeInventoryRequest{} + var expected *bool + obj.IgnoreUnchangedCounts = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIgnoreUnchangedCounts(), "getter should return the property value") + }) + + t.Run("GetIgnoreUnchangedCounts_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchChangeInventoryRequest{} + obj.IgnoreUnchangedCounts = nil + + // Act & Assert + assert.Nil(t, obj.GetIgnoreUnchangedCounts(), "getter should return nil when property is nil") + }) + + t.Run("GetIgnoreUnchangedCounts_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchChangeInventoryRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIgnoreUnchangedCounts() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBatchChangeInventoryRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchChangeInventoryRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetChanges_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchChangeInventoryRequest{} + var fernTestValueChanges []*InventoryChange + + // Act + obj.SetChanges(fernTestValueChanges) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIgnoreUnchangedCounts_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchChangeInventoryRequest{} + var fernTestValueIgnoreUnchangedCounts *bool + + // Act + obj.SetIgnoreUnchangedCounts(fernTestValueIgnoreUnchangedCounts) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBatchChangeInventoryResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &BatchChangeInventoryResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCounts", func(t *testing.T) { + obj := &BatchChangeInventoryResponse{} + var fernTestValueCounts []*InventoryCount + obj.SetCounts(fernTestValueCounts) + assert.Equal(t, fernTestValueCounts, obj.Counts) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetChanges", func(t *testing.T) { + obj := &BatchChangeInventoryResponse{} + var fernTestValueChanges []*InventoryChange + obj.SetChanges(fernTestValueChanges) + assert.Equal(t, fernTestValueChanges, obj.Changes) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBatchChangeInventoryResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchChangeInventoryResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchChangeInventoryResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchChangeInventoryResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetCounts", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchChangeInventoryResponse{} + var expected []*InventoryCount + obj.Counts = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCounts(), "getter should return the property value") + }) + + t.Run("GetCounts_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchChangeInventoryResponse{} + obj.Counts = nil + + // Act & Assert + assert.Nil(t, obj.GetCounts(), "getter should return nil when property is nil") + }) + + t.Run("GetCounts_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchChangeInventoryResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCounts() // Should return zero value + }) + + t.Run("GetChanges", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchChangeInventoryResponse{} + var expected []*InventoryChange + obj.Changes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetChanges(), "getter should return the property value") + }) + + t.Run("GetChanges_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchChangeInventoryResponse{} + obj.Changes = nil + + // Act & Assert + assert.Nil(t, obj.GetChanges(), "getter should return nil when property is nil") + }) + + t.Run("GetChanges_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchChangeInventoryResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetChanges() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBatchChangeInventoryResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchChangeInventoryResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCounts_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchChangeInventoryResponse{} + var fernTestValueCounts []*InventoryCount + + // Act + obj.SetCounts(fernTestValueCounts) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetChanges_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchChangeInventoryResponse{} + var fernTestValueChanges []*InventoryChange + + // Act + obj.SetChanges(fernTestValueChanges) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBatchGetInventoryChangesResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &BatchGetInventoryChangesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetChanges", func(t *testing.T) { + obj := &BatchGetInventoryChangesResponse{} + var fernTestValueChanges []*InventoryChange + obj.SetChanges(fernTestValueChanges) + assert.Equal(t, fernTestValueChanges, obj.Changes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &BatchGetInventoryChangesResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBatchGetInventoryChangesResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryChangesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryChangesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetInventoryChangesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetChanges", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryChangesResponse{} + var expected []*InventoryChange + obj.Changes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetChanges(), "getter should return the property value") + }) + + t.Run("GetChanges_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryChangesResponse{} + obj.Changes = nil + + // Act & Assert + assert.Nil(t, obj.GetChanges(), "getter should return nil when property is nil") + }) + + t.Run("GetChanges_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetInventoryChangesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetChanges() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryChangesResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryChangesResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetInventoryChangesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBatchGetInventoryChangesResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryChangesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetChanges_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryChangesResponse{} + var fernTestValueChanges []*InventoryChange + + // Act + obj.SetChanges(fernTestValueChanges) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryChangesResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBatchGetInventoryCountsRequest(t *testing.T) { + t.Run("SetCatalogObjectIDs", func(t *testing.T) { + obj := &BatchGetInventoryCountsRequest{} + var fernTestValueCatalogObjectIDs []string + obj.SetCatalogObjectIDs(fernTestValueCatalogObjectIDs) + assert.Equal(t, fernTestValueCatalogObjectIDs, obj.CatalogObjectIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationIDs", func(t *testing.T) { + obj := &BatchGetInventoryCountsRequest{} + var fernTestValueLocationIDs []string + obj.SetLocationIDs(fernTestValueLocationIDs) + assert.Equal(t, fernTestValueLocationIDs, obj.LocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAfter", func(t *testing.T) { + obj := &BatchGetInventoryCountsRequest{} + var fernTestValueUpdatedAfter *string + obj.SetUpdatedAfter(fernTestValueUpdatedAfter) + assert.Equal(t, fernTestValueUpdatedAfter, obj.UpdatedAfter) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &BatchGetInventoryCountsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStates", func(t *testing.T) { + obj := &BatchGetInventoryCountsRequest{} + var fernTestValueStates []InventoryState + obj.SetStates(fernTestValueStates) + assert.Equal(t, fernTestValueStates, obj.States) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &BatchGetInventoryCountsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBatchGetInventoryCountsRequest(t *testing.T) { + t.Run("GetCatalogObjectIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsRequest{} + var expected []string + obj.CatalogObjectIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogObjectIDs(), "getter should return the property value") + }) + + t.Run("GetCatalogObjectIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsRequest{} + obj.CatalogObjectIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogObjectIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogObjectIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetInventoryCountsRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogObjectIDs() // Should return zero value + }) + + t.Run("GetLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsRequest{} + var expected []string + obj.LocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationIDs(), "getter should return the property value") + }) + + t.Run("GetLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsRequest{} + obj.LocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetInventoryCountsRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationIDs() // Should return zero value + }) + + t.Run("GetUpdatedAfter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsRequest{} + var expected *string + obj.UpdatedAfter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAfter(), "getter should return the property value") + }) + + t.Run("GetUpdatedAfter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsRequest{} + obj.UpdatedAfter = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAfter(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAfter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetInventoryCountsRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAfter() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsRequest{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsRequest{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetInventoryCountsRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetStates", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsRequest{} + var expected []InventoryState + obj.States = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStates(), "getter should return the property value") + }) + + t.Run("GetStates_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsRequest{} + obj.States = nil + + // Act & Assert + assert.Nil(t, obj.GetStates(), "getter should return nil when property is nil") + }) + + t.Run("GetStates_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetInventoryCountsRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStates() // Should return zero value + }) + + t.Run("GetLimit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsRequest{} + var expected *int + obj.Limit = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLimit(), "getter should return the property value") + }) + + t.Run("GetLimit_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsRequest{} + obj.Limit = nil + + // Act & Assert + assert.Nil(t, obj.GetLimit(), "getter should return nil when property is nil") + }) + + t.Run("GetLimit_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetInventoryCountsRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLimit() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBatchGetInventoryCountsRequest(t *testing.T) { + t.Run("SetCatalogObjectIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsRequest{} + var fernTestValueCatalogObjectIDs []string + + // Act + obj.SetCatalogObjectIDs(fernTestValueCatalogObjectIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsRequest{} + var fernTestValueLocationIDs []string + + // Act + obj.SetLocationIDs(fernTestValueLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAfter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsRequest{} + var fernTestValueUpdatedAfter *string + + // Act + obj.SetUpdatedAfter(fernTestValueUpdatedAfter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStates_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsRequest{} + var fernTestValueStates []InventoryState + + // Act + obj.SetStates(fernTestValueStates) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBatchGetInventoryCountsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &BatchGetInventoryCountsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCounts", func(t *testing.T) { + obj := &BatchGetInventoryCountsResponse{} + var fernTestValueCounts []*InventoryCount + obj.SetCounts(fernTestValueCounts) + assert.Equal(t, fernTestValueCounts, obj.Counts) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &BatchGetInventoryCountsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBatchGetInventoryCountsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetInventoryCountsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetCounts", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsResponse{} + var expected []*InventoryCount + obj.Counts = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCounts(), "getter should return the property value") + }) + + t.Run("GetCounts_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsResponse{} + obj.Counts = nil + + // Act & Assert + assert.Nil(t, obj.GetCounts(), "getter should return nil when property is nil") + }) + + t.Run("GetCounts_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetInventoryCountsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCounts() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetInventoryCountsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBatchGetInventoryCountsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCounts_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsResponse{} + var fernTestValueCounts []*InventoryCount + + // Act + obj.SetCounts(fernTestValueCounts) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBatchRetrieveInventoryChangesRequest(t *testing.T) { + t.Run("SetCatalogObjectIDs", func(t *testing.T) { + obj := &BatchRetrieveInventoryChangesRequest{} + var fernTestValueCatalogObjectIDs []string + obj.SetCatalogObjectIDs(fernTestValueCatalogObjectIDs) + assert.Equal(t, fernTestValueCatalogObjectIDs, obj.CatalogObjectIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationIDs", func(t *testing.T) { + obj := &BatchRetrieveInventoryChangesRequest{} + var fernTestValueLocationIDs []string + obj.SetLocationIDs(fernTestValueLocationIDs) + assert.Equal(t, fernTestValueLocationIDs, obj.LocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTypes", func(t *testing.T) { + obj := &BatchRetrieveInventoryChangesRequest{} + var fernTestValueTypes []InventoryChangeType + obj.SetTypes(fernTestValueTypes) + assert.Equal(t, fernTestValueTypes, obj.Types) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStates", func(t *testing.T) { + obj := &BatchRetrieveInventoryChangesRequest{} + var fernTestValueStates []InventoryState + obj.SetStates(fernTestValueStates) + assert.Equal(t, fernTestValueStates, obj.States) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAfter", func(t *testing.T) { + obj := &BatchRetrieveInventoryChangesRequest{} + var fernTestValueUpdatedAfter *string + obj.SetUpdatedAfter(fernTestValueUpdatedAfter) + assert.Equal(t, fernTestValueUpdatedAfter, obj.UpdatedAfter) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedBefore", func(t *testing.T) { + obj := &BatchRetrieveInventoryChangesRequest{} + var fernTestValueUpdatedBefore *string + obj.SetUpdatedBefore(fernTestValueUpdatedBefore) + assert.Equal(t, fernTestValueUpdatedBefore, obj.UpdatedBefore) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &BatchRetrieveInventoryChangesRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &BatchRetrieveInventoryChangesRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBatchRetrieveInventoryChangesRequest(t *testing.T) { + t.Run("GetCatalogObjectIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchRetrieveInventoryChangesRequest{} + var expected []string + obj.CatalogObjectIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogObjectIDs(), "getter should return the property value") + }) + + t.Run("GetCatalogObjectIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchRetrieveInventoryChangesRequest{} + obj.CatalogObjectIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogObjectIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogObjectIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchRetrieveInventoryChangesRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogObjectIDs() // Should return zero value + }) + + t.Run("GetLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchRetrieveInventoryChangesRequest{} + var expected []string + obj.LocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationIDs(), "getter should return the property value") + }) + + t.Run("GetLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchRetrieveInventoryChangesRequest{} + obj.LocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchRetrieveInventoryChangesRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationIDs() // Should return zero value + }) + + t.Run("GetTypes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchRetrieveInventoryChangesRequest{} + var expected []InventoryChangeType + obj.Types = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTypes(), "getter should return the property value") + }) + + t.Run("GetTypes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchRetrieveInventoryChangesRequest{} + obj.Types = nil + + // Act & Assert + assert.Nil(t, obj.GetTypes(), "getter should return nil when property is nil") + }) + + t.Run("GetTypes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchRetrieveInventoryChangesRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTypes() // Should return zero value + }) + + t.Run("GetStates", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchRetrieveInventoryChangesRequest{} + var expected []InventoryState + obj.States = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStates(), "getter should return the property value") + }) + + t.Run("GetStates_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchRetrieveInventoryChangesRequest{} + obj.States = nil + + // Act & Assert + assert.Nil(t, obj.GetStates(), "getter should return nil when property is nil") + }) + + t.Run("GetStates_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchRetrieveInventoryChangesRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStates() // Should return zero value + }) + + t.Run("GetUpdatedAfter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchRetrieveInventoryChangesRequest{} + var expected *string + obj.UpdatedAfter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAfter(), "getter should return the property value") + }) + + t.Run("GetUpdatedAfter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchRetrieveInventoryChangesRequest{} + obj.UpdatedAfter = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAfter(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAfter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchRetrieveInventoryChangesRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAfter() // Should return zero value + }) + + t.Run("GetUpdatedBefore", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchRetrieveInventoryChangesRequest{} + var expected *string + obj.UpdatedBefore = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedBefore(), "getter should return the property value") + }) + + t.Run("GetUpdatedBefore_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchRetrieveInventoryChangesRequest{} + obj.UpdatedBefore = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedBefore(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedBefore_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchRetrieveInventoryChangesRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedBefore() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchRetrieveInventoryChangesRequest{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchRetrieveInventoryChangesRequest{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchRetrieveInventoryChangesRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetLimit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchRetrieveInventoryChangesRequest{} + var expected *int + obj.Limit = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLimit(), "getter should return the property value") + }) + + t.Run("GetLimit_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchRetrieveInventoryChangesRequest{} + obj.Limit = nil + + // Act & Assert + assert.Nil(t, obj.GetLimit(), "getter should return nil when property is nil") + }) + + t.Run("GetLimit_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchRetrieveInventoryChangesRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLimit() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBatchRetrieveInventoryChangesRequest(t *testing.T) { + t.Run("SetCatalogObjectIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchRetrieveInventoryChangesRequest{} + var fernTestValueCatalogObjectIDs []string + + // Act + obj.SetCatalogObjectIDs(fernTestValueCatalogObjectIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchRetrieveInventoryChangesRequest{} + var fernTestValueLocationIDs []string + + // Act + obj.SetLocationIDs(fernTestValueLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTypes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchRetrieveInventoryChangesRequest{} + var fernTestValueTypes []InventoryChangeType + + // Act + obj.SetTypes(fernTestValueTypes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStates_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchRetrieveInventoryChangesRequest{} + var fernTestValueStates []InventoryState + + // Act + obj.SetStates(fernTestValueStates) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAfter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchRetrieveInventoryChangesRequest{} + var fernTestValueUpdatedAfter *string + + // Act + obj.SetUpdatedAfter(fernTestValueUpdatedAfter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedBefore_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchRetrieveInventoryChangesRequest{} + var fernTestValueUpdatedBefore *string + + // Act + obj.SetUpdatedBefore(fernTestValueUpdatedBefore) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchRetrieveInventoryChangesRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchRetrieveInventoryChangesRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetInventoryAdjustmentResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetInventoryAdjustmentResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAdjustment", func(t *testing.T) { + obj := &GetInventoryAdjustmentResponse{} + var fernTestValueAdjustment *InventoryAdjustment + obj.SetAdjustment(fernTestValueAdjustment) + assert.Equal(t, fernTestValueAdjustment, obj.Adjustment) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetInventoryAdjustmentResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryAdjustmentResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryAdjustmentResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetInventoryAdjustmentResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetAdjustment", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryAdjustmentResponse{} + var expected *InventoryAdjustment + obj.Adjustment = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAdjustment(), "getter should return the property value") + }) + + t.Run("GetAdjustment_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryAdjustmentResponse{} + obj.Adjustment = nil + + // Act & Assert + assert.Nil(t, obj.GetAdjustment(), "getter should return nil when property is nil") + }) + + t.Run("GetAdjustment_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetInventoryAdjustmentResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAdjustment() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetInventoryAdjustmentResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryAdjustmentResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAdjustment_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryAdjustmentResponse{} + var fernTestValueAdjustment *InventoryAdjustment + + // Act + obj.SetAdjustment(fernTestValueAdjustment) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetInventoryChangesResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetInventoryChangesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetChanges", func(t *testing.T) { + obj := &GetInventoryChangesResponse{} + var fernTestValueChanges []*InventoryChange + obj.SetChanges(fernTestValueChanges) + assert.Equal(t, fernTestValueChanges, obj.Changes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &GetInventoryChangesResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetInventoryChangesResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryChangesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryChangesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetInventoryChangesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetChanges", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryChangesResponse{} + var expected []*InventoryChange + obj.Changes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetChanges(), "getter should return the property value") + }) + + t.Run("GetChanges_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryChangesResponse{} + obj.Changes = nil + + // Act & Assert + assert.Nil(t, obj.GetChanges(), "getter should return nil when property is nil") + }) + + t.Run("GetChanges_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetInventoryChangesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetChanges() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryChangesResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryChangesResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetInventoryChangesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetInventoryChangesResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryChangesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetChanges_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryChangesResponse{} + var fernTestValueChanges []*InventoryChange + + // Act + obj.SetChanges(fernTestValueChanges) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryChangesResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetInventoryCountResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetInventoryCountResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCounts", func(t *testing.T) { + obj := &GetInventoryCountResponse{} + var fernTestValueCounts []*InventoryCount + obj.SetCounts(fernTestValueCounts) + assert.Equal(t, fernTestValueCounts, obj.Counts) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &GetInventoryCountResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetInventoryCountResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryCountResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryCountResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetInventoryCountResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetCounts", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryCountResponse{} + var expected []*InventoryCount + obj.Counts = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCounts(), "getter should return the property value") + }) + + t.Run("GetCounts_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryCountResponse{} + obj.Counts = nil + + // Act & Assert + assert.Nil(t, obj.GetCounts(), "getter should return nil when property is nil") + }) + + t.Run("GetCounts_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetInventoryCountResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCounts() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryCountResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryCountResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetInventoryCountResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetInventoryCountResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryCountResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCounts_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryCountResponse{} + var fernTestValueCounts []*InventoryCount + + // Act + obj.SetCounts(fernTestValueCounts) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryCountResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetInventoryPhysicalCountResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetInventoryPhysicalCountResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCount", func(t *testing.T) { + obj := &GetInventoryPhysicalCountResponse{} + var fernTestValueCount *InventoryPhysicalCount + obj.SetCount(fernTestValueCount) + assert.Equal(t, fernTestValueCount, obj.Count) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetInventoryPhysicalCountResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryPhysicalCountResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryPhysicalCountResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetInventoryPhysicalCountResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetCount", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryPhysicalCountResponse{} + var expected *InventoryPhysicalCount + obj.Count = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCount(), "getter should return the property value") + }) + + t.Run("GetCount_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryPhysicalCountResponse{} + obj.Count = nil + + // Act & Assert + assert.Nil(t, obj.GetCount(), "getter should return nil when property is nil") + }) + + t.Run("GetCount_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetInventoryPhysicalCountResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCount() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetInventoryPhysicalCountResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryPhysicalCountResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCount_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryPhysicalCountResponse{} + var fernTestValueCount *InventoryPhysicalCount + + // Act + obj.SetCount(fernTestValueCount) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetInventoryTransferResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetInventoryTransferResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTransfer", func(t *testing.T) { + obj := &GetInventoryTransferResponse{} + var fernTestValueTransfer *InventoryTransfer + obj.SetTransfer(fernTestValueTransfer) + assert.Equal(t, fernTestValueTransfer, obj.Transfer) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetInventoryTransferResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryTransferResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryTransferResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetInventoryTransferResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetTransfer", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryTransferResponse{} + var expected *InventoryTransfer + obj.Transfer = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTransfer(), "getter should return the property value") + }) + + t.Run("GetTransfer_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryTransferResponse{} + obj.Transfer = nil + + // Act & Assert + assert.Nil(t, obj.GetTransfer(), "getter should return nil when property is nil") + }) + + t.Run("GetTransfer_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetInventoryTransferResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTransfer() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetInventoryTransferResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryTransferResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTransfer_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryTransferResponse{} + var fernTestValueTransfer *InventoryTransfer + + // Act + obj.SetTransfer(fernTestValueTransfer) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInventoryAdjustment(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &InventoryAdjustment{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReferenceID", func(t *testing.T) { + obj := &InventoryAdjustment{} + var fernTestValueReferenceID *string + obj.SetReferenceID(fernTestValueReferenceID) + assert.Equal(t, fernTestValueReferenceID, obj.ReferenceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFromState", func(t *testing.T) { + obj := &InventoryAdjustment{} + var fernTestValueFromState *InventoryState + obj.SetFromState(fernTestValueFromState) + assert.Equal(t, fernTestValueFromState, obj.FromState) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetToState", func(t *testing.T) { + obj := &InventoryAdjustment{} + var fernTestValueToState *InventoryState + obj.SetToState(fernTestValueToState) + assert.Equal(t, fernTestValueToState, obj.ToState) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &InventoryAdjustment{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogObjectID", func(t *testing.T) { + obj := &InventoryAdjustment{} + var fernTestValueCatalogObjectID *string + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + assert.Equal(t, fernTestValueCatalogObjectID, obj.CatalogObjectID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogObjectType", func(t *testing.T) { + obj := &InventoryAdjustment{} + var fernTestValueCatalogObjectType *string + obj.SetCatalogObjectType(fernTestValueCatalogObjectType) + assert.Equal(t, fernTestValueCatalogObjectType, obj.CatalogObjectType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuantity", func(t *testing.T) { + obj := &InventoryAdjustment{} + var fernTestValueQuantity *string + obj.SetQuantity(fernTestValueQuantity) + assert.Equal(t, fernTestValueQuantity, obj.Quantity) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTotalPriceMoney", func(t *testing.T) { + obj := &InventoryAdjustment{} + var fernTestValueTotalPriceMoney *Money + obj.SetTotalPriceMoney(fernTestValueTotalPriceMoney) + assert.Equal(t, fernTestValueTotalPriceMoney, obj.TotalPriceMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOccurredAt", func(t *testing.T) { + obj := &InventoryAdjustment{} + var fernTestValueOccurredAt *string + obj.SetOccurredAt(fernTestValueOccurredAt) + assert.Equal(t, fernTestValueOccurredAt, obj.OccurredAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &InventoryAdjustment{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSource", func(t *testing.T) { + obj := &InventoryAdjustment{} + var fernTestValueSource *SourceApplication + obj.SetSource(fernTestValueSource) + assert.Equal(t, fernTestValueSource, obj.Source) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEmployeeID", func(t *testing.T) { + obj := &InventoryAdjustment{} + var fernTestValueEmployeeID *string + obj.SetEmployeeID(fernTestValueEmployeeID) + assert.Equal(t, fernTestValueEmployeeID, obj.EmployeeID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTeamMemberID", func(t *testing.T) { + obj := &InventoryAdjustment{} + var fernTestValueTeamMemberID *string + obj.SetTeamMemberID(fernTestValueTeamMemberID) + assert.Equal(t, fernTestValueTeamMemberID, obj.TeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTransactionID", func(t *testing.T) { + obj := &InventoryAdjustment{} + var fernTestValueTransactionID *string + obj.SetTransactionID(fernTestValueTransactionID) + assert.Equal(t, fernTestValueTransactionID, obj.TransactionID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRefundID", func(t *testing.T) { + obj := &InventoryAdjustment{} + var fernTestValueRefundID *string + obj.SetRefundID(fernTestValueRefundID) + assert.Equal(t, fernTestValueRefundID, obj.RefundID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPurchaseOrderID", func(t *testing.T) { + obj := &InventoryAdjustment{} + var fernTestValuePurchaseOrderID *string + obj.SetPurchaseOrderID(fernTestValuePurchaseOrderID) + assert.Equal(t, fernTestValuePurchaseOrderID, obj.PurchaseOrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGoodsReceiptID", func(t *testing.T) { + obj := &InventoryAdjustment{} + var fernTestValueGoodsReceiptID *string + obj.SetGoodsReceiptID(fernTestValueGoodsReceiptID) + assert.Equal(t, fernTestValueGoodsReceiptID, obj.GoodsReceiptID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAdjustmentGroup", func(t *testing.T) { + obj := &InventoryAdjustment{} + var fernTestValueAdjustmentGroup *InventoryAdjustmentGroup + obj.SetAdjustmentGroup(fernTestValueAdjustmentGroup) + assert.Equal(t, fernTestValueAdjustmentGroup, obj.AdjustmentGroup) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInventoryAdjustment(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryAdjustment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetReferenceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var expected *string + obj.ReferenceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReferenceID(), "getter should return the property value") + }) + + t.Run("GetReferenceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + obj.ReferenceID = nil + + // Act & Assert + assert.Nil(t, obj.GetReferenceID(), "getter should return nil when property is nil") + }) + + t.Run("GetReferenceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryAdjustment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReferenceID() // Should return zero value + }) + + t.Run("GetFromState", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var expected *InventoryState + obj.FromState = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFromState(), "getter should return the property value") + }) + + t.Run("GetFromState_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + obj.FromState = nil + + // Act & Assert + assert.Nil(t, obj.GetFromState(), "getter should return nil when property is nil") + }) + + t.Run("GetFromState_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryAdjustment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFromState() // Should return zero value + }) + + t.Run("GetToState", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var expected *InventoryState + obj.ToState = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetToState(), "getter should return the property value") + }) + + t.Run("GetToState_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + obj.ToState = nil + + // Act & Assert + assert.Nil(t, obj.GetToState(), "getter should return nil when property is nil") + }) + + t.Run("GetToState_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryAdjustment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetToState() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryAdjustment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetCatalogObjectID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var expected *string + obj.CatalogObjectID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogObjectID(), "getter should return the property value") + }) + + t.Run("GetCatalogObjectID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + obj.CatalogObjectID = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogObjectID(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogObjectID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryAdjustment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogObjectID() // Should return zero value + }) + + t.Run("GetCatalogObjectType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var expected *string + obj.CatalogObjectType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogObjectType(), "getter should return the property value") + }) + + t.Run("GetCatalogObjectType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + obj.CatalogObjectType = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogObjectType(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogObjectType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryAdjustment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogObjectType() // Should return zero value + }) + + t.Run("GetQuantity", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var expected *string + obj.Quantity = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQuantity(), "getter should return the property value") + }) + + t.Run("GetQuantity_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + obj.Quantity = nil + + // Act & Assert + assert.Nil(t, obj.GetQuantity(), "getter should return nil when property is nil") + }) + + t.Run("GetQuantity_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryAdjustment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQuantity() // Should return zero value + }) + + t.Run("GetTotalPriceMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var expected *Money + obj.TotalPriceMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTotalPriceMoney(), "getter should return the property value") + }) + + t.Run("GetTotalPriceMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + obj.TotalPriceMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTotalPriceMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTotalPriceMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryAdjustment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTotalPriceMoney() // Should return zero value + }) + + t.Run("GetOccurredAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var expected *string + obj.OccurredAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOccurredAt(), "getter should return the property value") + }) + + t.Run("GetOccurredAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + obj.OccurredAt = nil + + // Act & Assert + assert.Nil(t, obj.GetOccurredAt(), "getter should return nil when property is nil") + }) + + t.Run("GetOccurredAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryAdjustment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOccurredAt() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryAdjustment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetSource", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var expected *SourceApplication + obj.Source = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSource(), "getter should return the property value") + }) + + t.Run("GetSource_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + obj.Source = nil + + // Act & Assert + assert.Nil(t, obj.GetSource(), "getter should return nil when property is nil") + }) + + t.Run("GetSource_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryAdjustment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSource() // Should return zero value + }) + + t.Run("GetEmployeeID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var expected *string + obj.EmployeeID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEmployeeID(), "getter should return the property value") + }) + + t.Run("GetEmployeeID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + obj.EmployeeID = nil + + // Act & Assert + assert.Nil(t, obj.GetEmployeeID(), "getter should return nil when property is nil") + }) + + t.Run("GetEmployeeID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryAdjustment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEmployeeID() // Should return zero value + }) + + t.Run("GetTeamMemberID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var expected *string + obj.TeamMemberID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMemberID(), "getter should return the property value") + }) + + t.Run("GetTeamMemberID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + obj.TeamMemberID = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMemberID(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMemberID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryAdjustment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMemberID() // Should return zero value + }) + + t.Run("GetTransactionID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var expected *string + obj.TransactionID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTransactionID(), "getter should return the property value") + }) + + t.Run("GetTransactionID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + obj.TransactionID = nil + + // Act & Assert + assert.Nil(t, obj.GetTransactionID(), "getter should return nil when property is nil") + }) + + t.Run("GetTransactionID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryAdjustment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTransactionID() // Should return zero value + }) + + t.Run("GetRefundID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var expected *string + obj.RefundID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRefundID(), "getter should return the property value") + }) + + t.Run("GetRefundID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + obj.RefundID = nil + + // Act & Assert + assert.Nil(t, obj.GetRefundID(), "getter should return nil when property is nil") + }) + + t.Run("GetRefundID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryAdjustment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRefundID() // Should return zero value + }) + + t.Run("GetPurchaseOrderID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var expected *string + obj.PurchaseOrderID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPurchaseOrderID(), "getter should return the property value") + }) + + t.Run("GetPurchaseOrderID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + obj.PurchaseOrderID = nil + + // Act & Assert + assert.Nil(t, obj.GetPurchaseOrderID(), "getter should return nil when property is nil") + }) + + t.Run("GetPurchaseOrderID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryAdjustment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPurchaseOrderID() // Should return zero value + }) + + t.Run("GetGoodsReceiptID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var expected *string + obj.GoodsReceiptID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGoodsReceiptID(), "getter should return the property value") + }) + + t.Run("GetGoodsReceiptID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + obj.GoodsReceiptID = nil + + // Act & Assert + assert.Nil(t, obj.GetGoodsReceiptID(), "getter should return nil when property is nil") + }) + + t.Run("GetGoodsReceiptID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryAdjustment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGoodsReceiptID() // Should return zero value + }) + + t.Run("GetAdjustmentGroup", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var expected *InventoryAdjustmentGroup + obj.AdjustmentGroup = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAdjustmentGroup(), "getter should return the property value") + }) + + t.Run("GetAdjustmentGroup_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + obj.AdjustmentGroup = nil + + // Act & Assert + assert.Nil(t, obj.GetAdjustmentGroup(), "getter should return nil when property is nil") + }) + + t.Run("GetAdjustmentGroup_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryAdjustment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAdjustmentGroup() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInventoryAdjustment(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReferenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var fernTestValueReferenceID *string + + // Act + obj.SetReferenceID(fernTestValueReferenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFromState_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var fernTestValueFromState *InventoryState + + // Act + obj.SetFromState(fernTestValueFromState) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetToState_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var fernTestValueToState *InventoryState + + // Act + obj.SetToState(fernTestValueToState) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogObjectID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var fernTestValueCatalogObjectID *string + + // Act + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogObjectType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var fernTestValueCatalogObjectType *string + + // Act + obj.SetCatalogObjectType(fernTestValueCatalogObjectType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuantity_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var fernTestValueQuantity *string + + // Act + obj.SetQuantity(fernTestValueQuantity) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTotalPriceMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var fernTestValueTotalPriceMoney *Money + + // Act + obj.SetTotalPriceMoney(fernTestValueTotalPriceMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOccurredAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var fernTestValueOccurredAt *string + + // Act + obj.SetOccurredAt(fernTestValueOccurredAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSource_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var fernTestValueSource *SourceApplication + + // Act + obj.SetSource(fernTestValueSource) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEmployeeID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var fernTestValueEmployeeID *string + + // Act + obj.SetEmployeeID(fernTestValueEmployeeID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var fernTestValueTeamMemberID *string + + // Act + obj.SetTeamMemberID(fernTestValueTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTransactionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var fernTestValueTransactionID *string + + // Act + obj.SetTransactionID(fernTestValueTransactionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRefundID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var fernTestValueRefundID *string + + // Act + obj.SetRefundID(fernTestValueRefundID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPurchaseOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var fernTestValuePurchaseOrderID *string + + // Act + obj.SetPurchaseOrderID(fernTestValuePurchaseOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGoodsReceiptID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var fernTestValueGoodsReceiptID *string + + // Act + obj.SetGoodsReceiptID(fernTestValueGoodsReceiptID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAdjustmentGroup_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + var fernTestValueAdjustmentGroup *InventoryAdjustmentGroup + + // Act + obj.SetAdjustmentGroup(fernTestValueAdjustmentGroup) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInventoryAdjustmentGroup(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &InventoryAdjustmentGroup{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRootAdjustmentID", func(t *testing.T) { + obj := &InventoryAdjustmentGroup{} + var fernTestValueRootAdjustmentID *string + obj.SetRootAdjustmentID(fernTestValueRootAdjustmentID) + assert.Equal(t, fernTestValueRootAdjustmentID, obj.RootAdjustmentID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFromState", func(t *testing.T) { + obj := &InventoryAdjustmentGroup{} + var fernTestValueFromState *InventoryState + obj.SetFromState(fernTestValueFromState) + assert.Equal(t, fernTestValueFromState, obj.FromState) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetToState", func(t *testing.T) { + obj := &InventoryAdjustmentGroup{} + var fernTestValueToState *InventoryState + obj.SetToState(fernTestValueToState) + assert.Equal(t, fernTestValueToState, obj.ToState) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInventoryAdjustmentGroup(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustmentGroup{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustmentGroup{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryAdjustmentGroup + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetRootAdjustmentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustmentGroup{} + var expected *string + obj.RootAdjustmentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRootAdjustmentID(), "getter should return the property value") + }) + + t.Run("GetRootAdjustmentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustmentGroup{} + obj.RootAdjustmentID = nil + + // Act & Assert + assert.Nil(t, obj.GetRootAdjustmentID(), "getter should return nil when property is nil") + }) + + t.Run("GetRootAdjustmentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryAdjustmentGroup + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRootAdjustmentID() // Should return zero value + }) + + t.Run("GetFromState", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustmentGroup{} + var expected *InventoryState + obj.FromState = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFromState(), "getter should return the property value") + }) + + t.Run("GetFromState_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustmentGroup{} + obj.FromState = nil + + // Act & Assert + assert.Nil(t, obj.GetFromState(), "getter should return nil when property is nil") + }) + + t.Run("GetFromState_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryAdjustmentGroup + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFromState() // Should return zero value + }) + + t.Run("GetToState", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustmentGroup{} + var expected *InventoryState + obj.ToState = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetToState(), "getter should return the property value") + }) + + t.Run("GetToState_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustmentGroup{} + obj.ToState = nil + + // Act & Assert + assert.Nil(t, obj.GetToState(), "getter should return nil when property is nil") + }) + + t.Run("GetToState_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryAdjustmentGroup + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetToState() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInventoryAdjustmentGroup(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustmentGroup{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRootAdjustmentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustmentGroup{} + var fernTestValueRootAdjustmentID *string + + // Act + obj.SetRootAdjustmentID(fernTestValueRootAdjustmentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFromState_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustmentGroup{} + var fernTestValueFromState *InventoryState + + // Act + obj.SetFromState(fernTestValueFromState) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetToState_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustmentGroup{} + var fernTestValueToState *InventoryState + + // Act + obj.SetToState(fernTestValueToState) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInventoryChange(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &InventoryChange{} + var fernTestValueType *InventoryChangeType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPhysicalCount", func(t *testing.T) { + obj := &InventoryChange{} + var fernTestValuePhysicalCount *InventoryPhysicalCount + obj.SetPhysicalCount(fernTestValuePhysicalCount) + assert.Equal(t, fernTestValuePhysicalCount, obj.PhysicalCount) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAdjustment", func(t *testing.T) { + obj := &InventoryChange{} + var fernTestValueAdjustment *InventoryAdjustment + obj.SetAdjustment(fernTestValueAdjustment) + assert.Equal(t, fernTestValueAdjustment, obj.Adjustment) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTransfer", func(t *testing.T) { + obj := &InventoryChange{} + var fernTestValueTransfer *InventoryTransfer + obj.SetTransfer(fernTestValueTransfer) + assert.Equal(t, fernTestValueTransfer, obj.Transfer) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMeasurementUnit", func(t *testing.T) { + obj := &InventoryChange{} + var fernTestValueMeasurementUnit *CatalogMeasurementUnit + obj.SetMeasurementUnit(fernTestValueMeasurementUnit) + assert.Equal(t, fernTestValueMeasurementUnit, obj.MeasurementUnit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMeasurementUnitID", func(t *testing.T) { + obj := &InventoryChange{} + var fernTestValueMeasurementUnitID *string + obj.SetMeasurementUnitID(fernTestValueMeasurementUnitID) + assert.Equal(t, fernTestValueMeasurementUnitID, obj.MeasurementUnitID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInventoryChange(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryChange{} + var expected *InventoryChangeType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryChange{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryChange + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetPhysicalCount", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryChange{} + var expected *InventoryPhysicalCount + obj.PhysicalCount = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPhysicalCount(), "getter should return the property value") + }) + + t.Run("GetPhysicalCount_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryChange{} + obj.PhysicalCount = nil + + // Act & Assert + assert.Nil(t, obj.GetPhysicalCount(), "getter should return nil when property is nil") + }) + + t.Run("GetPhysicalCount_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryChange + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPhysicalCount() // Should return zero value + }) + + t.Run("GetAdjustment", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryChange{} + var expected *InventoryAdjustment + obj.Adjustment = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAdjustment(), "getter should return the property value") + }) + + t.Run("GetAdjustment_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryChange{} + obj.Adjustment = nil + + // Act & Assert + assert.Nil(t, obj.GetAdjustment(), "getter should return nil when property is nil") + }) + + t.Run("GetAdjustment_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryChange + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAdjustment() // Should return zero value + }) + + t.Run("GetTransfer", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryChange{} + var expected *InventoryTransfer + obj.Transfer = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTransfer(), "getter should return the property value") + }) + + t.Run("GetTransfer_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryChange{} + obj.Transfer = nil + + // Act & Assert + assert.Nil(t, obj.GetTransfer(), "getter should return nil when property is nil") + }) + + t.Run("GetTransfer_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryChange + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTransfer() // Should return zero value + }) + + t.Run("GetMeasurementUnit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryChange{} + var expected *CatalogMeasurementUnit + obj.MeasurementUnit = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMeasurementUnit(), "getter should return the property value") + }) + + t.Run("GetMeasurementUnit_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryChange{} + obj.MeasurementUnit = nil + + // Act & Assert + assert.Nil(t, obj.GetMeasurementUnit(), "getter should return nil when property is nil") + }) + + t.Run("GetMeasurementUnit_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryChange + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMeasurementUnit() // Should return zero value + }) + + t.Run("GetMeasurementUnitID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryChange{} + var expected *string + obj.MeasurementUnitID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMeasurementUnitID(), "getter should return the property value") + }) + + t.Run("GetMeasurementUnitID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryChange{} + obj.MeasurementUnitID = nil + + // Act & Assert + assert.Nil(t, obj.GetMeasurementUnitID(), "getter should return nil when property is nil") + }) + + t.Run("GetMeasurementUnitID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryChange + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMeasurementUnitID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInventoryChange(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryChange{} + var fernTestValueType *InventoryChangeType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPhysicalCount_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryChange{} + var fernTestValuePhysicalCount *InventoryPhysicalCount + + // Act + obj.SetPhysicalCount(fernTestValuePhysicalCount) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAdjustment_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryChange{} + var fernTestValueAdjustment *InventoryAdjustment + + // Act + obj.SetAdjustment(fernTestValueAdjustment) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTransfer_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryChange{} + var fernTestValueTransfer *InventoryTransfer + + // Act + obj.SetTransfer(fernTestValueTransfer) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMeasurementUnit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryChange{} + var fernTestValueMeasurementUnit *CatalogMeasurementUnit + + // Act + obj.SetMeasurementUnit(fernTestValueMeasurementUnit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMeasurementUnitID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryChange{} + var fernTestValueMeasurementUnitID *string + + // Act + obj.SetMeasurementUnitID(fernTestValueMeasurementUnitID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInventoryCount(t *testing.T) { + t.Run("SetCatalogObjectID", func(t *testing.T) { + obj := &InventoryCount{} + var fernTestValueCatalogObjectID *string + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + assert.Equal(t, fernTestValueCatalogObjectID, obj.CatalogObjectID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogObjectType", func(t *testing.T) { + obj := &InventoryCount{} + var fernTestValueCatalogObjectType *string + obj.SetCatalogObjectType(fernTestValueCatalogObjectType) + assert.Equal(t, fernTestValueCatalogObjectType, obj.CatalogObjectType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetState", func(t *testing.T) { + obj := &InventoryCount{} + var fernTestValueState *InventoryState + obj.SetState(fernTestValueState) + assert.Equal(t, fernTestValueState, obj.State) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &InventoryCount{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuantity", func(t *testing.T) { + obj := &InventoryCount{} + var fernTestValueQuantity *string + obj.SetQuantity(fernTestValueQuantity) + assert.Equal(t, fernTestValueQuantity, obj.Quantity) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCalculatedAt", func(t *testing.T) { + obj := &InventoryCount{} + var fernTestValueCalculatedAt *string + obj.SetCalculatedAt(fernTestValueCalculatedAt) + assert.Equal(t, fernTestValueCalculatedAt, obj.CalculatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsEstimated", func(t *testing.T) { + obj := &InventoryCount{} + var fernTestValueIsEstimated *bool + obj.SetIsEstimated(fernTestValueIsEstimated) + assert.Equal(t, fernTestValueIsEstimated, obj.IsEstimated) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInventoryCount(t *testing.T) { + t.Run("GetCatalogObjectID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCount{} + var expected *string + obj.CatalogObjectID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogObjectID(), "getter should return the property value") + }) + + t.Run("GetCatalogObjectID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCount{} + obj.CatalogObjectID = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogObjectID(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogObjectID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryCount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogObjectID() // Should return zero value + }) + + t.Run("GetCatalogObjectType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCount{} + var expected *string + obj.CatalogObjectType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogObjectType(), "getter should return the property value") + }) + + t.Run("GetCatalogObjectType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCount{} + obj.CatalogObjectType = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogObjectType(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogObjectType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryCount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogObjectType() // Should return zero value + }) + + t.Run("GetState", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCount{} + var expected *InventoryState + obj.State = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetState(), "getter should return the property value") + }) + + t.Run("GetState_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCount{} + obj.State = nil + + // Act & Assert + assert.Nil(t, obj.GetState(), "getter should return nil when property is nil") + }) + + t.Run("GetState_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryCount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetState() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCount{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCount{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryCount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetQuantity", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCount{} + var expected *string + obj.Quantity = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQuantity(), "getter should return the property value") + }) + + t.Run("GetQuantity_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCount{} + obj.Quantity = nil + + // Act & Assert + assert.Nil(t, obj.GetQuantity(), "getter should return nil when property is nil") + }) + + t.Run("GetQuantity_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryCount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQuantity() // Should return zero value + }) + + t.Run("GetCalculatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCount{} + var expected *string + obj.CalculatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCalculatedAt(), "getter should return the property value") + }) + + t.Run("GetCalculatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCount{} + obj.CalculatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCalculatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCalculatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryCount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCalculatedAt() // Should return zero value + }) + + t.Run("GetIsEstimated", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCount{} + var expected *bool + obj.IsEstimated = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsEstimated(), "getter should return the property value") + }) + + t.Run("GetIsEstimated_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCount{} + obj.IsEstimated = nil + + // Act & Assert + assert.Nil(t, obj.GetIsEstimated(), "getter should return nil when property is nil") + }) + + t.Run("GetIsEstimated_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryCount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsEstimated() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInventoryCount(t *testing.T) { + t.Run("SetCatalogObjectID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCount{} + var fernTestValueCatalogObjectID *string + + // Act + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogObjectType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCount{} + var fernTestValueCatalogObjectType *string + + // Act + obj.SetCatalogObjectType(fernTestValueCatalogObjectType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetState_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCount{} + var fernTestValueState *InventoryState + + // Act + obj.SetState(fernTestValueState) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCount{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuantity_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCount{} + var fernTestValueQuantity *string + + // Act + obj.SetQuantity(fernTestValueQuantity) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCalculatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCount{} + var fernTestValueCalculatedAt *string + + // Act + obj.SetCalculatedAt(fernTestValueCalculatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsEstimated_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCount{} + var fernTestValueIsEstimated *bool + + // Act + obj.SetIsEstimated(fernTestValueIsEstimated) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInventoryPhysicalCount(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &InventoryPhysicalCount{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReferenceID", func(t *testing.T) { + obj := &InventoryPhysicalCount{} + var fernTestValueReferenceID *string + obj.SetReferenceID(fernTestValueReferenceID) + assert.Equal(t, fernTestValueReferenceID, obj.ReferenceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogObjectID", func(t *testing.T) { + obj := &InventoryPhysicalCount{} + var fernTestValueCatalogObjectID *string + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + assert.Equal(t, fernTestValueCatalogObjectID, obj.CatalogObjectID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogObjectType", func(t *testing.T) { + obj := &InventoryPhysicalCount{} + var fernTestValueCatalogObjectType *string + obj.SetCatalogObjectType(fernTestValueCatalogObjectType) + assert.Equal(t, fernTestValueCatalogObjectType, obj.CatalogObjectType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetState", func(t *testing.T) { + obj := &InventoryPhysicalCount{} + var fernTestValueState *InventoryState + obj.SetState(fernTestValueState) + assert.Equal(t, fernTestValueState, obj.State) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &InventoryPhysicalCount{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuantity", func(t *testing.T) { + obj := &InventoryPhysicalCount{} + var fernTestValueQuantity *string + obj.SetQuantity(fernTestValueQuantity) + assert.Equal(t, fernTestValueQuantity, obj.Quantity) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSource", func(t *testing.T) { + obj := &InventoryPhysicalCount{} + var fernTestValueSource *SourceApplication + obj.SetSource(fernTestValueSource) + assert.Equal(t, fernTestValueSource, obj.Source) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEmployeeID", func(t *testing.T) { + obj := &InventoryPhysicalCount{} + var fernTestValueEmployeeID *string + obj.SetEmployeeID(fernTestValueEmployeeID) + assert.Equal(t, fernTestValueEmployeeID, obj.EmployeeID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTeamMemberID", func(t *testing.T) { + obj := &InventoryPhysicalCount{} + var fernTestValueTeamMemberID *string + obj.SetTeamMemberID(fernTestValueTeamMemberID) + assert.Equal(t, fernTestValueTeamMemberID, obj.TeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOccurredAt", func(t *testing.T) { + obj := &InventoryPhysicalCount{} + var fernTestValueOccurredAt *string + obj.SetOccurredAt(fernTestValueOccurredAt) + assert.Equal(t, fernTestValueOccurredAt, obj.OccurredAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &InventoryPhysicalCount{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInventoryPhysicalCount(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryPhysicalCount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetReferenceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + var expected *string + obj.ReferenceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReferenceID(), "getter should return the property value") + }) + + t.Run("GetReferenceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + obj.ReferenceID = nil + + // Act & Assert + assert.Nil(t, obj.GetReferenceID(), "getter should return nil when property is nil") + }) + + t.Run("GetReferenceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryPhysicalCount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReferenceID() // Should return zero value + }) + + t.Run("GetCatalogObjectID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + var expected *string + obj.CatalogObjectID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogObjectID(), "getter should return the property value") + }) + + t.Run("GetCatalogObjectID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + obj.CatalogObjectID = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogObjectID(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogObjectID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryPhysicalCount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogObjectID() // Should return zero value + }) + + t.Run("GetCatalogObjectType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + var expected *string + obj.CatalogObjectType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogObjectType(), "getter should return the property value") + }) + + t.Run("GetCatalogObjectType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + obj.CatalogObjectType = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogObjectType(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogObjectType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryPhysicalCount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogObjectType() // Should return zero value + }) + + t.Run("GetState", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + var expected *InventoryState + obj.State = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetState(), "getter should return the property value") + }) + + t.Run("GetState_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + obj.State = nil + + // Act & Assert + assert.Nil(t, obj.GetState(), "getter should return nil when property is nil") + }) + + t.Run("GetState_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryPhysicalCount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetState() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryPhysicalCount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetQuantity", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + var expected *string + obj.Quantity = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQuantity(), "getter should return the property value") + }) + + t.Run("GetQuantity_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + obj.Quantity = nil + + // Act & Assert + assert.Nil(t, obj.GetQuantity(), "getter should return nil when property is nil") + }) + + t.Run("GetQuantity_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryPhysicalCount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQuantity() // Should return zero value + }) + + t.Run("GetSource", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + var expected *SourceApplication + obj.Source = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSource(), "getter should return the property value") + }) + + t.Run("GetSource_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + obj.Source = nil + + // Act & Assert + assert.Nil(t, obj.GetSource(), "getter should return nil when property is nil") + }) + + t.Run("GetSource_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryPhysicalCount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSource() // Should return zero value + }) + + t.Run("GetEmployeeID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + var expected *string + obj.EmployeeID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEmployeeID(), "getter should return the property value") + }) + + t.Run("GetEmployeeID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + obj.EmployeeID = nil + + // Act & Assert + assert.Nil(t, obj.GetEmployeeID(), "getter should return nil when property is nil") + }) + + t.Run("GetEmployeeID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryPhysicalCount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEmployeeID() // Should return zero value + }) + + t.Run("GetTeamMemberID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + var expected *string + obj.TeamMemberID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMemberID(), "getter should return the property value") + }) + + t.Run("GetTeamMemberID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + obj.TeamMemberID = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMemberID(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMemberID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryPhysicalCount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMemberID() // Should return zero value + }) + + t.Run("GetOccurredAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + var expected *string + obj.OccurredAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOccurredAt(), "getter should return the property value") + }) + + t.Run("GetOccurredAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + obj.OccurredAt = nil + + // Act & Assert + assert.Nil(t, obj.GetOccurredAt(), "getter should return nil when property is nil") + }) + + t.Run("GetOccurredAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryPhysicalCount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOccurredAt() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryPhysicalCount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInventoryPhysicalCount(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReferenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + var fernTestValueReferenceID *string + + // Act + obj.SetReferenceID(fernTestValueReferenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogObjectID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + var fernTestValueCatalogObjectID *string + + // Act + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogObjectType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + var fernTestValueCatalogObjectType *string + + // Act + obj.SetCatalogObjectType(fernTestValueCatalogObjectType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetState_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + var fernTestValueState *InventoryState + + // Act + obj.SetState(fernTestValueState) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuantity_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + var fernTestValueQuantity *string + + // Act + obj.SetQuantity(fernTestValueQuantity) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSource_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + var fernTestValueSource *SourceApplication + + // Act + obj.SetSource(fernTestValueSource) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEmployeeID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + var fernTestValueEmployeeID *string + + // Act + obj.SetEmployeeID(fernTestValueEmployeeID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + var fernTestValueTeamMemberID *string + + // Act + obj.SetTeamMemberID(fernTestValueTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOccurredAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + var fernTestValueOccurredAt *string + + // Act + obj.SetOccurredAt(fernTestValueOccurredAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInventoryTransfer(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &InventoryTransfer{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReferenceID", func(t *testing.T) { + obj := &InventoryTransfer{} + var fernTestValueReferenceID *string + obj.SetReferenceID(fernTestValueReferenceID) + assert.Equal(t, fernTestValueReferenceID, obj.ReferenceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetState", func(t *testing.T) { + obj := &InventoryTransfer{} + var fernTestValueState *InventoryState + obj.SetState(fernTestValueState) + assert.Equal(t, fernTestValueState, obj.State) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFromLocationID", func(t *testing.T) { + obj := &InventoryTransfer{} + var fernTestValueFromLocationID *string + obj.SetFromLocationID(fernTestValueFromLocationID) + assert.Equal(t, fernTestValueFromLocationID, obj.FromLocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetToLocationID", func(t *testing.T) { + obj := &InventoryTransfer{} + var fernTestValueToLocationID *string + obj.SetToLocationID(fernTestValueToLocationID) + assert.Equal(t, fernTestValueToLocationID, obj.ToLocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogObjectID", func(t *testing.T) { + obj := &InventoryTransfer{} + var fernTestValueCatalogObjectID *string + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + assert.Equal(t, fernTestValueCatalogObjectID, obj.CatalogObjectID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogObjectType", func(t *testing.T) { + obj := &InventoryTransfer{} + var fernTestValueCatalogObjectType *string + obj.SetCatalogObjectType(fernTestValueCatalogObjectType) + assert.Equal(t, fernTestValueCatalogObjectType, obj.CatalogObjectType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuantity", func(t *testing.T) { + obj := &InventoryTransfer{} + var fernTestValueQuantity *string + obj.SetQuantity(fernTestValueQuantity) + assert.Equal(t, fernTestValueQuantity, obj.Quantity) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOccurredAt", func(t *testing.T) { + obj := &InventoryTransfer{} + var fernTestValueOccurredAt *string + obj.SetOccurredAt(fernTestValueOccurredAt) + assert.Equal(t, fernTestValueOccurredAt, obj.OccurredAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &InventoryTransfer{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSource", func(t *testing.T) { + obj := &InventoryTransfer{} + var fernTestValueSource *SourceApplication + obj.SetSource(fernTestValueSource) + assert.Equal(t, fernTestValueSource, obj.Source) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEmployeeID", func(t *testing.T) { + obj := &InventoryTransfer{} + var fernTestValueEmployeeID *string + obj.SetEmployeeID(fernTestValueEmployeeID) + assert.Equal(t, fernTestValueEmployeeID, obj.EmployeeID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTeamMemberID", func(t *testing.T) { + obj := &InventoryTransfer{} + var fernTestValueTeamMemberID *string + obj.SetTeamMemberID(fernTestValueTeamMemberID) + assert.Equal(t, fernTestValueTeamMemberID, obj.TeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInventoryTransfer(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryTransfer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetReferenceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + var expected *string + obj.ReferenceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReferenceID(), "getter should return the property value") + }) + + t.Run("GetReferenceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + obj.ReferenceID = nil + + // Act & Assert + assert.Nil(t, obj.GetReferenceID(), "getter should return nil when property is nil") + }) + + t.Run("GetReferenceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryTransfer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReferenceID() // Should return zero value + }) + + t.Run("GetState", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + var expected *InventoryState + obj.State = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetState(), "getter should return the property value") + }) + + t.Run("GetState_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + obj.State = nil + + // Act & Assert + assert.Nil(t, obj.GetState(), "getter should return nil when property is nil") + }) + + t.Run("GetState_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryTransfer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetState() // Should return zero value + }) + + t.Run("GetFromLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + var expected *string + obj.FromLocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFromLocationID(), "getter should return the property value") + }) + + t.Run("GetFromLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + obj.FromLocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetFromLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetFromLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryTransfer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFromLocationID() // Should return zero value + }) + + t.Run("GetToLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + var expected *string + obj.ToLocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetToLocationID(), "getter should return the property value") + }) + + t.Run("GetToLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + obj.ToLocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetToLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetToLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryTransfer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetToLocationID() // Should return zero value + }) + + t.Run("GetCatalogObjectID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + var expected *string + obj.CatalogObjectID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogObjectID(), "getter should return the property value") + }) + + t.Run("GetCatalogObjectID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + obj.CatalogObjectID = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogObjectID(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogObjectID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryTransfer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogObjectID() // Should return zero value + }) + + t.Run("GetCatalogObjectType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + var expected *string + obj.CatalogObjectType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogObjectType(), "getter should return the property value") + }) + + t.Run("GetCatalogObjectType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + obj.CatalogObjectType = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogObjectType(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogObjectType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryTransfer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogObjectType() // Should return zero value + }) + + t.Run("GetQuantity", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + var expected *string + obj.Quantity = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQuantity(), "getter should return the property value") + }) + + t.Run("GetQuantity_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + obj.Quantity = nil + + // Act & Assert + assert.Nil(t, obj.GetQuantity(), "getter should return nil when property is nil") + }) + + t.Run("GetQuantity_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryTransfer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQuantity() // Should return zero value + }) + + t.Run("GetOccurredAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + var expected *string + obj.OccurredAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOccurredAt(), "getter should return the property value") + }) + + t.Run("GetOccurredAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + obj.OccurredAt = nil + + // Act & Assert + assert.Nil(t, obj.GetOccurredAt(), "getter should return nil when property is nil") + }) + + t.Run("GetOccurredAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryTransfer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOccurredAt() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryTransfer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetSource", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + var expected *SourceApplication + obj.Source = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSource(), "getter should return the property value") + }) + + t.Run("GetSource_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + obj.Source = nil + + // Act & Assert + assert.Nil(t, obj.GetSource(), "getter should return nil when property is nil") + }) + + t.Run("GetSource_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryTransfer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSource() // Should return zero value + }) + + t.Run("GetEmployeeID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + var expected *string + obj.EmployeeID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEmployeeID(), "getter should return the property value") + }) + + t.Run("GetEmployeeID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + obj.EmployeeID = nil + + // Act & Assert + assert.Nil(t, obj.GetEmployeeID(), "getter should return nil when property is nil") + }) + + t.Run("GetEmployeeID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryTransfer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEmployeeID() // Should return zero value + }) + + t.Run("GetTeamMemberID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + var expected *string + obj.TeamMemberID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMemberID(), "getter should return the property value") + }) + + t.Run("GetTeamMemberID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + obj.TeamMemberID = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMemberID(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMemberID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryTransfer + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMemberID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInventoryTransfer(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReferenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + var fernTestValueReferenceID *string + + // Act + obj.SetReferenceID(fernTestValueReferenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetState_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + var fernTestValueState *InventoryState + + // Act + obj.SetState(fernTestValueState) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFromLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + var fernTestValueFromLocationID *string + + // Act + obj.SetFromLocationID(fernTestValueFromLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetToLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + var fernTestValueToLocationID *string + + // Act + obj.SetToLocationID(fernTestValueToLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogObjectID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + var fernTestValueCatalogObjectID *string + + // Act + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogObjectType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + var fernTestValueCatalogObjectType *string + + // Act + obj.SetCatalogObjectType(fernTestValueCatalogObjectType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuantity_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + var fernTestValueQuantity *string + + // Act + obj.SetQuantity(fernTestValueQuantity) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOccurredAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + var fernTestValueOccurredAt *string + + // Act + obj.SetOccurredAt(fernTestValueOccurredAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSource_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + var fernTestValueSource *SourceApplication + + // Act + obj.SetSource(fernTestValueSource) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEmployeeID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + var fernTestValueEmployeeID *string + + // Act + obj.SetEmployeeID(fernTestValueEmployeeID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + var fernTestValueTeamMemberID *string + + // Act + obj.SetTeamMemberID(fernTestValueTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingBatchChangeInventoryRequest(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchChangeInventoryRequest{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BatchChangeInventoryRequest + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BatchChangeInventoryRequest + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BatchChangeInventoryRequest + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBatchChangeInventoryResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchChangeInventoryResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BatchChangeInventoryResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BatchChangeInventoryResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BatchChangeInventoryResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBatchGetInventoryChangesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryChangesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BatchGetInventoryChangesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BatchGetInventoryChangesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BatchGetInventoryChangesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBatchGetInventoryCountsRequest(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsRequest{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BatchGetInventoryCountsRequest + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BatchGetInventoryCountsRequest + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BatchGetInventoryCountsRequest + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBatchGetInventoryCountsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetInventoryCountsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BatchGetInventoryCountsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BatchGetInventoryCountsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BatchGetInventoryCountsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBatchRetrieveInventoryChangesRequest(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchRetrieveInventoryChangesRequest{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BatchRetrieveInventoryChangesRequest + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BatchRetrieveInventoryChangesRequest + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BatchRetrieveInventoryChangesRequest + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetInventoryAdjustmentResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryAdjustmentResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetInventoryAdjustmentResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetInventoryAdjustmentResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetInventoryAdjustmentResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetInventoryChangesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryChangesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetInventoryChangesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetInventoryChangesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetInventoryChangesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetInventoryCountResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryCountResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetInventoryCountResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetInventoryCountResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetInventoryCountResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetInventoryPhysicalCountResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryPhysicalCountResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetInventoryPhysicalCountResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetInventoryPhysicalCountResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetInventoryPhysicalCountResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetInventoryTransferResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInventoryTransferResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetInventoryTransferResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetInventoryTransferResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetInventoryTransferResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInventoryAdjustment(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustment{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InventoryAdjustment + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InventoryAdjustment + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InventoryAdjustment + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInventoryAdjustmentGroup(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryAdjustmentGroup{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InventoryAdjustmentGroup + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InventoryAdjustmentGroup + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InventoryAdjustmentGroup + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInventoryChange(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryChange{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InventoryChange + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InventoryChange + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InventoryChange + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInventoryCount(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCount{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InventoryCount + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InventoryCount + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InventoryCount + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInventoryPhysicalCount(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryPhysicalCount{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InventoryPhysicalCount + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InventoryPhysicalCount + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InventoryPhysicalCount + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInventoryTransfer(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryTransfer{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InventoryTransfer + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InventoryTransfer + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InventoryTransfer + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringBatchChangeInventoryRequest(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BatchChangeInventoryRequest{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchChangeInventoryRequest + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBatchChangeInventoryResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BatchChangeInventoryResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchChangeInventoryResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBatchGetInventoryChangesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BatchGetInventoryChangesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetInventoryChangesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBatchGetInventoryCountsRequest(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BatchGetInventoryCountsRequest{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetInventoryCountsRequest + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBatchGetInventoryCountsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BatchGetInventoryCountsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetInventoryCountsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBatchRetrieveInventoryChangesRequest(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BatchRetrieveInventoryChangesRequest{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchRetrieveInventoryChangesRequest + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetInventoryAdjustmentResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetInventoryAdjustmentResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetInventoryAdjustmentResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetInventoryChangesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetInventoryChangesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetInventoryChangesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetInventoryCountResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetInventoryCountResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetInventoryCountResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetInventoryPhysicalCountResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetInventoryPhysicalCountResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetInventoryPhysicalCountResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetInventoryTransferResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetInventoryTransferResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetInventoryTransferResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInventoryAdjustment(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InventoryAdjustment{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryAdjustment + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInventoryAdjustmentGroup(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InventoryAdjustmentGroup{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryAdjustmentGroup + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInventoryChange(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InventoryChange{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryChange + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInventoryCount(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InventoryCount{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryCount + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInventoryPhysicalCount(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InventoryPhysicalCount{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryPhysicalCount + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInventoryTransfer(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InventoryTransfer{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryTransfer + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestEnumInventoryChangeType(t *testing.T) { + t.Run("NewFromString_PHYSICAL_COUNT", func(t *testing.T) { + t.Parallel() + val, err := NewInventoryChangeTypeFromString("PHYSICAL_COUNT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InventoryChangeType("PHYSICAL_COUNT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ADJUSTMENT", func(t *testing.T) { + t.Parallel() + val, err := NewInventoryChangeTypeFromString("ADJUSTMENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InventoryChangeType("ADJUSTMENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TRANSFER", func(t *testing.T) { + t.Parallel() + val, err := NewInventoryChangeTypeFromString("TRANSFER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InventoryChangeType("TRANSFER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewInventoryChangeTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewInventoryChangeTypeFromString("PHYSICAL_COUNT") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumInventoryState(t *testing.T) { + t.Run("NewFromString_CUSTOM", func(t *testing.T) { + t.Parallel() + val, err := NewInventoryStateFromString("CUSTOM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InventoryState("CUSTOM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IN_STOCK", func(t *testing.T) { + t.Parallel() + val, err := NewInventoryStateFromString("IN_STOCK") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InventoryState("IN_STOCK"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SOLD", func(t *testing.T) { + t.Parallel() + val, err := NewInventoryStateFromString("SOLD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InventoryState("SOLD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RETURNED_BY_CUSTOMER", func(t *testing.T) { + t.Parallel() + val, err := NewInventoryStateFromString("RETURNED_BY_CUSTOMER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InventoryState("RETURNED_BY_CUSTOMER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RESERVED_FOR_SALE", func(t *testing.T) { + t.Parallel() + val, err := NewInventoryStateFromString("RESERVED_FOR_SALE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InventoryState("RESERVED_FOR_SALE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SOLD_ONLINE", func(t *testing.T) { + t.Parallel() + val, err := NewInventoryStateFromString("SOLD_ONLINE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InventoryState("SOLD_ONLINE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ORDERED_FROM_VENDOR", func(t *testing.T) { + t.Parallel() + val, err := NewInventoryStateFromString("ORDERED_FROM_VENDOR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InventoryState("ORDERED_FROM_VENDOR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RECEIVED_FROM_VENDOR", func(t *testing.T) { + t.Parallel() + val, err := NewInventoryStateFromString("RECEIVED_FROM_VENDOR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InventoryState("RECEIVED_FROM_VENDOR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IN_TRANSIT_TO", func(t *testing.T) { + t.Parallel() + val, err := NewInventoryStateFromString("IN_TRANSIT_TO") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InventoryState("IN_TRANSIT_TO"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NONE", func(t *testing.T) { + t.Parallel() + val, err := NewInventoryStateFromString("NONE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InventoryState("NONE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_WASTE", func(t *testing.T) { + t.Parallel() + val, err := NewInventoryStateFromString("WASTE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InventoryState("WASTE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UNLINKED_RETURN", func(t *testing.T) { + t.Parallel() + val, err := NewInventoryStateFromString("UNLINKED_RETURN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InventoryState("UNLINKED_RETURN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_COMPOSED", func(t *testing.T) { + t.Parallel() + val, err := NewInventoryStateFromString("COMPOSED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InventoryState("COMPOSED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DECOMPOSED", func(t *testing.T) { + t.Parallel() + val, err := NewInventoryStateFromString("DECOMPOSED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InventoryState("DECOMPOSED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SUPPORTED_BY_NEWER_VERSION", func(t *testing.T) { + t.Parallel() + val, err := NewInventoryStateFromString("SUPPORTED_BY_NEWER_VERSION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InventoryState("SUPPORTED_BY_NEWER_VERSION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IN_TRANSIT", func(t *testing.T) { + t.Parallel() + val, err := NewInventoryStateFromString("IN_TRANSIT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InventoryState("IN_TRANSIT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewInventoryStateFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewInventoryStateFromString("CUSTOM") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestExtraPropertiesBatchChangeInventoryRequest(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BatchChangeInventoryRequest{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchChangeInventoryRequest + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBatchChangeInventoryResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BatchChangeInventoryResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchChangeInventoryResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBatchGetInventoryChangesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BatchGetInventoryChangesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetInventoryChangesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBatchGetInventoryCountsRequest(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BatchGetInventoryCountsRequest{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetInventoryCountsRequest + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBatchGetInventoryCountsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BatchGetInventoryCountsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetInventoryCountsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBatchRetrieveInventoryChangesRequest(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BatchRetrieveInventoryChangesRequest{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchRetrieveInventoryChangesRequest + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetInventoryAdjustmentResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetInventoryAdjustmentResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetInventoryAdjustmentResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetInventoryChangesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetInventoryChangesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetInventoryChangesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetInventoryCountResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetInventoryCountResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetInventoryCountResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetInventoryPhysicalCountResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetInventoryPhysicalCountResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetInventoryPhysicalCountResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetInventoryTransferResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetInventoryTransferResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetInventoryTransferResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInventoryAdjustment(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InventoryAdjustment{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryAdjustment + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInventoryAdjustmentGroup(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InventoryAdjustmentGroup{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryAdjustmentGroup + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInventoryChange(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InventoryChange{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryChange + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInventoryCount(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InventoryCount{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryCount + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInventoryPhysicalCount(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InventoryPhysicalCount{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryPhysicalCount + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInventoryTransfer(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InventoryTransfer{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryTransfer + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/invoices.go b/invoices.go index 829dcac..e5ac7e9 100644 --- a/invoices.go +++ b/invoices.go @@ -38,6 +38,27 @@ func (c *CreateInvoiceAttachmentRequest) SetInvoiceID(invoiceID string) { c.require(createInvoiceAttachmentRequestFieldInvoiceID) } +func (c *CreateInvoiceAttachmentRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateInvoiceAttachmentRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateInvoiceAttachmentRequest(body) + return nil +} + +func (c *CreateInvoiceAttachmentRequest) MarshalJSON() ([]byte, error) { + type embed CreateInvoiceAttachmentRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( deleteInvoiceAttachmentRequestFieldInvoiceID = big.NewInt(1 << 0) deleteInvoiceAttachmentRequestFieldAttachmentID = big.NewInt(1 << 1) @@ -112,6 +133,27 @@ func (c *CancelInvoiceRequest) SetVersion(version int) { c.require(cancelInvoiceRequestFieldVersion) } +func (c *CancelInvoiceRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CancelInvoiceRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CancelInvoiceRequest(body) + return nil +} + +func (c *CancelInvoiceRequest) MarshalJSON() ([]byte, error) { + type embed CancelInvoiceRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( createInvoiceRequestFieldInvoice = big.NewInt(1 << 0) createInvoiceRequestFieldIdempotencyKey = big.NewInt(1 << 1) @@ -119,7 +161,7 @@ var ( type CreateInvoiceRequest struct { // The invoice to create. - Invoice *Invoice `json:"invoice,omitempty" url:"-"` + Invoice *Invoice `json:"invoice" url:"-"` // A unique string that identifies the `CreateInvoice` request. If you do not // provide `idempotency_key` (or provide an empty string as the value), the endpoint // treats each request as independent. @@ -152,6 +194,27 @@ func (c *CreateInvoiceRequest) SetIdempotencyKey(idempotencyKey *string) { c.require(createInvoiceRequestFieldIdempotencyKey) } +func (c *CreateInvoiceRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateInvoiceRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateInvoiceRequest(body) + return nil +} + +func (c *CreateInvoiceRequest) MarshalJSON() ([]byte, error) { + type embed CreateInvoiceRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( deleteInvoicesRequestFieldInvoiceID = big.NewInt(1 << 0) deleteInvoicesRequestFieldVersion = big.NewInt(1 << 1) @@ -317,6 +380,27 @@ func (p *PublishInvoiceRequest) SetIdempotencyKey(idempotencyKey *string) { p.require(publishInvoiceRequestFieldIdempotencyKey) } +func (p *PublishInvoiceRequest) UnmarshalJSON(data []byte) error { + type unmarshaler PublishInvoiceRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *p = PublishInvoiceRequest(body) + return nil +} + +func (p *PublishInvoiceRequest) MarshalJSON() ([]byte, error) { + type embed PublishInvoiceRequest + var marshaler = struct { + embed + }{ + embed: embed(*p), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, p.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( searchInvoicesRequestFieldQuery = big.NewInt(1 << 0) searchInvoicesRequestFieldLimit = big.NewInt(1 << 1) @@ -325,7 +409,7 @@ var ( type SearchInvoicesRequest struct { // Describes the query criteria for searching invoices. - Query *InvoiceQuery `json:"query,omitempty" url:"-"` + Query *InvoiceQuery `json:"query" url:"-"` // The maximum number of invoices to return (200 is the maximum `limit`). // If not provided, the server uses a default limit of 100 invoices. Limit *int `json:"limit,omitempty" url:"-"` @@ -367,6 +451,27 @@ func (s *SearchInvoicesRequest) SetCursor(cursor *string) { s.require(searchInvoicesRequestFieldCursor) } +func (s *SearchInvoicesRequest) UnmarshalJSON(data []byte) error { + type unmarshaler SearchInvoicesRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *s = SearchInvoicesRequest(body) + return nil +} + +func (s *SearchInvoicesRequest) MarshalJSON() ([]byte, error) { + type embed SearchInvoicesRequest + var marshaler = struct { + embed + }{ + embed: embed(*s), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, s.explicitFields) + return json.Marshal(explicitMarshaler) +} + // The response returned by the `CancelInvoice` request. var ( cancelInvoiceResponseFieldInvoice = big.NewInt(1 << 0) @@ -401,6 +506,9 @@ func (c *CancelInvoiceResponse) GetErrors() []*Error { } func (c *CancelInvoiceResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -453,6 +561,9 @@ func (c *CancelInvoiceResponse) MarshalJSON() ([]byte, error) { } func (c *CancelInvoiceResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -499,6 +610,9 @@ func (c *CreateInvoiceAttachmentRequestData) GetDescription() *string { } func (c *CreateInvoiceAttachmentRequestData) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -551,6 +665,9 @@ func (c *CreateInvoiceAttachmentRequestData) MarshalJSON() ([]byte, error) { } func (c *CreateInvoiceAttachmentRequestData) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -596,6 +713,9 @@ func (c *CreateInvoiceAttachmentResponse) GetErrors() []*Error { } func (c *CreateInvoiceAttachmentResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -648,6 +768,9 @@ func (c *CreateInvoiceAttachmentResponse) MarshalJSON() ([]byte, error) { } func (c *CreateInvoiceAttachmentResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -693,6 +816,9 @@ func (c *CreateInvoiceResponse) GetErrors() []*Error { } func (c *CreateInvoiceResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -745,6 +871,9 @@ func (c *CreateInvoiceResponse) MarshalJSON() ([]byte, error) { } func (c *CreateInvoiceResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -780,6 +909,9 @@ func (d *DeleteInvoiceAttachmentResponse) GetErrors() []*Error { } func (d *DeleteInvoiceAttachmentResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -825,6 +957,9 @@ func (d *DeleteInvoiceAttachmentResponse) MarshalJSON() ([]byte, error) { } func (d *DeleteInvoiceAttachmentResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -860,6 +995,9 @@ func (d *DeleteInvoiceResponse) GetErrors() []*Error { } func (d *DeleteInvoiceResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -905,6 +1043,9 @@ func (d *DeleteInvoiceResponse) MarshalJSON() ([]byte, error) { } func (d *DeleteInvoiceResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -950,6 +1091,9 @@ func (g *GetInvoiceResponse) GetErrors() []*Error { } func (g *GetInvoiceResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -1002,6 +1146,9 @@ func (g *GetInvoiceResponse) MarshalJSON() ([]byte, error) { } func (g *GetInvoiceResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -1348,6 +1495,9 @@ func (i *Invoice) GetCreatorTeamMemberID() *string { } func (i *Invoice) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -1561,6 +1711,9 @@ func (i *Invoice) MarshalJSON() ([]byte, error) { } func (i *Invoice) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -1644,6 +1797,9 @@ func (i *InvoiceAcceptedPaymentMethods) GetCashAppPay() *bool { } func (i *InvoiceAcceptedPaymentMethods) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -1717,6 +1873,9 @@ func (i *InvoiceAcceptedPaymentMethods) MarshalJSON() ([]byte, error) { } func (i *InvoiceAcceptedPaymentMethods) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -1815,6 +1974,9 @@ func (i *InvoiceAttachment) GetUploadedAt() *string { } func (i *InvoiceAttachment) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -1902,6 +2064,9 @@ func (i *InvoiceAttachment) MarshalJSON() ([]byte, error) { } func (i *InvoiceAttachment) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -1988,6 +2153,9 @@ func (i *InvoiceCustomField) GetPlacement() *InvoiceCustomFieldPlacement { } func (i *InvoiceCustomField) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -2047,6 +2215,9 @@ func (i *InvoiceCustomField) MarshalJSON() ([]byte, error) { } func (i *InvoiceCustomField) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -2145,6 +2316,9 @@ func (i *InvoiceFilter) GetCustomerIDs() []string { } func (i *InvoiceFilter) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -2197,6 +2371,9 @@ func (i *InvoiceFilter) MarshalJSON() ([]byte, error) { } func (i *InvoiceFilter) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -2278,6 +2455,9 @@ func (i *InvoicePaymentReminder) GetSentAt() *string { } func (i *InvoicePaymentReminder) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -2351,6 +2531,9 @@ func (i *InvoicePaymentReminder) MarshalJSON() ([]byte, error) { } func (i *InvoicePaymentReminder) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -2578,6 +2761,9 @@ func (i *InvoicePaymentRequest) GetRoundingAdjustmentIncludedMoney() *Money { } func (i *InvoicePaymentRequest) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -2707,6 +2893,9 @@ func (i *InvoicePaymentRequest) MarshalJSON() ([]byte, error) { } func (i *InvoicePaymentRequest) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -2753,6 +2942,9 @@ func (i *InvoiceQuery) GetSort() *InvoiceSort { } func (i *InvoiceQuery) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -2805,6 +2997,9 @@ func (i *InvoiceQuery) MarshalJSON() ([]byte, error) { } func (i *InvoiceQuery) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -2917,6 +3112,9 @@ func (i *InvoiceRecipient) GetTaxIDs() *InvoiceRecipientTaxIDs { } func (i *InvoiceRecipient) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -3011,6 +3209,9 @@ func (i *InvoiceRecipient) MarshalJSON() ([]byte, error) { } func (i *InvoiceRecipient) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -3048,6 +3249,9 @@ func (i *InvoiceRecipientTaxIDs) GetEuVat() *string { } func (i *InvoiceRecipientTaxIDs) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -3093,6 +3297,9 @@ func (i *InvoiceRecipientTaxIDs) MarshalJSON() ([]byte, error) { } func (i *InvoiceRecipientTaxIDs) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -3201,6 +3408,9 @@ func (i *InvoiceSort) GetOrder() *SortOrder { } func (i *InvoiceSort) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -3253,6 +3463,9 @@ func (i *InvoiceSort) MarshalJSON() ([]byte, error) { } func (i *InvoiceSort) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -3361,6 +3574,9 @@ func (l *ListInvoicesResponse) GetErrors() []*Error { } func (l *ListInvoicesResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -3420,6 +3636,9 @@ func (l *ListInvoicesResponse) MarshalJSON() ([]byte, error) { } func (l *ListInvoicesResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -3465,6 +3684,9 @@ func (p *PublishInvoiceResponse) GetErrors() []*Error { } func (p *PublishInvoiceResponse) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -3517,6 +3739,9 @@ func (p *PublishInvoiceResponse) MarshalJSON() ([]byte, error) { } func (p *PublishInvoiceResponse) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -3575,6 +3800,9 @@ func (s *SearchInvoicesResponse) GetErrors() []*Error { } func (s *SearchInvoicesResponse) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -3634,6 +3862,9 @@ func (s *SearchInvoicesResponse) MarshalJSON() ([]byte, error) { } func (s *SearchInvoicesResponse) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -3679,6 +3910,9 @@ func (u *UpdateInvoiceResponse) GetErrors() []*Error { } func (u *UpdateInvoiceResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -3731,6 +3965,9 @@ func (u *UpdateInvoiceResponse) MarshalJSON() ([]byte, error) { } func (u *UpdateInvoiceResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -3756,7 +3993,7 @@ type UpdateInvoiceRequest struct { // null values or the `remove` field (for individual payment requests or reminders). // The current invoice `version` is also required. For more information, including requirements, // limitations, and more examples, see [Update an Invoice](https://developer.squareup.com/docs/invoices-api/update-invoices). - Invoice *Invoice `json:"invoice,omitempty" url:"-"` + Invoice *Invoice `json:"invoice" url:"-"` // A unique string that identifies the `UpdateInvoice` request. If you do not // provide `idempotency_key` (or provide an empty string as the value), the endpoint // treats each request as independent. @@ -3806,3 +4043,24 @@ func (u *UpdateInvoiceRequest) SetFieldsToClear(fieldsToClear []string) { u.FieldsToClear = fieldsToClear u.require(updateInvoiceRequestFieldFieldsToClear) } + +func (u *UpdateInvoiceRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdateInvoiceRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdateInvoiceRequest(body) + return nil +} + +func (u *UpdateInvoiceRequest) MarshalJSON() ([]byte, error) { + type embed UpdateInvoiceRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/invoices/invoices_test/invoices_test.go b/invoices/invoices_test/invoices_test.go new file mode 100644 index 0000000..e9e185e --- /dev/null +++ b/invoices/invoices_test/invoices_test.go @@ -0,0 +1,461 @@ +// Code generated by Fern. DO NOT EDIT. + +package invoices_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + strings "strings" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestInvoicesListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.ListInvoicesRequest{ + LocationID: "location_id", + Cursor: square.String( + "cursor", + ), + Limit: square.Int( + 1, + ), + } + _, invocationErr := client.Invoices.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestInvoicesListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestInvoicesListWithWireMock", "GET", "/v2/invoices", map[string]string{"location_id": "location_id", "cursor": "cursor", "limit": "1"}, 1) +} + +func TestInvoicesCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CreateInvoiceRequest{ + Invoice: &square.Invoice{ + LocationID: square.String( + "ES0RJRZYEC39A", + ), + OrderID: square.String( + "CAISENgvlJ6jLWAzERDzjyHVybY", + ), + PrimaryRecipient: &square.InvoiceRecipient{ + CustomerID: square.String( + "JDKYHBWT1D4F8MFH63DBMEN8Y4", + ), + }, + PaymentRequests: []*square.InvoicePaymentRequest{ + &square.InvoicePaymentRequest{ + RequestType: square.InvoiceRequestTypeBalance.Ptr(), + DueDate: square.String( + "2030-01-24", + ), + TippingEnabled: square.Bool( + true, + ), + AutomaticPaymentSource: square.InvoiceAutomaticPaymentSourceNone.Ptr(), + Reminders: []*square.InvoicePaymentReminder{ + &square.InvoicePaymentReminder{ + RelativeScheduledDays: square.Int( + -1, + ), + Message: square.String( + "Your invoice is due tomorrow", + ), + }, + }, + }, + }, + DeliveryMethod: square.InvoiceDeliveryMethodEmail.Ptr(), + InvoiceNumber: square.String( + "inv-100", + ), + Title: square.String( + "Event Planning Services", + ), + Description: square.String( + "We appreciate your business!", + ), + ScheduledAt: square.String( + "2030-01-13T10:00:00Z", + ), + AcceptedPaymentMethods: &square.InvoiceAcceptedPaymentMethods{ + Card: square.Bool( + true, + ), + SquareGiftCard: square.Bool( + false, + ), + BankAccount: square.Bool( + false, + ), + BuyNowPayLater: square.Bool( + false, + ), + CashAppPay: square.Bool( + false, + ), + }, + CustomFields: []*square.InvoiceCustomField{ + &square.InvoiceCustomField{ + Label: square.String( + "Event Reference Number", + ), + Value: square.String( + "Ref. #1234", + ), + Placement: square.InvoiceCustomFieldPlacementAboveLineItems.Ptr(), + }, + &square.InvoiceCustomField{ + Label: square.String( + "Terms of Service", + ), + Value: square.String( + "The terms of service are...", + ), + Placement: square.InvoiceCustomFieldPlacementBelowLineItems.Ptr(), + }, + }, + SaleOrServiceDate: square.String( + "2030-01-24", + ), + StorePaymentMethodEnabled: square.Bool( + false, + ), + }, + IdempotencyKey: square.String( + "ce3748f9-5fc1-4762-aa12-aae5e843f1f4", + ), + } + _, invocationErr := client.Invoices.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestInvoicesCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestInvoicesCreateWithWireMock", "POST", "/v2/invoices", nil, 1) +} + +func TestInvoicesSearchWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.SearchInvoicesRequest{ + Query: &square.InvoiceQuery{ + Filter: &square.InvoiceFilter{ + LocationIDs: []string{ + "ES0RJRZYEC39A", + }, + CustomerIDs: []string{ + "JDKYHBWT1D4F8MFH63DBMEN8Y4", + }, + }, + Sort: &square.InvoiceSort{ + Field: square.InvoiceSortField( + "INVOICE_SORT_DATE", + ), + Order: square.SortOrderDesc.Ptr(), + }, + }, + Limit: square.Int( + 100, + ), + } + _, invocationErr := client.Invoices.Search( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestInvoicesSearchWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestInvoicesSearchWithWireMock", "POST", "/v2/invoices/search", nil, 1) +} + +func TestInvoicesGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.GetInvoicesRequest{ + InvoiceID: "invoice_id", + } + _, invocationErr := client.Invoices.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestInvoicesGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestInvoicesGetWithWireMock", "GET", "/v2/invoices/invoice_id", nil, 1) +} + +func TestInvoicesUpdateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.UpdateInvoiceRequest{ + InvoiceID: "invoice_id", + Invoice: &square.Invoice{ + Version: square.Int( + 1, + ), + PaymentRequests: []*square.InvoicePaymentRequest{ + &square.InvoicePaymentRequest{ + UID: square.String( + "2da7964f-f3d2-4f43-81e8-5aa220bf3355", + ), + TippingEnabled: square.Bool( + false, + ), + }, + }, + }, + IdempotencyKey: square.String( + "4ee82288-0910-499e-ab4c-5d0071dad1be", + ), + } + _, invocationErr := client.Invoices.Update( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestInvoicesUpdateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestInvoicesUpdateWithWireMock", "PUT", "/v2/invoices/invoice_id", nil, 1) +} + +func TestInvoicesDeleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.DeleteInvoicesRequest{ + InvoiceID: "invoice_id", + Version: square.Int( + 1, + ), + } + _, invocationErr := client.Invoices.Delete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestInvoicesDeleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestInvoicesDeleteWithWireMock", "DELETE", "/v2/invoices/invoice_id", map[string]string{"version": "1"}, 1) +} + +func TestInvoicesCreateInvoiceAttachmentWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CreateInvoiceAttachmentRequest{ + InvoiceID: "invoice_id", + ImageFile: strings.NewReader( + "", + ), + } + _, invocationErr := client.Invoices.CreateInvoiceAttachment( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestInvoicesCreateInvoiceAttachmentWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestInvoicesCreateInvoiceAttachmentWithWireMock", "POST", "/v2/invoices/invoice_id/attachments", nil, 1) +} + +func TestInvoicesDeleteInvoiceAttachmentWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.DeleteInvoiceAttachmentRequest{ + InvoiceID: "invoice_id", + AttachmentID: "attachment_id", + } + _, invocationErr := client.Invoices.DeleteInvoiceAttachment( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestInvoicesDeleteInvoiceAttachmentWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestInvoicesDeleteInvoiceAttachmentWithWireMock", "DELETE", "/v2/invoices/invoice_id/attachments/attachment_id", nil, 1) +} + +func TestInvoicesCancelWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CancelInvoiceRequest{ + InvoiceID: "invoice_id", + Version: 0, + } + _, invocationErr := client.Invoices.Cancel( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestInvoicesCancelWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestInvoicesCancelWithWireMock", "POST", "/v2/invoices/invoice_id/cancel", nil, 1) +} + +func TestInvoicesPublishWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.PublishInvoiceRequest{ + InvoiceID: "invoice_id", + Version: 1, + IdempotencyKey: square.String( + "32da42d0-1997-41b0-826b-f09464fc2c2e", + ), + } + _, invocationErr := client.Invoices.Publish( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestInvoicesPublishWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestInvoicesPublishWithWireMock", "POST", "/v2/invoices/invoice_id/publish", nil, 1) +} diff --git a/invoices_test.go b/invoices_test.go new file mode 100644 index 0000000..95253a4 --- /dev/null +++ b/invoices_test.go @@ -0,0 +1,9839 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersCreateInvoiceAttachmentRequest(t *testing.T) { + t.Run("SetInvoiceID", func(t *testing.T) { + obj := &CreateInvoiceAttachmentRequest{} + var fernTestValueInvoiceID string + obj.SetInvoiceID(fernTestValueInvoiceID) + assert.Equal(t, fernTestValueInvoiceID, obj.InvoiceID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateInvoiceAttachmentRequest(t *testing.T) { + t.Run("SetInvoiceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateInvoiceAttachmentRequest{} + var fernTestValueInvoiceID string + + // Act + obj.SetInvoiceID(fernTestValueInvoiceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteInvoiceAttachmentRequest(t *testing.T) { + t.Run("SetInvoiceID", func(t *testing.T) { + obj := &DeleteInvoiceAttachmentRequest{} + var fernTestValueInvoiceID string + obj.SetInvoiceID(fernTestValueInvoiceID) + assert.Equal(t, fernTestValueInvoiceID, obj.InvoiceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAttachmentID", func(t *testing.T) { + obj := &DeleteInvoiceAttachmentRequest{} + var fernTestValueAttachmentID string + obj.SetAttachmentID(fernTestValueAttachmentID) + assert.Equal(t, fernTestValueAttachmentID, obj.AttachmentID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDeleteInvoiceAttachmentRequest(t *testing.T) { + t.Run("SetInvoiceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteInvoiceAttachmentRequest{} + var fernTestValueInvoiceID string + + // Act + obj.SetInvoiceID(fernTestValueInvoiceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAttachmentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteInvoiceAttachmentRequest{} + var fernTestValueAttachmentID string + + // Act + obj.SetAttachmentID(fernTestValueAttachmentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCancelInvoiceRequest(t *testing.T) { + t.Run("SetInvoiceID", func(t *testing.T) { + obj := &CancelInvoiceRequest{} + var fernTestValueInvoiceID string + obj.SetInvoiceID(fernTestValueInvoiceID) + assert.Equal(t, fernTestValueInvoiceID, obj.InvoiceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &CancelInvoiceRequest{} + var fernTestValueVersion int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCancelInvoiceRequest(t *testing.T) { + t.Run("SetInvoiceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelInvoiceRequest{} + var fernTestValueInvoiceID string + + // Act + obj.SetInvoiceID(fernTestValueInvoiceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelInvoiceRequest{} + var fernTestValueVersion int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateInvoiceRequest(t *testing.T) { + t.Run("SetInvoice", func(t *testing.T) { + obj := &CreateInvoiceRequest{} + var fernTestValueInvoice *Invoice + obj.SetInvoice(fernTestValueInvoice) + assert.Equal(t, fernTestValueInvoice, obj.Invoice) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateInvoiceRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateInvoiceRequest(t *testing.T) { + t.Run("SetInvoice_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateInvoiceRequest{} + var fernTestValueInvoice *Invoice + + // Act + obj.SetInvoice(fernTestValueInvoice) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateInvoiceRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteInvoicesRequest(t *testing.T) { + t.Run("SetInvoiceID", func(t *testing.T) { + obj := &DeleteInvoicesRequest{} + var fernTestValueInvoiceID string + obj.SetInvoiceID(fernTestValueInvoiceID) + assert.Equal(t, fernTestValueInvoiceID, obj.InvoiceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &DeleteInvoicesRequest{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDeleteInvoicesRequest(t *testing.T) { + t.Run("SetInvoiceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteInvoicesRequest{} + var fernTestValueInvoiceID string + + // Act + obj.SetInvoiceID(fernTestValueInvoiceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteInvoicesRequest{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetInvoicesRequest(t *testing.T) { + t.Run("SetInvoiceID", func(t *testing.T) { + obj := &GetInvoicesRequest{} + var fernTestValueInvoiceID string + obj.SetInvoiceID(fernTestValueInvoiceID) + assert.Equal(t, fernTestValueInvoiceID, obj.InvoiceID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetInvoicesRequest(t *testing.T) { + t.Run("SetInvoiceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInvoicesRequest{} + var fernTestValueInvoiceID string + + // Act + obj.SetInvoiceID(fernTestValueInvoiceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListInvoicesRequest(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &ListInvoicesRequest{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListInvoicesRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListInvoicesRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListInvoicesRequest(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListInvoicesRequest{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListInvoicesRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListInvoicesRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPublishInvoiceRequest(t *testing.T) { + t.Run("SetInvoiceID", func(t *testing.T) { + obj := &PublishInvoiceRequest{} + var fernTestValueInvoiceID string + obj.SetInvoiceID(fernTestValueInvoiceID) + assert.Equal(t, fernTestValueInvoiceID, obj.InvoiceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &PublishInvoiceRequest{} + var fernTestValueVersion int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &PublishInvoiceRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitPublishInvoiceRequest(t *testing.T) { + t.Run("SetInvoiceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PublishInvoiceRequest{} + var fernTestValueInvoiceID string + + // Act + obj.SetInvoiceID(fernTestValueInvoiceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PublishInvoiceRequest{} + var fernTestValueVersion int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PublishInvoiceRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchInvoicesRequest(t *testing.T) { + t.Run("SetQuery", func(t *testing.T) { + obj := &SearchInvoicesRequest{} + var fernTestValueQuery *InvoiceQuery + obj.SetQuery(fernTestValueQuery) + assert.Equal(t, fernTestValueQuery, obj.Query) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &SearchInvoicesRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchInvoicesRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitSearchInvoicesRequest(t *testing.T) { + t.Run("SetQuery_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchInvoicesRequest{} + var fernTestValueQuery *InvoiceQuery + + // Act + obj.SetQuery(fernTestValueQuery) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchInvoicesRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchInvoicesRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCancelInvoiceResponse(t *testing.T) { + t.Run("SetInvoice", func(t *testing.T) { + obj := &CancelInvoiceResponse{} + var fernTestValueInvoice *Invoice + obj.SetInvoice(fernTestValueInvoice) + assert.Equal(t, fernTestValueInvoice, obj.Invoice) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &CancelInvoiceResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCancelInvoiceResponse(t *testing.T) { + t.Run("GetInvoice", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelInvoiceResponse{} + var expected *Invoice + obj.Invoice = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInvoice(), "getter should return the property value") + }) + + t.Run("GetInvoice_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelInvoiceResponse{} + obj.Invoice = nil + + // Act & Assert + assert.Nil(t, obj.GetInvoice(), "getter should return nil when property is nil") + }) + + t.Run("GetInvoice_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelInvoiceResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInvoice() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelInvoiceResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelInvoiceResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelInvoiceResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCancelInvoiceResponse(t *testing.T) { + t.Run("SetInvoice_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelInvoiceResponse{} + var fernTestValueInvoice *Invoice + + // Act + obj.SetInvoice(fernTestValueInvoice) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelInvoiceResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateInvoiceAttachmentRequestData(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateInvoiceAttachmentRequestData{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDescription", func(t *testing.T) { + obj := &CreateInvoiceAttachmentRequestData{} + var fernTestValueDescription *string + obj.SetDescription(fernTestValueDescription) + assert.Equal(t, fernTestValueDescription, obj.Description) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateInvoiceAttachmentRequestData(t *testing.T) { + t.Run("GetIdempotencyKey", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateInvoiceAttachmentRequestData{} + var expected *string + obj.IdempotencyKey = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIdempotencyKey(), "getter should return the property value") + }) + + t.Run("GetIdempotencyKey_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateInvoiceAttachmentRequestData{} + obj.IdempotencyKey = nil + + // Act & Assert + assert.Nil(t, obj.GetIdempotencyKey(), "getter should return nil when property is nil") + }) + + t.Run("GetIdempotencyKey_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateInvoiceAttachmentRequestData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIdempotencyKey() // Should return zero value + }) + + t.Run("GetDescription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateInvoiceAttachmentRequestData{} + var expected *string + obj.Description = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDescription(), "getter should return the property value") + }) + + t.Run("GetDescription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateInvoiceAttachmentRequestData{} + obj.Description = nil + + // Act & Assert + assert.Nil(t, obj.GetDescription(), "getter should return nil when property is nil") + }) + + t.Run("GetDescription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateInvoiceAttachmentRequestData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDescription() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateInvoiceAttachmentRequestData(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateInvoiceAttachmentRequestData{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDescription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateInvoiceAttachmentRequestData{} + var fernTestValueDescription *string + + // Act + obj.SetDescription(fernTestValueDescription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateInvoiceAttachmentResponse(t *testing.T) { + t.Run("SetAttachment", func(t *testing.T) { + obj := &CreateInvoiceAttachmentResponse{} + var fernTestValueAttachment *InvoiceAttachment + obj.SetAttachment(fernTestValueAttachment) + assert.Equal(t, fernTestValueAttachment, obj.Attachment) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateInvoiceAttachmentResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateInvoiceAttachmentResponse(t *testing.T) { + t.Run("GetAttachment", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateInvoiceAttachmentResponse{} + var expected *InvoiceAttachment + obj.Attachment = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAttachment(), "getter should return the property value") + }) + + t.Run("GetAttachment_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateInvoiceAttachmentResponse{} + obj.Attachment = nil + + // Act & Assert + assert.Nil(t, obj.GetAttachment(), "getter should return nil when property is nil") + }) + + t.Run("GetAttachment_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateInvoiceAttachmentResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAttachment() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateInvoiceAttachmentResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateInvoiceAttachmentResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateInvoiceAttachmentResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateInvoiceAttachmentResponse(t *testing.T) { + t.Run("SetAttachment_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateInvoiceAttachmentResponse{} + var fernTestValueAttachment *InvoiceAttachment + + // Act + obj.SetAttachment(fernTestValueAttachment) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateInvoiceAttachmentResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateInvoiceResponse(t *testing.T) { + t.Run("SetInvoice", func(t *testing.T) { + obj := &CreateInvoiceResponse{} + var fernTestValueInvoice *Invoice + obj.SetInvoice(fernTestValueInvoice) + assert.Equal(t, fernTestValueInvoice, obj.Invoice) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateInvoiceResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateInvoiceResponse(t *testing.T) { + t.Run("GetInvoice", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateInvoiceResponse{} + var expected *Invoice + obj.Invoice = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInvoice(), "getter should return the property value") + }) + + t.Run("GetInvoice_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateInvoiceResponse{} + obj.Invoice = nil + + // Act & Assert + assert.Nil(t, obj.GetInvoice(), "getter should return nil when property is nil") + }) + + t.Run("GetInvoice_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateInvoiceResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInvoice() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateInvoiceResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateInvoiceResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateInvoiceResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateInvoiceResponse(t *testing.T) { + t.Run("SetInvoice_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateInvoiceResponse{} + var fernTestValueInvoice *Invoice + + // Act + obj.SetInvoice(fernTestValueInvoice) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateInvoiceResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteInvoiceAttachmentResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DeleteInvoiceAttachmentResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeleteInvoiceAttachmentResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteInvoiceAttachmentResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteInvoiceAttachmentResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteInvoiceAttachmentResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeleteInvoiceAttachmentResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteInvoiceAttachmentResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteInvoiceResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DeleteInvoiceResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeleteInvoiceResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteInvoiceResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteInvoiceResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteInvoiceResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeleteInvoiceResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteInvoiceResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetInvoiceResponse(t *testing.T) { + t.Run("SetInvoice", func(t *testing.T) { + obj := &GetInvoiceResponse{} + var fernTestValueInvoice *Invoice + obj.SetInvoice(fernTestValueInvoice) + assert.Equal(t, fernTestValueInvoice, obj.Invoice) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &GetInvoiceResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetInvoiceResponse(t *testing.T) { + t.Run("GetInvoice", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInvoiceResponse{} + var expected *Invoice + obj.Invoice = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInvoice(), "getter should return the property value") + }) + + t.Run("GetInvoice_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInvoiceResponse{} + obj.Invoice = nil + + // Act & Assert + assert.Nil(t, obj.GetInvoice(), "getter should return nil when property is nil") + }) + + t.Run("GetInvoice_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetInvoiceResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInvoice() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInvoiceResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInvoiceResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetInvoiceResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetInvoiceResponse(t *testing.T) { + t.Run("SetInvoice_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInvoiceResponse{} + var fernTestValueInvoice *Invoice + + // Act + obj.SetInvoice(fernTestValueInvoice) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInvoiceResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoice(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &Invoice{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &Invoice{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &Invoice{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrderID", func(t *testing.T) { + obj := &Invoice{} + var fernTestValueOrderID *string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPrimaryRecipient", func(t *testing.T) { + obj := &Invoice{} + var fernTestValuePrimaryRecipient *InvoiceRecipient + obj.SetPrimaryRecipient(fernTestValuePrimaryRecipient) + assert.Equal(t, fernTestValuePrimaryRecipient, obj.PrimaryRecipient) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPaymentRequests", func(t *testing.T) { + obj := &Invoice{} + var fernTestValuePaymentRequests []*InvoicePaymentRequest + obj.SetPaymentRequests(fernTestValuePaymentRequests) + assert.Equal(t, fernTestValuePaymentRequests, obj.PaymentRequests) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeliveryMethod", func(t *testing.T) { + obj := &Invoice{} + var fernTestValueDeliveryMethod *InvoiceDeliveryMethod + obj.SetDeliveryMethod(fernTestValueDeliveryMethod) + assert.Equal(t, fernTestValueDeliveryMethod, obj.DeliveryMethod) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetInvoiceNumber", func(t *testing.T) { + obj := &Invoice{} + var fernTestValueInvoiceNumber *string + obj.SetInvoiceNumber(fernTestValueInvoiceNumber) + assert.Equal(t, fernTestValueInvoiceNumber, obj.InvoiceNumber) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTitle", func(t *testing.T) { + obj := &Invoice{} + var fernTestValueTitle *string + obj.SetTitle(fernTestValueTitle) + assert.Equal(t, fernTestValueTitle, obj.Title) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDescription", func(t *testing.T) { + obj := &Invoice{} + var fernTestValueDescription *string + obj.SetDescription(fernTestValueDescription) + assert.Equal(t, fernTestValueDescription, obj.Description) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetScheduledAt", func(t *testing.T) { + obj := &Invoice{} + var fernTestValueScheduledAt *string + obj.SetScheduledAt(fernTestValueScheduledAt) + assert.Equal(t, fernTestValueScheduledAt, obj.ScheduledAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPublicURL", func(t *testing.T) { + obj := &Invoice{} + var fernTestValuePublicURL *string + obj.SetPublicURL(fernTestValuePublicURL) + assert.Equal(t, fernTestValuePublicURL, obj.PublicURL) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNextPaymentAmountMoney", func(t *testing.T) { + obj := &Invoice{} + var fernTestValueNextPaymentAmountMoney *Money + obj.SetNextPaymentAmountMoney(fernTestValueNextPaymentAmountMoney) + assert.Equal(t, fernTestValueNextPaymentAmountMoney, obj.NextPaymentAmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &Invoice{} + var fernTestValueStatus *InvoiceStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTimezone", func(t *testing.T) { + obj := &Invoice{} + var fernTestValueTimezone *string + obj.SetTimezone(fernTestValueTimezone) + assert.Equal(t, fernTestValueTimezone, obj.Timezone) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &Invoice{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &Invoice{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAcceptedPaymentMethods", func(t *testing.T) { + obj := &Invoice{} + var fernTestValueAcceptedPaymentMethods *InvoiceAcceptedPaymentMethods + obj.SetAcceptedPaymentMethods(fernTestValueAcceptedPaymentMethods) + assert.Equal(t, fernTestValueAcceptedPaymentMethods, obj.AcceptedPaymentMethods) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomFields", func(t *testing.T) { + obj := &Invoice{} + var fernTestValueCustomFields []*InvoiceCustomField + obj.SetCustomFields(fernTestValueCustomFields) + assert.Equal(t, fernTestValueCustomFields, obj.CustomFields) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSubscriptionID", func(t *testing.T) { + obj := &Invoice{} + var fernTestValueSubscriptionID *string + obj.SetSubscriptionID(fernTestValueSubscriptionID) + assert.Equal(t, fernTestValueSubscriptionID, obj.SubscriptionID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSaleOrServiceDate", func(t *testing.T) { + obj := &Invoice{} + var fernTestValueSaleOrServiceDate *string + obj.SetSaleOrServiceDate(fernTestValueSaleOrServiceDate) + assert.Equal(t, fernTestValueSaleOrServiceDate, obj.SaleOrServiceDate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPaymentConditions", func(t *testing.T) { + obj := &Invoice{} + var fernTestValuePaymentConditions *string + obj.SetPaymentConditions(fernTestValuePaymentConditions) + assert.Equal(t, fernTestValuePaymentConditions, obj.PaymentConditions) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStorePaymentMethodEnabled", func(t *testing.T) { + obj := &Invoice{} + var fernTestValueStorePaymentMethodEnabled *bool + obj.SetStorePaymentMethodEnabled(fernTestValueStorePaymentMethodEnabled) + assert.Equal(t, fernTestValueStorePaymentMethodEnabled, obj.StorePaymentMethodEnabled) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAttachments", func(t *testing.T) { + obj := &Invoice{} + var fernTestValueAttachments []*InvoiceAttachment + obj.SetAttachments(fernTestValueAttachments) + assert.Equal(t, fernTestValueAttachments, obj.Attachments) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatorTeamMemberID", func(t *testing.T) { + obj := &Invoice{} + var fernTestValueCreatorTeamMemberID *string + obj.SetCreatorTeamMemberID(fernTestValueCreatorTeamMemberID) + assert.Equal(t, fernTestValueCreatorTeamMemberID, obj.CreatorTeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoice(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Invoice + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var expected *int + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Invoice + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Invoice + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetOrderID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var expected *string + obj.OrderID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderID(), "getter should return the property value") + }) + + t.Run("GetOrderID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + obj.OrderID = nil + + // Act & Assert + assert.Nil(t, obj.GetOrderID(), "getter should return nil when property is nil") + }) + + t.Run("GetOrderID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Invoice + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderID() // Should return zero value + }) + + t.Run("GetPrimaryRecipient", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var expected *InvoiceRecipient + obj.PrimaryRecipient = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPrimaryRecipient(), "getter should return the property value") + }) + + t.Run("GetPrimaryRecipient_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + obj.PrimaryRecipient = nil + + // Act & Assert + assert.Nil(t, obj.GetPrimaryRecipient(), "getter should return nil when property is nil") + }) + + t.Run("GetPrimaryRecipient_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Invoice + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPrimaryRecipient() // Should return zero value + }) + + t.Run("GetPaymentRequests", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var expected []*InvoicePaymentRequest + obj.PaymentRequests = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentRequests(), "getter should return the property value") + }) + + t.Run("GetPaymentRequests_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + obj.PaymentRequests = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentRequests(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentRequests_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Invoice + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentRequests() // Should return zero value + }) + + t.Run("GetDeliveryMethod", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var expected *InvoiceDeliveryMethod + obj.DeliveryMethod = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeliveryMethod(), "getter should return the property value") + }) + + t.Run("GetDeliveryMethod_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + obj.DeliveryMethod = nil + + // Act & Assert + assert.Nil(t, obj.GetDeliveryMethod(), "getter should return nil when property is nil") + }) + + t.Run("GetDeliveryMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Invoice + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeliveryMethod() // Should return zero value + }) + + t.Run("GetInvoiceNumber", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var expected *string + obj.InvoiceNumber = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInvoiceNumber(), "getter should return the property value") + }) + + t.Run("GetInvoiceNumber_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + obj.InvoiceNumber = nil + + // Act & Assert + assert.Nil(t, obj.GetInvoiceNumber(), "getter should return nil when property is nil") + }) + + t.Run("GetInvoiceNumber_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Invoice + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInvoiceNumber() // Should return zero value + }) + + t.Run("GetTitle", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var expected *string + obj.Title = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTitle(), "getter should return the property value") + }) + + t.Run("GetTitle_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + obj.Title = nil + + // Act & Assert + assert.Nil(t, obj.GetTitle(), "getter should return nil when property is nil") + }) + + t.Run("GetTitle_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Invoice + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTitle() // Should return zero value + }) + + t.Run("GetDescription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var expected *string + obj.Description = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDescription(), "getter should return the property value") + }) + + t.Run("GetDescription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + obj.Description = nil + + // Act & Assert + assert.Nil(t, obj.GetDescription(), "getter should return nil when property is nil") + }) + + t.Run("GetDescription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Invoice + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDescription() // Should return zero value + }) + + t.Run("GetScheduledAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var expected *string + obj.ScheduledAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetScheduledAt(), "getter should return the property value") + }) + + t.Run("GetScheduledAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + obj.ScheduledAt = nil + + // Act & Assert + assert.Nil(t, obj.GetScheduledAt(), "getter should return nil when property is nil") + }) + + t.Run("GetScheduledAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Invoice + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetScheduledAt() // Should return zero value + }) + + t.Run("GetPublicURL", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var expected *string + obj.PublicURL = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPublicURL(), "getter should return the property value") + }) + + t.Run("GetPublicURL_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + obj.PublicURL = nil + + // Act & Assert + assert.Nil(t, obj.GetPublicURL(), "getter should return nil when property is nil") + }) + + t.Run("GetPublicURL_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Invoice + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPublicURL() // Should return zero value + }) + + t.Run("GetNextPaymentAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var expected *Money + obj.NextPaymentAmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNextPaymentAmountMoney(), "getter should return the property value") + }) + + t.Run("GetNextPaymentAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + obj.NextPaymentAmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetNextPaymentAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetNextPaymentAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Invoice + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNextPaymentAmountMoney() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var expected *InvoiceStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Invoice + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetTimezone", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var expected *string + obj.Timezone = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTimezone(), "getter should return the property value") + }) + + t.Run("GetTimezone_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + obj.Timezone = nil + + // Act & Assert + assert.Nil(t, obj.GetTimezone(), "getter should return nil when property is nil") + }) + + t.Run("GetTimezone_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Invoice + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTimezone() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Invoice + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Invoice + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetAcceptedPaymentMethods", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var expected *InvoiceAcceptedPaymentMethods + obj.AcceptedPaymentMethods = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAcceptedPaymentMethods(), "getter should return the property value") + }) + + t.Run("GetAcceptedPaymentMethods_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + obj.AcceptedPaymentMethods = nil + + // Act & Assert + assert.Nil(t, obj.GetAcceptedPaymentMethods(), "getter should return nil when property is nil") + }) + + t.Run("GetAcceptedPaymentMethods_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Invoice + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAcceptedPaymentMethods() // Should return zero value + }) + + t.Run("GetCustomFields", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var expected []*InvoiceCustomField + obj.CustomFields = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomFields(), "getter should return the property value") + }) + + t.Run("GetCustomFields_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + obj.CustomFields = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomFields(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomFields_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Invoice + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomFields() // Should return zero value + }) + + t.Run("GetSubscriptionID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var expected *string + obj.SubscriptionID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscriptionID(), "getter should return the property value") + }) + + t.Run("GetSubscriptionID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + obj.SubscriptionID = nil + + // Act & Assert + assert.Nil(t, obj.GetSubscriptionID(), "getter should return nil when property is nil") + }) + + t.Run("GetSubscriptionID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Invoice + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscriptionID() // Should return zero value + }) + + t.Run("GetSaleOrServiceDate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var expected *string + obj.SaleOrServiceDate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSaleOrServiceDate(), "getter should return the property value") + }) + + t.Run("GetSaleOrServiceDate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + obj.SaleOrServiceDate = nil + + // Act & Assert + assert.Nil(t, obj.GetSaleOrServiceDate(), "getter should return nil when property is nil") + }) + + t.Run("GetSaleOrServiceDate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Invoice + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSaleOrServiceDate() // Should return zero value + }) + + t.Run("GetPaymentConditions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var expected *string + obj.PaymentConditions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentConditions(), "getter should return the property value") + }) + + t.Run("GetPaymentConditions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + obj.PaymentConditions = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentConditions(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentConditions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Invoice + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentConditions() // Should return zero value + }) + + t.Run("GetStorePaymentMethodEnabled", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var expected *bool + obj.StorePaymentMethodEnabled = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStorePaymentMethodEnabled(), "getter should return the property value") + }) + + t.Run("GetStorePaymentMethodEnabled_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + obj.StorePaymentMethodEnabled = nil + + // Act & Assert + assert.Nil(t, obj.GetStorePaymentMethodEnabled(), "getter should return nil when property is nil") + }) + + t.Run("GetStorePaymentMethodEnabled_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Invoice + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStorePaymentMethodEnabled() // Should return zero value + }) + + t.Run("GetAttachments", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var expected []*InvoiceAttachment + obj.Attachments = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAttachments(), "getter should return the property value") + }) + + t.Run("GetAttachments_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + obj.Attachments = nil + + // Act & Assert + assert.Nil(t, obj.GetAttachments(), "getter should return nil when property is nil") + }) + + t.Run("GetAttachments_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Invoice + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAttachments() // Should return zero value + }) + + t.Run("GetCreatorTeamMemberID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var expected *string + obj.CreatorTeamMemberID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatorTeamMemberID(), "getter should return the property value") + }) + + t.Run("GetCreatorTeamMemberID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + obj.CreatorTeamMemberID = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatorTeamMemberID(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatorTeamMemberID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Invoice + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatorTeamMemberID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoice(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var fernTestValueOrderID *string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPrimaryRecipient_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var fernTestValuePrimaryRecipient *InvoiceRecipient + + // Act + obj.SetPrimaryRecipient(fernTestValuePrimaryRecipient) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPaymentRequests_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var fernTestValuePaymentRequests []*InvoicePaymentRequest + + // Act + obj.SetPaymentRequests(fernTestValuePaymentRequests) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeliveryMethod_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var fernTestValueDeliveryMethod *InvoiceDeliveryMethod + + // Act + obj.SetDeliveryMethod(fernTestValueDeliveryMethod) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetInvoiceNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var fernTestValueInvoiceNumber *string + + // Act + obj.SetInvoiceNumber(fernTestValueInvoiceNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTitle_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var fernTestValueTitle *string + + // Act + obj.SetTitle(fernTestValueTitle) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDescription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var fernTestValueDescription *string + + // Act + obj.SetDescription(fernTestValueDescription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetScheduledAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var fernTestValueScheduledAt *string + + // Act + obj.SetScheduledAt(fernTestValueScheduledAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPublicURL_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var fernTestValuePublicURL *string + + // Act + obj.SetPublicURL(fernTestValuePublicURL) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNextPaymentAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var fernTestValueNextPaymentAmountMoney *Money + + // Act + obj.SetNextPaymentAmountMoney(fernTestValueNextPaymentAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var fernTestValueStatus *InvoiceStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTimezone_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var fernTestValueTimezone *string + + // Act + obj.SetTimezone(fernTestValueTimezone) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAcceptedPaymentMethods_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var fernTestValueAcceptedPaymentMethods *InvoiceAcceptedPaymentMethods + + // Act + obj.SetAcceptedPaymentMethods(fernTestValueAcceptedPaymentMethods) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomFields_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var fernTestValueCustomFields []*InvoiceCustomField + + // Act + obj.SetCustomFields(fernTestValueCustomFields) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSubscriptionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var fernTestValueSubscriptionID *string + + // Act + obj.SetSubscriptionID(fernTestValueSubscriptionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSaleOrServiceDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var fernTestValueSaleOrServiceDate *string + + // Act + obj.SetSaleOrServiceDate(fernTestValueSaleOrServiceDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPaymentConditions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var fernTestValuePaymentConditions *string + + // Act + obj.SetPaymentConditions(fernTestValuePaymentConditions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStorePaymentMethodEnabled_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var fernTestValueStorePaymentMethodEnabled *bool + + // Act + obj.SetStorePaymentMethodEnabled(fernTestValueStorePaymentMethodEnabled) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAttachments_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var fernTestValueAttachments []*InvoiceAttachment + + // Act + obj.SetAttachments(fernTestValueAttachments) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatorTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + var fernTestValueCreatorTeamMemberID *string + + // Act + obj.SetCreatorTeamMemberID(fernTestValueCreatorTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoiceAcceptedPaymentMethods(t *testing.T) { + t.Run("SetCard", func(t *testing.T) { + obj := &InvoiceAcceptedPaymentMethods{} + var fernTestValueCard *bool + obj.SetCard(fernTestValueCard) + assert.Equal(t, fernTestValueCard, obj.Card) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSquareGiftCard", func(t *testing.T) { + obj := &InvoiceAcceptedPaymentMethods{} + var fernTestValueSquareGiftCard *bool + obj.SetSquareGiftCard(fernTestValueSquareGiftCard) + assert.Equal(t, fernTestValueSquareGiftCard, obj.SquareGiftCard) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBankAccount", func(t *testing.T) { + obj := &InvoiceAcceptedPaymentMethods{} + var fernTestValueBankAccount *bool + obj.SetBankAccount(fernTestValueBankAccount) + assert.Equal(t, fernTestValueBankAccount, obj.BankAccount) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBuyNowPayLater", func(t *testing.T) { + obj := &InvoiceAcceptedPaymentMethods{} + var fernTestValueBuyNowPayLater *bool + obj.SetBuyNowPayLater(fernTestValueBuyNowPayLater) + assert.Equal(t, fernTestValueBuyNowPayLater, obj.BuyNowPayLater) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCashAppPay", func(t *testing.T) { + obj := &InvoiceAcceptedPaymentMethods{} + var fernTestValueCashAppPay *bool + obj.SetCashAppPay(fernTestValueCashAppPay) + assert.Equal(t, fernTestValueCashAppPay, obj.CashAppPay) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoiceAcceptedPaymentMethods(t *testing.T) { + t.Run("GetCard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAcceptedPaymentMethods{} + var expected *bool + obj.Card = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCard(), "getter should return the property value") + }) + + t.Run("GetCard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAcceptedPaymentMethods{} + obj.Card = nil + + // Act & Assert + assert.Nil(t, obj.GetCard(), "getter should return nil when property is nil") + }) + + t.Run("GetCard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceAcceptedPaymentMethods + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCard() // Should return zero value + }) + + t.Run("GetSquareGiftCard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAcceptedPaymentMethods{} + var expected *bool + obj.SquareGiftCard = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSquareGiftCard(), "getter should return the property value") + }) + + t.Run("GetSquareGiftCard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAcceptedPaymentMethods{} + obj.SquareGiftCard = nil + + // Act & Assert + assert.Nil(t, obj.GetSquareGiftCard(), "getter should return nil when property is nil") + }) + + t.Run("GetSquareGiftCard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceAcceptedPaymentMethods + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSquareGiftCard() // Should return zero value + }) + + t.Run("GetBankAccount", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAcceptedPaymentMethods{} + var expected *bool + obj.BankAccount = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBankAccount(), "getter should return the property value") + }) + + t.Run("GetBankAccount_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAcceptedPaymentMethods{} + obj.BankAccount = nil + + // Act & Assert + assert.Nil(t, obj.GetBankAccount(), "getter should return nil when property is nil") + }) + + t.Run("GetBankAccount_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceAcceptedPaymentMethods + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBankAccount() // Should return zero value + }) + + t.Run("GetBuyNowPayLater", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAcceptedPaymentMethods{} + var expected *bool + obj.BuyNowPayLater = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBuyNowPayLater(), "getter should return the property value") + }) + + t.Run("GetBuyNowPayLater_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAcceptedPaymentMethods{} + obj.BuyNowPayLater = nil + + // Act & Assert + assert.Nil(t, obj.GetBuyNowPayLater(), "getter should return nil when property is nil") + }) + + t.Run("GetBuyNowPayLater_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceAcceptedPaymentMethods + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBuyNowPayLater() // Should return zero value + }) + + t.Run("GetCashAppPay", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAcceptedPaymentMethods{} + var expected *bool + obj.CashAppPay = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCashAppPay(), "getter should return the property value") + }) + + t.Run("GetCashAppPay_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAcceptedPaymentMethods{} + obj.CashAppPay = nil + + // Act & Assert + assert.Nil(t, obj.GetCashAppPay(), "getter should return nil when property is nil") + }) + + t.Run("GetCashAppPay_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceAcceptedPaymentMethods + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCashAppPay() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoiceAcceptedPaymentMethods(t *testing.T) { + t.Run("SetCard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAcceptedPaymentMethods{} + var fernTestValueCard *bool + + // Act + obj.SetCard(fernTestValueCard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSquareGiftCard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAcceptedPaymentMethods{} + var fernTestValueSquareGiftCard *bool + + // Act + obj.SetSquareGiftCard(fernTestValueSquareGiftCard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBankAccount_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAcceptedPaymentMethods{} + var fernTestValueBankAccount *bool + + // Act + obj.SetBankAccount(fernTestValueBankAccount) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBuyNowPayLater_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAcceptedPaymentMethods{} + var fernTestValueBuyNowPayLater *bool + + // Act + obj.SetBuyNowPayLater(fernTestValueBuyNowPayLater) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCashAppPay_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAcceptedPaymentMethods{} + var fernTestValueCashAppPay *bool + + // Act + obj.SetCashAppPay(fernTestValueCashAppPay) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoiceAttachment(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &InvoiceAttachment{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFilename", func(t *testing.T) { + obj := &InvoiceAttachment{} + var fernTestValueFilename *string + obj.SetFilename(fernTestValueFilename) + assert.Equal(t, fernTestValueFilename, obj.Filename) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDescription", func(t *testing.T) { + obj := &InvoiceAttachment{} + var fernTestValueDescription *string + obj.SetDescription(fernTestValueDescription) + assert.Equal(t, fernTestValueDescription, obj.Description) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFilesize", func(t *testing.T) { + obj := &InvoiceAttachment{} + var fernTestValueFilesize *int + obj.SetFilesize(fernTestValueFilesize) + assert.Equal(t, fernTestValueFilesize, obj.Filesize) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetHash", func(t *testing.T) { + obj := &InvoiceAttachment{} + var fernTestValueHash *string + obj.SetHash(fernTestValueHash) + assert.Equal(t, fernTestValueHash, obj.Hash) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMimeType", func(t *testing.T) { + obj := &InvoiceAttachment{} + var fernTestValueMimeType *string + obj.SetMimeType(fernTestValueMimeType) + assert.Equal(t, fernTestValueMimeType, obj.MimeType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUploadedAt", func(t *testing.T) { + obj := &InvoiceAttachment{} + var fernTestValueUploadedAt *string + obj.SetUploadedAt(fernTestValueUploadedAt) + assert.Equal(t, fernTestValueUploadedAt, obj.UploadedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoiceAttachment(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAttachment{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAttachment{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceAttachment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetFilename", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAttachment{} + var expected *string + obj.Filename = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFilename(), "getter should return the property value") + }) + + t.Run("GetFilename_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAttachment{} + obj.Filename = nil + + // Act & Assert + assert.Nil(t, obj.GetFilename(), "getter should return nil when property is nil") + }) + + t.Run("GetFilename_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceAttachment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFilename() // Should return zero value + }) + + t.Run("GetDescription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAttachment{} + var expected *string + obj.Description = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDescription(), "getter should return the property value") + }) + + t.Run("GetDescription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAttachment{} + obj.Description = nil + + // Act & Assert + assert.Nil(t, obj.GetDescription(), "getter should return nil when property is nil") + }) + + t.Run("GetDescription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceAttachment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDescription() // Should return zero value + }) + + t.Run("GetFilesize", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAttachment{} + var expected *int + obj.Filesize = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFilesize(), "getter should return the property value") + }) + + t.Run("GetFilesize_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAttachment{} + obj.Filesize = nil + + // Act & Assert + assert.Nil(t, obj.GetFilesize(), "getter should return nil when property is nil") + }) + + t.Run("GetFilesize_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceAttachment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFilesize() // Should return zero value + }) + + t.Run("GetHash", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAttachment{} + var expected *string + obj.Hash = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetHash(), "getter should return the property value") + }) + + t.Run("GetHash_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAttachment{} + obj.Hash = nil + + // Act & Assert + assert.Nil(t, obj.GetHash(), "getter should return nil when property is nil") + }) + + t.Run("GetHash_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceAttachment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetHash() // Should return zero value + }) + + t.Run("GetMimeType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAttachment{} + var expected *string + obj.MimeType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMimeType(), "getter should return the property value") + }) + + t.Run("GetMimeType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAttachment{} + obj.MimeType = nil + + // Act & Assert + assert.Nil(t, obj.GetMimeType(), "getter should return nil when property is nil") + }) + + t.Run("GetMimeType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceAttachment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMimeType() // Should return zero value + }) + + t.Run("GetUploadedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAttachment{} + var expected *string + obj.UploadedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUploadedAt(), "getter should return the property value") + }) + + t.Run("GetUploadedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAttachment{} + obj.UploadedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUploadedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUploadedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceAttachment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUploadedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoiceAttachment(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAttachment{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFilename_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAttachment{} + var fernTestValueFilename *string + + // Act + obj.SetFilename(fernTestValueFilename) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDescription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAttachment{} + var fernTestValueDescription *string + + // Act + obj.SetDescription(fernTestValueDescription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFilesize_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAttachment{} + var fernTestValueFilesize *int + + // Act + obj.SetFilesize(fernTestValueFilesize) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetHash_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAttachment{} + var fernTestValueHash *string + + // Act + obj.SetHash(fernTestValueHash) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMimeType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAttachment{} + var fernTestValueMimeType *string + + // Act + obj.SetMimeType(fernTestValueMimeType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUploadedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAttachment{} + var fernTestValueUploadedAt *string + + // Act + obj.SetUploadedAt(fernTestValueUploadedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoiceCustomField(t *testing.T) { + t.Run("SetLabel", func(t *testing.T) { + obj := &InvoiceCustomField{} + var fernTestValueLabel *string + obj.SetLabel(fernTestValueLabel) + assert.Equal(t, fernTestValueLabel, obj.Label) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetValue", func(t *testing.T) { + obj := &InvoiceCustomField{} + var fernTestValueValue *string + obj.SetValue(fernTestValueValue) + assert.Equal(t, fernTestValueValue, obj.Value) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPlacement", func(t *testing.T) { + obj := &InvoiceCustomField{} + var fernTestValuePlacement *InvoiceCustomFieldPlacement + obj.SetPlacement(fernTestValuePlacement) + assert.Equal(t, fernTestValuePlacement, obj.Placement) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoiceCustomField(t *testing.T) { + t.Run("GetLabel", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCustomField{} + var expected *string + obj.Label = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLabel(), "getter should return the property value") + }) + + t.Run("GetLabel_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCustomField{} + obj.Label = nil + + // Act & Assert + assert.Nil(t, obj.GetLabel(), "getter should return nil when property is nil") + }) + + t.Run("GetLabel_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCustomField + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLabel() // Should return zero value + }) + + t.Run("GetValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCustomField{} + var expected *string + obj.Value = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetValue(), "getter should return the property value") + }) + + t.Run("GetValue_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCustomField{} + obj.Value = nil + + // Act & Assert + assert.Nil(t, obj.GetValue(), "getter should return nil when property is nil") + }) + + t.Run("GetValue_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCustomField + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetValue() // Should return zero value + }) + + t.Run("GetPlacement", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCustomField{} + var expected *InvoiceCustomFieldPlacement + obj.Placement = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPlacement(), "getter should return the property value") + }) + + t.Run("GetPlacement_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCustomField{} + obj.Placement = nil + + // Act & Assert + assert.Nil(t, obj.GetPlacement(), "getter should return nil when property is nil") + }) + + t.Run("GetPlacement_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCustomField + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPlacement() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoiceCustomField(t *testing.T) { + t.Run("SetLabel_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCustomField{} + var fernTestValueLabel *string + + // Act + obj.SetLabel(fernTestValueLabel) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetValue_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCustomField{} + var fernTestValueValue *string + + // Act + obj.SetValue(fernTestValueValue) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPlacement_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCustomField{} + var fernTestValuePlacement *InvoiceCustomFieldPlacement + + // Act + obj.SetPlacement(fernTestValuePlacement) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoiceFilter(t *testing.T) { + t.Run("SetLocationIDs", func(t *testing.T) { + obj := &InvoiceFilter{} + var fernTestValueLocationIDs []string + obj.SetLocationIDs(fernTestValueLocationIDs) + assert.Equal(t, fernTestValueLocationIDs, obj.LocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerIDs", func(t *testing.T) { + obj := &InvoiceFilter{} + var fernTestValueCustomerIDs []string + obj.SetCustomerIDs(fernTestValueCustomerIDs) + assert.Equal(t, fernTestValueCustomerIDs, obj.CustomerIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoiceFilter(t *testing.T) { + t.Run("GetLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceFilter{} + var expected []string + obj.LocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationIDs(), "getter should return the property value") + }) + + t.Run("GetLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceFilter{} + obj.LocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationIDs() // Should return zero value + }) + + t.Run("GetCustomerIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceFilter{} + var expected []string + obj.CustomerIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomerIDs(), "getter should return the property value") + }) + + t.Run("GetCustomerIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceFilter{} + obj.CustomerIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomerIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomerIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomerIDs() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoiceFilter(t *testing.T) { + t.Run("SetLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceFilter{} + var fernTestValueLocationIDs []string + + // Act + obj.SetLocationIDs(fernTestValueLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceFilter{} + var fernTestValueCustomerIDs []string + + // Act + obj.SetCustomerIDs(fernTestValueCustomerIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoicePaymentReminder(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &InvoicePaymentReminder{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRelativeScheduledDays", func(t *testing.T) { + obj := &InvoicePaymentReminder{} + var fernTestValueRelativeScheduledDays *int + obj.SetRelativeScheduledDays(fernTestValueRelativeScheduledDays) + assert.Equal(t, fernTestValueRelativeScheduledDays, obj.RelativeScheduledDays) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMessage", func(t *testing.T) { + obj := &InvoicePaymentReminder{} + var fernTestValueMessage *string + obj.SetMessage(fernTestValueMessage) + assert.Equal(t, fernTestValueMessage, obj.Message) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &InvoicePaymentReminder{} + var fernTestValueStatus *InvoicePaymentReminderStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSentAt", func(t *testing.T) { + obj := &InvoicePaymentReminder{} + var fernTestValueSentAt *string + obj.SetSentAt(fernTestValueSentAt) + assert.Equal(t, fernTestValueSentAt, obj.SentAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoicePaymentReminder(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentReminder{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentReminder{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentReminder + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetRelativeScheduledDays", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentReminder{} + var expected *int + obj.RelativeScheduledDays = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRelativeScheduledDays(), "getter should return the property value") + }) + + t.Run("GetRelativeScheduledDays_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentReminder{} + obj.RelativeScheduledDays = nil + + // Act & Assert + assert.Nil(t, obj.GetRelativeScheduledDays(), "getter should return nil when property is nil") + }) + + t.Run("GetRelativeScheduledDays_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentReminder + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRelativeScheduledDays() // Should return zero value + }) + + t.Run("GetMessage", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentReminder{} + var expected *string + obj.Message = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMessage(), "getter should return the property value") + }) + + t.Run("GetMessage_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentReminder{} + obj.Message = nil + + // Act & Assert + assert.Nil(t, obj.GetMessage(), "getter should return nil when property is nil") + }) + + t.Run("GetMessage_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentReminder + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMessage() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentReminder{} + var expected *InvoicePaymentReminderStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentReminder{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentReminder + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetSentAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentReminder{} + var expected *string + obj.SentAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSentAt(), "getter should return the property value") + }) + + t.Run("GetSentAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentReminder{} + obj.SentAt = nil + + // Act & Assert + assert.Nil(t, obj.GetSentAt(), "getter should return nil when property is nil") + }) + + t.Run("GetSentAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentReminder + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSentAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoicePaymentReminder(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentReminder{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRelativeScheduledDays_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentReminder{} + var fernTestValueRelativeScheduledDays *int + + // Act + obj.SetRelativeScheduledDays(fernTestValueRelativeScheduledDays) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMessage_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentReminder{} + var fernTestValueMessage *string + + // Act + obj.SetMessage(fernTestValueMessage) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentReminder{} + var fernTestValueStatus *InvoicePaymentReminderStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSentAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentReminder{} + var fernTestValueSentAt *string + + // Act + obj.SetSentAt(fernTestValueSentAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoicePaymentRequest(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &InvoicePaymentRequest{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRequestMethod", func(t *testing.T) { + obj := &InvoicePaymentRequest{} + var fernTestValueRequestMethod *InvoiceRequestMethod + obj.SetRequestMethod(fernTestValueRequestMethod) + assert.Equal(t, fernTestValueRequestMethod, obj.RequestMethod) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRequestType", func(t *testing.T) { + obj := &InvoicePaymentRequest{} + var fernTestValueRequestType *InvoiceRequestType + obj.SetRequestType(fernTestValueRequestType) + assert.Equal(t, fernTestValueRequestType, obj.RequestType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDueDate", func(t *testing.T) { + obj := &InvoicePaymentRequest{} + var fernTestValueDueDate *string + obj.SetDueDate(fernTestValueDueDate) + assert.Equal(t, fernTestValueDueDate, obj.DueDate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFixedAmountRequestedMoney", func(t *testing.T) { + obj := &InvoicePaymentRequest{} + var fernTestValueFixedAmountRequestedMoney *Money + obj.SetFixedAmountRequestedMoney(fernTestValueFixedAmountRequestedMoney) + assert.Equal(t, fernTestValueFixedAmountRequestedMoney, obj.FixedAmountRequestedMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPercentageRequested", func(t *testing.T) { + obj := &InvoicePaymentRequest{} + var fernTestValuePercentageRequested *string + obj.SetPercentageRequested(fernTestValuePercentageRequested) + assert.Equal(t, fernTestValuePercentageRequested, obj.PercentageRequested) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTippingEnabled", func(t *testing.T) { + obj := &InvoicePaymentRequest{} + var fernTestValueTippingEnabled *bool + obj.SetTippingEnabled(fernTestValueTippingEnabled) + assert.Equal(t, fernTestValueTippingEnabled, obj.TippingEnabled) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAutomaticPaymentSource", func(t *testing.T) { + obj := &InvoicePaymentRequest{} + var fernTestValueAutomaticPaymentSource *InvoiceAutomaticPaymentSource + obj.SetAutomaticPaymentSource(fernTestValueAutomaticPaymentSource) + assert.Equal(t, fernTestValueAutomaticPaymentSource, obj.AutomaticPaymentSource) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCardID", func(t *testing.T) { + obj := &InvoicePaymentRequest{} + var fernTestValueCardID *string + obj.SetCardID(fernTestValueCardID) + assert.Equal(t, fernTestValueCardID, obj.CardID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReminders", func(t *testing.T) { + obj := &InvoicePaymentRequest{} + var fernTestValueReminders []*InvoicePaymentReminder + obj.SetReminders(fernTestValueReminders) + assert.Equal(t, fernTestValueReminders, obj.Reminders) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetComputedAmountMoney", func(t *testing.T) { + obj := &InvoicePaymentRequest{} + var fernTestValueComputedAmountMoney *Money + obj.SetComputedAmountMoney(fernTestValueComputedAmountMoney) + assert.Equal(t, fernTestValueComputedAmountMoney, obj.ComputedAmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTotalCompletedAmountMoney", func(t *testing.T) { + obj := &InvoicePaymentRequest{} + var fernTestValueTotalCompletedAmountMoney *Money + obj.SetTotalCompletedAmountMoney(fernTestValueTotalCompletedAmountMoney) + assert.Equal(t, fernTestValueTotalCompletedAmountMoney, obj.TotalCompletedAmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRoundingAdjustmentIncludedMoney", func(t *testing.T) { + obj := &InvoicePaymentRequest{} + var fernTestValueRoundingAdjustmentIncludedMoney *Money + obj.SetRoundingAdjustmentIncludedMoney(fernTestValueRoundingAdjustmentIncludedMoney) + assert.Equal(t, fernTestValueRoundingAdjustmentIncludedMoney, obj.RoundingAdjustmentIncludedMoney) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoicePaymentRequest(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetRequestMethod", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + var expected *InvoiceRequestMethod + obj.RequestMethod = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRequestMethod(), "getter should return the property value") + }) + + t.Run("GetRequestMethod_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + obj.RequestMethod = nil + + // Act & Assert + assert.Nil(t, obj.GetRequestMethod(), "getter should return nil when property is nil") + }) + + t.Run("GetRequestMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRequestMethod() // Should return zero value + }) + + t.Run("GetRequestType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + var expected *InvoiceRequestType + obj.RequestType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRequestType(), "getter should return the property value") + }) + + t.Run("GetRequestType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + obj.RequestType = nil + + // Act & Assert + assert.Nil(t, obj.GetRequestType(), "getter should return nil when property is nil") + }) + + t.Run("GetRequestType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRequestType() // Should return zero value + }) + + t.Run("GetDueDate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + var expected *string + obj.DueDate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDueDate(), "getter should return the property value") + }) + + t.Run("GetDueDate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + obj.DueDate = nil + + // Act & Assert + assert.Nil(t, obj.GetDueDate(), "getter should return nil when property is nil") + }) + + t.Run("GetDueDate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDueDate() // Should return zero value + }) + + t.Run("GetFixedAmountRequestedMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + var expected *Money + obj.FixedAmountRequestedMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFixedAmountRequestedMoney(), "getter should return the property value") + }) + + t.Run("GetFixedAmountRequestedMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + obj.FixedAmountRequestedMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetFixedAmountRequestedMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetFixedAmountRequestedMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFixedAmountRequestedMoney() // Should return zero value + }) + + t.Run("GetPercentageRequested", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + var expected *string + obj.PercentageRequested = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPercentageRequested(), "getter should return the property value") + }) + + t.Run("GetPercentageRequested_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + obj.PercentageRequested = nil + + // Act & Assert + assert.Nil(t, obj.GetPercentageRequested(), "getter should return nil when property is nil") + }) + + t.Run("GetPercentageRequested_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPercentageRequested() // Should return zero value + }) + + t.Run("GetTippingEnabled", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + var expected *bool + obj.TippingEnabled = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTippingEnabled(), "getter should return the property value") + }) + + t.Run("GetTippingEnabled_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + obj.TippingEnabled = nil + + // Act & Assert + assert.Nil(t, obj.GetTippingEnabled(), "getter should return nil when property is nil") + }) + + t.Run("GetTippingEnabled_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTippingEnabled() // Should return zero value + }) + + t.Run("GetAutomaticPaymentSource", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + var expected *InvoiceAutomaticPaymentSource + obj.AutomaticPaymentSource = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAutomaticPaymentSource(), "getter should return the property value") + }) + + t.Run("GetAutomaticPaymentSource_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + obj.AutomaticPaymentSource = nil + + // Act & Assert + assert.Nil(t, obj.GetAutomaticPaymentSource(), "getter should return nil when property is nil") + }) + + t.Run("GetAutomaticPaymentSource_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAutomaticPaymentSource() // Should return zero value + }) + + t.Run("GetCardID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + var expected *string + obj.CardID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCardID(), "getter should return the property value") + }) + + t.Run("GetCardID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + obj.CardID = nil + + // Act & Assert + assert.Nil(t, obj.GetCardID(), "getter should return nil when property is nil") + }) + + t.Run("GetCardID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCardID() // Should return zero value + }) + + t.Run("GetReminders", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + var expected []*InvoicePaymentReminder + obj.Reminders = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReminders(), "getter should return the property value") + }) + + t.Run("GetReminders_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + obj.Reminders = nil + + // Act & Assert + assert.Nil(t, obj.GetReminders(), "getter should return nil when property is nil") + }) + + t.Run("GetReminders_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReminders() // Should return zero value + }) + + t.Run("GetComputedAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + var expected *Money + obj.ComputedAmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetComputedAmountMoney(), "getter should return the property value") + }) + + t.Run("GetComputedAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + obj.ComputedAmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetComputedAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetComputedAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetComputedAmountMoney() // Should return zero value + }) + + t.Run("GetTotalCompletedAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + var expected *Money + obj.TotalCompletedAmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTotalCompletedAmountMoney(), "getter should return the property value") + }) + + t.Run("GetTotalCompletedAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + obj.TotalCompletedAmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTotalCompletedAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTotalCompletedAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTotalCompletedAmountMoney() // Should return zero value + }) + + t.Run("GetRoundingAdjustmentIncludedMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + var expected *Money + obj.RoundingAdjustmentIncludedMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRoundingAdjustmentIncludedMoney(), "getter should return the property value") + }) + + t.Run("GetRoundingAdjustmentIncludedMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + obj.RoundingAdjustmentIncludedMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetRoundingAdjustmentIncludedMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetRoundingAdjustmentIncludedMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRoundingAdjustmentIncludedMoney() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoicePaymentRequest(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRequestMethod_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + var fernTestValueRequestMethod *InvoiceRequestMethod + + // Act + obj.SetRequestMethod(fernTestValueRequestMethod) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRequestType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + var fernTestValueRequestType *InvoiceRequestType + + // Act + obj.SetRequestType(fernTestValueRequestType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDueDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + var fernTestValueDueDate *string + + // Act + obj.SetDueDate(fernTestValueDueDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFixedAmountRequestedMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + var fernTestValueFixedAmountRequestedMoney *Money + + // Act + obj.SetFixedAmountRequestedMoney(fernTestValueFixedAmountRequestedMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPercentageRequested_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + var fernTestValuePercentageRequested *string + + // Act + obj.SetPercentageRequested(fernTestValuePercentageRequested) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTippingEnabled_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + var fernTestValueTippingEnabled *bool + + // Act + obj.SetTippingEnabled(fernTestValueTippingEnabled) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAutomaticPaymentSource_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + var fernTestValueAutomaticPaymentSource *InvoiceAutomaticPaymentSource + + // Act + obj.SetAutomaticPaymentSource(fernTestValueAutomaticPaymentSource) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCardID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + var fernTestValueCardID *string + + // Act + obj.SetCardID(fernTestValueCardID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReminders_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + var fernTestValueReminders []*InvoicePaymentReminder + + // Act + obj.SetReminders(fernTestValueReminders) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetComputedAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + var fernTestValueComputedAmountMoney *Money + + // Act + obj.SetComputedAmountMoney(fernTestValueComputedAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTotalCompletedAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + var fernTestValueTotalCompletedAmountMoney *Money + + // Act + obj.SetTotalCompletedAmountMoney(fernTestValueTotalCompletedAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRoundingAdjustmentIncludedMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + var fernTestValueRoundingAdjustmentIncludedMoney *Money + + // Act + obj.SetRoundingAdjustmentIncludedMoney(fernTestValueRoundingAdjustmentIncludedMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoiceQuery(t *testing.T) { + t.Run("SetFilter", func(t *testing.T) { + obj := &InvoiceQuery{} + var fernTestValueFilter *InvoiceFilter + obj.SetFilter(fernTestValueFilter) + assert.Equal(t, fernTestValueFilter, obj.Filter) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSort", func(t *testing.T) { + obj := &InvoiceQuery{} + var fernTestValueSort *InvoiceSort + obj.SetSort(fernTestValueSort) + assert.Equal(t, fernTestValueSort, obj.Sort) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoiceQuery(t *testing.T) { + t.Run("GetFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceQuery{} + var expected *InvoiceFilter + obj.Filter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFilter(), "getter should return the property value") + }) + + t.Run("GetFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceQuery{} + obj.Filter = nil + + // Act & Assert + assert.Nil(t, obj.GetFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFilter() // Should return zero value + }) + + t.Run("GetSort", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceQuery{} + var expected *InvoiceSort + obj.Sort = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSort(), "getter should return the property value") + }) + + t.Run("GetSort_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceQuery{} + obj.Sort = nil + + // Act & Assert + assert.Nil(t, obj.GetSort(), "getter should return nil when property is nil") + }) + + t.Run("GetSort_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSort() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoiceQuery(t *testing.T) { + t.Run("SetFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceQuery{} + var fernTestValueFilter *InvoiceFilter + + // Act + obj.SetFilter(fernTestValueFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSort_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceQuery{} + var fernTestValueSort *InvoiceSort + + // Act + obj.SetSort(fernTestValueSort) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoiceRecipient(t *testing.T) { + t.Run("SetCustomerID", func(t *testing.T) { + obj := &InvoiceRecipient{} + var fernTestValueCustomerID *string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGivenName", func(t *testing.T) { + obj := &InvoiceRecipient{} + var fernTestValueGivenName *string + obj.SetGivenName(fernTestValueGivenName) + assert.Equal(t, fernTestValueGivenName, obj.GivenName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFamilyName", func(t *testing.T) { + obj := &InvoiceRecipient{} + var fernTestValueFamilyName *string + obj.SetFamilyName(fernTestValueFamilyName) + assert.Equal(t, fernTestValueFamilyName, obj.FamilyName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEmailAddress", func(t *testing.T) { + obj := &InvoiceRecipient{} + var fernTestValueEmailAddress *string + obj.SetEmailAddress(fernTestValueEmailAddress) + assert.Equal(t, fernTestValueEmailAddress, obj.EmailAddress) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAddress", func(t *testing.T) { + obj := &InvoiceRecipient{} + var fernTestValueAddress *Address + obj.SetAddress(fernTestValueAddress) + assert.Equal(t, fernTestValueAddress, obj.Address) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPhoneNumber", func(t *testing.T) { + obj := &InvoiceRecipient{} + var fernTestValuePhoneNumber *string + obj.SetPhoneNumber(fernTestValuePhoneNumber) + assert.Equal(t, fernTestValuePhoneNumber, obj.PhoneNumber) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCompanyName", func(t *testing.T) { + obj := &InvoiceRecipient{} + var fernTestValueCompanyName *string + obj.SetCompanyName(fernTestValueCompanyName) + assert.Equal(t, fernTestValueCompanyName, obj.CompanyName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTaxIDs", func(t *testing.T) { + obj := &InvoiceRecipient{} + var fernTestValueTaxIDs *InvoiceRecipientTaxIDs + obj.SetTaxIDs(fernTestValueTaxIDs) + assert.Equal(t, fernTestValueTaxIDs, obj.TaxIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoiceRecipient(t *testing.T) { + t.Run("GetCustomerID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipient{} + var expected *string + obj.CustomerID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomerID(), "getter should return the property value") + }) + + t.Run("GetCustomerID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipient{} + obj.CustomerID = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomerID(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomerID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceRecipient + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomerID() // Should return zero value + }) + + t.Run("GetGivenName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipient{} + var expected *string + obj.GivenName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGivenName(), "getter should return the property value") + }) + + t.Run("GetGivenName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipient{} + obj.GivenName = nil + + // Act & Assert + assert.Nil(t, obj.GetGivenName(), "getter should return nil when property is nil") + }) + + t.Run("GetGivenName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceRecipient + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGivenName() // Should return zero value + }) + + t.Run("GetFamilyName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipient{} + var expected *string + obj.FamilyName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFamilyName(), "getter should return the property value") + }) + + t.Run("GetFamilyName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipient{} + obj.FamilyName = nil + + // Act & Assert + assert.Nil(t, obj.GetFamilyName(), "getter should return nil when property is nil") + }) + + t.Run("GetFamilyName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceRecipient + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFamilyName() // Should return zero value + }) + + t.Run("GetEmailAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipient{} + var expected *string + obj.EmailAddress = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEmailAddress(), "getter should return the property value") + }) + + t.Run("GetEmailAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipient{} + obj.EmailAddress = nil + + // Act & Assert + assert.Nil(t, obj.GetEmailAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetEmailAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceRecipient + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEmailAddress() // Should return zero value + }) + + t.Run("GetAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipient{} + var expected *Address + obj.Address = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAddress(), "getter should return the property value") + }) + + t.Run("GetAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipient{} + obj.Address = nil + + // Act & Assert + assert.Nil(t, obj.GetAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceRecipient + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAddress() // Should return zero value + }) + + t.Run("GetPhoneNumber", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipient{} + var expected *string + obj.PhoneNumber = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPhoneNumber(), "getter should return the property value") + }) + + t.Run("GetPhoneNumber_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipient{} + obj.PhoneNumber = nil + + // Act & Assert + assert.Nil(t, obj.GetPhoneNumber(), "getter should return nil when property is nil") + }) + + t.Run("GetPhoneNumber_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceRecipient + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPhoneNumber() // Should return zero value + }) + + t.Run("GetCompanyName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipient{} + var expected *string + obj.CompanyName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCompanyName(), "getter should return the property value") + }) + + t.Run("GetCompanyName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipient{} + obj.CompanyName = nil + + // Act & Assert + assert.Nil(t, obj.GetCompanyName(), "getter should return nil when property is nil") + }) + + t.Run("GetCompanyName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceRecipient + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCompanyName() // Should return zero value + }) + + t.Run("GetTaxIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipient{} + var expected *InvoiceRecipientTaxIDs + obj.TaxIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTaxIDs(), "getter should return the property value") + }) + + t.Run("GetTaxIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipient{} + obj.TaxIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetTaxIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetTaxIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceRecipient + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTaxIDs() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoiceRecipient(t *testing.T) { + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipient{} + var fernTestValueCustomerID *string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGivenName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipient{} + var fernTestValueGivenName *string + + // Act + obj.SetGivenName(fernTestValueGivenName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFamilyName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipient{} + var fernTestValueFamilyName *string + + // Act + obj.SetFamilyName(fernTestValueFamilyName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEmailAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipient{} + var fernTestValueEmailAddress *string + + // Act + obj.SetEmailAddress(fernTestValueEmailAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipient{} + var fernTestValueAddress *Address + + // Act + obj.SetAddress(fernTestValueAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPhoneNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipient{} + var fernTestValuePhoneNumber *string + + // Act + obj.SetPhoneNumber(fernTestValuePhoneNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCompanyName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipient{} + var fernTestValueCompanyName *string + + // Act + obj.SetCompanyName(fernTestValueCompanyName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTaxIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipient{} + var fernTestValueTaxIDs *InvoiceRecipientTaxIDs + + // Act + obj.SetTaxIDs(fernTestValueTaxIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoiceRecipientTaxIDs(t *testing.T) { + t.Run("SetEuVat", func(t *testing.T) { + obj := &InvoiceRecipientTaxIDs{} + var fernTestValueEuVat *string + obj.SetEuVat(fernTestValueEuVat) + assert.Equal(t, fernTestValueEuVat, obj.EuVat) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoiceRecipientTaxIDs(t *testing.T) { + t.Run("GetEuVat", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipientTaxIDs{} + var expected *string + obj.EuVat = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEuVat(), "getter should return the property value") + }) + + t.Run("GetEuVat_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipientTaxIDs{} + obj.EuVat = nil + + // Act & Assert + assert.Nil(t, obj.GetEuVat(), "getter should return nil when property is nil") + }) + + t.Run("GetEuVat_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceRecipientTaxIDs + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEuVat() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoiceRecipientTaxIDs(t *testing.T) { + t.Run("SetEuVat_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipientTaxIDs{} + var fernTestValueEuVat *string + + // Act + obj.SetEuVat(fernTestValueEuVat) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoiceSort(t *testing.T) { + t.Run("SetOrder", func(t *testing.T) { + obj := &InvoiceSort{} + var fernTestValueOrder *SortOrder + obj.SetOrder(fernTestValueOrder) + assert.Equal(t, fernTestValueOrder, obj.Order) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoiceSort(t *testing.T) { + t.Run("GetOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceSort{} + var expected *SortOrder + obj.Order = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrder(), "getter should return the property value") + }) + + t.Run("GetOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceSort{} + obj.Order = nil + + // Act & Assert + assert.Nil(t, obj.GetOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceSort + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrder() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoiceSort(t *testing.T) { + t.Run("SetOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceSort{} + var fernTestValueOrder *SortOrder + + // Act + obj.SetOrder(fernTestValueOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListInvoicesResponse(t *testing.T) { + t.Run("SetInvoices", func(t *testing.T) { + obj := &ListInvoicesResponse{} + var fernTestValueInvoices []*Invoice + obj.SetInvoices(fernTestValueInvoices) + assert.Equal(t, fernTestValueInvoices, obj.Invoices) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListInvoicesResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &ListInvoicesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListInvoicesResponse(t *testing.T) { + t.Run("GetInvoices", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListInvoicesResponse{} + var expected []*Invoice + obj.Invoices = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInvoices(), "getter should return the property value") + }) + + t.Run("GetInvoices_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListInvoicesResponse{} + obj.Invoices = nil + + // Act & Assert + assert.Nil(t, obj.GetInvoices(), "getter should return nil when property is nil") + }) + + t.Run("GetInvoices_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListInvoicesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInvoices() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListInvoicesResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListInvoicesResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListInvoicesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListInvoicesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListInvoicesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListInvoicesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListInvoicesResponse(t *testing.T) { + t.Run("SetInvoices_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListInvoicesResponse{} + var fernTestValueInvoices []*Invoice + + // Act + obj.SetInvoices(fernTestValueInvoices) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListInvoicesResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListInvoicesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPublishInvoiceResponse(t *testing.T) { + t.Run("SetInvoice", func(t *testing.T) { + obj := &PublishInvoiceResponse{} + var fernTestValueInvoice *Invoice + obj.SetInvoice(fernTestValueInvoice) + assert.Equal(t, fernTestValueInvoice, obj.Invoice) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &PublishInvoiceResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPublishInvoiceResponse(t *testing.T) { + t.Run("GetInvoice", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PublishInvoiceResponse{} + var expected *Invoice + obj.Invoice = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInvoice(), "getter should return the property value") + }) + + t.Run("GetInvoice_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PublishInvoiceResponse{} + obj.Invoice = nil + + // Act & Assert + assert.Nil(t, obj.GetInvoice(), "getter should return nil when property is nil") + }) + + t.Run("GetInvoice_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PublishInvoiceResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInvoice() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PublishInvoiceResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PublishInvoiceResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PublishInvoiceResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPublishInvoiceResponse(t *testing.T) { + t.Run("SetInvoice_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PublishInvoiceResponse{} + var fernTestValueInvoice *Invoice + + // Act + obj.SetInvoice(fernTestValueInvoice) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PublishInvoiceResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchInvoicesResponse(t *testing.T) { + t.Run("SetInvoices", func(t *testing.T) { + obj := &SearchInvoicesResponse{} + var fernTestValueInvoices []*Invoice + obj.SetInvoices(fernTestValueInvoices) + assert.Equal(t, fernTestValueInvoices, obj.Invoices) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchInvoicesResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &SearchInvoicesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchInvoicesResponse(t *testing.T) { + t.Run("GetInvoices", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchInvoicesResponse{} + var expected []*Invoice + obj.Invoices = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInvoices(), "getter should return the property value") + }) + + t.Run("GetInvoices_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchInvoicesResponse{} + obj.Invoices = nil + + // Act & Assert + assert.Nil(t, obj.GetInvoices(), "getter should return nil when property is nil") + }) + + t.Run("GetInvoices_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchInvoicesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInvoices() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchInvoicesResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchInvoicesResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchInvoicesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchInvoicesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchInvoicesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchInvoicesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchInvoicesResponse(t *testing.T) { + t.Run("SetInvoices_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchInvoicesResponse{} + var fernTestValueInvoices []*Invoice + + // Act + obj.SetInvoices(fernTestValueInvoices) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchInvoicesResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchInvoicesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateInvoiceResponse(t *testing.T) { + t.Run("SetInvoice", func(t *testing.T) { + obj := &UpdateInvoiceResponse{} + var fernTestValueInvoice *Invoice + obj.SetInvoice(fernTestValueInvoice) + assert.Equal(t, fernTestValueInvoice, obj.Invoice) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateInvoiceResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateInvoiceResponse(t *testing.T) { + t.Run("GetInvoice", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateInvoiceResponse{} + var expected *Invoice + obj.Invoice = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInvoice(), "getter should return the property value") + }) + + t.Run("GetInvoice_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateInvoiceResponse{} + obj.Invoice = nil + + // Act & Assert + assert.Nil(t, obj.GetInvoice(), "getter should return nil when property is nil") + }) + + t.Run("GetInvoice_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateInvoiceResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInvoice() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateInvoiceResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateInvoiceResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateInvoiceResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateInvoiceResponse(t *testing.T) { + t.Run("SetInvoice_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateInvoiceResponse{} + var fernTestValueInvoice *Invoice + + // Act + obj.SetInvoice(fernTestValueInvoice) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateInvoiceResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateInvoiceRequest(t *testing.T) { + t.Run("SetInvoiceID", func(t *testing.T) { + obj := &UpdateInvoiceRequest{} + var fernTestValueInvoiceID string + obj.SetInvoiceID(fernTestValueInvoiceID) + assert.Equal(t, fernTestValueInvoiceID, obj.InvoiceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetInvoice", func(t *testing.T) { + obj := &UpdateInvoiceRequest{} + var fernTestValueInvoice *Invoice + obj.SetInvoice(fernTestValueInvoice) + assert.Equal(t, fernTestValueInvoice, obj.Invoice) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &UpdateInvoiceRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFieldsToClear", func(t *testing.T) { + obj := &UpdateInvoiceRequest{} + var fernTestValueFieldsToClear []string + obj.SetFieldsToClear(fernTestValueFieldsToClear) + assert.Equal(t, fernTestValueFieldsToClear, obj.FieldsToClear) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateInvoiceRequest(t *testing.T) { + t.Run("SetInvoiceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateInvoiceRequest{} + var fernTestValueInvoiceID string + + // Act + obj.SetInvoiceID(fernTestValueInvoiceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetInvoice_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateInvoiceRequest{} + var fernTestValueInvoice *Invoice + + // Act + obj.SetInvoice(fernTestValueInvoice) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateInvoiceRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFieldsToClear_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateInvoiceRequest{} + var fernTestValueFieldsToClear []string + + // Act + obj.SetFieldsToClear(fernTestValueFieldsToClear) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingCancelInvoiceResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelInvoiceResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CancelInvoiceResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CancelInvoiceResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CancelInvoiceResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateInvoiceAttachmentRequestData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateInvoiceAttachmentRequestData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateInvoiceAttachmentRequestData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateInvoiceAttachmentRequestData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateInvoiceAttachmentRequestData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateInvoiceAttachmentResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateInvoiceAttachmentResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateInvoiceAttachmentResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateInvoiceAttachmentResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateInvoiceAttachmentResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateInvoiceResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateInvoiceResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateInvoiceResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateInvoiceResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateInvoiceResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeleteInvoiceAttachmentResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteInvoiceAttachmentResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeleteInvoiceAttachmentResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeleteInvoiceAttachmentResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeleteInvoiceAttachmentResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeleteInvoiceResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteInvoiceResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeleteInvoiceResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeleteInvoiceResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeleteInvoiceResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetInvoiceResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetInvoiceResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetInvoiceResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetInvoiceResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetInvoiceResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoice(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Invoice{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Invoice + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Invoice + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Invoice + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoiceAcceptedPaymentMethods(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAcceptedPaymentMethods{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoiceAcceptedPaymentMethods + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoiceAcceptedPaymentMethods + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoiceAcceptedPaymentMethods + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoiceAttachment(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceAttachment{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoiceAttachment + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoiceAttachment + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoiceAttachment + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoiceCustomField(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCustomField{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoiceCustomField + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoiceCustomField + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoiceCustomField + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoiceFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoiceFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoiceFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoiceFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoicePaymentReminder(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentReminder{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoicePaymentReminder + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoicePaymentReminder + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoicePaymentReminder + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoicePaymentRequest(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentRequest{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoicePaymentRequest + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoicePaymentRequest + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoicePaymentRequest + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoiceQuery(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceQuery{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoiceQuery + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoiceQuery + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoiceQuery + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoiceRecipient(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipient{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoiceRecipient + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoiceRecipient + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoiceRecipient + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoiceRecipientTaxIDs(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRecipientTaxIDs{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoiceRecipientTaxIDs + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoiceRecipientTaxIDs + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoiceRecipientTaxIDs + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoiceSort(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceSort{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoiceSort + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoiceSort + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoiceSort + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListInvoicesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListInvoicesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListInvoicesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListInvoicesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListInvoicesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPublishInvoiceResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PublishInvoiceResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PublishInvoiceResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PublishInvoiceResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PublishInvoiceResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchInvoicesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchInvoicesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchInvoicesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchInvoicesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchInvoicesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateInvoiceResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateInvoiceResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateInvoiceResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateInvoiceResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateInvoiceResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringCancelInvoiceResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CancelInvoiceResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelInvoiceResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateInvoiceAttachmentRequestData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateInvoiceAttachmentRequestData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateInvoiceAttachmentRequestData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateInvoiceAttachmentResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateInvoiceAttachmentResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateInvoiceAttachmentResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateInvoiceResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateInvoiceResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateInvoiceResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeleteInvoiceAttachmentResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeleteInvoiceAttachmentResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteInvoiceAttachmentResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeleteInvoiceResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeleteInvoiceResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteInvoiceResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetInvoiceResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetInvoiceResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetInvoiceResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoice(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Invoice{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Invoice + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoiceAcceptedPaymentMethods(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoiceAcceptedPaymentMethods{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceAcceptedPaymentMethods + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoiceAttachment(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoiceAttachment{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceAttachment + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoiceCustomField(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoiceCustomField{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCustomField + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoiceFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoiceFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoicePaymentReminder(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoicePaymentReminder{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentReminder + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoicePaymentRequest(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoicePaymentRequest{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentRequest + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoiceQuery(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoiceQuery{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceQuery + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoiceRecipient(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoiceRecipient{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceRecipient + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoiceRecipientTaxIDs(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoiceRecipientTaxIDs{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceRecipientTaxIDs + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoiceSort(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoiceSort{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceSort + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListInvoicesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListInvoicesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListInvoicesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPublishInvoiceResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PublishInvoiceResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PublishInvoiceResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchInvoicesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchInvoicesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchInvoicesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateInvoiceResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateInvoiceResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateInvoiceResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestEnumInvoiceAutomaticPaymentSource(t *testing.T) { + t.Run("NewFromString_NONE", func(t *testing.T) { + t.Parallel() + val, err := NewInvoiceAutomaticPaymentSourceFromString("NONE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoiceAutomaticPaymentSource("NONE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CARD_ON_FILE", func(t *testing.T) { + t.Parallel() + val, err := NewInvoiceAutomaticPaymentSourceFromString("CARD_ON_FILE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoiceAutomaticPaymentSource("CARD_ON_FILE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BANK_ON_FILE", func(t *testing.T) { + t.Parallel() + val, err := NewInvoiceAutomaticPaymentSourceFromString("BANK_ON_FILE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoiceAutomaticPaymentSource("BANK_ON_FILE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewInvoiceAutomaticPaymentSourceFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewInvoiceAutomaticPaymentSourceFromString("NONE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumInvoiceCustomFieldPlacement(t *testing.T) { + t.Run("NewFromString_ABOVE_LINE_ITEMS", func(t *testing.T) { + t.Parallel() + val, err := NewInvoiceCustomFieldPlacementFromString("ABOVE_LINE_ITEMS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoiceCustomFieldPlacement("ABOVE_LINE_ITEMS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BELOW_LINE_ITEMS", func(t *testing.T) { + t.Parallel() + val, err := NewInvoiceCustomFieldPlacementFromString("BELOW_LINE_ITEMS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoiceCustomFieldPlacement("BELOW_LINE_ITEMS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewInvoiceCustomFieldPlacementFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewInvoiceCustomFieldPlacementFromString("ABOVE_LINE_ITEMS") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumInvoiceDeliveryMethod(t *testing.T) { + t.Run("NewFromString_EMAIL", func(t *testing.T) { + t.Parallel() + val, err := NewInvoiceDeliveryMethodFromString("EMAIL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoiceDeliveryMethod("EMAIL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SHARE_MANUALLY", func(t *testing.T) { + t.Parallel() + val, err := NewInvoiceDeliveryMethodFromString("SHARE_MANUALLY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoiceDeliveryMethod("SHARE_MANUALLY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SMS", func(t *testing.T) { + t.Parallel() + val, err := NewInvoiceDeliveryMethodFromString("SMS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoiceDeliveryMethod("SMS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewInvoiceDeliveryMethodFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewInvoiceDeliveryMethodFromString("EMAIL") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumInvoicePaymentReminderStatus(t *testing.T) { + t.Run("NewFromString_PENDING", func(t *testing.T) { + t.Parallel() + val, err := NewInvoicePaymentReminderStatusFromString("PENDING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoicePaymentReminderStatus("PENDING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NOT_APPLICABLE", func(t *testing.T) { + t.Parallel() + val, err := NewInvoicePaymentReminderStatusFromString("NOT_APPLICABLE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoicePaymentReminderStatus("NOT_APPLICABLE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SENT", func(t *testing.T) { + t.Parallel() + val, err := NewInvoicePaymentReminderStatusFromString("SENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoicePaymentReminderStatus("SENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewInvoicePaymentReminderStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewInvoicePaymentReminderStatusFromString("PENDING") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumInvoiceRequestMethod(t *testing.T) { + t.Run("NewFromString_EMAIL", func(t *testing.T) { + t.Parallel() + val, err := NewInvoiceRequestMethodFromString("EMAIL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoiceRequestMethod("EMAIL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CHARGE_CARD_ON_FILE", func(t *testing.T) { + t.Parallel() + val, err := NewInvoiceRequestMethodFromString("CHARGE_CARD_ON_FILE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoiceRequestMethod("CHARGE_CARD_ON_FILE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SHARE_MANUALLY", func(t *testing.T) { + t.Parallel() + val, err := NewInvoiceRequestMethodFromString("SHARE_MANUALLY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoiceRequestMethod("SHARE_MANUALLY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CHARGE_BANK_ON_FILE", func(t *testing.T) { + t.Parallel() + val, err := NewInvoiceRequestMethodFromString("CHARGE_BANK_ON_FILE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoiceRequestMethod("CHARGE_BANK_ON_FILE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SMS", func(t *testing.T) { + t.Parallel() + val, err := NewInvoiceRequestMethodFromString("SMS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoiceRequestMethod("SMS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SMS_CHARGE_CARD_ON_FILE", func(t *testing.T) { + t.Parallel() + val, err := NewInvoiceRequestMethodFromString("SMS_CHARGE_CARD_ON_FILE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoiceRequestMethod("SMS_CHARGE_CARD_ON_FILE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SMS_CHARGE_BANK_ON_FILE", func(t *testing.T) { + t.Parallel() + val, err := NewInvoiceRequestMethodFromString("SMS_CHARGE_BANK_ON_FILE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoiceRequestMethod("SMS_CHARGE_BANK_ON_FILE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewInvoiceRequestMethodFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewInvoiceRequestMethodFromString("EMAIL") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumInvoiceRequestType(t *testing.T) { + t.Run("NewFromString_BALANCE", func(t *testing.T) { + t.Parallel() + val, err := NewInvoiceRequestTypeFromString("BALANCE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoiceRequestType("BALANCE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DEPOSIT", func(t *testing.T) { + t.Parallel() + val, err := NewInvoiceRequestTypeFromString("DEPOSIT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoiceRequestType("DEPOSIT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INSTALLMENT", func(t *testing.T) { + t.Parallel() + val, err := NewInvoiceRequestTypeFromString("INSTALLMENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoiceRequestType("INSTALLMENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewInvoiceRequestTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewInvoiceRequestTypeFromString("BALANCE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumInvoiceStatus(t *testing.T) { + t.Run("NewFromString_DRAFT", func(t *testing.T) { + t.Parallel() + val, err := NewInvoiceStatusFromString("DRAFT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoiceStatus("DRAFT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UNPAID", func(t *testing.T) { + t.Parallel() + val, err := NewInvoiceStatusFromString("UNPAID") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoiceStatus("UNPAID"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SCHEDULED", func(t *testing.T) { + t.Parallel() + val, err := NewInvoiceStatusFromString("SCHEDULED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoiceStatus("SCHEDULED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PARTIALLY_PAID", func(t *testing.T) { + t.Parallel() + val, err := NewInvoiceStatusFromString("PARTIALLY_PAID") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoiceStatus("PARTIALLY_PAID"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PAID", func(t *testing.T) { + t.Parallel() + val, err := NewInvoiceStatusFromString("PAID") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoiceStatus("PAID"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PARTIALLY_REFUNDED", func(t *testing.T) { + t.Parallel() + val, err := NewInvoiceStatusFromString("PARTIALLY_REFUNDED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoiceStatus("PARTIALLY_REFUNDED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_REFUNDED", func(t *testing.T) { + t.Parallel() + val, err := NewInvoiceStatusFromString("REFUNDED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoiceStatus("REFUNDED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CANCELED", func(t *testing.T) { + t.Parallel() + val, err := NewInvoiceStatusFromString("CANCELED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoiceStatus("CANCELED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FAILED", func(t *testing.T) { + t.Parallel() + val, err := NewInvoiceStatusFromString("FAILED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoiceStatus("FAILED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PAYMENT_PENDING", func(t *testing.T) { + t.Parallel() + val, err := NewInvoiceStatusFromString("PAYMENT_PENDING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InvoiceStatus("PAYMENT_PENDING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewInvoiceStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewInvoiceStatusFromString("DRAFT") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestExtraPropertiesCancelInvoiceResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CancelInvoiceResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelInvoiceResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateInvoiceAttachmentRequestData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateInvoiceAttachmentRequestData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateInvoiceAttachmentRequestData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateInvoiceAttachmentResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateInvoiceAttachmentResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateInvoiceAttachmentResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateInvoiceResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateInvoiceResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateInvoiceResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeleteInvoiceAttachmentResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeleteInvoiceAttachmentResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteInvoiceAttachmentResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeleteInvoiceResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeleteInvoiceResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteInvoiceResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetInvoiceResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetInvoiceResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetInvoiceResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoice(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Invoice{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Invoice + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoiceAcceptedPaymentMethods(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoiceAcceptedPaymentMethods{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceAcceptedPaymentMethods + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoiceAttachment(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoiceAttachment{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceAttachment + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoiceCustomField(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoiceCustomField{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCustomField + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoiceFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoiceFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoicePaymentReminder(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoicePaymentReminder{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentReminder + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoicePaymentRequest(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoicePaymentRequest{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentRequest + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoiceQuery(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoiceQuery{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceQuery + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoiceRecipient(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoiceRecipient{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceRecipient + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoiceRecipientTaxIDs(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoiceRecipientTaxIDs{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceRecipientTaxIDs + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoiceSort(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoiceSort{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceSort + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListInvoicesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListInvoicesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListInvoicesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPublishInvoiceResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PublishInvoiceResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PublishInvoiceResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchInvoicesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchInvoicesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchInvoicesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateInvoiceResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateInvoiceResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateInvoiceResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/labor.go b/labor.go index 5fc3462..4b1e988 100644 --- a/labor.go +++ b/labor.go @@ -20,7 +20,7 @@ type BulkPublishScheduledShiftsRequest struct { // - Each key is the ID of a scheduled shift you want to publish. // - Each value is a `BulkPublishScheduledShiftsData` object that contains the // `version` field or is an empty object. - ScheduledShifts map[string]*BulkPublishScheduledShiftsData `json:"scheduled_shifts,omitempty" url:"-"` + ScheduledShifts map[string]*BulkPublishScheduledShiftsData `json:"scheduled_shifts" url:"-"` // Indicates whether Square should send email notifications to team members and // which team members should receive the notifications. This setting applies to all shifts // specified in the bulk operation. The default value is `AFFECTED`. @@ -52,6 +52,27 @@ func (b *BulkPublishScheduledShiftsRequest) SetScheduledShiftNotificationAudienc b.require(bulkPublishScheduledShiftsRequestFieldScheduledShiftNotificationAudience) } +func (b *BulkPublishScheduledShiftsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler BulkPublishScheduledShiftsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *b = BulkPublishScheduledShiftsRequest(body) + return nil +} + +func (b *BulkPublishScheduledShiftsRequest) MarshalJSON() ([]byte, error) { + type embed BulkPublishScheduledShiftsRequest + var marshaler = struct { + embed + }{ + embed: embed(*b), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, b.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( createScheduledShiftRequestFieldIdempotencyKey = big.NewInt(1 << 0) createScheduledShiftRequestFieldScheduledShift = big.NewInt(1 << 1) @@ -69,7 +90,7 @@ type CreateScheduledShiftRequest struct { // // The `start_at` and `end_at` timestamps must be provided in the time zone + offset of the // shift location specified in `location_id`. Example for Pacific Standard Time: 2024-10-31T12:30:00-08:00 - ScheduledShift *ScheduledShift `json:"scheduled_shift,omitempty" url:"-"` + ScheduledShift *ScheduledShift `json:"scheduled_shift" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -96,6 +117,27 @@ func (c *CreateScheduledShiftRequest) SetScheduledShift(scheduledShift *Schedule c.require(createScheduledShiftRequestFieldScheduledShift) } +func (c *CreateScheduledShiftRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateScheduledShiftRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateScheduledShiftRequest(body) + return nil +} + +func (c *CreateScheduledShiftRequest) MarshalJSON() ([]byte, error) { + type embed CreateScheduledShiftRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( createTimecardRequestFieldIdempotencyKey = big.NewInt(1 << 0) createTimecardRequestFieldTimecard = big.NewInt(1 << 1) @@ -105,7 +147,7 @@ type CreateTimecardRequest struct { // A unique string value to ensure the idempotency of the operation. IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"` // The `Timecard` to be created. - Timecard *Timecard `json:"timecard,omitempty" url:"-"` + Timecard *Timecard `json:"timecard" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -132,6 +174,27 @@ func (c *CreateTimecardRequest) SetTimecard(timecard *Timecard) { c.require(createTimecardRequestFieldTimecard) } +func (c *CreateTimecardRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateTimecardRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateTimecardRequest(body) + return nil +} + +func (c *CreateTimecardRequest) MarshalJSON() ([]byte, error) { + type embed CreateTimecardRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( deleteTimecardRequestFieldID = big.NewInt(1 << 0) ) @@ -220,6 +283,27 @@ func (p *PublishScheduledShiftRequest) SetScheduledShiftNotificationAudience(sch p.require(publishScheduledShiftRequestFieldScheduledShiftNotificationAudience) } +func (p *PublishScheduledShiftRequest) UnmarshalJSON(data []byte) error { + type unmarshaler PublishScheduledShiftRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *p = PublishScheduledShiftRequest(body) + return nil +} + +func (p *PublishScheduledShiftRequest) MarshalJSON() ([]byte, error) { + type embed PublishScheduledShiftRequest + var marshaler = struct { + embed + }{ + embed: embed(*p), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, p.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( retrieveScheduledShiftRequestFieldID = big.NewInt(1 << 0) ) @@ -320,6 +404,27 @@ func (s *SearchScheduledShiftsRequest) SetCursor(cursor *string) { s.require(searchScheduledShiftsRequestFieldCursor) } +func (s *SearchScheduledShiftsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler SearchScheduledShiftsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *s = SearchScheduledShiftsRequest(body) + return nil +} + +func (s *SearchScheduledShiftsRequest) MarshalJSON() ([]byte, error) { + type embed SearchScheduledShiftsRequest + var marshaler = struct { + embed + }{ + embed: embed(*s), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, s.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( searchTimecardsRequestFieldQuery = big.NewInt(1 << 0) searchTimecardsRequestFieldLimit = big.NewInt(1 << 1) @@ -366,6 +471,27 @@ func (s *SearchTimecardsRequest) SetCursor(cursor *string) { s.require(searchTimecardsRequestFieldCursor) } +func (s *SearchTimecardsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler SearchTimecardsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *s = SearchTimecardsRequest(body) + return nil +} + +func (s *SearchTimecardsRequest) MarshalJSON() ([]byte, error) { + type embed SearchTimecardsRequest + var marshaler = struct { + embed + }{ + embed: embed(*s), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, s.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( updateScheduledShiftRequestFieldID = big.NewInt(1 << 0) updateScheduledShiftRequestFieldScheduledShift = big.NewInt(1 << 1) @@ -387,7 +513,7 @@ type UpdateScheduledShiftRequest struct { // control for the request, provide the current version of the shift in the `version` field. // If the provided version doesn't match the server version, the request fails. If `version` is // omitted, Square executes a blind write, potentially overwriting data from another publish request. - ScheduledShift *ScheduledShift `json:"scheduled_shift,omitempty" url:"-"` + ScheduledShift *ScheduledShift `json:"scheduled_shift" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -414,6 +540,27 @@ func (u *UpdateScheduledShiftRequest) SetScheduledShift(scheduledShift *Schedule u.require(updateScheduledShiftRequestFieldScheduledShift) } +func (u *UpdateScheduledShiftRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdateScheduledShiftRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdateScheduledShiftRequest(body) + return nil +} + +func (u *UpdateScheduledShiftRequest) MarshalJSON() ([]byte, error) { + type embed UpdateScheduledShiftRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( updateTimecardRequestFieldID = big.NewInt(1 << 0) updateTimecardRequestFieldTimecard = big.NewInt(1 << 1) @@ -423,7 +570,7 @@ type UpdateTimecardRequest struct { // The ID of the object being updated. ID string `json:"-" url:"-"` // The updated `Timecard` object. - Timecard *Timecard `json:"timecard,omitempty" url:"-"` + Timecard *Timecard `json:"timecard" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -450,6 +597,27 @@ func (u *UpdateTimecardRequest) SetTimecard(timecard *Timecard) { u.require(updateTimecardRequestFieldTimecard) } +func (u *UpdateTimecardRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdateTimecardRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdateTimecardRequest(body) + return nil +} + +func (u *UpdateTimecardRequest) MarshalJSON() ([]byte, error) { + type embed UpdateTimecardRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} + // Represents options for an individual publish request in a // [BulkPublishScheduledShifts](api-endpoint:Labor-BulkPublishScheduledShifts) // operation, provided as the value in a key-value pair. @@ -478,6 +646,9 @@ func (b *BulkPublishScheduledShiftsData) GetVersion() *int { } func (b *BulkPublishScheduledShiftsData) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -523,6 +694,9 @@ func (b *BulkPublishScheduledShiftsData) MarshalJSON() ([]byte, error) { } func (b *BulkPublishScheduledShiftsData) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -575,6 +749,9 @@ func (b *BulkPublishScheduledShiftsResponse) GetErrors() []*Error { } func (b *BulkPublishScheduledShiftsResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -627,6 +804,9 @@ func (b *BulkPublishScheduledShiftsResponse) MarshalJSON() ([]byte, error) { } func (b *BulkPublishScheduledShiftsResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -675,6 +855,9 @@ func (c *CreateScheduledShiftResponse) GetErrors() []*Error { } func (c *CreateScheduledShiftResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -727,6 +910,9 @@ func (c *CreateScheduledShiftResponse) MarshalJSON() ([]byte, error) { } func (c *CreateScheduledShiftResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -774,6 +960,9 @@ func (c *CreateTimecardResponse) GetErrors() []*Error { } func (c *CreateTimecardResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -826,6 +1015,9 @@ func (c *CreateTimecardResponse) MarshalJSON() ([]byte, error) { } func (c *CreateTimecardResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -862,6 +1054,9 @@ func (d *DeleteTimecardResponse) GetErrors() []*Error { } func (d *DeleteTimecardResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -907,6 +1102,9 @@ func (d *DeleteTimecardResponse) MarshalJSON() ([]byte, error) { } func (d *DeleteTimecardResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -953,6 +1151,9 @@ func (p *PublishScheduledShiftResponse) GetErrors() []*Error { } func (p *PublishScheduledShiftResponse) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -1005,6 +1206,9 @@ func (p *PublishScheduledShiftResponse) MarshalJSON() ([]byte, error) { } func (p *PublishScheduledShiftResponse) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -1051,6 +1255,9 @@ func (r *RetrieveScheduledShiftResponse) GetErrors() []*Error { } func (r *RetrieveScheduledShiftResponse) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -1103,6 +1310,9 @@ func (r *RetrieveScheduledShiftResponse) MarshalJSON() ([]byte, error) { } func (r *RetrieveScheduledShiftResponse) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -1150,6 +1360,9 @@ func (r *RetrieveTimecardResponse) GetErrors() []*Error { } func (r *RetrieveTimecardResponse) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -1202,6 +1415,9 @@ func (r *RetrieveTimecardResponse) MarshalJSON() ([]byte, error) { } func (r *RetrieveTimecardResponse) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -1293,6 +1509,9 @@ func (s *ScheduledShift) GetUpdatedAt() *string { } func (s *ScheduledShift) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -1373,6 +1592,9 @@ func (s *ScheduledShift) MarshalJSON() ([]byte, error) { } func (s *ScheduledShift) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -1486,6 +1708,9 @@ func (s *ScheduledShiftDetails) GetTimezone() *string { } func (s *ScheduledShiftDetails) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -1580,6 +1805,9 @@ func (s *ScheduledShiftDetails) MarshalJSON() ([]byte, error) { } func (s *ScheduledShiftDetails) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -1696,6 +1924,9 @@ func (s *ScheduledShiftFilter) GetScheduledShiftStatuses() []ScheduledShiftFilte } func (s *ScheduledShiftFilter) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -1783,6 +2014,9 @@ func (s *ScheduledShiftFilter) MarshalJSON() ([]byte, error) { } func (s *ScheduledShiftFilter) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -1906,6 +2140,9 @@ func (s *ScheduledShiftQuery) GetSort() *ScheduledShiftSort { } func (s *ScheduledShiftQuery) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -1958,6 +2195,9 @@ func (s *ScheduledShiftQuery) MarshalJSON() ([]byte, error) { } func (s *ScheduledShiftQuery) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -2006,6 +2246,9 @@ func (s *ScheduledShiftSort) GetOrder() *SortOrder { } func (s *ScheduledShiftSort) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -2058,6 +2301,9 @@ func (s *ScheduledShiftSort) MarshalJSON() ([]byte, error) { } func (s *ScheduledShiftSort) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -2148,6 +2394,9 @@ func (s *ScheduledShiftWorkday) GetDefaultTimezone() *string { } func (s *ScheduledShiftWorkday) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -2207,6 +2456,9 @@ func (s *ScheduledShiftWorkday) MarshalJSON() ([]byte, error) { } func (s *ScheduledShiftWorkday) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -2290,6 +2542,9 @@ func (s *SearchScheduledShiftsResponse) GetErrors() []*Error { } func (s *SearchScheduledShiftsResponse) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -2349,6 +2604,9 @@ func (s *SearchScheduledShiftsResponse) MarshalJSON() ([]byte, error) { } func (s *SearchScheduledShiftsResponse) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -2406,6 +2664,9 @@ func (s *SearchTimecardsResponse) GetErrors() []*Error { } func (s *SearchTimecardsResponse) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -2465,6 +2726,9 @@ func (s *SearchTimecardsResponse) MarshalJSON() ([]byte, error) { } func (s *SearchTimecardsResponse) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -2632,6 +2896,9 @@ func (t *Timecard) GetDeclaredCashTipMoney() *Money { } func (t *Timecard) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -2761,6 +3028,9 @@ func (t *Timecard) MarshalJSON() ([]byte, error) { } func (t *Timecard) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -2848,6 +3118,9 @@ func (t *TimecardFilter) GetTeamMemberIDs() []string { } func (t *TimecardFilter) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -2928,6 +3201,9 @@ func (t *TimecardFilter) MarshalJSON() ([]byte, error) { } func (t *TimecardFilter) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -2996,6 +3272,9 @@ func (t *TimecardQuery) GetSort() *TimecardSort { } func (t *TimecardQuery) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -3048,6 +3327,9 @@ func (t *TimecardQuery) MarshalJSON() ([]byte, error) { } func (t *TimecardQuery) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -3095,6 +3377,9 @@ func (t *TimecardSort) GetOrder() *SortOrder { } func (t *TimecardSort) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -3147,6 +3432,9 @@ func (t *TimecardSort) MarshalJSON() ([]byte, error) { } func (t *TimecardSort) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -3266,6 +3554,9 @@ func (t *TimecardWage) GetTipEligible() *bool { } func (t *TimecardWage) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -3332,6 +3623,9 @@ func (t *TimecardWage) MarshalJSON() ([]byte, error) { } func (t *TimecardWage) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -3392,6 +3686,9 @@ func (t *TimecardWorkday) GetDefaultTimezone() *string { } func (t *TimecardWorkday) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -3451,6 +3748,9 @@ func (t *TimecardWorkday) MarshalJSON() ([]byte, error) { } func (t *TimecardWorkday) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -3525,6 +3825,9 @@ func (u *UpdateScheduledShiftResponse) GetErrors() []*Error { } func (u *UpdateScheduledShiftResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -3577,6 +3880,9 @@ func (u *UpdateScheduledShiftResponse) MarshalJSON() ([]byte, error) { } func (u *UpdateScheduledShiftResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -3624,6 +3930,9 @@ func (u *UpdateTimecardResponse) GetErrors() []*Error { } func (u *UpdateTimecardResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -3676,6 +3985,9 @@ func (u *UpdateTimecardResponse) MarshalJSON() ([]byte, error) { } func (u *UpdateTimecardResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value diff --git a/labor/break_types.go b/labor/break_types.go index cf3df56..78df0ac 100644 --- a/labor/break_types.go +++ b/labor/break_types.go @@ -3,7 +3,9 @@ package labor import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" big "math/big" ) @@ -16,7 +18,7 @@ type CreateBreakTypeRequest struct { // A unique string value to ensure the idempotency of the operation. IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"` // The `BreakType` to be created. - BreakType *v3.BreakType `json:"break_type,omitempty" url:"-"` + BreakType *v3.BreakType `json:"break_type" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -43,6 +45,27 @@ func (c *CreateBreakTypeRequest) SetBreakType(breakType *v3.BreakType) { c.require(createBreakTypeRequestFieldBreakType) } +func (c *CreateBreakTypeRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateBreakTypeRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateBreakTypeRequest(body) + return nil +} + +func (c *CreateBreakTypeRequest) MarshalJSON() ([]byte, error) { + type embed CreateBreakTypeRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( deleteBreakTypesRequestFieldID = big.NewInt(1 << 0) ) @@ -152,7 +175,7 @@ type UpdateBreakTypeRequest struct { // The UUID for the `BreakType` being updated. ID string `json:"-" url:"-"` // The updated `BreakType`. - BreakType *v3.BreakType `json:"break_type,omitempty" url:"-"` + BreakType *v3.BreakType `json:"break_type" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -178,3 +201,24 @@ func (u *UpdateBreakTypeRequest) SetBreakType(breakType *v3.BreakType) { u.BreakType = breakType u.require(updateBreakTypeRequestFieldBreakType) } + +func (u *UpdateBreakTypeRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdateBreakTypeRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdateBreakTypeRequest(body) + return nil +} + +func (u *UpdateBreakTypeRequest) MarshalJSON() ([]byte, error) { + type embed UpdateBreakTypeRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/labor/break_types_test.go b/labor/break_types_test.go new file mode 100644 index 0000000..ed9178f --- /dev/null +++ b/labor/break_types_test.go @@ -0,0 +1,313 @@ +// Code generated by Fern. DO NOT EDIT. + +package labor + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersCreateBreakTypeRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateBreakTypeRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateBreakTypeRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBreakTypeRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteBreakTypesRequest(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &DeleteBreakTypesRequest{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDeleteBreakTypesRequest(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteBreakTypesRequest{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetBreakTypesRequest(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &GetBreakTypesRequest{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetBreakTypesRequest(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBreakTypesRequest{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListBreakTypesRequest(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &ListBreakTypesRequest{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListBreakTypesRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListBreakTypesRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListBreakTypesRequest(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBreakTypesRequest{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBreakTypesRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBreakTypesRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateBreakTypeRequest(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &UpdateBreakTypeRequest{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateBreakTypeRequest(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateBreakTypeRequest{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/labor/breaktypes/labor_break_types_test/labor_break_types_test.go b/labor/breaktypes/labor_break_types_test/labor_break_types_test.go new file mode 100644 index 0000000..4c98ba0 --- /dev/null +++ b/labor/breaktypes/labor_break_types_test/labor_break_types_test.go @@ -0,0 +1,214 @@ +// Code generated by Fern. DO NOT EDIT. + +package labor_break_types_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + labor "github.com/square/square-go-sdk/v3/labor" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestLaborBreakTypesListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &labor.ListBreakTypesRequest{ + LocationID: square.String( + "location_id", + ), + Limit: square.Int( + 1, + ), + Cursor: square.String( + "cursor", + ), + } + _, invocationErr := client.Labor.BreakTypes.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLaborBreakTypesListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLaborBreakTypesListWithWireMock", "GET", "/v2/labor/break-types", map[string]string{"location_id": "location_id", "limit": "1", "cursor": "cursor"}, 1) +} + +func TestLaborBreakTypesCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &labor.CreateBreakTypeRequest{ + IdempotencyKey: square.String( + "PAD3NG5KSN2GL", + ), + BreakType: &square.BreakType{ + LocationID: "CGJN03P1D08GF", + BreakName: "Lunch Break", + ExpectedDuration: "PT30M", + IsPaid: true, + }, + } + _, invocationErr := client.Labor.BreakTypes.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLaborBreakTypesCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLaborBreakTypesCreateWithWireMock", "POST", "/v2/labor/break-types", nil, 1) +} + +func TestLaborBreakTypesGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &labor.GetBreakTypesRequest{ + ID: "id", + } + _, invocationErr := client.Labor.BreakTypes.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLaborBreakTypesGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLaborBreakTypesGetWithWireMock", "GET", "/v2/labor/break-types/id", nil, 1) +} + +func TestLaborBreakTypesUpdateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &labor.UpdateBreakTypeRequest{ + ID: "id", + BreakType: &square.BreakType{ + LocationID: "26M7H24AZ9N6R", + BreakName: "Lunch", + ExpectedDuration: "PT50M", + IsPaid: true, + Version: square.Int( + 1, + ), + }, + } + _, invocationErr := client.Labor.BreakTypes.Update( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLaborBreakTypesUpdateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLaborBreakTypesUpdateWithWireMock", "PUT", "/v2/labor/break-types/id", nil, 1) +} + +func TestLaborBreakTypesDeleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &labor.DeleteBreakTypesRequest{ + ID: "id", + } + _, invocationErr := client.Labor.BreakTypes.Delete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLaborBreakTypesDeleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLaborBreakTypesDeleteWithWireMock", "DELETE", "/v2/labor/break-types/id", nil, 1) +} diff --git a/labor/employee_wages_test.go b/labor/employee_wages_test.go new file mode 100644 index 0000000..5de7a1d --- /dev/null +++ b/labor/employee_wages_test.go @@ -0,0 +1,178 @@ +// Code generated by Fern. DO NOT EDIT. + +package labor + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersGetEmployeeWagesRequest(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &GetEmployeeWagesRequest{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetEmployeeWagesRequest(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetEmployeeWagesRequest{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListEmployeeWagesRequest(t *testing.T) { + t.Run("SetEmployeeID", func(t *testing.T) { + obj := &ListEmployeeWagesRequest{} + var fernTestValueEmployeeID *string + obj.SetEmployeeID(fernTestValueEmployeeID) + assert.Equal(t, fernTestValueEmployeeID, obj.EmployeeID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListEmployeeWagesRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListEmployeeWagesRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListEmployeeWagesRequest(t *testing.T) { + t.Run("SetEmployeeID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEmployeeWagesRequest{} + var fernTestValueEmployeeID *string + + // Act + obj.SetEmployeeID(fernTestValueEmployeeID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEmployeeWagesRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEmployeeWagesRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/labor/employeewages/labor_employee_wages_test/labor_employee_wages_test.go b/labor/employeewages/labor_employee_wages_test/labor_employee_wages_test.go new file mode 100644 index 0000000..1999d8c --- /dev/null +++ b/labor/employeewages/labor_employee_wages_test/labor_employee_wages_test.go @@ -0,0 +1,122 @@ +// Code generated by Fern. DO NOT EDIT. + +package labor_employee_wages_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + labor "github.com/square/square-go-sdk/v3/labor" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestLaborEmployeeWagesListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &labor.ListEmployeeWagesRequest{ + EmployeeID: square.String( + "employee_id", + ), + Limit: square.Int( + 1, + ), + Cursor: square.String( + "cursor", + ), + } + _, invocationErr := client.Labor.EmployeeWages.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLaborEmployeeWagesListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLaborEmployeeWagesListWithWireMock", "GET", "/v2/labor/employee-wages", map[string]string{"employee_id": "employee_id", "limit": "1", "cursor": "cursor"}, 1) +} + +func TestLaborEmployeeWagesGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &labor.GetEmployeeWagesRequest{ + ID: "id", + } + _, invocationErr := client.Labor.EmployeeWages.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLaborEmployeeWagesGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLaborEmployeeWagesGetWithWireMock", "GET", "/v2/labor/employee-wages/id", nil, 1) +} diff --git a/labor/labor_test/labor_test.go b/labor/labor_test/labor_test.go new file mode 100644 index 0000000..ed34afd --- /dev/null +++ b/labor/labor_test/labor_test.go @@ -0,0 +1,524 @@ +// Code generated by Fern. DO NOT EDIT. + +package labor_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestLaborCreateScheduledShiftWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CreateScheduledShiftRequest{ + IdempotencyKey: square.String( + "HIDSNG5KS478L", + ), + ScheduledShift: &square.ScheduledShift{ + DraftShiftDetails: &square.ScheduledShiftDetails{ + TeamMemberID: square.String( + "ormj0jJJZ5OZIzxrZYJI", + ), + LocationID: square.String( + "PAA1RJZZKXBFG", + ), + JobID: square.String( + "FzbJAtt9qEWncK1BWgVCxQ6M", + ), + StartAt: square.String( + "2019-01-25T03:11:00-05:00", + ), + EndAt: square.String( + "2019-01-25T13:11:00-05:00", + ), + Notes: square.String( + "Dont forget to prep the vegetables", + ), + IsDeleted: square.Bool( + false, + ), + }, + }, + } + _, invocationErr := client.Labor.CreateScheduledShift( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLaborCreateScheduledShiftWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLaborCreateScheduledShiftWithWireMock", "POST", "/v2/labor/scheduled-shifts", nil, 1) +} + +func TestLaborBulkPublishScheduledShiftsWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.BulkPublishScheduledShiftsRequest{ + ScheduledShifts: map[string]*square.BulkPublishScheduledShiftsData{ + "key": &square.BulkPublishScheduledShiftsData{}, + }, + ScheduledShiftNotificationAudience: square.ScheduledShiftNotificationAudienceAffected.Ptr(), + } + _, invocationErr := client.Labor.BulkPublishScheduledShifts( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLaborBulkPublishScheduledShiftsWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLaborBulkPublishScheduledShiftsWithWireMock", "POST", "/v2/labor/scheduled-shifts/bulk-publish", nil, 1) +} + +func TestLaborSearchScheduledShiftsWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.SearchScheduledShiftsRequest{ + Query: &square.ScheduledShiftQuery{ + Filter: &square.ScheduledShiftFilter{ + AssignmentStatus: square.ScheduledShiftFilterAssignmentStatusAssigned.Ptr(), + }, + Sort: &square.ScheduledShiftSort{ + Field: square.ScheduledShiftSortFieldCreatedAt.Ptr(), + Order: square.SortOrderAsc.Ptr(), + }, + }, + Limit: square.Int( + 2, + ), + Cursor: square.String( + "xoxp-1234-5678-90123", + ), + } + _, invocationErr := client.Labor.SearchScheduledShifts( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLaborSearchScheduledShiftsWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLaborSearchScheduledShiftsWithWireMock", "POST", "/v2/labor/scheduled-shifts/search", nil, 1) +} + +func TestLaborRetrieveScheduledShiftWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.RetrieveScheduledShiftRequest{ + ID: "id", + } + _, invocationErr := client.Labor.RetrieveScheduledShift( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLaborRetrieveScheduledShiftWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLaborRetrieveScheduledShiftWithWireMock", "GET", "/v2/labor/scheduled-shifts/id", nil, 1) +} + +func TestLaborUpdateScheduledShiftWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.UpdateScheduledShiftRequest{ + ID: "id", + ScheduledShift: &square.ScheduledShift{ + DraftShiftDetails: &square.ScheduledShiftDetails{ + TeamMemberID: square.String( + "ormj0jJJZ5OZIzxrZYJI", + ), + LocationID: square.String( + "PAA1RJZZKXBFG", + ), + JobID: square.String( + "FzbJAtt9qEWncK1BWgVCxQ6M", + ), + StartAt: square.String( + "2019-03-25T03:11:00-05:00", + ), + EndAt: square.String( + "2019-03-25T13:18:00-05:00", + ), + Notes: square.String( + "Dont forget to prep the vegetables", + ), + IsDeleted: square.Bool( + false, + ), + }, + Version: square.Int( + 1, + ), + }, + } + _, invocationErr := client.Labor.UpdateScheduledShift( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLaborUpdateScheduledShiftWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLaborUpdateScheduledShiftWithWireMock", "PUT", "/v2/labor/scheduled-shifts/id", nil, 1) +} + +func TestLaborPublishScheduledShiftWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.PublishScheduledShiftRequest{ + ID: "id", + IdempotencyKey: "HIDSNG5KS478L", + Version: square.Int( + 2, + ), + ScheduledShiftNotificationAudience: square.ScheduledShiftNotificationAudienceAll.Ptr(), + } + _, invocationErr := client.Labor.PublishScheduledShift( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLaborPublishScheduledShiftWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLaborPublishScheduledShiftWithWireMock", "POST", "/v2/labor/scheduled-shifts/id/publish", nil, 1) +} + +func TestLaborCreateTimecardWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CreateTimecardRequest{ + IdempotencyKey: square.String( + "HIDSNG5KS478L", + ), + Timecard: &square.Timecard{ + LocationID: "PAA1RJZZKXBFG", + StartAt: "2019-01-25T03:11:00-05:00", + EndAt: square.String( + "2019-01-25T13:11:00-05:00", + ), + Wage: &square.TimecardWage{ + Title: square.String( + "Barista", + ), + HourlyRate: &square.Money{ + Amount: square.Int64( + int64(1100), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + TipEligible: square.Bool( + true, + ), + }, + Breaks: []*square.Break{ + &square.Break{ + StartAt: "2019-01-25T06:11:00-05:00", + EndAt: square.String( + "2019-01-25T06:16:00-05:00", + ), + BreakTypeID: "REGS1EQR1TPZ5", + Name: "Tea Break", + ExpectedDuration: "PT5M", + IsPaid: true, + }, + }, + TeamMemberID: "ormj0jJJZ5OZIzxrZYJI", + DeclaredCashTipMoney: &square.Money{ + Amount: square.Int64( + int64(500), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + }, + } + _, invocationErr := client.Labor.CreateTimecard( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLaborCreateTimecardWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLaborCreateTimecardWithWireMock", "POST", "/v2/labor/timecards", nil, 1) +} + +func TestLaborSearchTimecardsWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.SearchTimecardsRequest{ + Query: &square.TimecardQuery{ + Filter: &square.TimecardFilter{ + Workday: &square.TimecardWorkday{ + DateRange: &square.DateRange{ + StartDate: square.String( + "2019-01-20", + ), + EndDate: square.String( + "2019-02-03", + ), + }, + MatchTimecardsBy: square.TimecardWorkdayMatcherStartAt.Ptr(), + DefaultTimezone: square.String( + "America/Los_Angeles", + ), + }, + }, + }, + Limit: square.Int( + 100, + ), + } + _, invocationErr := client.Labor.SearchTimecards( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLaborSearchTimecardsWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLaborSearchTimecardsWithWireMock", "POST", "/v2/labor/timecards/search", nil, 1) +} + +func TestLaborRetrieveTimecardWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.RetrieveTimecardRequest{ + ID: "id", + } + _, invocationErr := client.Labor.RetrieveTimecard( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLaborRetrieveTimecardWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLaborRetrieveTimecardWithWireMock", "GET", "/v2/labor/timecards/id", nil, 1) +} + +func TestLaborUpdateTimecardWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.UpdateTimecardRequest{ + ID: "id", + Timecard: &square.Timecard{ + LocationID: "PAA1RJZZKXBFG", + StartAt: "2019-01-25T03:11:00-05:00", + EndAt: square.String( + "2019-01-25T13:11:00-05:00", + ), + Wage: &square.TimecardWage{ + Title: square.String( + "Bartender", + ), + HourlyRate: &square.Money{ + Amount: square.Int64( + int64(1500), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + TipEligible: square.Bool( + true, + ), + }, + Breaks: []*square.Break{ + &square.Break{ + ID: square.String( + "X7GAQYVVRRG6P", + ), + StartAt: "2019-01-25T06:11:00-05:00", + EndAt: square.String( + "2019-01-25T06:16:00-05:00", + ), + BreakTypeID: "REGS1EQR1TPZ5", + Name: "Tea Break", + ExpectedDuration: "PT5M", + IsPaid: true, + }, + }, + Status: square.TimecardStatusClosed.Ptr(), + Version: square.Int( + 1, + ), + TeamMemberID: "ormj0jJJZ5OZIzxrZYJI", + DeclaredCashTipMoney: &square.Money{ + Amount: square.Int64( + int64(500), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + }, + } + _, invocationErr := client.Labor.UpdateTimecard( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLaborUpdateTimecardWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLaborUpdateTimecardWithWireMock", "PUT", "/v2/labor/timecards/id", nil, 1) +} + +func TestLaborDeleteTimecardWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.DeleteTimecardRequest{ + ID: "id", + } + _, invocationErr := client.Labor.DeleteTimecard( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLaborDeleteTimecardWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLaborDeleteTimecardWithWireMock", "DELETE", "/v2/labor/timecards/id", nil, 1) +} diff --git a/labor/shifts.go b/labor/shifts.go index afb8c0d..a51b197 100644 --- a/labor/shifts.go +++ b/labor/shifts.go @@ -3,7 +3,9 @@ package labor import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" big "math/big" ) @@ -16,7 +18,7 @@ type CreateShiftRequest struct { // A unique string value to ensure the idempotency of the operation. IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"` // The `Shift` to be created. - Shift *v3.Shift `json:"shift,omitempty" url:"-"` + Shift *v3.Shift `json:"shift" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -43,6 +45,27 @@ func (c *CreateShiftRequest) SetShift(shift *v3.Shift) { c.require(createShiftRequestFieldShift) } +func (c *CreateShiftRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateShiftRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateShiftRequest(body) + return nil +} + +func (c *CreateShiftRequest) MarshalJSON() ([]byte, error) { + type embed CreateShiftRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( deleteShiftsRequestFieldID = big.NewInt(1 << 0) ) @@ -141,6 +164,27 @@ func (s *SearchShiftsRequest) SetCursor(cursor *string) { s.require(searchShiftsRequestFieldCursor) } +func (s *SearchShiftsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler SearchShiftsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *s = SearchShiftsRequest(body) + return nil +} + +func (s *SearchShiftsRequest) MarshalJSON() ([]byte, error) { + type embed SearchShiftsRequest + var marshaler = struct { + embed + }{ + embed: embed(*s), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, s.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( updateShiftRequestFieldID = big.NewInt(1 << 0) updateShiftRequestFieldShift = big.NewInt(1 << 1) @@ -150,7 +194,7 @@ type UpdateShiftRequest struct { // The ID of the object being updated. ID string `json:"-" url:"-"` // The updated `Shift` object. - Shift *v3.Shift `json:"shift,omitempty" url:"-"` + Shift *v3.Shift `json:"shift" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -176,3 +220,24 @@ func (u *UpdateShiftRequest) SetShift(shift *v3.Shift) { u.Shift = shift u.require(updateShiftRequestFieldShift) } + +func (u *UpdateShiftRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdateShiftRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdateShiftRequest(body) + return nil +} + +func (u *UpdateShiftRequest) MarshalJSON() ([]byte, error) { + type embed UpdateShiftRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/labor/shifts/labor_shifts_test/labor_shifts_test.go b/labor/shifts/labor_shifts_test/labor_shifts_test.go new file mode 100644 index 0000000..4be2b45 --- /dev/null +++ b/labor/shifts/labor_shifts_test/labor_shifts_test.go @@ -0,0 +1,301 @@ +// Code generated by Fern. DO NOT EDIT. + +package labor_shifts_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + labor "github.com/square/square-go-sdk/v3/labor" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestLaborShiftsCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &labor.CreateShiftRequest{ + IdempotencyKey: square.String( + "HIDSNG5KS478L", + ), + Shift: &square.Shift{ + LocationID: "PAA1RJZZKXBFG", + StartAt: "2019-01-25T03:11:00-05:00", + EndAt: square.String( + "2019-01-25T13:11:00-05:00", + ), + Wage: &square.ShiftWage{ + Title: square.String( + "Barista", + ), + HourlyRate: &square.Money{ + Amount: square.Int64( + int64(1100), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + TipEligible: square.Bool( + true, + ), + }, + Breaks: []*square.Break{ + &square.Break{ + StartAt: "2019-01-25T06:11:00-05:00", + EndAt: square.String( + "2019-01-25T06:16:00-05:00", + ), + BreakTypeID: "REGS1EQR1TPZ5", + Name: "Tea Break", + ExpectedDuration: "PT5M", + IsPaid: true, + }, + }, + TeamMemberID: square.String( + "ormj0jJJZ5OZIzxrZYJI", + ), + DeclaredCashTipMoney: &square.Money{ + Amount: square.Int64( + int64(500), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + }, + } + _, invocationErr := client.Labor.Shifts.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLaborShiftsCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLaborShiftsCreateWithWireMock", "POST", "/v2/labor/shifts", nil, 1) +} + +func TestLaborShiftsSearchWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &labor.SearchShiftsRequest{ + Query: &square.ShiftQuery{ + Filter: &square.ShiftFilter{ + Workday: &square.ShiftWorkday{ + DateRange: &square.DateRange{ + StartDate: square.String( + "2019-01-20", + ), + EndDate: square.String( + "2019-02-03", + ), + }, + MatchShiftsBy: square.ShiftWorkdayMatcherStartAt.Ptr(), + DefaultTimezone: square.String( + "America/Los_Angeles", + ), + }, + }, + }, + Limit: square.Int( + 100, + ), + } + _, invocationErr := client.Labor.Shifts.Search( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLaborShiftsSearchWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLaborShiftsSearchWithWireMock", "POST", "/v2/labor/shifts/search", nil, 1) +} + +func TestLaborShiftsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &labor.GetShiftsRequest{ + ID: "id", + } + _, invocationErr := client.Labor.Shifts.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLaborShiftsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLaborShiftsGetWithWireMock", "GET", "/v2/labor/shifts/id", nil, 1) +} + +func TestLaborShiftsUpdateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &labor.UpdateShiftRequest{ + ID: "id", + Shift: &square.Shift{ + LocationID: "PAA1RJZZKXBFG", + StartAt: "2019-01-25T03:11:00-05:00", + EndAt: square.String( + "2019-01-25T13:11:00-05:00", + ), + Wage: &square.ShiftWage{ + Title: square.String( + "Bartender", + ), + HourlyRate: &square.Money{ + Amount: square.Int64( + int64(1500), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + TipEligible: square.Bool( + true, + ), + }, + Breaks: []*square.Break{ + &square.Break{ + ID: square.String( + "X7GAQYVVRRG6P", + ), + StartAt: "2019-01-25T06:11:00-05:00", + EndAt: square.String( + "2019-01-25T06:16:00-05:00", + ), + BreakTypeID: "REGS1EQR1TPZ5", + Name: "Tea Break", + ExpectedDuration: "PT5M", + IsPaid: true, + }, + }, + Version: square.Int( + 1, + ), + TeamMemberID: square.String( + "ormj0jJJZ5OZIzxrZYJI", + ), + DeclaredCashTipMoney: &square.Money{ + Amount: square.Int64( + int64(500), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + }, + } + _, invocationErr := client.Labor.Shifts.Update( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLaborShiftsUpdateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLaborShiftsUpdateWithWireMock", "PUT", "/v2/labor/shifts/id", nil, 1) +} + +func TestLaborShiftsDeleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &labor.DeleteShiftsRequest{ + ID: "id", + } + _, invocationErr := client.Labor.Shifts.Delete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLaborShiftsDeleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLaborShiftsDeleteWithWireMock", "DELETE", "/v2/labor/shifts/id", nil, 1) +} diff --git a/labor/shifts_test.go b/labor/shifts_test.go new file mode 100644 index 0000000..b02b509 --- /dev/null +++ b/labor/shifts_test.go @@ -0,0 +1,274 @@ +// Code generated by Fern. DO NOT EDIT. + +package labor + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersCreateShiftRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateShiftRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateShiftRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateShiftRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteShiftsRequest(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &DeleteShiftsRequest{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDeleteShiftsRequest(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteShiftsRequest{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetShiftsRequest(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &GetShiftsRequest{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetShiftsRequest(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetShiftsRequest{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchShiftsRequest(t *testing.T) { + t.Run("SetLimit", func(t *testing.T) { + obj := &SearchShiftsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchShiftsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitSearchShiftsRequest(t *testing.T) { + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchShiftsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchShiftsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateShiftRequest(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &UpdateShiftRequest{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateShiftRequest(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateShiftRequest{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/labor/team_member_wages_test.go b/labor/team_member_wages_test.go new file mode 100644 index 0000000..eef0535 --- /dev/null +++ b/labor/team_member_wages_test.go @@ -0,0 +1,178 @@ +// Code generated by Fern. DO NOT EDIT. + +package labor + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersGetTeamMemberWagesRequest(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &GetTeamMemberWagesRequest{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetTeamMemberWagesRequest(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTeamMemberWagesRequest{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListTeamMemberWagesRequest(t *testing.T) { + t.Run("SetTeamMemberID", func(t *testing.T) { + obj := &ListTeamMemberWagesRequest{} + var fernTestValueTeamMemberID *string + obj.SetTeamMemberID(fernTestValueTeamMemberID) + assert.Equal(t, fernTestValueTeamMemberID, obj.TeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListTeamMemberWagesRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListTeamMemberWagesRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListTeamMemberWagesRequest(t *testing.T) { + t.Run("SetTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTeamMemberWagesRequest{} + var fernTestValueTeamMemberID *string + + // Act + obj.SetTeamMemberID(fernTestValueTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTeamMemberWagesRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTeamMemberWagesRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/labor/teammemberwages/labor_team_member_wages_test/labor_team_member_wages_test.go b/labor/teammemberwages/labor_team_member_wages_test/labor_team_member_wages_test.go new file mode 100644 index 0000000..4a953d5 --- /dev/null +++ b/labor/teammemberwages/labor_team_member_wages_test/labor_team_member_wages_test.go @@ -0,0 +1,122 @@ +// Code generated by Fern. DO NOT EDIT. + +package labor_team_member_wages_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + labor "github.com/square/square-go-sdk/v3/labor" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestLaborTeamMemberWagesListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &labor.ListTeamMemberWagesRequest{ + TeamMemberID: square.String( + "team_member_id", + ), + Limit: square.Int( + 1, + ), + Cursor: square.String( + "cursor", + ), + } + _, invocationErr := client.Labor.TeamMemberWages.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLaborTeamMemberWagesListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLaborTeamMemberWagesListWithWireMock", "GET", "/v2/labor/team-member-wages", map[string]string{"team_member_id": "team_member_id", "limit": "1", "cursor": "cursor"}, 1) +} + +func TestLaborTeamMemberWagesGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &labor.GetTeamMemberWagesRequest{ + ID: "id", + } + _, invocationErr := client.Labor.TeamMemberWages.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLaborTeamMemberWagesGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLaborTeamMemberWagesGetWithWireMock", "GET", "/v2/labor/team-member-wages/id", nil, 1) +} diff --git a/labor/workweek_configs.go b/labor/workweek_configs.go index 95c36fe..b264e5b 100644 --- a/labor/workweek_configs.go +++ b/labor/workweek_configs.go @@ -3,7 +3,9 @@ package labor import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" big "math/big" ) @@ -16,7 +18,7 @@ type UpdateWorkweekConfigRequest struct { // The UUID for the `WorkweekConfig` object being updated. ID string `json:"-" url:"-"` // The updated `WorkweekConfig` object. - WorkweekConfig *v3.WorkweekConfig `json:"workweek_config,omitempty" url:"-"` + WorkweekConfig *v3.WorkweekConfig `json:"workweek_config" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -43,6 +45,27 @@ func (u *UpdateWorkweekConfigRequest) SetWorkweekConfig(workweekConfig *v3.Workw u.require(updateWorkweekConfigRequestFieldWorkweekConfig) } +func (u *UpdateWorkweekConfigRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdateWorkweekConfigRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdateWorkweekConfigRequest(body) + return nil +} + +func (u *UpdateWorkweekConfigRequest) MarshalJSON() ([]byte, error) { + type embed UpdateWorkweekConfigRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( listWorkweekConfigsRequestFieldLimit = big.NewInt(1 << 0) listWorkweekConfigsRequestFieldCursor = big.NewInt(1 << 1) diff --git a/labor/workweek_configs_test.go b/labor/workweek_configs_test.go new file mode 100644 index 0000000..865e4b1 --- /dev/null +++ b/labor/workweek_configs_test.go @@ -0,0 +1,139 @@ +// Code generated by Fern. DO NOT EDIT. + +package labor + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersUpdateWorkweekConfigRequest(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &UpdateWorkweekConfigRequest{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateWorkweekConfigRequest(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWorkweekConfigRequest{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListWorkweekConfigsRequest(t *testing.T) { + t.Run("SetLimit", func(t *testing.T) { + obj := &ListWorkweekConfigsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListWorkweekConfigsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListWorkweekConfigsRequest(t *testing.T) { + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWorkweekConfigsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWorkweekConfigsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/labor/workweekconfigs/labor_workweek_configs_test/labor_workweek_configs_test.go b/labor/workweekconfigs/labor_workweek_configs_test/labor_workweek_configs_test.go new file mode 100644 index 0000000..9f7129b --- /dev/null +++ b/labor/workweekconfigs/labor_workweek_configs_test/labor_workweek_configs_test.go @@ -0,0 +1,126 @@ +// Code generated by Fern. DO NOT EDIT. + +package labor_workweek_configs_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + labor "github.com/square/square-go-sdk/v3/labor" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestLaborWorkweekConfigsListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &labor.ListWorkweekConfigsRequest{ + Limit: square.Int( + 1, + ), + Cursor: square.String( + "cursor", + ), + } + _, invocationErr := client.Labor.WorkweekConfigs.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLaborWorkweekConfigsListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLaborWorkweekConfigsListWithWireMock", "GET", "/v2/labor/workweek-configs", map[string]string{"limit": "1", "cursor": "cursor"}, 1) +} + +func TestLaborWorkweekConfigsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &labor.UpdateWorkweekConfigRequest{ + ID: "id", + WorkweekConfig: &square.WorkweekConfig{ + StartOfWeek: square.WeekdayMon, + StartOfDayLocalTime: "10:00", + Version: square.Int( + 10, + ), + }, + } + _, invocationErr := client.Labor.WorkweekConfigs.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLaborWorkweekConfigsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLaborWorkweekConfigsGetWithWireMock", "PUT", "/v2/labor/workweek-configs/id", nil, 1) +} diff --git a/labor_test.go b/labor_test.go new file mode 100644 index 0000000..57a54f9 --- /dev/null +++ b/labor_test.go @@ -0,0 +1,9101 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersBulkPublishScheduledShiftsRequest(t *testing.T) { + t.Run("SetScheduledShifts", func(t *testing.T) { + obj := &BulkPublishScheduledShiftsRequest{} + var fernTestValueScheduledShifts map[string]*BulkPublishScheduledShiftsData + obj.SetScheduledShifts(fernTestValueScheduledShifts) + assert.Equal(t, fernTestValueScheduledShifts, obj.ScheduledShifts) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetScheduledShiftNotificationAudience", func(t *testing.T) { + obj := &BulkPublishScheduledShiftsRequest{} + var fernTestValueScheduledShiftNotificationAudience *ScheduledShiftNotificationAudience + obj.SetScheduledShiftNotificationAudience(fernTestValueScheduledShiftNotificationAudience) + assert.Equal(t, fernTestValueScheduledShiftNotificationAudience, obj.ScheduledShiftNotificationAudience) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitBulkPublishScheduledShiftsRequest(t *testing.T) { + t.Run("SetScheduledShifts_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkPublishScheduledShiftsRequest{} + var fernTestValueScheduledShifts map[string]*BulkPublishScheduledShiftsData + + // Act + obj.SetScheduledShifts(fernTestValueScheduledShifts) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetScheduledShiftNotificationAudience_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkPublishScheduledShiftsRequest{} + var fernTestValueScheduledShiftNotificationAudience *ScheduledShiftNotificationAudience + + // Act + obj.SetScheduledShiftNotificationAudience(fernTestValueScheduledShiftNotificationAudience) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateScheduledShiftRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateScheduledShiftRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetScheduledShift", func(t *testing.T) { + obj := &CreateScheduledShiftRequest{} + var fernTestValueScheduledShift *ScheduledShift + obj.SetScheduledShift(fernTestValueScheduledShift) + assert.Equal(t, fernTestValueScheduledShift, obj.ScheduledShift) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateScheduledShiftRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateScheduledShiftRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetScheduledShift_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateScheduledShiftRequest{} + var fernTestValueScheduledShift *ScheduledShift + + // Act + obj.SetScheduledShift(fernTestValueScheduledShift) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateTimecardRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateTimecardRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTimecard", func(t *testing.T) { + obj := &CreateTimecardRequest{} + var fernTestValueTimecard *Timecard + obj.SetTimecard(fernTestValueTimecard) + assert.Equal(t, fernTestValueTimecard, obj.Timecard) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateTimecardRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTimecardRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTimecard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTimecardRequest{} + var fernTestValueTimecard *Timecard + + // Act + obj.SetTimecard(fernTestValueTimecard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteTimecardRequest(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &DeleteTimecardRequest{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDeleteTimecardRequest(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteTimecardRequest{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPublishScheduledShiftRequest(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &PublishScheduledShiftRequest{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &PublishScheduledShiftRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &PublishScheduledShiftRequest{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetScheduledShiftNotificationAudience", func(t *testing.T) { + obj := &PublishScheduledShiftRequest{} + var fernTestValueScheduledShiftNotificationAudience *ScheduledShiftNotificationAudience + obj.SetScheduledShiftNotificationAudience(fernTestValueScheduledShiftNotificationAudience) + assert.Equal(t, fernTestValueScheduledShiftNotificationAudience, obj.ScheduledShiftNotificationAudience) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitPublishScheduledShiftRequest(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PublishScheduledShiftRequest{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PublishScheduledShiftRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PublishScheduledShiftRequest{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetScheduledShiftNotificationAudience_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PublishScheduledShiftRequest{} + var fernTestValueScheduledShiftNotificationAudience *ScheduledShiftNotificationAudience + + // Act + obj.SetScheduledShiftNotificationAudience(fernTestValueScheduledShiftNotificationAudience) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRetrieveScheduledShiftRequest(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &RetrieveScheduledShiftRequest{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitRetrieveScheduledShiftRequest(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveScheduledShiftRequest{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRetrieveTimecardRequest(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &RetrieveTimecardRequest{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitRetrieveTimecardRequest(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTimecardRequest{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchScheduledShiftsRequest(t *testing.T) { + t.Run("SetQuery", func(t *testing.T) { + obj := &SearchScheduledShiftsRequest{} + var fernTestValueQuery *ScheduledShiftQuery + obj.SetQuery(fernTestValueQuery) + assert.Equal(t, fernTestValueQuery, obj.Query) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &SearchScheduledShiftsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchScheduledShiftsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitSearchScheduledShiftsRequest(t *testing.T) { + t.Run("SetQuery_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchScheduledShiftsRequest{} + var fernTestValueQuery *ScheduledShiftQuery + + // Act + obj.SetQuery(fernTestValueQuery) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchScheduledShiftsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchScheduledShiftsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchTimecardsRequest(t *testing.T) { + t.Run("SetQuery", func(t *testing.T) { + obj := &SearchTimecardsRequest{} + var fernTestValueQuery *TimecardQuery + obj.SetQuery(fernTestValueQuery) + assert.Equal(t, fernTestValueQuery, obj.Query) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &SearchTimecardsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchTimecardsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitSearchTimecardsRequest(t *testing.T) { + t.Run("SetQuery_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTimecardsRequest{} + var fernTestValueQuery *TimecardQuery + + // Act + obj.SetQuery(fernTestValueQuery) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTimecardsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTimecardsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateScheduledShiftRequest(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &UpdateScheduledShiftRequest{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetScheduledShift", func(t *testing.T) { + obj := &UpdateScheduledShiftRequest{} + var fernTestValueScheduledShift *ScheduledShift + obj.SetScheduledShift(fernTestValueScheduledShift) + assert.Equal(t, fernTestValueScheduledShift, obj.ScheduledShift) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateScheduledShiftRequest(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateScheduledShiftRequest{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetScheduledShift_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateScheduledShiftRequest{} + var fernTestValueScheduledShift *ScheduledShift + + // Act + obj.SetScheduledShift(fernTestValueScheduledShift) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateTimecardRequest(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &UpdateTimecardRequest{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTimecard", func(t *testing.T) { + obj := &UpdateTimecardRequest{} + var fernTestValueTimecard *Timecard + obj.SetTimecard(fernTestValueTimecard) + assert.Equal(t, fernTestValueTimecard, obj.Timecard) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateTimecardRequest(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTimecardRequest{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTimecard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTimecardRequest{} + var fernTestValueTimecard *Timecard + + // Act + obj.SetTimecard(fernTestValueTimecard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkPublishScheduledShiftsData(t *testing.T) { + t.Run("SetVersion", func(t *testing.T) { + obj := &BulkPublishScheduledShiftsData{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkPublishScheduledShiftsData(t *testing.T) { + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkPublishScheduledShiftsData{} + var expected *int + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkPublishScheduledShiftsData{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkPublishScheduledShiftsData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkPublishScheduledShiftsData(t *testing.T) { + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkPublishScheduledShiftsData{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkPublishScheduledShiftsResponse(t *testing.T) { + t.Run("SetResponses", func(t *testing.T) { + obj := &BulkPublishScheduledShiftsResponse{} + var fernTestValueResponses map[string]*PublishScheduledShiftResponse + obj.SetResponses(fernTestValueResponses) + assert.Equal(t, fernTestValueResponses, obj.Responses) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &BulkPublishScheduledShiftsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkPublishScheduledShiftsResponse(t *testing.T) { + t.Run("GetResponses", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkPublishScheduledShiftsResponse{} + var expected map[string]*PublishScheduledShiftResponse + obj.Responses = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetResponses(), "getter should return the property value") + }) + + t.Run("GetResponses_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkPublishScheduledShiftsResponse{} + obj.Responses = nil + + // Act & Assert + assert.Nil(t, obj.GetResponses(), "getter should return nil when property is nil") + }) + + t.Run("GetResponses_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkPublishScheduledShiftsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetResponses() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkPublishScheduledShiftsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkPublishScheduledShiftsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkPublishScheduledShiftsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkPublishScheduledShiftsResponse(t *testing.T) { + t.Run("SetResponses_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkPublishScheduledShiftsResponse{} + var fernTestValueResponses map[string]*PublishScheduledShiftResponse + + // Act + obj.SetResponses(fernTestValueResponses) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkPublishScheduledShiftsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateScheduledShiftResponse(t *testing.T) { + t.Run("SetScheduledShift", func(t *testing.T) { + obj := &CreateScheduledShiftResponse{} + var fernTestValueScheduledShift *ScheduledShift + obj.SetScheduledShift(fernTestValueScheduledShift) + assert.Equal(t, fernTestValueScheduledShift, obj.ScheduledShift) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateScheduledShiftResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateScheduledShiftResponse(t *testing.T) { + t.Run("GetScheduledShift", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateScheduledShiftResponse{} + var expected *ScheduledShift + obj.ScheduledShift = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetScheduledShift(), "getter should return the property value") + }) + + t.Run("GetScheduledShift_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateScheduledShiftResponse{} + obj.ScheduledShift = nil + + // Act & Assert + assert.Nil(t, obj.GetScheduledShift(), "getter should return nil when property is nil") + }) + + t.Run("GetScheduledShift_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateScheduledShiftResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetScheduledShift() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateScheduledShiftResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateScheduledShiftResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateScheduledShiftResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateScheduledShiftResponse(t *testing.T) { + t.Run("SetScheduledShift_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateScheduledShiftResponse{} + var fernTestValueScheduledShift *ScheduledShift + + // Act + obj.SetScheduledShift(fernTestValueScheduledShift) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateScheduledShiftResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateTimecardResponse(t *testing.T) { + t.Run("SetTimecard", func(t *testing.T) { + obj := &CreateTimecardResponse{} + var fernTestValueTimecard *Timecard + obj.SetTimecard(fernTestValueTimecard) + assert.Equal(t, fernTestValueTimecard, obj.Timecard) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateTimecardResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateTimecardResponse(t *testing.T) { + t.Run("GetTimecard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTimecardResponse{} + var expected *Timecard + obj.Timecard = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTimecard(), "getter should return the property value") + }) + + t.Run("GetTimecard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTimecardResponse{} + obj.Timecard = nil + + // Act & Assert + assert.Nil(t, obj.GetTimecard(), "getter should return nil when property is nil") + }) + + t.Run("GetTimecard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTimecardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTimecard() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTimecardResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTimecardResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTimecardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateTimecardResponse(t *testing.T) { + t.Run("SetTimecard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTimecardResponse{} + var fernTestValueTimecard *Timecard + + // Act + obj.SetTimecard(fernTestValueTimecard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTimecardResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteTimecardResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DeleteTimecardResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeleteTimecardResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteTimecardResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteTimecardResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteTimecardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeleteTimecardResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteTimecardResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPublishScheduledShiftResponse(t *testing.T) { + t.Run("SetScheduledShift", func(t *testing.T) { + obj := &PublishScheduledShiftResponse{} + var fernTestValueScheduledShift *ScheduledShift + obj.SetScheduledShift(fernTestValueScheduledShift) + assert.Equal(t, fernTestValueScheduledShift, obj.ScheduledShift) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &PublishScheduledShiftResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPublishScheduledShiftResponse(t *testing.T) { + t.Run("GetScheduledShift", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PublishScheduledShiftResponse{} + var expected *ScheduledShift + obj.ScheduledShift = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetScheduledShift(), "getter should return the property value") + }) + + t.Run("GetScheduledShift_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PublishScheduledShiftResponse{} + obj.ScheduledShift = nil + + // Act & Assert + assert.Nil(t, obj.GetScheduledShift(), "getter should return nil when property is nil") + }) + + t.Run("GetScheduledShift_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PublishScheduledShiftResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetScheduledShift() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PublishScheduledShiftResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PublishScheduledShiftResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PublishScheduledShiftResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPublishScheduledShiftResponse(t *testing.T) { + t.Run("SetScheduledShift_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PublishScheduledShiftResponse{} + var fernTestValueScheduledShift *ScheduledShift + + // Act + obj.SetScheduledShift(fernTestValueScheduledShift) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PublishScheduledShiftResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRetrieveScheduledShiftResponse(t *testing.T) { + t.Run("SetScheduledShift", func(t *testing.T) { + obj := &RetrieveScheduledShiftResponse{} + var fernTestValueScheduledShift *ScheduledShift + obj.SetScheduledShift(fernTestValueScheduledShift) + assert.Equal(t, fernTestValueScheduledShift, obj.ScheduledShift) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &RetrieveScheduledShiftResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRetrieveScheduledShiftResponse(t *testing.T) { + t.Run("GetScheduledShift", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveScheduledShiftResponse{} + var expected *ScheduledShift + obj.ScheduledShift = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetScheduledShift(), "getter should return the property value") + }) + + t.Run("GetScheduledShift_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveScheduledShiftResponse{} + obj.ScheduledShift = nil + + // Act & Assert + assert.Nil(t, obj.GetScheduledShift(), "getter should return nil when property is nil") + }) + + t.Run("GetScheduledShift_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveScheduledShiftResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetScheduledShift() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveScheduledShiftResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveScheduledShiftResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveScheduledShiftResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRetrieveScheduledShiftResponse(t *testing.T) { + t.Run("SetScheduledShift_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveScheduledShiftResponse{} + var fernTestValueScheduledShift *ScheduledShift + + // Act + obj.SetScheduledShift(fernTestValueScheduledShift) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveScheduledShiftResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRetrieveTimecardResponse(t *testing.T) { + t.Run("SetTimecard", func(t *testing.T) { + obj := &RetrieveTimecardResponse{} + var fernTestValueTimecard *Timecard + obj.SetTimecard(fernTestValueTimecard) + assert.Equal(t, fernTestValueTimecard, obj.Timecard) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &RetrieveTimecardResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRetrieveTimecardResponse(t *testing.T) { + t.Run("GetTimecard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTimecardResponse{} + var expected *Timecard + obj.Timecard = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTimecard(), "getter should return the property value") + }) + + t.Run("GetTimecard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTimecardResponse{} + obj.Timecard = nil + + // Act & Assert + assert.Nil(t, obj.GetTimecard(), "getter should return nil when property is nil") + }) + + t.Run("GetTimecard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveTimecardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTimecard() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTimecardResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTimecardResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveTimecardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRetrieveTimecardResponse(t *testing.T) { + t.Run("SetTimecard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTimecardResponse{} + var fernTestValueTimecard *Timecard + + // Act + obj.SetTimecard(fernTestValueTimecard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTimecardResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersScheduledShift(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &ScheduledShift{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDraftShiftDetails", func(t *testing.T) { + obj := &ScheduledShift{} + var fernTestValueDraftShiftDetails *ScheduledShiftDetails + obj.SetDraftShiftDetails(fernTestValueDraftShiftDetails) + assert.Equal(t, fernTestValueDraftShiftDetails, obj.DraftShiftDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPublishedShiftDetails", func(t *testing.T) { + obj := &ScheduledShift{} + var fernTestValuePublishedShiftDetails *ScheduledShiftDetails + obj.SetPublishedShiftDetails(fernTestValuePublishedShiftDetails) + assert.Equal(t, fernTestValuePublishedShiftDetails, obj.PublishedShiftDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &ScheduledShift{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &ScheduledShift{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &ScheduledShift{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersScheduledShift(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShift{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShift{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetDraftShiftDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShift{} + var expected *ScheduledShiftDetails + obj.DraftShiftDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDraftShiftDetails(), "getter should return the property value") + }) + + t.Run("GetDraftShiftDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShift{} + obj.DraftShiftDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetDraftShiftDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetDraftShiftDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDraftShiftDetails() // Should return zero value + }) + + t.Run("GetPublishedShiftDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShift{} + var expected *ScheduledShiftDetails + obj.PublishedShiftDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPublishedShiftDetails(), "getter should return the property value") + }) + + t.Run("GetPublishedShiftDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShift{} + obj.PublishedShiftDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetPublishedShiftDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetPublishedShiftDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPublishedShiftDetails() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShift{} + var expected *int + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShift{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShift{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShift{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShift{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShift{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitScheduledShift(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShift{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDraftShiftDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShift{} + var fernTestValueDraftShiftDetails *ScheduledShiftDetails + + // Act + obj.SetDraftShiftDetails(fernTestValueDraftShiftDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPublishedShiftDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShift{} + var fernTestValuePublishedShiftDetails *ScheduledShiftDetails + + // Act + obj.SetPublishedShiftDetails(fernTestValuePublishedShiftDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShift{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShift{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShift{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersScheduledShiftDetails(t *testing.T) { + t.Run("SetTeamMemberID", func(t *testing.T) { + obj := &ScheduledShiftDetails{} + var fernTestValueTeamMemberID *string + obj.SetTeamMemberID(fernTestValueTeamMemberID) + assert.Equal(t, fernTestValueTeamMemberID, obj.TeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &ScheduledShiftDetails{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetJobID", func(t *testing.T) { + obj := &ScheduledShiftDetails{} + var fernTestValueJobID *string + obj.SetJobID(fernTestValueJobID) + assert.Equal(t, fernTestValueJobID, obj.JobID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStartAt", func(t *testing.T) { + obj := &ScheduledShiftDetails{} + var fernTestValueStartAt *string + obj.SetStartAt(fernTestValueStartAt) + assert.Equal(t, fernTestValueStartAt, obj.StartAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEndAt", func(t *testing.T) { + obj := &ScheduledShiftDetails{} + var fernTestValueEndAt *string + obj.SetEndAt(fernTestValueEndAt) + assert.Equal(t, fernTestValueEndAt, obj.EndAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNotes", func(t *testing.T) { + obj := &ScheduledShiftDetails{} + var fernTestValueNotes *string + obj.SetNotes(fernTestValueNotes) + assert.Equal(t, fernTestValueNotes, obj.Notes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsDeleted", func(t *testing.T) { + obj := &ScheduledShiftDetails{} + var fernTestValueIsDeleted *bool + obj.SetIsDeleted(fernTestValueIsDeleted) + assert.Equal(t, fernTestValueIsDeleted, obj.IsDeleted) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTimezone", func(t *testing.T) { + obj := &ScheduledShiftDetails{} + var fernTestValueTimezone *string + obj.SetTimezone(fernTestValueTimezone) + assert.Equal(t, fernTestValueTimezone, obj.Timezone) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersScheduledShiftDetails(t *testing.T) { + t.Run("GetTeamMemberID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftDetails{} + var expected *string + obj.TeamMemberID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMemberID(), "getter should return the property value") + }) + + t.Run("GetTeamMemberID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftDetails{} + obj.TeamMemberID = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMemberID(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMemberID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMemberID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftDetails{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftDetails{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetJobID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftDetails{} + var expected *string + obj.JobID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetJobID(), "getter should return the property value") + }) + + t.Run("GetJobID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftDetails{} + obj.JobID = nil + + // Act & Assert + assert.Nil(t, obj.GetJobID(), "getter should return nil when property is nil") + }) + + t.Run("GetJobID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetJobID() // Should return zero value + }) + + t.Run("GetStartAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftDetails{} + var expected *string + obj.StartAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStartAt(), "getter should return the property value") + }) + + t.Run("GetStartAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftDetails{} + obj.StartAt = nil + + // Act & Assert + assert.Nil(t, obj.GetStartAt(), "getter should return nil when property is nil") + }) + + t.Run("GetStartAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStartAt() // Should return zero value + }) + + t.Run("GetEndAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftDetails{} + var expected *string + obj.EndAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEndAt(), "getter should return the property value") + }) + + t.Run("GetEndAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftDetails{} + obj.EndAt = nil + + // Act & Assert + assert.Nil(t, obj.GetEndAt(), "getter should return nil when property is nil") + }) + + t.Run("GetEndAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEndAt() // Should return zero value + }) + + t.Run("GetNotes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftDetails{} + var expected *string + obj.Notes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNotes(), "getter should return the property value") + }) + + t.Run("GetNotes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftDetails{} + obj.Notes = nil + + // Act & Assert + assert.Nil(t, obj.GetNotes(), "getter should return nil when property is nil") + }) + + t.Run("GetNotes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNotes() // Should return zero value + }) + + t.Run("GetIsDeleted", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftDetails{} + var expected *bool + obj.IsDeleted = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsDeleted(), "getter should return the property value") + }) + + t.Run("GetIsDeleted_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftDetails{} + obj.IsDeleted = nil + + // Act & Assert + assert.Nil(t, obj.GetIsDeleted(), "getter should return nil when property is nil") + }) + + t.Run("GetIsDeleted_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsDeleted() // Should return zero value + }) + + t.Run("GetTimezone", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftDetails{} + var expected *string + obj.Timezone = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTimezone(), "getter should return the property value") + }) + + t.Run("GetTimezone_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftDetails{} + obj.Timezone = nil + + // Act & Assert + assert.Nil(t, obj.GetTimezone(), "getter should return nil when property is nil") + }) + + t.Run("GetTimezone_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTimezone() // Should return zero value + }) + +} + +func TestSettersMarkExplicitScheduledShiftDetails(t *testing.T) { + t.Run("SetTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftDetails{} + var fernTestValueTeamMemberID *string + + // Act + obj.SetTeamMemberID(fernTestValueTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftDetails{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetJobID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftDetails{} + var fernTestValueJobID *string + + // Act + obj.SetJobID(fernTestValueJobID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStartAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftDetails{} + var fernTestValueStartAt *string + + // Act + obj.SetStartAt(fernTestValueStartAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEndAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftDetails{} + var fernTestValueEndAt *string + + // Act + obj.SetEndAt(fernTestValueEndAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNotes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftDetails{} + var fernTestValueNotes *string + + // Act + obj.SetNotes(fernTestValueNotes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsDeleted_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftDetails{} + var fernTestValueIsDeleted *bool + + // Act + obj.SetIsDeleted(fernTestValueIsDeleted) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTimezone_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftDetails{} + var fernTestValueTimezone *string + + // Act + obj.SetTimezone(fernTestValueTimezone) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersScheduledShiftFilter(t *testing.T) { + t.Run("SetLocationIDs", func(t *testing.T) { + obj := &ScheduledShiftFilter{} + var fernTestValueLocationIDs []string + obj.SetLocationIDs(fernTestValueLocationIDs) + assert.Equal(t, fernTestValueLocationIDs, obj.LocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStart", func(t *testing.T) { + obj := &ScheduledShiftFilter{} + var fernTestValueStart *TimeRange + obj.SetStart(fernTestValueStart) + assert.Equal(t, fernTestValueStart, obj.Start) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEnd", func(t *testing.T) { + obj := &ScheduledShiftFilter{} + var fernTestValueEnd *TimeRange + obj.SetEnd(fernTestValueEnd) + assert.Equal(t, fernTestValueEnd, obj.End) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetWorkday", func(t *testing.T) { + obj := &ScheduledShiftFilter{} + var fernTestValueWorkday *ScheduledShiftWorkday + obj.SetWorkday(fernTestValueWorkday) + assert.Equal(t, fernTestValueWorkday, obj.Workday) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTeamMemberIDs", func(t *testing.T) { + obj := &ScheduledShiftFilter{} + var fernTestValueTeamMemberIDs []string + obj.SetTeamMemberIDs(fernTestValueTeamMemberIDs) + assert.Equal(t, fernTestValueTeamMemberIDs, obj.TeamMemberIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAssignmentStatus", func(t *testing.T) { + obj := &ScheduledShiftFilter{} + var fernTestValueAssignmentStatus *ScheduledShiftFilterAssignmentStatus + obj.SetAssignmentStatus(fernTestValueAssignmentStatus) + assert.Equal(t, fernTestValueAssignmentStatus, obj.AssignmentStatus) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetScheduledShiftStatuses", func(t *testing.T) { + obj := &ScheduledShiftFilter{} + var fernTestValueScheduledShiftStatuses []ScheduledShiftFilterScheduledShiftStatus + obj.SetScheduledShiftStatuses(fernTestValueScheduledShiftStatuses) + assert.Equal(t, fernTestValueScheduledShiftStatuses, obj.ScheduledShiftStatuses) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersScheduledShiftFilter(t *testing.T) { + t.Run("GetLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftFilter{} + var expected []string + obj.LocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationIDs(), "getter should return the property value") + }) + + t.Run("GetLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftFilter{} + obj.LocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationIDs() // Should return zero value + }) + + t.Run("GetStart", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftFilter{} + var expected *TimeRange + obj.Start = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStart(), "getter should return the property value") + }) + + t.Run("GetStart_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftFilter{} + obj.Start = nil + + // Act & Assert + assert.Nil(t, obj.GetStart(), "getter should return nil when property is nil") + }) + + t.Run("GetStart_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStart() // Should return zero value + }) + + t.Run("GetEnd", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftFilter{} + var expected *TimeRange + obj.End = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEnd(), "getter should return the property value") + }) + + t.Run("GetEnd_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftFilter{} + obj.End = nil + + // Act & Assert + assert.Nil(t, obj.GetEnd(), "getter should return nil when property is nil") + }) + + t.Run("GetEnd_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEnd() // Should return zero value + }) + + t.Run("GetWorkday", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftFilter{} + var expected *ScheduledShiftWorkday + obj.Workday = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetWorkday(), "getter should return the property value") + }) + + t.Run("GetWorkday_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftFilter{} + obj.Workday = nil + + // Act & Assert + assert.Nil(t, obj.GetWorkday(), "getter should return nil when property is nil") + }) + + t.Run("GetWorkday_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetWorkday() // Should return zero value + }) + + t.Run("GetTeamMemberIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftFilter{} + var expected []string + obj.TeamMemberIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMemberIDs(), "getter should return the property value") + }) + + t.Run("GetTeamMemberIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftFilter{} + obj.TeamMemberIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMemberIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMemberIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMemberIDs() // Should return zero value + }) + + t.Run("GetAssignmentStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftFilter{} + var expected *ScheduledShiftFilterAssignmentStatus + obj.AssignmentStatus = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAssignmentStatus(), "getter should return the property value") + }) + + t.Run("GetAssignmentStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftFilter{} + obj.AssignmentStatus = nil + + // Act & Assert + assert.Nil(t, obj.GetAssignmentStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetAssignmentStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAssignmentStatus() // Should return zero value + }) + + t.Run("GetScheduledShiftStatuses", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftFilter{} + var expected []ScheduledShiftFilterScheduledShiftStatus + obj.ScheduledShiftStatuses = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetScheduledShiftStatuses(), "getter should return the property value") + }) + + t.Run("GetScheduledShiftStatuses_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftFilter{} + obj.ScheduledShiftStatuses = nil + + // Act & Assert + assert.Nil(t, obj.GetScheduledShiftStatuses(), "getter should return nil when property is nil") + }) + + t.Run("GetScheduledShiftStatuses_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetScheduledShiftStatuses() // Should return zero value + }) + +} + +func TestSettersMarkExplicitScheduledShiftFilter(t *testing.T) { + t.Run("SetLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftFilter{} + var fernTestValueLocationIDs []string + + // Act + obj.SetLocationIDs(fernTestValueLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStart_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftFilter{} + var fernTestValueStart *TimeRange + + // Act + obj.SetStart(fernTestValueStart) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEnd_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftFilter{} + var fernTestValueEnd *TimeRange + + // Act + obj.SetEnd(fernTestValueEnd) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetWorkday_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftFilter{} + var fernTestValueWorkday *ScheduledShiftWorkday + + // Act + obj.SetWorkday(fernTestValueWorkday) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTeamMemberIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftFilter{} + var fernTestValueTeamMemberIDs []string + + // Act + obj.SetTeamMemberIDs(fernTestValueTeamMemberIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAssignmentStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftFilter{} + var fernTestValueAssignmentStatus *ScheduledShiftFilterAssignmentStatus + + // Act + obj.SetAssignmentStatus(fernTestValueAssignmentStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetScheduledShiftStatuses_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftFilter{} + var fernTestValueScheduledShiftStatuses []ScheduledShiftFilterScheduledShiftStatus + + // Act + obj.SetScheduledShiftStatuses(fernTestValueScheduledShiftStatuses) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersScheduledShiftQuery(t *testing.T) { + t.Run("SetFilter", func(t *testing.T) { + obj := &ScheduledShiftQuery{} + var fernTestValueFilter *ScheduledShiftFilter + obj.SetFilter(fernTestValueFilter) + assert.Equal(t, fernTestValueFilter, obj.Filter) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSort", func(t *testing.T) { + obj := &ScheduledShiftQuery{} + var fernTestValueSort *ScheduledShiftSort + obj.SetSort(fernTestValueSort) + assert.Equal(t, fernTestValueSort, obj.Sort) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersScheduledShiftQuery(t *testing.T) { + t.Run("GetFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftQuery{} + var expected *ScheduledShiftFilter + obj.Filter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFilter(), "getter should return the property value") + }) + + t.Run("GetFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftQuery{} + obj.Filter = nil + + // Act & Assert + assert.Nil(t, obj.GetFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFilter() // Should return zero value + }) + + t.Run("GetSort", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftQuery{} + var expected *ScheduledShiftSort + obj.Sort = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSort(), "getter should return the property value") + }) + + t.Run("GetSort_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftQuery{} + obj.Sort = nil + + // Act & Assert + assert.Nil(t, obj.GetSort(), "getter should return nil when property is nil") + }) + + t.Run("GetSort_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSort() // Should return zero value + }) + +} + +func TestSettersMarkExplicitScheduledShiftQuery(t *testing.T) { + t.Run("SetFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftQuery{} + var fernTestValueFilter *ScheduledShiftFilter + + // Act + obj.SetFilter(fernTestValueFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSort_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftQuery{} + var fernTestValueSort *ScheduledShiftSort + + // Act + obj.SetSort(fernTestValueSort) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersScheduledShiftSort(t *testing.T) { + t.Run("SetField", func(t *testing.T) { + obj := &ScheduledShiftSort{} + var fernTestValueField *ScheduledShiftSortField + obj.SetField(fernTestValueField) + assert.Equal(t, fernTestValueField, obj.Field) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrder", func(t *testing.T) { + obj := &ScheduledShiftSort{} + var fernTestValueOrder *SortOrder + obj.SetOrder(fernTestValueOrder) + assert.Equal(t, fernTestValueOrder, obj.Order) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersScheduledShiftSort(t *testing.T) { + t.Run("GetField", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftSort{} + var expected *ScheduledShiftSortField + obj.Field = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetField(), "getter should return the property value") + }) + + t.Run("GetField_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftSort{} + obj.Field = nil + + // Act & Assert + assert.Nil(t, obj.GetField(), "getter should return nil when property is nil") + }) + + t.Run("GetField_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftSort + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetField() // Should return zero value + }) + + t.Run("GetOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftSort{} + var expected *SortOrder + obj.Order = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrder(), "getter should return the property value") + }) + + t.Run("GetOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftSort{} + obj.Order = nil + + // Act & Assert + assert.Nil(t, obj.GetOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftSort + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrder() // Should return zero value + }) + +} + +func TestSettersMarkExplicitScheduledShiftSort(t *testing.T) { + t.Run("SetField_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftSort{} + var fernTestValueField *ScheduledShiftSortField + + // Act + obj.SetField(fernTestValueField) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftSort{} + var fernTestValueOrder *SortOrder + + // Act + obj.SetOrder(fernTestValueOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersScheduledShiftWorkday(t *testing.T) { + t.Run("SetDateRange", func(t *testing.T) { + obj := &ScheduledShiftWorkday{} + var fernTestValueDateRange *DateRange + obj.SetDateRange(fernTestValueDateRange) + assert.Equal(t, fernTestValueDateRange, obj.DateRange) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMatchScheduledShiftsBy", func(t *testing.T) { + obj := &ScheduledShiftWorkday{} + var fernTestValueMatchScheduledShiftsBy *ScheduledShiftWorkdayMatcher + obj.SetMatchScheduledShiftsBy(fernTestValueMatchScheduledShiftsBy) + assert.Equal(t, fernTestValueMatchScheduledShiftsBy, obj.MatchScheduledShiftsBy) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDefaultTimezone", func(t *testing.T) { + obj := &ScheduledShiftWorkday{} + var fernTestValueDefaultTimezone *string + obj.SetDefaultTimezone(fernTestValueDefaultTimezone) + assert.Equal(t, fernTestValueDefaultTimezone, obj.DefaultTimezone) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersScheduledShiftWorkday(t *testing.T) { + t.Run("GetDateRange", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftWorkday{} + var expected *DateRange + obj.DateRange = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDateRange(), "getter should return the property value") + }) + + t.Run("GetDateRange_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftWorkday{} + obj.DateRange = nil + + // Act & Assert + assert.Nil(t, obj.GetDateRange(), "getter should return nil when property is nil") + }) + + t.Run("GetDateRange_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftWorkday + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDateRange() // Should return zero value + }) + + t.Run("GetMatchScheduledShiftsBy", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftWorkday{} + var expected *ScheduledShiftWorkdayMatcher + obj.MatchScheduledShiftsBy = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMatchScheduledShiftsBy(), "getter should return the property value") + }) + + t.Run("GetMatchScheduledShiftsBy_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftWorkday{} + obj.MatchScheduledShiftsBy = nil + + // Act & Assert + assert.Nil(t, obj.GetMatchScheduledShiftsBy(), "getter should return nil when property is nil") + }) + + t.Run("GetMatchScheduledShiftsBy_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftWorkday + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMatchScheduledShiftsBy() // Should return zero value + }) + + t.Run("GetDefaultTimezone", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftWorkday{} + var expected *string + obj.DefaultTimezone = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDefaultTimezone(), "getter should return the property value") + }) + + t.Run("GetDefaultTimezone_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftWorkday{} + obj.DefaultTimezone = nil + + // Act & Assert + assert.Nil(t, obj.GetDefaultTimezone(), "getter should return nil when property is nil") + }) + + t.Run("GetDefaultTimezone_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftWorkday + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDefaultTimezone() // Should return zero value + }) + +} + +func TestSettersMarkExplicitScheduledShiftWorkday(t *testing.T) { + t.Run("SetDateRange_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftWorkday{} + var fernTestValueDateRange *DateRange + + // Act + obj.SetDateRange(fernTestValueDateRange) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMatchScheduledShiftsBy_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftWorkday{} + var fernTestValueMatchScheduledShiftsBy *ScheduledShiftWorkdayMatcher + + // Act + obj.SetMatchScheduledShiftsBy(fernTestValueMatchScheduledShiftsBy) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDefaultTimezone_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftWorkday{} + var fernTestValueDefaultTimezone *string + + // Act + obj.SetDefaultTimezone(fernTestValueDefaultTimezone) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchScheduledShiftsResponse(t *testing.T) { + t.Run("SetScheduledShifts", func(t *testing.T) { + obj := &SearchScheduledShiftsResponse{} + var fernTestValueScheduledShifts []*ScheduledShift + obj.SetScheduledShifts(fernTestValueScheduledShifts) + assert.Equal(t, fernTestValueScheduledShifts, obj.ScheduledShifts) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchScheduledShiftsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &SearchScheduledShiftsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchScheduledShiftsResponse(t *testing.T) { + t.Run("GetScheduledShifts", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchScheduledShiftsResponse{} + var expected []*ScheduledShift + obj.ScheduledShifts = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetScheduledShifts(), "getter should return the property value") + }) + + t.Run("GetScheduledShifts_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchScheduledShiftsResponse{} + obj.ScheduledShifts = nil + + // Act & Assert + assert.Nil(t, obj.GetScheduledShifts(), "getter should return nil when property is nil") + }) + + t.Run("GetScheduledShifts_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchScheduledShiftsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetScheduledShifts() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchScheduledShiftsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchScheduledShiftsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchScheduledShiftsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchScheduledShiftsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchScheduledShiftsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchScheduledShiftsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchScheduledShiftsResponse(t *testing.T) { + t.Run("SetScheduledShifts_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchScheduledShiftsResponse{} + var fernTestValueScheduledShifts []*ScheduledShift + + // Act + obj.SetScheduledShifts(fernTestValueScheduledShifts) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchScheduledShiftsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchScheduledShiftsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchTimecardsResponse(t *testing.T) { + t.Run("SetTimecards", func(t *testing.T) { + obj := &SearchTimecardsResponse{} + var fernTestValueTimecards []*Timecard + obj.SetTimecards(fernTestValueTimecards) + assert.Equal(t, fernTestValueTimecards, obj.Timecards) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchTimecardsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &SearchTimecardsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchTimecardsResponse(t *testing.T) { + t.Run("GetTimecards", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTimecardsResponse{} + var expected []*Timecard + obj.Timecards = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTimecards(), "getter should return the property value") + }) + + t.Run("GetTimecards_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTimecardsResponse{} + obj.Timecards = nil + + // Act & Assert + assert.Nil(t, obj.GetTimecards(), "getter should return nil when property is nil") + }) + + t.Run("GetTimecards_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTimecardsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTimecards() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTimecardsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTimecardsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTimecardsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTimecardsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTimecardsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTimecardsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchTimecardsResponse(t *testing.T) { + t.Run("SetTimecards_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTimecardsResponse{} + var fernTestValueTimecards []*Timecard + + // Act + obj.SetTimecards(fernTestValueTimecards) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTimecardsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTimecardsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTimecard(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &Timecard{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &Timecard{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTimezone", func(t *testing.T) { + obj := &Timecard{} + var fernTestValueTimezone *string + obj.SetTimezone(fernTestValueTimezone) + assert.Equal(t, fernTestValueTimezone, obj.Timezone) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStartAt", func(t *testing.T) { + obj := &Timecard{} + var fernTestValueStartAt string + obj.SetStartAt(fernTestValueStartAt) + assert.Equal(t, fernTestValueStartAt, obj.StartAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEndAt", func(t *testing.T) { + obj := &Timecard{} + var fernTestValueEndAt *string + obj.SetEndAt(fernTestValueEndAt) + assert.Equal(t, fernTestValueEndAt, obj.EndAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetWage", func(t *testing.T) { + obj := &Timecard{} + var fernTestValueWage *TimecardWage + obj.SetWage(fernTestValueWage) + assert.Equal(t, fernTestValueWage, obj.Wage) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBreaks", func(t *testing.T) { + obj := &Timecard{} + var fernTestValueBreaks []*Break + obj.SetBreaks(fernTestValueBreaks) + assert.Equal(t, fernTestValueBreaks, obj.Breaks) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &Timecard{} + var fernTestValueStatus *TimecardStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &Timecard{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &Timecard{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &Timecard{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTeamMemberID", func(t *testing.T) { + obj := &Timecard{} + var fernTestValueTeamMemberID string + obj.SetTeamMemberID(fernTestValueTeamMemberID) + assert.Equal(t, fernTestValueTeamMemberID, obj.TeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeclaredCashTipMoney", func(t *testing.T) { + obj := &Timecard{} + var fernTestValueDeclaredCashTipMoney *Money + obj.SetDeclaredCashTipMoney(fernTestValueDeclaredCashTipMoney) + assert.Equal(t, fernTestValueDeclaredCashTipMoney, obj.DeclaredCashTipMoney) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTimecard(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Timecard + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + var expected string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Timecard + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetTimezone", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + var expected *string + obj.Timezone = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTimezone(), "getter should return the property value") + }) + + t.Run("GetTimezone_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + obj.Timezone = nil + + // Act & Assert + assert.Nil(t, obj.GetTimezone(), "getter should return nil when property is nil") + }) + + t.Run("GetTimezone_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Timecard + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTimezone() // Should return zero value + }) + + t.Run("GetStartAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + var expected string + obj.StartAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStartAt(), "getter should return the property value") + }) + + t.Run("GetStartAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Timecard + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStartAt() // Should return zero value + }) + + t.Run("GetEndAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + var expected *string + obj.EndAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEndAt(), "getter should return the property value") + }) + + t.Run("GetEndAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + obj.EndAt = nil + + // Act & Assert + assert.Nil(t, obj.GetEndAt(), "getter should return nil when property is nil") + }) + + t.Run("GetEndAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Timecard + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEndAt() // Should return zero value + }) + + t.Run("GetWage", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + var expected *TimecardWage + obj.Wage = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetWage(), "getter should return the property value") + }) + + t.Run("GetWage_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + obj.Wage = nil + + // Act & Assert + assert.Nil(t, obj.GetWage(), "getter should return nil when property is nil") + }) + + t.Run("GetWage_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Timecard + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetWage() // Should return zero value + }) + + t.Run("GetBreaks", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + var expected []*Break + obj.Breaks = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBreaks(), "getter should return the property value") + }) + + t.Run("GetBreaks_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + obj.Breaks = nil + + // Act & Assert + assert.Nil(t, obj.GetBreaks(), "getter should return nil when property is nil") + }) + + t.Run("GetBreaks_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Timecard + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBreaks() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + var expected *TimecardStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Timecard + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + var expected *int + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Timecard + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Timecard + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Timecard + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetTeamMemberID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + var expected string + obj.TeamMemberID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMemberID(), "getter should return the property value") + }) + + t.Run("GetTeamMemberID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Timecard + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMemberID() // Should return zero value + }) + + t.Run("GetDeclaredCashTipMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + var expected *Money + obj.DeclaredCashTipMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeclaredCashTipMoney(), "getter should return the property value") + }) + + t.Run("GetDeclaredCashTipMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + obj.DeclaredCashTipMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetDeclaredCashTipMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetDeclaredCashTipMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Timecard + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeclaredCashTipMoney() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTimecard(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTimezone_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + var fernTestValueTimezone *string + + // Act + obj.SetTimezone(fernTestValueTimezone) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStartAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + var fernTestValueStartAt string + + // Act + obj.SetStartAt(fernTestValueStartAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEndAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + var fernTestValueEndAt *string + + // Act + obj.SetEndAt(fernTestValueEndAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetWage_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + var fernTestValueWage *TimecardWage + + // Act + obj.SetWage(fernTestValueWage) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBreaks_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + var fernTestValueBreaks []*Break + + // Act + obj.SetBreaks(fernTestValueBreaks) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + var fernTestValueStatus *TimecardStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + var fernTestValueTeamMemberID string + + // Act + obj.SetTeamMemberID(fernTestValueTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeclaredCashTipMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + var fernTestValueDeclaredCashTipMoney *Money + + // Act + obj.SetDeclaredCashTipMoney(fernTestValueDeclaredCashTipMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTimecardFilter(t *testing.T) { + t.Run("SetLocationIDs", func(t *testing.T) { + obj := &TimecardFilter{} + var fernTestValueLocationIDs []string + obj.SetLocationIDs(fernTestValueLocationIDs) + assert.Equal(t, fernTestValueLocationIDs, obj.LocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &TimecardFilter{} + var fernTestValueStatus *TimecardFilterStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStart", func(t *testing.T) { + obj := &TimecardFilter{} + var fernTestValueStart *TimeRange + obj.SetStart(fernTestValueStart) + assert.Equal(t, fernTestValueStart, obj.Start) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEnd", func(t *testing.T) { + obj := &TimecardFilter{} + var fernTestValueEnd *TimeRange + obj.SetEnd(fernTestValueEnd) + assert.Equal(t, fernTestValueEnd, obj.End) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetWorkday", func(t *testing.T) { + obj := &TimecardFilter{} + var fernTestValueWorkday *TimecardWorkday + obj.SetWorkday(fernTestValueWorkday) + assert.Equal(t, fernTestValueWorkday, obj.Workday) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTeamMemberIDs", func(t *testing.T) { + obj := &TimecardFilter{} + var fernTestValueTeamMemberIDs []string + obj.SetTeamMemberIDs(fernTestValueTeamMemberIDs) + assert.Equal(t, fernTestValueTeamMemberIDs, obj.TeamMemberIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTimecardFilter(t *testing.T) { + t.Run("GetLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardFilter{} + var expected []string + obj.LocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationIDs(), "getter should return the property value") + }) + + t.Run("GetLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardFilter{} + obj.LocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimecardFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationIDs() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardFilter{} + var expected *TimecardFilterStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardFilter{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimecardFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetStart", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardFilter{} + var expected *TimeRange + obj.Start = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStart(), "getter should return the property value") + }) + + t.Run("GetStart_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardFilter{} + obj.Start = nil + + // Act & Assert + assert.Nil(t, obj.GetStart(), "getter should return nil when property is nil") + }) + + t.Run("GetStart_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimecardFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStart() // Should return zero value + }) + + t.Run("GetEnd", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardFilter{} + var expected *TimeRange + obj.End = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEnd(), "getter should return the property value") + }) + + t.Run("GetEnd_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardFilter{} + obj.End = nil + + // Act & Assert + assert.Nil(t, obj.GetEnd(), "getter should return nil when property is nil") + }) + + t.Run("GetEnd_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimecardFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEnd() // Should return zero value + }) + + t.Run("GetWorkday", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardFilter{} + var expected *TimecardWorkday + obj.Workday = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetWorkday(), "getter should return the property value") + }) + + t.Run("GetWorkday_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardFilter{} + obj.Workday = nil + + // Act & Assert + assert.Nil(t, obj.GetWorkday(), "getter should return nil when property is nil") + }) + + t.Run("GetWorkday_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimecardFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetWorkday() // Should return zero value + }) + + t.Run("GetTeamMemberIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardFilter{} + var expected []string + obj.TeamMemberIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMemberIDs(), "getter should return the property value") + }) + + t.Run("GetTeamMemberIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardFilter{} + obj.TeamMemberIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMemberIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMemberIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimecardFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMemberIDs() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTimecardFilter(t *testing.T) { + t.Run("SetLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardFilter{} + var fernTestValueLocationIDs []string + + // Act + obj.SetLocationIDs(fernTestValueLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardFilter{} + var fernTestValueStatus *TimecardFilterStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStart_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardFilter{} + var fernTestValueStart *TimeRange + + // Act + obj.SetStart(fernTestValueStart) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEnd_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardFilter{} + var fernTestValueEnd *TimeRange + + // Act + obj.SetEnd(fernTestValueEnd) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetWorkday_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardFilter{} + var fernTestValueWorkday *TimecardWorkday + + // Act + obj.SetWorkday(fernTestValueWorkday) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTeamMemberIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardFilter{} + var fernTestValueTeamMemberIDs []string + + // Act + obj.SetTeamMemberIDs(fernTestValueTeamMemberIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTimecardQuery(t *testing.T) { + t.Run("SetFilter", func(t *testing.T) { + obj := &TimecardQuery{} + var fernTestValueFilter *TimecardFilter + obj.SetFilter(fernTestValueFilter) + assert.Equal(t, fernTestValueFilter, obj.Filter) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSort", func(t *testing.T) { + obj := &TimecardQuery{} + var fernTestValueSort *TimecardSort + obj.SetSort(fernTestValueSort) + assert.Equal(t, fernTestValueSort, obj.Sort) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTimecardQuery(t *testing.T) { + t.Run("GetFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardQuery{} + var expected *TimecardFilter + obj.Filter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFilter(), "getter should return the property value") + }) + + t.Run("GetFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardQuery{} + obj.Filter = nil + + // Act & Assert + assert.Nil(t, obj.GetFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimecardQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFilter() // Should return zero value + }) + + t.Run("GetSort", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardQuery{} + var expected *TimecardSort + obj.Sort = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSort(), "getter should return the property value") + }) + + t.Run("GetSort_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardQuery{} + obj.Sort = nil + + // Act & Assert + assert.Nil(t, obj.GetSort(), "getter should return nil when property is nil") + }) + + t.Run("GetSort_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimecardQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSort() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTimecardQuery(t *testing.T) { + t.Run("SetFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardQuery{} + var fernTestValueFilter *TimecardFilter + + // Act + obj.SetFilter(fernTestValueFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSort_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardQuery{} + var fernTestValueSort *TimecardSort + + // Act + obj.SetSort(fernTestValueSort) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTimecardSort(t *testing.T) { + t.Run("SetField", func(t *testing.T) { + obj := &TimecardSort{} + var fernTestValueField *TimecardSortField + obj.SetField(fernTestValueField) + assert.Equal(t, fernTestValueField, obj.Field) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrder", func(t *testing.T) { + obj := &TimecardSort{} + var fernTestValueOrder *SortOrder + obj.SetOrder(fernTestValueOrder) + assert.Equal(t, fernTestValueOrder, obj.Order) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTimecardSort(t *testing.T) { + t.Run("GetField", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardSort{} + var expected *TimecardSortField + obj.Field = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetField(), "getter should return the property value") + }) + + t.Run("GetField_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardSort{} + obj.Field = nil + + // Act & Assert + assert.Nil(t, obj.GetField(), "getter should return nil when property is nil") + }) + + t.Run("GetField_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimecardSort + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetField() // Should return zero value + }) + + t.Run("GetOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardSort{} + var expected *SortOrder + obj.Order = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrder(), "getter should return the property value") + }) + + t.Run("GetOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardSort{} + obj.Order = nil + + // Act & Assert + assert.Nil(t, obj.GetOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimecardSort + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrder() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTimecardSort(t *testing.T) { + t.Run("SetField_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardSort{} + var fernTestValueField *TimecardSortField + + // Act + obj.SetField(fernTestValueField) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardSort{} + var fernTestValueOrder *SortOrder + + // Act + obj.SetOrder(fernTestValueOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTimecardWage(t *testing.T) { + t.Run("SetTitle", func(t *testing.T) { + obj := &TimecardWage{} + var fernTestValueTitle *string + obj.SetTitle(fernTestValueTitle) + assert.Equal(t, fernTestValueTitle, obj.Title) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetHourlyRate", func(t *testing.T) { + obj := &TimecardWage{} + var fernTestValueHourlyRate *Money + obj.SetHourlyRate(fernTestValueHourlyRate) + assert.Equal(t, fernTestValueHourlyRate, obj.HourlyRate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetJobID", func(t *testing.T) { + obj := &TimecardWage{} + var fernTestValueJobID *string + obj.SetJobID(fernTestValueJobID) + assert.Equal(t, fernTestValueJobID, obj.JobID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTipEligible", func(t *testing.T) { + obj := &TimecardWage{} + var fernTestValueTipEligible *bool + obj.SetTipEligible(fernTestValueTipEligible) + assert.Equal(t, fernTestValueTipEligible, obj.TipEligible) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTimecardWage(t *testing.T) { + t.Run("GetTitle", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardWage{} + var expected *string + obj.Title = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTitle(), "getter should return the property value") + }) + + t.Run("GetTitle_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardWage{} + obj.Title = nil + + // Act & Assert + assert.Nil(t, obj.GetTitle(), "getter should return nil when property is nil") + }) + + t.Run("GetTitle_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimecardWage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTitle() // Should return zero value + }) + + t.Run("GetHourlyRate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardWage{} + var expected *Money + obj.HourlyRate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetHourlyRate(), "getter should return the property value") + }) + + t.Run("GetHourlyRate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardWage{} + obj.HourlyRate = nil + + // Act & Assert + assert.Nil(t, obj.GetHourlyRate(), "getter should return nil when property is nil") + }) + + t.Run("GetHourlyRate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimecardWage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetHourlyRate() // Should return zero value + }) + + t.Run("GetJobID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardWage{} + var expected *string + obj.JobID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetJobID(), "getter should return the property value") + }) + + t.Run("GetJobID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardWage{} + obj.JobID = nil + + // Act & Assert + assert.Nil(t, obj.GetJobID(), "getter should return nil when property is nil") + }) + + t.Run("GetJobID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimecardWage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetJobID() // Should return zero value + }) + + t.Run("GetTipEligible", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardWage{} + var expected *bool + obj.TipEligible = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTipEligible(), "getter should return the property value") + }) + + t.Run("GetTipEligible_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardWage{} + obj.TipEligible = nil + + // Act & Assert + assert.Nil(t, obj.GetTipEligible(), "getter should return nil when property is nil") + }) + + t.Run("GetTipEligible_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimecardWage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTipEligible() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTimecardWage(t *testing.T) { + t.Run("SetTitle_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardWage{} + var fernTestValueTitle *string + + // Act + obj.SetTitle(fernTestValueTitle) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetHourlyRate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardWage{} + var fernTestValueHourlyRate *Money + + // Act + obj.SetHourlyRate(fernTestValueHourlyRate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetJobID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardWage{} + var fernTestValueJobID *string + + // Act + obj.SetJobID(fernTestValueJobID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTipEligible_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardWage{} + var fernTestValueTipEligible *bool + + // Act + obj.SetTipEligible(fernTestValueTipEligible) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTimecardWorkday(t *testing.T) { + t.Run("SetDateRange", func(t *testing.T) { + obj := &TimecardWorkday{} + var fernTestValueDateRange *DateRange + obj.SetDateRange(fernTestValueDateRange) + assert.Equal(t, fernTestValueDateRange, obj.DateRange) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMatchTimecardsBy", func(t *testing.T) { + obj := &TimecardWorkday{} + var fernTestValueMatchTimecardsBy *TimecardWorkdayMatcher + obj.SetMatchTimecardsBy(fernTestValueMatchTimecardsBy) + assert.Equal(t, fernTestValueMatchTimecardsBy, obj.MatchTimecardsBy) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDefaultTimezone", func(t *testing.T) { + obj := &TimecardWorkday{} + var fernTestValueDefaultTimezone *string + obj.SetDefaultTimezone(fernTestValueDefaultTimezone) + assert.Equal(t, fernTestValueDefaultTimezone, obj.DefaultTimezone) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTimecardWorkday(t *testing.T) { + t.Run("GetDateRange", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardWorkday{} + var expected *DateRange + obj.DateRange = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDateRange(), "getter should return the property value") + }) + + t.Run("GetDateRange_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardWorkday{} + obj.DateRange = nil + + // Act & Assert + assert.Nil(t, obj.GetDateRange(), "getter should return nil when property is nil") + }) + + t.Run("GetDateRange_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimecardWorkday + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDateRange() // Should return zero value + }) + + t.Run("GetMatchTimecardsBy", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardWorkday{} + var expected *TimecardWorkdayMatcher + obj.MatchTimecardsBy = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMatchTimecardsBy(), "getter should return the property value") + }) + + t.Run("GetMatchTimecardsBy_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardWorkday{} + obj.MatchTimecardsBy = nil + + // Act & Assert + assert.Nil(t, obj.GetMatchTimecardsBy(), "getter should return nil when property is nil") + }) + + t.Run("GetMatchTimecardsBy_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimecardWorkday + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMatchTimecardsBy() // Should return zero value + }) + + t.Run("GetDefaultTimezone", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardWorkday{} + var expected *string + obj.DefaultTimezone = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDefaultTimezone(), "getter should return the property value") + }) + + t.Run("GetDefaultTimezone_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardWorkday{} + obj.DefaultTimezone = nil + + // Act & Assert + assert.Nil(t, obj.GetDefaultTimezone(), "getter should return nil when property is nil") + }) + + t.Run("GetDefaultTimezone_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimecardWorkday + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDefaultTimezone() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTimecardWorkday(t *testing.T) { + t.Run("SetDateRange_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardWorkday{} + var fernTestValueDateRange *DateRange + + // Act + obj.SetDateRange(fernTestValueDateRange) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMatchTimecardsBy_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardWorkday{} + var fernTestValueMatchTimecardsBy *TimecardWorkdayMatcher + + // Act + obj.SetMatchTimecardsBy(fernTestValueMatchTimecardsBy) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDefaultTimezone_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardWorkday{} + var fernTestValueDefaultTimezone *string + + // Act + obj.SetDefaultTimezone(fernTestValueDefaultTimezone) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateScheduledShiftResponse(t *testing.T) { + t.Run("SetScheduledShift", func(t *testing.T) { + obj := &UpdateScheduledShiftResponse{} + var fernTestValueScheduledShift *ScheduledShift + obj.SetScheduledShift(fernTestValueScheduledShift) + assert.Equal(t, fernTestValueScheduledShift, obj.ScheduledShift) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateScheduledShiftResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateScheduledShiftResponse(t *testing.T) { + t.Run("GetScheduledShift", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateScheduledShiftResponse{} + var expected *ScheduledShift + obj.ScheduledShift = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetScheduledShift(), "getter should return the property value") + }) + + t.Run("GetScheduledShift_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateScheduledShiftResponse{} + obj.ScheduledShift = nil + + // Act & Assert + assert.Nil(t, obj.GetScheduledShift(), "getter should return nil when property is nil") + }) + + t.Run("GetScheduledShift_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateScheduledShiftResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetScheduledShift() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateScheduledShiftResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateScheduledShiftResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateScheduledShiftResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateScheduledShiftResponse(t *testing.T) { + t.Run("SetScheduledShift_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateScheduledShiftResponse{} + var fernTestValueScheduledShift *ScheduledShift + + // Act + obj.SetScheduledShift(fernTestValueScheduledShift) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateScheduledShiftResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateTimecardResponse(t *testing.T) { + t.Run("SetTimecard", func(t *testing.T) { + obj := &UpdateTimecardResponse{} + var fernTestValueTimecard *Timecard + obj.SetTimecard(fernTestValueTimecard) + assert.Equal(t, fernTestValueTimecard, obj.Timecard) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateTimecardResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateTimecardResponse(t *testing.T) { + t.Run("GetTimecard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTimecardResponse{} + var expected *Timecard + obj.Timecard = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTimecard(), "getter should return the property value") + }) + + t.Run("GetTimecard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTimecardResponse{} + obj.Timecard = nil + + // Act & Assert + assert.Nil(t, obj.GetTimecard(), "getter should return nil when property is nil") + }) + + t.Run("GetTimecard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTimecardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTimecard() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTimecardResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTimecardResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTimecardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateTimecardResponse(t *testing.T) { + t.Run("SetTimecard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTimecardResponse{} + var fernTestValueTimecard *Timecard + + // Act + obj.SetTimecard(fernTestValueTimecard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTimecardResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingBulkPublishScheduledShiftsData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkPublishScheduledShiftsData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkPublishScheduledShiftsData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkPublishScheduledShiftsData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkPublishScheduledShiftsData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBulkPublishScheduledShiftsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkPublishScheduledShiftsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkPublishScheduledShiftsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkPublishScheduledShiftsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkPublishScheduledShiftsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateScheduledShiftResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateScheduledShiftResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateScheduledShiftResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateScheduledShiftResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateScheduledShiftResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateTimecardResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTimecardResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateTimecardResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateTimecardResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateTimecardResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeleteTimecardResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteTimecardResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeleteTimecardResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeleteTimecardResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeleteTimecardResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPublishScheduledShiftResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PublishScheduledShiftResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PublishScheduledShiftResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PublishScheduledShiftResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PublishScheduledShiftResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRetrieveScheduledShiftResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveScheduledShiftResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RetrieveScheduledShiftResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RetrieveScheduledShiftResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RetrieveScheduledShiftResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRetrieveTimecardResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTimecardResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RetrieveTimecardResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RetrieveTimecardResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RetrieveTimecardResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingScheduledShift(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShift{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ScheduledShift + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ScheduledShift + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ScheduledShift + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingScheduledShiftDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ScheduledShiftDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ScheduledShiftDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ScheduledShiftDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingScheduledShiftFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ScheduledShiftFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ScheduledShiftFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ScheduledShiftFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingScheduledShiftQuery(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftQuery{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ScheduledShiftQuery + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ScheduledShiftQuery + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ScheduledShiftQuery + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingScheduledShiftSort(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftSort{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ScheduledShiftSort + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ScheduledShiftSort + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ScheduledShiftSort + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingScheduledShiftWorkday(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ScheduledShiftWorkday{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ScheduledShiftWorkday + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ScheduledShiftWorkday + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ScheduledShiftWorkday + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchScheduledShiftsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchScheduledShiftsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchScheduledShiftsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchScheduledShiftsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchScheduledShiftsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchTimecardsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTimecardsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchTimecardsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchTimecardsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchTimecardsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTimecard(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Timecard{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Timecard + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Timecard + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Timecard + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTimecardFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TimecardFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TimecardFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TimecardFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTimecardQuery(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardQuery{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TimecardQuery + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TimecardQuery + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TimecardQuery + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTimecardSort(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardSort{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TimecardSort + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TimecardSort + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TimecardSort + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTimecardWage(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardWage{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TimecardWage + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TimecardWage + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TimecardWage + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTimecardWorkday(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimecardWorkday{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TimecardWorkday + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TimecardWorkday + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TimecardWorkday + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateScheduledShiftResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateScheduledShiftResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateScheduledShiftResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateScheduledShiftResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateScheduledShiftResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateTimecardResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTimecardResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateTimecardResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateTimecardResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateTimecardResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringBulkPublishScheduledShiftsData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkPublishScheduledShiftsData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkPublishScheduledShiftsData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBulkPublishScheduledShiftsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkPublishScheduledShiftsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkPublishScheduledShiftsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateScheduledShiftResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateScheduledShiftResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateScheduledShiftResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateTimecardResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateTimecardResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTimecardResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeleteTimecardResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeleteTimecardResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteTimecardResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPublishScheduledShiftResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PublishScheduledShiftResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PublishScheduledShiftResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRetrieveScheduledShiftResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RetrieveScheduledShiftResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveScheduledShiftResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRetrieveTimecardResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RetrieveTimecardResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveTimecardResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringScheduledShift(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ScheduledShift{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShift + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringScheduledShiftDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ScheduledShiftDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringScheduledShiftFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ScheduledShiftFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringScheduledShiftQuery(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ScheduledShiftQuery{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftQuery + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringScheduledShiftSort(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ScheduledShiftSort{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftSort + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringScheduledShiftWorkday(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ScheduledShiftWorkday{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftWorkday + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchScheduledShiftsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchScheduledShiftsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchScheduledShiftsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchTimecardsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchTimecardsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTimecardsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTimecard(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Timecard{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Timecard + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTimecardFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TimecardFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimecardFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTimecardQuery(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TimecardQuery{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimecardQuery + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTimecardSort(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TimecardSort{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimecardSort + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTimecardWage(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TimecardWage{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimecardWage + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTimecardWorkday(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TimecardWorkday{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimecardWorkday + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateScheduledShiftResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateScheduledShiftResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateScheduledShiftResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateTimecardResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateTimecardResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTimecardResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestEnumScheduledShiftFilterAssignmentStatus(t *testing.T) { + t.Run("NewFromString_ASSIGNED", func(t *testing.T) { + t.Parallel() + val, err := NewScheduledShiftFilterAssignmentStatusFromString("ASSIGNED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ScheduledShiftFilterAssignmentStatus("ASSIGNED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UNASSIGNED", func(t *testing.T) { + t.Parallel() + val, err := NewScheduledShiftFilterAssignmentStatusFromString("UNASSIGNED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ScheduledShiftFilterAssignmentStatus("UNASSIGNED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewScheduledShiftFilterAssignmentStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewScheduledShiftFilterAssignmentStatusFromString("ASSIGNED") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumScheduledShiftFilterScheduledShiftStatus(t *testing.T) { + t.Run("NewFromString_DRAFT", func(t *testing.T) { + t.Parallel() + val, err := NewScheduledShiftFilterScheduledShiftStatusFromString("DRAFT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ScheduledShiftFilterScheduledShiftStatus("DRAFT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PUBLISHED", func(t *testing.T) { + t.Parallel() + val, err := NewScheduledShiftFilterScheduledShiftStatusFromString("PUBLISHED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ScheduledShiftFilterScheduledShiftStatus("PUBLISHED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewScheduledShiftFilterScheduledShiftStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewScheduledShiftFilterScheduledShiftStatusFromString("DRAFT") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumScheduledShiftNotificationAudience(t *testing.T) { + t.Run("NewFromString_ALL", func(t *testing.T) { + t.Parallel() + val, err := NewScheduledShiftNotificationAudienceFromString("ALL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ScheduledShiftNotificationAudience("ALL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AFFECTED", func(t *testing.T) { + t.Parallel() + val, err := NewScheduledShiftNotificationAudienceFromString("AFFECTED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ScheduledShiftNotificationAudience("AFFECTED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NONE", func(t *testing.T) { + t.Parallel() + val, err := NewScheduledShiftNotificationAudienceFromString("NONE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ScheduledShiftNotificationAudience("NONE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewScheduledShiftNotificationAudienceFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewScheduledShiftNotificationAudienceFromString("ALL") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumScheduledShiftSortField(t *testing.T) { + t.Run("NewFromString_START_AT", func(t *testing.T) { + t.Parallel() + val, err := NewScheduledShiftSortFieldFromString("START_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ScheduledShiftSortField("START_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_END_AT", func(t *testing.T) { + t.Parallel() + val, err := NewScheduledShiftSortFieldFromString("END_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ScheduledShiftSortField("END_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CREATED_AT", func(t *testing.T) { + t.Parallel() + val, err := NewScheduledShiftSortFieldFromString("CREATED_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ScheduledShiftSortField("CREATED_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UPDATED_AT", func(t *testing.T) { + t.Parallel() + val, err := NewScheduledShiftSortFieldFromString("UPDATED_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ScheduledShiftSortField("UPDATED_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewScheduledShiftSortFieldFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewScheduledShiftSortFieldFromString("START_AT") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumScheduledShiftWorkdayMatcher(t *testing.T) { + t.Run("NewFromString_START_AT", func(t *testing.T) { + t.Parallel() + val, err := NewScheduledShiftWorkdayMatcherFromString("START_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ScheduledShiftWorkdayMatcher("START_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_END_AT", func(t *testing.T) { + t.Parallel() + val, err := NewScheduledShiftWorkdayMatcherFromString("END_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ScheduledShiftWorkdayMatcher("END_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INTERSECTION", func(t *testing.T) { + t.Parallel() + val, err := NewScheduledShiftWorkdayMatcherFromString("INTERSECTION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ScheduledShiftWorkdayMatcher("INTERSECTION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewScheduledShiftWorkdayMatcherFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewScheduledShiftWorkdayMatcherFromString("START_AT") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumTimecardFilterStatus(t *testing.T) { + t.Run("NewFromString_OPEN", func(t *testing.T) { + t.Parallel() + val, err := NewTimecardFilterStatusFromString("OPEN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TimecardFilterStatus("OPEN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CLOSED", func(t *testing.T) { + t.Parallel() + val, err := NewTimecardFilterStatusFromString("CLOSED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TimecardFilterStatus("CLOSED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewTimecardFilterStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewTimecardFilterStatusFromString("OPEN") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumTimecardSortField(t *testing.T) { + t.Run("NewFromString_START_AT", func(t *testing.T) { + t.Parallel() + val, err := NewTimecardSortFieldFromString("START_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TimecardSortField("START_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_END_AT", func(t *testing.T) { + t.Parallel() + val, err := NewTimecardSortFieldFromString("END_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TimecardSortField("END_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CREATED_AT", func(t *testing.T) { + t.Parallel() + val, err := NewTimecardSortFieldFromString("CREATED_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TimecardSortField("CREATED_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UPDATED_AT", func(t *testing.T) { + t.Parallel() + val, err := NewTimecardSortFieldFromString("UPDATED_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TimecardSortField("UPDATED_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewTimecardSortFieldFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewTimecardSortFieldFromString("START_AT") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumTimecardStatus(t *testing.T) { + t.Run("NewFromString_OPEN", func(t *testing.T) { + t.Parallel() + val, err := NewTimecardStatusFromString("OPEN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TimecardStatus("OPEN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CLOSED", func(t *testing.T) { + t.Parallel() + val, err := NewTimecardStatusFromString("CLOSED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TimecardStatus("CLOSED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewTimecardStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewTimecardStatusFromString("OPEN") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumTimecardWorkdayMatcher(t *testing.T) { + t.Run("NewFromString_START_AT", func(t *testing.T) { + t.Parallel() + val, err := NewTimecardWorkdayMatcherFromString("START_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TimecardWorkdayMatcher("START_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_END_AT", func(t *testing.T) { + t.Parallel() + val, err := NewTimecardWorkdayMatcherFromString("END_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TimecardWorkdayMatcher("END_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INTERSECTION", func(t *testing.T) { + t.Parallel() + val, err := NewTimecardWorkdayMatcherFromString("INTERSECTION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TimecardWorkdayMatcher("INTERSECTION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewTimecardWorkdayMatcherFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewTimecardWorkdayMatcherFromString("START_AT") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestExtraPropertiesBulkPublishScheduledShiftsData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkPublishScheduledShiftsData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkPublishScheduledShiftsData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBulkPublishScheduledShiftsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkPublishScheduledShiftsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkPublishScheduledShiftsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateScheduledShiftResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateScheduledShiftResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateScheduledShiftResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateTimecardResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateTimecardResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTimecardResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeleteTimecardResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeleteTimecardResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteTimecardResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPublishScheduledShiftResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PublishScheduledShiftResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PublishScheduledShiftResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRetrieveScheduledShiftResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RetrieveScheduledShiftResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveScheduledShiftResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRetrieveTimecardResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RetrieveTimecardResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveTimecardResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesScheduledShift(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ScheduledShift{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShift + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesScheduledShiftDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ScheduledShiftDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesScheduledShiftFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ScheduledShiftFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesScheduledShiftQuery(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ScheduledShiftQuery{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftQuery + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesScheduledShiftSort(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ScheduledShiftSort{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftSort + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesScheduledShiftWorkday(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ScheduledShiftWorkday{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ScheduledShiftWorkday + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchScheduledShiftsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchScheduledShiftsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchScheduledShiftsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchTimecardsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchTimecardsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTimecardsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTimecard(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Timecard{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Timecard + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTimecardFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TimecardFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimecardFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTimecardQuery(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TimecardQuery{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimecardQuery + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTimecardSort(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TimecardSort{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimecardSort + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTimecardWage(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TimecardWage{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimecardWage + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTimecardWorkday(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TimecardWorkday{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimecardWorkday + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateScheduledShiftResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateScheduledShiftResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateScheduledShiftResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateTimecardResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateTimecardResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTimecardResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/locations.go b/locations.go index 2af913b..b961285 100644 --- a/locations.go +++ b/locations.go @@ -38,7 +38,7 @@ type CreateCheckoutRequest struct { // For more information, see [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency). IdempotencyKey string `json:"idempotency_key" url:"-"` // The order including line items to be checked out. - Order *CreateOrderRequest `json:"order,omitempty" url:"-"` + Order *CreateOrderRequest `json:"order" url:"-"` // If `true`, Square Checkout collects shipping information on your behalf and stores // that information with the transaction information in the Square Seller Dashboard. // @@ -173,6 +173,27 @@ func (c *CreateCheckoutRequest) SetNote(note *string) { c.require(createCheckoutRequestFieldNote) } +func (c *CreateCheckoutRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateCheckoutRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateCheckoutRequest(body) + return nil +} + +func (c *CreateCheckoutRequest) MarshalJSON() ([]byte, error) { + type embed CreateCheckoutRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( createLocationRequestFieldLocation = big.NewInt(1 << 0) ) @@ -201,6 +222,27 @@ func (c *CreateLocationRequest) SetLocation(location *Location) { c.require(createLocationRequestFieldLocation) } +func (c *CreateLocationRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateLocationRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateLocationRequest(body) + return nil +} + +func (c *CreateLocationRequest) MarshalJSON() ([]byte, error) { + type embed CreateLocationRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( getLocationsRequestFieldLocationID = big.NewInt(1 << 0) ) @@ -252,6 +294,9 @@ func (b *BusinessHours) GetPeriods() []*BusinessHoursPeriod { } func (b *BusinessHours) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -297,6 +342,9 @@ func (b *BusinessHours) MarshalJSON() ([]byte, error) { } func (b *BusinessHours) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -357,6 +405,9 @@ func (b *BusinessHoursPeriod) GetEndLocalTime() *string { } func (b *BusinessHoursPeriod) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -416,6 +467,9 @@ func (b *BusinessHoursPeriod) MarshalJSON() ([]byte, error) { } func (b *BusinessHoursPeriod) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -472,6 +526,9 @@ func (c *ChargeRequestAdditionalRecipient) GetAmountMoney() *Money { } func (c *ChargeRequestAdditionalRecipient) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -531,6 +588,9 @@ func (c *ChargeRequestAdditionalRecipient) MarshalJSON() ([]byte, error) { } func (c *ChargeRequestAdditionalRecipient) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -686,6 +746,9 @@ func (c *Checkout) GetAdditionalRecipients() []*AdditionalRecipient { } func (c *Checkout) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -794,6 +857,9 @@ func (c *Checkout) MarshalJSON() ([]byte, error) { } func (c *Checkout) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -839,6 +905,9 @@ func (c *Coordinates) GetLongitude() *float64 { } func (c *Coordinates) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -891,6 +960,9 @@ func (c *Coordinates) MarshalJSON() ([]byte, error) { } func (c *Coordinates) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -937,6 +1009,9 @@ func (c *CreateCheckoutResponse) GetErrors() []*Error { } func (c *CreateCheckoutResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -989,6 +1064,9 @@ func (c *CreateCheckoutResponse) MarshalJSON() ([]byte, error) { } func (c *CreateCheckoutResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -1034,6 +1112,9 @@ func (c *CreateLocationResponse) GetLocation() *Location { } func (c *CreateLocationResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -1086,6 +1167,9 @@ func (c *CreateLocationResponse) MarshalJSON() ([]byte, error) { } func (c *CreateLocationResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -1132,6 +1216,9 @@ func (g *GetLocationResponse) GetLocation() *Location { } func (g *GetLocationResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -1184,6 +1271,9 @@ func (g *GetLocationResponse) MarshalJSON() ([]byte, error) { } func (g *GetLocationResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -1232,6 +1322,9 @@ func (l *ListLocationsResponse) GetLocations() []*Location { } func (l *ListLocationsResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -1284,6 +1377,9 @@ func (l *ListLocationsResponse) MarshalJSON() ([]byte, error) { } func (l *ListLocationsResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -1601,6 +1697,9 @@ func (l *Location) GetTaxIDs() *TaxIDs { } func (l *Location) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -1828,6 +1927,9 @@ func (l *Location) MarshalJSON() ([]byte, error) { } func (l *Location) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -1982,6 +2084,9 @@ func (t *TaxIDs) GetJpQii() *string { } func (t *TaxIDs) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -2055,6 +2160,9 @@ func (t *TaxIDs) MarshalJSON() ([]byte, error) { } func (t *TaxIDs) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -2100,6 +2208,9 @@ func (u *UpdateLocationResponse) GetLocation() *Location { } func (u *UpdateLocationResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -2152,6 +2263,9 @@ func (u *UpdateLocationResponse) MarshalJSON() ([]byte, error) { } func (u *UpdateLocationResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -2198,3 +2312,24 @@ func (u *UpdateLocationRequest) SetLocation(location *Location) { u.Location = location u.require(updateLocationRequestFieldLocation) } + +func (u *UpdateLocationRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdateLocationRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdateLocationRequest(body) + return nil +} + +func (u *UpdateLocationRequest) MarshalJSON() ([]byte, error) { + type embed UpdateLocationRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/locations/custom_attribute_definitions.go b/locations/custom_attribute_definitions.go index 947efd4..2763679 100644 --- a/locations/custom_attribute_definitions.go +++ b/locations/custom_attribute_definitions.go @@ -3,7 +3,9 @@ package locations import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" big "math/big" ) @@ -18,7 +20,7 @@ type CreateLocationCustomAttributeDefinitionRequest struct { // definition hosted on the Square CDN. For more information, including supported values and constraints, see // [Supported data types](https://developer.squareup.com/docs/devtools/customattributes/overview#supported-data-types). // - `name` is required unless `visibility` is set to `VISIBILITY_HIDDEN`. - CustomAttributeDefinition *v3.CustomAttributeDefinition `json:"custom_attribute_definition,omitempty" url:"-"` + CustomAttributeDefinition *v3.CustomAttributeDefinition `json:"custom_attribute_definition" url:"-"` // A unique identifier for this request, used to ensure idempotency. For more information, // see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"` @@ -48,6 +50,27 @@ func (c *CreateLocationCustomAttributeDefinitionRequest) SetIdempotencyKey(idemp c.require(createLocationCustomAttributeDefinitionRequestFieldIdempotencyKey) } +func (c *CreateLocationCustomAttributeDefinitionRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateLocationCustomAttributeDefinitionRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateLocationCustomAttributeDefinitionRequest(body) + return nil +} + +func (c *CreateLocationCustomAttributeDefinitionRequest) MarshalJSON() ([]byte, error) { + type embed CreateLocationCustomAttributeDefinitionRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( deleteCustomAttributeDefinitionsRequestFieldKey = big.NewInt(1 << 0) ) @@ -187,7 +210,7 @@ type UpdateLocationCustomAttributeDefinitionRequest struct { // To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) // control, specify the current version of the custom attribute definition. // If this is not important for your application, `version` can be set to -1. - CustomAttributeDefinition *v3.CustomAttributeDefinition `json:"custom_attribute_definition,omitempty" url:"-"` + CustomAttributeDefinition *v3.CustomAttributeDefinition `json:"custom_attribute_definition" url:"-"` // A unique identifier for this request, used to ensure idempotency. For more information, // see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"` @@ -223,3 +246,24 @@ func (u *UpdateLocationCustomAttributeDefinitionRequest) SetIdempotencyKey(idemp u.IdempotencyKey = idempotencyKey u.require(updateLocationCustomAttributeDefinitionRequestFieldIdempotencyKey) } + +func (u *UpdateLocationCustomAttributeDefinitionRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdateLocationCustomAttributeDefinitionRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdateLocationCustomAttributeDefinitionRequest(body) + return nil +} + +func (u *UpdateLocationCustomAttributeDefinitionRequest) MarshalJSON() ([]byte, error) { + type embed UpdateLocationCustomAttributeDefinitionRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/locations/custom_attribute_definitions_test.go b/locations/custom_attribute_definitions_test.go new file mode 100644 index 0000000..0397fb3 --- /dev/null +++ b/locations/custom_attribute_definitions_test.go @@ -0,0 +1,352 @@ +// Code generated by Fern. DO NOT EDIT. + +package locations + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersCreateLocationCustomAttributeDefinitionRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateLocationCustomAttributeDefinitionRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateLocationCustomAttributeDefinitionRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLocationCustomAttributeDefinitionRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetKey", func(t *testing.T) { + obj := &DeleteCustomAttributeDefinitionsRequest{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDeleteCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomAttributeDefinitionsRequest{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetKey", func(t *testing.T) { + obj := &GetCustomAttributeDefinitionsRequest{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &GetCustomAttributeDefinitionsRequest{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributeDefinitionsRequest{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributeDefinitionsRequest{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetLimit", func(t *testing.T) { + obj := &ListCustomAttributeDefinitionsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListCustomAttributeDefinitionsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributeDefinitionsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributeDefinitionsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateLocationCustomAttributeDefinitionRequest(t *testing.T) { + t.Run("SetKey", func(t *testing.T) { + obj := &UpdateLocationCustomAttributeDefinitionRequest{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &UpdateLocationCustomAttributeDefinitionRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateLocationCustomAttributeDefinitionRequest(t *testing.T) { + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateLocationCustomAttributeDefinitionRequest{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateLocationCustomAttributeDefinitionRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/locations/custom_attributes.go b/locations/custom_attributes.go index 0cc2244..8285612 100644 --- a/locations/custom_attributes.go +++ b/locations/custom_attributes.go @@ -3,7 +3,9 @@ package locations import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" big "math/big" ) @@ -14,7 +16,7 @@ var ( type BulkDeleteLocationCustomAttributesRequest struct { // The data used to update the `CustomAttribute` objects. // The keys must be unique and are used to map to the corresponding response. - Values map[string]*v3.BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest `json:"values,omitempty" url:"-"` + Values map[string]*v3.BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest `json:"values" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -34,6 +36,27 @@ func (b *BulkDeleteLocationCustomAttributesRequest) SetValues(values map[string] b.require(bulkDeleteLocationCustomAttributesRequestFieldValues) } +func (b *BulkDeleteLocationCustomAttributesRequest) UnmarshalJSON(data []byte) error { + type unmarshaler BulkDeleteLocationCustomAttributesRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *b = BulkDeleteLocationCustomAttributesRequest(body) + return nil +} + +func (b *BulkDeleteLocationCustomAttributesRequest) MarshalJSON() ([]byte, error) { + type embed BulkDeleteLocationCustomAttributesRequest + var marshaler = struct { + embed + }{ + embed: embed(*b), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, b.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( bulkUpsertLocationCustomAttributesRequestFieldValues = big.NewInt(1 << 0) ) @@ -42,7 +65,7 @@ type BulkUpsertLocationCustomAttributesRequest struct { // A map containing 1 to 25 individual upsert requests. For each request, provide an // arbitrary ID that is unique for this `BulkUpsertLocationCustomAttributes` request and the // information needed to create or update a custom attribute. - Values map[string]*v3.BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest `json:"values,omitempty" url:"-"` + Values map[string]*v3.BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest `json:"values" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -62,6 +85,27 @@ func (b *BulkUpsertLocationCustomAttributesRequest) SetValues(values map[string] b.require(bulkUpsertLocationCustomAttributesRequestFieldValues) } +func (b *BulkUpsertLocationCustomAttributesRequest) UnmarshalJSON(data []byte) error { + type unmarshaler BulkUpsertLocationCustomAttributesRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *b = BulkUpsertLocationCustomAttributesRequest(body) + return nil +} + +func (b *BulkUpsertLocationCustomAttributesRequest) MarshalJSON() ([]byte, error) { + type embed BulkUpsertLocationCustomAttributesRequest + var marshaler = struct { + embed + }{ + embed: embed(*b), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, b.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( deleteCustomAttributesRequestFieldLocationID = big.NewInt(1 << 0) deleteCustomAttributesRequestFieldKey = big.NewInt(1 << 1) @@ -255,7 +299,7 @@ type UpsertLocationCustomAttributeRequest struct { // - `version`. To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) // control for an update operation, include the current version of the custom attribute. // If this is not important for your application, version can be set to -1. - CustomAttribute *v3.CustomAttribute `json:"custom_attribute,omitempty" url:"-"` + CustomAttribute *v3.CustomAttribute `json:"custom_attribute" url:"-"` // A unique identifier for this request, used to ensure idempotency. For more information, // see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"` @@ -298,3 +342,24 @@ func (u *UpsertLocationCustomAttributeRequest) SetIdempotencyKey(idempotencyKey u.IdempotencyKey = idempotencyKey u.require(upsertLocationCustomAttributeRequestFieldIdempotencyKey) } + +func (u *UpsertLocationCustomAttributeRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpsertLocationCustomAttributeRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpsertLocationCustomAttributeRequest(body) + return nil +} + +func (u *UpsertLocationCustomAttributeRequest) MarshalJSON() ([]byte, error) { + type embed UpsertLocationCustomAttributeRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/locations/custom_attributes_test.go b/locations/custom_attributes_test.go new file mode 100644 index 0000000..c87d771 --- /dev/null +++ b/locations/custom_attributes_test.go @@ -0,0 +1,541 @@ +// Code generated by Fern. DO NOT EDIT. + +package locations + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersDeleteCustomAttributesRequest(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &DeleteCustomAttributesRequest{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetKey", func(t *testing.T) { + obj := &DeleteCustomAttributesRequest{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDeleteCustomAttributesRequest(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomAttributesRequest{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomAttributesRequest{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetCustomAttributesRequest(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &GetCustomAttributesRequest{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetKey", func(t *testing.T) { + obj := &GetCustomAttributesRequest{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetWithDefinition", func(t *testing.T) { + obj := &GetCustomAttributesRequest{} + var fernTestValueWithDefinition *bool + obj.SetWithDefinition(fernTestValueWithDefinition) + assert.Equal(t, fernTestValueWithDefinition, obj.WithDefinition) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &GetCustomAttributesRequest{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetCustomAttributesRequest(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributesRequest{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributesRequest{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetWithDefinition_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributesRequest{} + var fernTestValueWithDefinition *bool + + // Act + obj.SetWithDefinition(fernTestValueWithDefinition) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributesRequest{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListCustomAttributesRequest(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &ListCustomAttributesRequest{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListCustomAttributesRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListCustomAttributesRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetWithDefinitions", func(t *testing.T) { + obj := &ListCustomAttributesRequest{} + var fernTestValueWithDefinitions *bool + obj.SetWithDefinitions(fernTestValueWithDefinitions) + assert.Equal(t, fernTestValueWithDefinitions, obj.WithDefinitions) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListCustomAttributesRequest(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributesRequest{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributesRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributesRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetWithDefinitions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributesRequest{} + var fernTestValueWithDefinitions *bool + + // Act + obj.SetWithDefinitions(fernTestValueWithDefinitions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpsertLocationCustomAttributeRequest(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &UpsertLocationCustomAttributeRequest{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetKey", func(t *testing.T) { + obj := &UpsertLocationCustomAttributeRequest{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &UpsertLocationCustomAttributeRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpsertLocationCustomAttributeRequest(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertLocationCustomAttributeRequest{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertLocationCustomAttributeRequest{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertLocationCustomAttributeRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/locations/customattributedefinitions/locations_custom_attribute_definitions_test/locations_custom_attribute_definitions_test.go b/locations/customattributedefinitions/locations_custom_attribute_definitions_test/locations_custom_attribute_definitions_test.go new file mode 100644 index 0000000..9c7dcbb --- /dev/null +++ b/locations/customattributedefinitions/locations_custom_attribute_definitions_test/locations_custom_attribute_definitions_test.go @@ -0,0 +1,218 @@ +// Code generated by Fern. DO NOT EDIT. + +package locations_custom_attribute_definitions_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + locations "github.com/square/square-go-sdk/v3/locations" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestLocationsCustomAttributeDefinitionsListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &locations.ListCustomAttributeDefinitionsRequest{ + VisibilityFilter: square.VisibilityFilterAll.Ptr(), + Limit: square.Int( + 1, + ), + Cursor: square.String( + "cursor", + ), + } + _, invocationErr := client.Locations.CustomAttributeDefinitions.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLocationsCustomAttributeDefinitionsListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLocationsCustomAttributeDefinitionsListWithWireMock", "GET", "/v2/locations/custom-attribute-definitions", map[string]string{"visibility_filter": "ALL", "limit": "1", "cursor": "cursor"}, 1) +} + +func TestLocationsCustomAttributeDefinitionsCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &locations.CreateLocationCustomAttributeDefinitionRequest{ + CustomAttributeDefinition: &square.CustomAttributeDefinition{ + Key: square.String( + "bestseller", + ), + Schema: map[string]any{ + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String", + }, + Name: square.String( + "Bestseller", + ), + Description: square.String( + "Bestselling item at location", + ), + Visibility: square.CustomAttributeDefinitionVisibilityVisibilityReadWriteValues.Ptr(), + }, + } + _, invocationErr := client.Locations.CustomAttributeDefinitions.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLocationsCustomAttributeDefinitionsCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLocationsCustomAttributeDefinitionsCreateWithWireMock", "POST", "/v2/locations/custom-attribute-definitions", nil, 1) +} + +func TestLocationsCustomAttributeDefinitionsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &locations.GetCustomAttributeDefinitionsRequest{ + Key: "key", + Version: square.Int( + 1, + ), + } + _, invocationErr := client.Locations.CustomAttributeDefinitions.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLocationsCustomAttributeDefinitionsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLocationsCustomAttributeDefinitionsGetWithWireMock", "GET", "/v2/locations/custom-attribute-definitions/key", map[string]string{"version": "1"}, 1) +} + +func TestLocationsCustomAttributeDefinitionsUpdateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &locations.UpdateLocationCustomAttributeDefinitionRequest{ + Key: "key", + CustomAttributeDefinition: &square.CustomAttributeDefinition{ + Description: square.String( + "Update the description as desired.", + ), + Visibility: square.CustomAttributeDefinitionVisibilityVisibilityReadOnly.Ptr(), + }, + } + _, invocationErr := client.Locations.CustomAttributeDefinitions.Update( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLocationsCustomAttributeDefinitionsUpdateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLocationsCustomAttributeDefinitionsUpdateWithWireMock", "PUT", "/v2/locations/custom-attribute-definitions/key", nil, 1) +} + +func TestLocationsCustomAttributeDefinitionsDeleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &locations.DeleteCustomAttributeDefinitionsRequest{ + Key: "key", + } + _, invocationErr := client.Locations.CustomAttributeDefinitions.Delete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLocationsCustomAttributeDefinitionsDeleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLocationsCustomAttributeDefinitionsDeleteWithWireMock", "DELETE", "/v2/locations/custom-attribute-definitions/key", nil, 1) +} diff --git a/locations/customattributes/locations_custom_attributes_test/locations_custom_attributes_test.go b/locations/customattributes/locations_custom_attributes_test/locations_custom_attributes_test.go new file mode 100644 index 0000000..8bf9235 --- /dev/null +++ b/locations/customattributes/locations_custom_attributes_test/locations_custom_attributes_test.go @@ -0,0 +1,280 @@ +// Code generated by Fern. DO NOT EDIT. + +package locations_custom_attributes_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + locations "github.com/square/square-go-sdk/v3/locations" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestLocationsCustomAttributesBatchDeleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &locations.BulkDeleteLocationCustomAttributesRequest{ + Values: map[string]*square.BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest{ + "id1": &square.BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest{ + Key: square.String( + "bestseller", + ), + }, + "id2": &square.BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest{ + Key: square.String( + "bestseller", + ), + }, + "id3": &square.BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest{ + Key: square.String( + "phone-number", + ), + }, + }, + } + _, invocationErr := client.Locations.CustomAttributes.BatchDelete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLocationsCustomAttributesBatchDeleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLocationsCustomAttributesBatchDeleteWithWireMock", "POST", "/v2/locations/custom-attributes/bulk-delete", nil, 1) +} + +func TestLocationsCustomAttributesBatchUpsertWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &locations.BulkUpsertLocationCustomAttributesRequest{ + Values: map[string]*square.BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest{ + "id1": &square.BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest{ + LocationID: "L0TBCBTB7P8RQ", + CustomAttribute: &square.CustomAttribute{ + Key: square.String( + "bestseller", + ), + Value: "hot cocoa", + }, + }, + "id2": &square.BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest{ + LocationID: "L9XMD04V3STJX", + CustomAttribute: &square.CustomAttribute{ + Key: square.String( + "bestseller", + ), + Value: "berry smoothie", + }, + }, + "id3": &square.BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest{ + LocationID: "L0TBCBTB7P8RQ", + CustomAttribute: &square.CustomAttribute{ + Key: square.String( + "phone-number", + ), + Value: "+12223334444", + }, + }, + }, + } + _, invocationErr := client.Locations.CustomAttributes.BatchUpsert( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLocationsCustomAttributesBatchUpsertWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLocationsCustomAttributesBatchUpsertWithWireMock", "POST", "/v2/locations/custom-attributes/bulk-upsert", nil, 1) +} + +func TestLocationsCustomAttributesListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &locations.ListCustomAttributesRequest{ + LocationID: "location_id", + VisibilityFilter: square.VisibilityFilterAll.Ptr(), + Limit: square.Int( + 1, + ), + Cursor: square.String( + "cursor", + ), + WithDefinitions: square.Bool( + true, + ), + } + _, invocationErr := client.Locations.CustomAttributes.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLocationsCustomAttributesListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLocationsCustomAttributesListWithWireMock", "GET", "/v2/locations/location_id/custom-attributes", map[string]string{"visibility_filter": "ALL", "limit": "1", "cursor": "cursor", "with_definitions": "true"}, 1) +} + +func TestLocationsCustomAttributesGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &locations.GetCustomAttributesRequest{ + LocationID: "location_id", + Key: "key", + WithDefinition: square.Bool( + true, + ), + Version: square.Int( + 1, + ), + } + _, invocationErr := client.Locations.CustomAttributes.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLocationsCustomAttributesGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLocationsCustomAttributesGetWithWireMock", "GET", "/v2/locations/location_id/custom-attributes/key", map[string]string{"with_definition": "true", "version": "1"}, 1) +} + +func TestLocationsCustomAttributesUpsertWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &locations.UpsertLocationCustomAttributeRequest{ + LocationID: "location_id", + Key: "key", + CustomAttribute: &square.CustomAttribute{ + Value: "hot cocoa", + }, + } + _, invocationErr := client.Locations.CustomAttributes.Upsert( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLocationsCustomAttributesUpsertWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLocationsCustomAttributesUpsertWithWireMock", "POST", "/v2/locations/location_id/custom-attributes/key", nil, 1) +} + +func TestLocationsCustomAttributesDeleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &locations.DeleteCustomAttributesRequest{ + LocationID: "location_id", + Key: "key", + } + _, invocationErr := client.Locations.CustomAttributes.Delete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLocationsCustomAttributesDeleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLocationsCustomAttributesDeleteWithWireMock", "DELETE", "/v2/locations/location_id/custom-attributes/key", nil, 1) +} diff --git a/locations/locations_test/locations_test.go b/locations/locations_test/locations_test.go new file mode 100644 index 0000000..65b6068 --- /dev/null +++ b/locations/locations_test/locations_test.go @@ -0,0 +1,379 @@ +// Code generated by Fern. DO NOT EDIT. + +package locations_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestLocationsListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + _, invocationErr := client.Locations.List( + context.TODO(), + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLocationsListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLocationsListWithWireMock", "GET", "/v2/locations", nil, 1) +} + +func TestLocationsCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CreateLocationRequest{ + Location: &square.Location{ + Name: square.String( + "Midtown", + ), + Address: &square.Address{ + AddressLine1: square.String( + "1234 Peachtree St. NE", + ), + Locality: square.String( + "Atlanta", + ), + AdministrativeDistrictLevel1: square.String( + "GA", + ), + PostalCode: square.String( + "30309", + ), + }, + Description: square.String( + "Midtown Atlanta store", + ), + }, + } + _, invocationErr := client.Locations.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLocationsCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLocationsCreateWithWireMock", "POST", "/v2/locations", nil, 1) +} + +func TestLocationsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.GetLocationsRequest{ + LocationID: "location_id", + } + _, invocationErr := client.Locations.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLocationsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLocationsGetWithWireMock", "GET", "/v2/locations/location_id", nil, 1) +} + +func TestLocationsUpdateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.UpdateLocationRequest{ + LocationID: "location_id", + Location: &square.Location{ + BusinessHours: &square.BusinessHours{ + Periods: []*square.BusinessHoursPeriod{ + &square.BusinessHoursPeriod{ + DayOfWeek: square.DayOfWeekFri.Ptr(), + StartLocalTime: square.String( + "07:00", + ), + EndLocalTime: square.String( + "18:00", + ), + }, + &square.BusinessHoursPeriod{ + DayOfWeek: square.DayOfWeekSat.Ptr(), + StartLocalTime: square.String( + "07:00", + ), + EndLocalTime: square.String( + "18:00", + ), + }, + &square.BusinessHoursPeriod{ + DayOfWeek: square.DayOfWeekSun.Ptr(), + StartLocalTime: square.String( + "09:00", + ), + EndLocalTime: square.String( + "15:00", + ), + }, + }, + }, + Description: square.String( + "Midtown Atlanta store - Open weekends", + ), + }, + } + _, invocationErr := client.Locations.Update( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLocationsUpdateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLocationsUpdateWithWireMock", "PUT", "/v2/locations/location_id", nil, 1) +} + +func TestLocationsCheckoutsWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CreateCheckoutRequest{ + LocationID: "location_id", + IdempotencyKey: "86ae1696-b1e3-4328-af6d-f1e04d947ad6", + Order: &square.CreateOrderRequest{ + Order: &square.Order{ + LocationID: "location_id", + ReferenceID: square.String( + "reference_id", + ), + CustomerID: square.String( + "customer_id", + ), + LineItems: []*square.OrderLineItem{ + &square.OrderLineItem{ + Name: square.String( + "Printed T Shirt", + ), + Quantity: "2", + AppliedTaxes: []*square.OrderLineItemAppliedTax{ + &square.OrderLineItemAppliedTax{ + TaxUID: "38ze1696-z1e3-5628-af6d-f1e04d947fg3", + }, + }, + AppliedDiscounts: []*square.OrderLineItemAppliedDiscount{ + &square.OrderLineItemAppliedDiscount{ + DiscountUID: "56ae1696-z1e3-9328-af6d-f1e04d947gd4", + }, + }, + BasePriceMoney: &square.Money{ + Amount: square.Int64( + int64(1500), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + }, + &square.OrderLineItem{ + Name: square.String( + "Slim Jeans", + ), + Quantity: "1", + BasePriceMoney: &square.Money{ + Amount: square.Int64( + int64(2500), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + }, + &square.OrderLineItem{ + Name: square.String( + "Woven Sweater", + ), + Quantity: "3", + BasePriceMoney: &square.Money{ + Amount: square.Int64( + int64(3500), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + }, + }, + Taxes: []*square.OrderLineItemTax{ + &square.OrderLineItemTax{ + UID: square.String( + "38ze1696-z1e3-5628-af6d-f1e04d947fg3", + ), + Type: square.OrderLineItemTaxTypeInclusive.Ptr(), + Percentage: square.String( + "7.75", + ), + Scope: square.OrderLineItemTaxScopeLineItem.Ptr(), + }, + }, + Discounts: []*square.OrderLineItemDiscount{ + &square.OrderLineItemDiscount{ + UID: square.String( + "56ae1696-z1e3-9328-af6d-f1e04d947gd4", + ), + Type: square.OrderLineItemDiscountTypeFixedAmount.Ptr(), + AmountMoney: &square.Money{ + Amount: square.Int64( + int64(100), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + Scope: square.OrderLineItemDiscountScopeLineItem.Ptr(), + }, + }, + }, + IdempotencyKey: square.String( + "12ae1696-z1e3-4328-af6d-f1e04d947gd4", + ), + }, + AskForShippingAddress: square.Bool( + true, + ), + MerchantSupportEmail: square.String( + "merchant+support@website.com", + ), + PrePopulateBuyerEmail: square.String( + "example@email.com", + ), + PrePopulateShippingAddress: &square.Address{ + AddressLine1: square.String( + "1455 Market St.", + ), + AddressLine2: square.String( + "Suite 600", + ), + Locality: square.String( + "San Francisco", + ), + AdministrativeDistrictLevel1: square.String( + "CA", + ), + PostalCode: square.String( + "94103", + ), + Country: square.CountryUs.Ptr(), + FirstName: square.String( + "Jane", + ), + LastName: square.String( + "Doe", + ), + }, + RedirectURL: square.String( + "https://merchant.website.com/order-confirm", + ), + AdditionalRecipients: []*square.ChargeRequestAdditionalRecipient{ + &square.ChargeRequestAdditionalRecipient{ + LocationID: "057P5VYJ4A5X1", + Description: "Application fees", + AmountMoney: &square.Money{ + Amount: square.Int64( + int64(60), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + }, + }, + } + _, invocationErr := client.Locations.Checkouts( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLocationsCheckoutsWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLocationsCheckoutsWithWireMock", "POST", "/v2/locations/location_id/checkouts", nil, 1) +} diff --git a/locations/transactions/locations_transactions_test/locations_transactions_test.go b/locations/transactions/locations_transactions_test/locations_transactions_test.go new file mode 100644 index 0000000..b783d6e --- /dev/null +++ b/locations/transactions/locations_transactions_test/locations_transactions_test.go @@ -0,0 +1,177 @@ +// Code generated by Fern. DO NOT EDIT. + +package locations_transactions_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + locations "github.com/square/square-go-sdk/v3/locations" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestLocationsTransactionsListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &locations.ListTransactionsRequest{ + LocationID: "location_id", + BeginTime: square.String( + "begin_time", + ), + EndTime: square.String( + "end_time", + ), + SortOrder: square.SortOrderDesc.Ptr(), + Cursor: square.String( + "cursor", + ), + } + _, invocationErr := client.Locations.Transactions.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLocationsTransactionsListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLocationsTransactionsListWithWireMock", "GET", "/v2/locations/location_id/transactions", map[string]string{"begin_time": "begin_time", "end_time": "end_time", "sort_order": "DESC", "cursor": "cursor"}, 1) +} + +func TestLocationsTransactionsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &locations.GetTransactionsRequest{ + LocationID: "location_id", + TransactionID: "transaction_id", + } + _, invocationErr := client.Locations.Transactions.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLocationsTransactionsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLocationsTransactionsGetWithWireMock", "GET", "/v2/locations/location_id/transactions/transaction_id", nil, 1) +} + +func TestLocationsTransactionsCaptureWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &locations.CaptureTransactionsRequest{ + LocationID: "location_id", + TransactionID: "transaction_id", + } + _, invocationErr := client.Locations.Transactions.Capture( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLocationsTransactionsCaptureWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLocationsTransactionsCaptureWithWireMock", "POST", "/v2/locations/location_id/transactions/transaction_id/capture", nil, 1) +} + +func TestLocationsTransactionsVoidWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &locations.VoidTransactionsRequest{ + LocationID: "location_id", + TransactionID: "transaction_id", + } + _, invocationErr := client.Locations.Transactions.Void( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLocationsTransactionsVoidWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLocationsTransactionsVoidWithWireMock", "POST", "/v2/locations/location_id/transactions/transaction_id/void", nil, 1) +} diff --git a/locations/transactions_test.go b/locations/transactions_test.go new file mode 100644 index 0000000..43d7595 --- /dev/null +++ b/locations/transactions_test.go @@ -0,0 +1,424 @@ +// Code generated by Fern. DO NOT EDIT. + +package locations + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersCaptureTransactionsRequest(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &CaptureTransactionsRequest{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTransactionID", func(t *testing.T) { + obj := &CaptureTransactionsRequest{} + var fernTestValueTransactionID string + obj.SetTransactionID(fernTestValueTransactionID) + assert.Equal(t, fernTestValueTransactionID, obj.TransactionID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCaptureTransactionsRequest(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CaptureTransactionsRequest{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTransactionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CaptureTransactionsRequest{} + var fernTestValueTransactionID string + + // Act + obj.SetTransactionID(fernTestValueTransactionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetTransactionsRequest(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &GetTransactionsRequest{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTransactionID", func(t *testing.T) { + obj := &GetTransactionsRequest{} + var fernTestValueTransactionID string + obj.SetTransactionID(fernTestValueTransactionID) + assert.Equal(t, fernTestValueTransactionID, obj.TransactionID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetTransactionsRequest(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTransactionsRequest{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTransactionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTransactionsRequest{} + var fernTestValueTransactionID string + + // Act + obj.SetTransactionID(fernTestValueTransactionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListTransactionsRequest(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &ListTransactionsRequest{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBeginTime", func(t *testing.T) { + obj := &ListTransactionsRequest{} + var fernTestValueBeginTime *string + obj.SetBeginTime(fernTestValueBeginTime) + assert.Equal(t, fernTestValueBeginTime, obj.BeginTime) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEndTime", func(t *testing.T) { + obj := &ListTransactionsRequest{} + var fernTestValueEndTime *string + obj.SetEndTime(fernTestValueEndTime) + assert.Equal(t, fernTestValueEndTime, obj.EndTime) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListTransactionsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListTransactionsRequest(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTransactionsRequest{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBeginTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTransactionsRequest{} + var fernTestValueBeginTime *string + + // Act + obj.SetBeginTime(fernTestValueBeginTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEndTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTransactionsRequest{} + var fernTestValueEndTime *string + + // Act + obj.SetEndTime(fernTestValueEndTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTransactionsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersVoidTransactionsRequest(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &VoidTransactionsRequest{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTransactionID", func(t *testing.T) { + obj := &VoidTransactionsRequest{} + var fernTestValueTransactionID string + obj.SetTransactionID(fernTestValueTransactionID) + assert.Equal(t, fernTestValueTransactionID, obj.TransactionID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitVoidTransactionsRequest(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VoidTransactionsRequest{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTransactionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VoidTransactionsRequest{} + var fernTestValueTransactionID string + + // Act + obj.SetTransactionID(fernTestValueTransactionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/locations_test.go b/locations_test.go new file mode 100644 index 0000000..bd64111 --- /dev/null +++ b/locations_test.go @@ -0,0 +1,6018 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersCreateCheckoutRequest(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &CreateCheckoutRequest{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateCheckoutRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrder", func(t *testing.T) { + obj := &CreateCheckoutRequest{} + var fernTestValueOrder *CreateOrderRequest + obj.SetOrder(fernTestValueOrder) + assert.Equal(t, fernTestValueOrder, obj.Order) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAskForShippingAddress", func(t *testing.T) { + obj := &CreateCheckoutRequest{} + var fernTestValueAskForShippingAddress *bool + obj.SetAskForShippingAddress(fernTestValueAskForShippingAddress) + assert.Equal(t, fernTestValueAskForShippingAddress, obj.AskForShippingAddress) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMerchantSupportEmail", func(t *testing.T) { + obj := &CreateCheckoutRequest{} + var fernTestValueMerchantSupportEmail *string + obj.SetMerchantSupportEmail(fernTestValueMerchantSupportEmail) + assert.Equal(t, fernTestValueMerchantSupportEmail, obj.MerchantSupportEmail) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPrePopulateBuyerEmail", func(t *testing.T) { + obj := &CreateCheckoutRequest{} + var fernTestValuePrePopulateBuyerEmail *string + obj.SetPrePopulateBuyerEmail(fernTestValuePrePopulateBuyerEmail) + assert.Equal(t, fernTestValuePrePopulateBuyerEmail, obj.PrePopulateBuyerEmail) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPrePopulateShippingAddress", func(t *testing.T) { + obj := &CreateCheckoutRequest{} + var fernTestValuePrePopulateShippingAddress *Address + obj.SetPrePopulateShippingAddress(fernTestValuePrePopulateShippingAddress) + assert.Equal(t, fernTestValuePrePopulateShippingAddress, obj.PrePopulateShippingAddress) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRedirectURL", func(t *testing.T) { + obj := &CreateCheckoutRequest{} + var fernTestValueRedirectURL *string + obj.SetRedirectURL(fernTestValueRedirectURL) + assert.Equal(t, fernTestValueRedirectURL, obj.RedirectURL) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAdditionalRecipients", func(t *testing.T) { + obj := &CreateCheckoutRequest{} + var fernTestValueAdditionalRecipients []*ChargeRequestAdditionalRecipient + obj.SetAdditionalRecipients(fernTestValueAdditionalRecipients) + assert.Equal(t, fernTestValueAdditionalRecipients, obj.AdditionalRecipients) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNote", func(t *testing.T) { + obj := &CreateCheckoutRequest{} + var fernTestValueNote *string + obj.SetNote(fernTestValueNote) + assert.Equal(t, fernTestValueNote, obj.Note) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateCheckoutRequest(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCheckoutRequest{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCheckoutRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCheckoutRequest{} + var fernTestValueOrder *CreateOrderRequest + + // Act + obj.SetOrder(fernTestValueOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAskForShippingAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCheckoutRequest{} + var fernTestValueAskForShippingAddress *bool + + // Act + obj.SetAskForShippingAddress(fernTestValueAskForShippingAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMerchantSupportEmail_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCheckoutRequest{} + var fernTestValueMerchantSupportEmail *string + + // Act + obj.SetMerchantSupportEmail(fernTestValueMerchantSupportEmail) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPrePopulateBuyerEmail_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCheckoutRequest{} + var fernTestValuePrePopulateBuyerEmail *string + + // Act + obj.SetPrePopulateBuyerEmail(fernTestValuePrePopulateBuyerEmail) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPrePopulateShippingAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCheckoutRequest{} + var fernTestValuePrePopulateShippingAddress *Address + + // Act + obj.SetPrePopulateShippingAddress(fernTestValuePrePopulateShippingAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRedirectURL_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCheckoutRequest{} + var fernTestValueRedirectURL *string + + // Act + obj.SetRedirectURL(fernTestValueRedirectURL) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAdditionalRecipients_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCheckoutRequest{} + var fernTestValueAdditionalRecipients []*ChargeRequestAdditionalRecipient + + // Act + obj.SetAdditionalRecipients(fernTestValueAdditionalRecipients) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNote_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCheckoutRequest{} + var fernTestValueNote *string + + // Act + obj.SetNote(fernTestValueNote) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateLocationRequest(t *testing.T) { + t.Run("SetLocation", func(t *testing.T) { + obj := &CreateLocationRequest{} + var fernTestValueLocation *Location + obj.SetLocation(fernTestValueLocation) + assert.Equal(t, fernTestValueLocation, obj.Location) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateLocationRequest(t *testing.T) { + t.Run("SetLocation_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLocationRequest{} + var fernTestValueLocation *Location + + // Act + obj.SetLocation(fernTestValueLocation) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetLocationsRequest(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &GetLocationsRequest{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetLocationsRequest(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLocationsRequest{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBusinessHours(t *testing.T) { + t.Run("SetPeriods", func(t *testing.T) { + obj := &BusinessHours{} + var fernTestValuePeriods []*BusinessHoursPeriod + obj.SetPeriods(fernTestValuePeriods) + assert.Equal(t, fernTestValuePeriods, obj.Periods) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBusinessHours(t *testing.T) { + t.Run("GetPeriods", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessHours{} + var expected []*BusinessHoursPeriod + obj.Periods = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPeriods(), "getter should return the property value") + }) + + t.Run("GetPeriods_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessHours{} + obj.Periods = nil + + // Act & Assert + assert.Nil(t, obj.GetPeriods(), "getter should return nil when property is nil") + }) + + t.Run("GetPeriods_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessHours + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPeriods() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBusinessHours(t *testing.T) { + t.Run("SetPeriods_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessHours{} + var fernTestValuePeriods []*BusinessHoursPeriod + + // Act + obj.SetPeriods(fernTestValuePeriods) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBusinessHoursPeriod(t *testing.T) { + t.Run("SetDayOfWeek", func(t *testing.T) { + obj := &BusinessHoursPeriod{} + var fernTestValueDayOfWeek *DayOfWeek + obj.SetDayOfWeek(fernTestValueDayOfWeek) + assert.Equal(t, fernTestValueDayOfWeek, obj.DayOfWeek) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStartLocalTime", func(t *testing.T) { + obj := &BusinessHoursPeriod{} + var fernTestValueStartLocalTime *string + obj.SetStartLocalTime(fernTestValueStartLocalTime) + assert.Equal(t, fernTestValueStartLocalTime, obj.StartLocalTime) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEndLocalTime", func(t *testing.T) { + obj := &BusinessHoursPeriod{} + var fernTestValueEndLocalTime *string + obj.SetEndLocalTime(fernTestValueEndLocalTime) + assert.Equal(t, fernTestValueEndLocalTime, obj.EndLocalTime) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBusinessHoursPeriod(t *testing.T) { + t.Run("GetDayOfWeek", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessHoursPeriod{} + var expected *DayOfWeek + obj.DayOfWeek = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDayOfWeek(), "getter should return the property value") + }) + + t.Run("GetDayOfWeek_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessHoursPeriod{} + obj.DayOfWeek = nil + + // Act & Assert + assert.Nil(t, obj.GetDayOfWeek(), "getter should return nil when property is nil") + }) + + t.Run("GetDayOfWeek_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessHoursPeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDayOfWeek() // Should return zero value + }) + + t.Run("GetStartLocalTime", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessHoursPeriod{} + var expected *string + obj.StartLocalTime = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStartLocalTime(), "getter should return the property value") + }) + + t.Run("GetStartLocalTime_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessHoursPeriod{} + obj.StartLocalTime = nil + + // Act & Assert + assert.Nil(t, obj.GetStartLocalTime(), "getter should return nil when property is nil") + }) + + t.Run("GetStartLocalTime_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessHoursPeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStartLocalTime() // Should return zero value + }) + + t.Run("GetEndLocalTime", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessHoursPeriod{} + var expected *string + obj.EndLocalTime = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEndLocalTime(), "getter should return the property value") + }) + + t.Run("GetEndLocalTime_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessHoursPeriod{} + obj.EndLocalTime = nil + + // Act & Assert + assert.Nil(t, obj.GetEndLocalTime(), "getter should return nil when property is nil") + }) + + t.Run("GetEndLocalTime_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessHoursPeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEndLocalTime() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBusinessHoursPeriod(t *testing.T) { + t.Run("SetDayOfWeek_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessHoursPeriod{} + var fernTestValueDayOfWeek *DayOfWeek + + // Act + obj.SetDayOfWeek(fernTestValueDayOfWeek) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStartLocalTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessHoursPeriod{} + var fernTestValueStartLocalTime *string + + // Act + obj.SetStartLocalTime(fernTestValueStartLocalTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEndLocalTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessHoursPeriod{} + var fernTestValueEndLocalTime *string + + // Act + obj.SetEndLocalTime(fernTestValueEndLocalTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersChargeRequestAdditionalRecipient(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &ChargeRequestAdditionalRecipient{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDescription", func(t *testing.T) { + obj := &ChargeRequestAdditionalRecipient{} + var fernTestValueDescription string + obj.SetDescription(fernTestValueDescription) + assert.Equal(t, fernTestValueDescription, obj.Description) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &ChargeRequestAdditionalRecipient{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersChargeRequestAdditionalRecipient(t *testing.T) { + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ChargeRequestAdditionalRecipient{} + var expected string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ChargeRequestAdditionalRecipient + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetDescription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ChargeRequestAdditionalRecipient{} + var expected string + obj.Description = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDescription(), "getter should return the property value") + }) + + t.Run("GetDescription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ChargeRequestAdditionalRecipient + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDescription() // Should return zero value + }) + + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ChargeRequestAdditionalRecipient{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ChargeRequestAdditionalRecipient{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ChargeRequestAdditionalRecipient + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + +} + +func TestSettersMarkExplicitChargeRequestAdditionalRecipient(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ChargeRequestAdditionalRecipient{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDescription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ChargeRequestAdditionalRecipient{} + var fernTestValueDescription string + + // Act + obj.SetDescription(fernTestValueDescription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ChargeRequestAdditionalRecipient{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCheckout(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &Checkout{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCheckoutPageURL", func(t *testing.T) { + obj := &Checkout{} + var fernTestValueCheckoutPageURL *string + obj.SetCheckoutPageURL(fernTestValueCheckoutPageURL) + assert.Equal(t, fernTestValueCheckoutPageURL, obj.CheckoutPageURL) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAskForShippingAddress", func(t *testing.T) { + obj := &Checkout{} + var fernTestValueAskForShippingAddress *bool + obj.SetAskForShippingAddress(fernTestValueAskForShippingAddress) + assert.Equal(t, fernTestValueAskForShippingAddress, obj.AskForShippingAddress) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMerchantSupportEmail", func(t *testing.T) { + obj := &Checkout{} + var fernTestValueMerchantSupportEmail *string + obj.SetMerchantSupportEmail(fernTestValueMerchantSupportEmail) + assert.Equal(t, fernTestValueMerchantSupportEmail, obj.MerchantSupportEmail) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPrePopulateBuyerEmail", func(t *testing.T) { + obj := &Checkout{} + var fernTestValuePrePopulateBuyerEmail *string + obj.SetPrePopulateBuyerEmail(fernTestValuePrePopulateBuyerEmail) + assert.Equal(t, fernTestValuePrePopulateBuyerEmail, obj.PrePopulateBuyerEmail) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPrePopulateShippingAddress", func(t *testing.T) { + obj := &Checkout{} + var fernTestValuePrePopulateShippingAddress *Address + obj.SetPrePopulateShippingAddress(fernTestValuePrePopulateShippingAddress) + assert.Equal(t, fernTestValuePrePopulateShippingAddress, obj.PrePopulateShippingAddress) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRedirectURL", func(t *testing.T) { + obj := &Checkout{} + var fernTestValueRedirectURL *string + obj.SetRedirectURL(fernTestValueRedirectURL) + assert.Equal(t, fernTestValueRedirectURL, obj.RedirectURL) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrder", func(t *testing.T) { + obj := &Checkout{} + var fernTestValueOrder *Order + obj.SetOrder(fernTestValueOrder) + assert.Equal(t, fernTestValueOrder, obj.Order) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &Checkout{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAdditionalRecipients", func(t *testing.T) { + obj := &Checkout{} + var fernTestValueAdditionalRecipients []*AdditionalRecipient + obj.SetAdditionalRecipients(fernTestValueAdditionalRecipients) + assert.Equal(t, fernTestValueAdditionalRecipients, obj.AdditionalRecipients) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCheckout(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Checkout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetCheckoutPageURL", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + var expected *string + obj.CheckoutPageURL = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCheckoutPageURL(), "getter should return the property value") + }) + + t.Run("GetCheckoutPageURL_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + obj.CheckoutPageURL = nil + + // Act & Assert + assert.Nil(t, obj.GetCheckoutPageURL(), "getter should return nil when property is nil") + }) + + t.Run("GetCheckoutPageURL_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Checkout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCheckoutPageURL() // Should return zero value + }) + + t.Run("GetAskForShippingAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + var expected *bool + obj.AskForShippingAddress = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAskForShippingAddress(), "getter should return the property value") + }) + + t.Run("GetAskForShippingAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + obj.AskForShippingAddress = nil + + // Act & Assert + assert.Nil(t, obj.GetAskForShippingAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetAskForShippingAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Checkout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAskForShippingAddress() // Should return zero value + }) + + t.Run("GetMerchantSupportEmail", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + var expected *string + obj.MerchantSupportEmail = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantSupportEmail(), "getter should return the property value") + }) + + t.Run("GetMerchantSupportEmail_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + obj.MerchantSupportEmail = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantSupportEmail(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantSupportEmail_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Checkout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantSupportEmail() // Should return zero value + }) + + t.Run("GetPrePopulateBuyerEmail", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + var expected *string + obj.PrePopulateBuyerEmail = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPrePopulateBuyerEmail(), "getter should return the property value") + }) + + t.Run("GetPrePopulateBuyerEmail_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + obj.PrePopulateBuyerEmail = nil + + // Act & Assert + assert.Nil(t, obj.GetPrePopulateBuyerEmail(), "getter should return nil when property is nil") + }) + + t.Run("GetPrePopulateBuyerEmail_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Checkout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPrePopulateBuyerEmail() // Should return zero value + }) + + t.Run("GetPrePopulateShippingAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + var expected *Address + obj.PrePopulateShippingAddress = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPrePopulateShippingAddress(), "getter should return the property value") + }) + + t.Run("GetPrePopulateShippingAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + obj.PrePopulateShippingAddress = nil + + // Act & Assert + assert.Nil(t, obj.GetPrePopulateShippingAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetPrePopulateShippingAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Checkout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPrePopulateShippingAddress() // Should return zero value + }) + + t.Run("GetRedirectURL", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + var expected *string + obj.RedirectURL = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRedirectURL(), "getter should return the property value") + }) + + t.Run("GetRedirectURL_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + obj.RedirectURL = nil + + // Act & Assert + assert.Nil(t, obj.GetRedirectURL(), "getter should return nil when property is nil") + }) + + t.Run("GetRedirectURL_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Checkout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRedirectURL() // Should return zero value + }) + + t.Run("GetOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + var expected *Order + obj.Order = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrder(), "getter should return the property value") + }) + + t.Run("GetOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + obj.Order = nil + + // Act & Assert + assert.Nil(t, obj.GetOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Checkout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrder() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Checkout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetAdditionalRecipients", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + var expected []*AdditionalRecipient + obj.AdditionalRecipients = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAdditionalRecipients(), "getter should return the property value") + }) + + t.Run("GetAdditionalRecipients_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + obj.AdditionalRecipients = nil + + // Act & Assert + assert.Nil(t, obj.GetAdditionalRecipients(), "getter should return nil when property is nil") + }) + + t.Run("GetAdditionalRecipients_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Checkout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAdditionalRecipients() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCheckout(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCheckoutPageURL_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + var fernTestValueCheckoutPageURL *string + + // Act + obj.SetCheckoutPageURL(fernTestValueCheckoutPageURL) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAskForShippingAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + var fernTestValueAskForShippingAddress *bool + + // Act + obj.SetAskForShippingAddress(fernTestValueAskForShippingAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMerchantSupportEmail_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + var fernTestValueMerchantSupportEmail *string + + // Act + obj.SetMerchantSupportEmail(fernTestValueMerchantSupportEmail) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPrePopulateBuyerEmail_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + var fernTestValuePrePopulateBuyerEmail *string + + // Act + obj.SetPrePopulateBuyerEmail(fernTestValuePrePopulateBuyerEmail) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPrePopulateShippingAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + var fernTestValuePrePopulateShippingAddress *Address + + // Act + obj.SetPrePopulateShippingAddress(fernTestValuePrePopulateShippingAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRedirectURL_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + var fernTestValueRedirectURL *string + + // Act + obj.SetRedirectURL(fernTestValueRedirectURL) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + var fernTestValueOrder *Order + + // Act + obj.SetOrder(fernTestValueOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAdditionalRecipients_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + var fernTestValueAdditionalRecipients []*AdditionalRecipient + + // Act + obj.SetAdditionalRecipients(fernTestValueAdditionalRecipients) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCoordinates(t *testing.T) { + t.Run("SetLatitude", func(t *testing.T) { + obj := &Coordinates{} + var fernTestValueLatitude *float64 + obj.SetLatitude(fernTestValueLatitude) + assert.Equal(t, fernTestValueLatitude, obj.Latitude) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLongitude", func(t *testing.T) { + obj := &Coordinates{} + var fernTestValueLongitude *float64 + obj.SetLongitude(fernTestValueLongitude) + assert.Equal(t, fernTestValueLongitude, obj.Longitude) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCoordinates(t *testing.T) { + t.Run("GetLatitude", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Coordinates{} + var expected *float64 + obj.Latitude = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLatitude(), "getter should return the property value") + }) + + t.Run("GetLatitude_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Coordinates{} + obj.Latitude = nil + + // Act & Assert + assert.Nil(t, obj.GetLatitude(), "getter should return nil when property is nil") + }) + + t.Run("GetLatitude_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Coordinates + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLatitude() // Should return zero value + }) + + t.Run("GetLongitude", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Coordinates{} + var expected *float64 + obj.Longitude = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLongitude(), "getter should return the property value") + }) + + t.Run("GetLongitude_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Coordinates{} + obj.Longitude = nil + + // Act & Assert + assert.Nil(t, obj.GetLongitude(), "getter should return nil when property is nil") + }) + + t.Run("GetLongitude_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Coordinates + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLongitude() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCoordinates(t *testing.T) { + t.Run("SetLatitude_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Coordinates{} + var fernTestValueLatitude *float64 + + // Act + obj.SetLatitude(fernTestValueLatitude) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLongitude_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Coordinates{} + var fernTestValueLongitude *float64 + + // Act + obj.SetLongitude(fernTestValueLongitude) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateCheckoutResponse(t *testing.T) { + t.Run("SetCheckout", func(t *testing.T) { + obj := &CreateCheckoutResponse{} + var fernTestValueCheckout *Checkout + obj.SetCheckout(fernTestValueCheckout) + assert.Equal(t, fernTestValueCheckout, obj.Checkout) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateCheckoutResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateCheckoutResponse(t *testing.T) { + t.Run("GetCheckout", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCheckoutResponse{} + var expected *Checkout + obj.Checkout = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCheckout(), "getter should return the property value") + }) + + t.Run("GetCheckout_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCheckoutResponse{} + obj.Checkout = nil + + // Act & Assert + assert.Nil(t, obj.GetCheckout(), "getter should return nil when property is nil") + }) + + t.Run("GetCheckout_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCheckoutResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCheckout() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCheckoutResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCheckoutResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCheckoutResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateCheckoutResponse(t *testing.T) { + t.Run("SetCheckout_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCheckoutResponse{} + var fernTestValueCheckout *Checkout + + // Act + obj.SetCheckout(fernTestValueCheckout) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCheckoutResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateLocationResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateLocationResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocation", func(t *testing.T) { + obj := &CreateLocationResponse{} + var fernTestValueLocation *Location + obj.SetLocation(fernTestValueLocation) + assert.Equal(t, fernTestValueLocation, obj.Location) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateLocationResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLocationResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLocationResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateLocationResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetLocation", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLocationResponse{} + var expected *Location + obj.Location = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocation(), "getter should return the property value") + }) + + t.Run("GetLocation_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLocationResponse{} + obj.Location = nil + + // Act & Assert + assert.Nil(t, obj.GetLocation(), "getter should return nil when property is nil") + }) + + t.Run("GetLocation_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateLocationResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocation() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateLocationResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLocationResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocation_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLocationResponse{} + var fernTestValueLocation *Location + + // Act + obj.SetLocation(fernTestValueLocation) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetLocationResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetLocationResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocation", func(t *testing.T) { + obj := &GetLocationResponse{} + var fernTestValueLocation *Location + obj.SetLocation(fernTestValueLocation) + assert.Equal(t, fernTestValueLocation, obj.Location) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetLocationResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLocationResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLocationResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetLocationResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetLocation", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLocationResponse{} + var expected *Location + obj.Location = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocation(), "getter should return the property value") + }) + + t.Run("GetLocation_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLocationResponse{} + obj.Location = nil + + // Act & Assert + assert.Nil(t, obj.GetLocation(), "getter should return nil when property is nil") + }) + + t.Run("GetLocation_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetLocationResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocation() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetLocationResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLocationResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocation_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLocationResponse{} + var fernTestValueLocation *Location + + // Act + obj.SetLocation(fernTestValueLocation) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListLocationsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &ListLocationsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocations", func(t *testing.T) { + obj := &ListLocationsResponse{} + var fernTestValueLocations []*Location + obj.SetLocations(fernTestValueLocations) + assert.Equal(t, fernTestValueLocations, obj.Locations) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListLocationsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListLocationsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetLocations", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationsResponse{} + var expected []*Location + obj.Locations = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocations(), "getter should return the property value") + }) + + t.Run("GetLocations_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationsResponse{} + obj.Locations = nil + + // Act & Assert + assert.Nil(t, obj.GetLocations(), "getter should return nil when property is nil") + }) + + t.Run("GetLocations_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListLocationsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocations() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListLocationsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocations_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationsResponse{} + var fernTestValueLocations []*Location + + // Act + obj.SetLocations(fernTestValueLocations) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLocation(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &Location{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &Location{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAddress", func(t *testing.T) { + obj := &Location{} + var fernTestValueAddress *Address + obj.SetAddress(fernTestValueAddress) + assert.Equal(t, fernTestValueAddress, obj.Address) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTimezone", func(t *testing.T) { + obj := &Location{} + var fernTestValueTimezone *string + obj.SetTimezone(fernTestValueTimezone) + assert.Equal(t, fernTestValueTimezone, obj.Timezone) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCapabilities", func(t *testing.T) { + obj := &Location{} + var fernTestValueCapabilities []LocationCapability + obj.SetCapabilities(fernTestValueCapabilities) + assert.Equal(t, fernTestValueCapabilities, obj.Capabilities) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &Location{} + var fernTestValueStatus *LocationStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &Location{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMerchantID", func(t *testing.T) { + obj := &Location{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCountry", func(t *testing.T) { + obj := &Location{} + var fernTestValueCountry *Country + obj.SetCountry(fernTestValueCountry) + assert.Equal(t, fernTestValueCountry, obj.Country) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLanguageCode", func(t *testing.T) { + obj := &Location{} + var fernTestValueLanguageCode *string + obj.SetLanguageCode(fernTestValueLanguageCode) + assert.Equal(t, fernTestValueLanguageCode, obj.LanguageCode) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCurrency", func(t *testing.T) { + obj := &Location{} + var fernTestValueCurrency *Currency + obj.SetCurrency(fernTestValueCurrency) + assert.Equal(t, fernTestValueCurrency, obj.Currency) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPhoneNumber", func(t *testing.T) { + obj := &Location{} + var fernTestValuePhoneNumber *string + obj.SetPhoneNumber(fernTestValuePhoneNumber) + assert.Equal(t, fernTestValuePhoneNumber, obj.PhoneNumber) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBusinessName", func(t *testing.T) { + obj := &Location{} + var fernTestValueBusinessName *string + obj.SetBusinessName(fernTestValueBusinessName) + assert.Equal(t, fernTestValueBusinessName, obj.BusinessName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &Location{} + var fernTestValueType *LocationType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetWebsiteURL", func(t *testing.T) { + obj := &Location{} + var fernTestValueWebsiteURL *string + obj.SetWebsiteURL(fernTestValueWebsiteURL) + assert.Equal(t, fernTestValueWebsiteURL, obj.WebsiteURL) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBusinessHours", func(t *testing.T) { + obj := &Location{} + var fernTestValueBusinessHours *BusinessHours + obj.SetBusinessHours(fernTestValueBusinessHours) + assert.Equal(t, fernTestValueBusinessHours, obj.BusinessHours) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBusinessEmail", func(t *testing.T) { + obj := &Location{} + var fernTestValueBusinessEmail *string + obj.SetBusinessEmail(fernTestValueBusinessEmail) + assert.Equal(t, fernTestValueBusinessEmail, obj.BusinessEmail) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDescription", func(t *testing.T) { + obj := &Location{} + var fernTestValueDescription *string + obj.SetDescription(fernTestValueDescription) + assert.Equal(t, fernTestValueDescription, obj.Description) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTwitterUsername", func(t *testing.T) { + obj := &Location{} + var fernTestValueTwitterUsername *string + obj.SetTwitterUsername(fernTestValueTwitterUsername) + assert.Equal(t, fernTestValueTwitterUsername, obj.TwitterUsername) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetInstagramUsername", func(t *testing.T) { + obj := &Location{} + var fernTestValueInstagramUsername *string + obj.SetInstagramUsername(fernTestValueInstagramUsername) + assert.Equal(t, fernTestValueInstagramUsername, obj.InstagramUsername) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFacebookURL", func(t *testing.T) { + obj := &Location{} + var fernTestValueFacebookURL *string + obj.SetFacebookURL(fernTestValueFacebookURL) + assert.Equal(t, fernTestValueFacebookURL, obj.FacebookURL) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCoordinates", func(t *testing.T) { + obj := &Location{} + var fernTestValueCoordinates *Coordinates + obj.SetCoordinates(fernTestValueCoordinates) + assert.Equal(t, fernTestValueCoordinates, obj.Coordinates) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLogoURL", func(t *testing.T) { + obj := &Location{} + var fernTestValueLogoURL *string + obj.SetLogoURL(fernTestValueLogoURL) + assert.Equal(t, fernTestValueLogoURL, obj.LogoURL) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPosBackgroundURL", func(t *testing.T) { + obj := &Location{} + var fernTestValuePosBackgroundURL *string + obj.SetPosBackgroundURL(fernTestValuePosBackgroundURL) + assert.Equal(t, fernTestValuePosBackgroundURL, obj.PosBackgroundURL) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMcc", func(t *testing.T) { + obj := &Location{} + var fernTestValueMcc *string + obj.SetMcc(fernTestValueMcc) + assert.Equal(t, fernTestValueMcc, obj.Mcc) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFullFormatLogoURL", func(t *testing.T) { + obj := &Location{} + var fernTestValueFullFormatLogoURL *string + obj.SetFullFormatLogoURL(fernTestValueFullFormatLogoURL) + assert.Equal(t, fernTestValueFullFormatLogoURL, obj.FullFormatLogoURL) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTaxIDs", func(t *testing.T) { + obj := &Location{} + var fernTestValueTaxIDs *TaxIDs + obj.SetTaxIDs(fernTestValueTaxIDs) + assert.Equal(t, fernTestValueTaxIDs, obj.TaxIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLocation(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var expected *Address + obj.Address = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAddress(), "getter should return the property value") + }) + + t.Run("GetAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + obj.Address = nil + + // Act & Assert + assert.Nil(t, obj.GetAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAddress() // Should return zero value + }) + + t.Run("GetTimezone", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var expected *string + obj.Timezone = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTimezone(), "getter should return the property value") + }) + + t.Run("GetTimezone_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + obj.Timezone = nil + + // Act & Assert + assert.Nil(t, obj.GetTimezone(), "getter should return nil when property is nil") + }) + + t.Run("GetTimezone_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTimezone() // Should return zero value + }) + + t.Run("GetCapabilities", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var expected []LocationCapability + obj.Capabilities = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCapabilities(), "getter should return the property value") + }) + + t.Run("GetCapabilities_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + obj.Capabilities = nil + + // Act & Assert + assert.Nil(t, obj.GetCapabilities(), "getter should return nil when property is nil") + }) + + t.Run("GetCapabilities_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCapabilities() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var expected *LocationStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetCountry", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var expected *Country + obj.Country = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCountry(), "getter should return the property value") + }) + + t.Run("GetCountry_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + obj.Country = nil + + // Act & Assert + assert.Nil(t, obj.GetCountry(), "getter should return nil when property is nil") + }) + + t.Run("GetCountry_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCountry() // Should return zero value + }) + + t.Run("GetLanguageCode", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var expected *string + obj.LanguageCode = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLanguageCode(), "getter should return the property value") + }) + + t.Run("GetLanguageCode_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + obj.LanguageCode = nil + + // Act & Assert + assert.Nil(t, obj.GetLanguageCode(), "getter should return nil when property is nil") + }) + + t.Run("GetLanguageCode_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLanguageCode() // Should return zero value + }) + + t.Run("GetCurrency", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var expected *Currency + obj.Currency = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCurrency(), "getter should return the property value") + }) + + t.Run("GetCurrency_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + obj.Currency = nil + + // Act & Assert + assert.Nil(t, obj.GetCurrency(), "getter should return nil when property is nil") + }) + + t.Run("GetCurrency_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCurrency() // Should return zero value + }) + + t.Run("GetPhoneNumber", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var expected *string + obj.PhoneNumber = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPhoneNumber(), "getter should return the property value") + }) + + t.Run("GetPhoneNumber_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + obj.PhoneNumber = nil + + // Act & Assert + assert.Nil(t, obj.GetPhoneNumber(), "getter should return nil when property is nil") + }) + + t.Run("GetPhoneNumber_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPhoneNumber() // Should return zero value + }) + + t.Run("GetBusinessName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var expected *string + obj.BusinessName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBusinessName(), "getter should return the property value") + }) + + t.Run("GetBusinessName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + obj.BusinessName = nil + + // Act & Assert + assert.Nil(t, obj.GetBusinessName(), "getter should return nil when property is nil") + }) + + t.Run("GetBusinessName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBusinessName() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var expected *LocationType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetWebsiteURL", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var expected *string + obj.WebsiteURL = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetWebsiteURL(), "getter should return the property value") + }) + + t.Run("GetWebsiteURL_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + obj.WebsiteURL = nil + + // Act & Assert + assert.Nil(t, obj.GetWebsiteURL(), "getter should return nil when property is nil") + }) + + t.Run("GetWebsiteURL_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetWebsiteURL() // Should return zero value + }) + + t.Run("GetBusinessHours", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var expected *BusinessHours + obj.BusinessHours = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBusinessHours(), "getter should return the property value") + }) + + t.Run("GetBusinessHours_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + obj.BusinessHours = nil + + // Act & Assert + assert.Nil(t, obj.GetBusinessHours(), "getter should return nil when property is nil") + }) + + t.Run("GetBusinessHours_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBusinessHours() // Should return zero value + }) + + t.Run("GetBusinessEmail", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var expected *string + obj.BusinessEmail = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBusinessEmail(), "getter should return the property value") + }) + + t.Run("GetBusinessEmail_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + obj.BusinessEmail = nil + + // Act & Assert + assert.Nil(t, obj.GetBusinessEmail(), "getter should return nil when property is nil") + }) + + t.Run("GetBusinessEmail_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBusinessEmail() // Should return zero value + }) + + t.Run("GetDescription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var expected *string + obj.Description = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDescription(), "getter should return the property value") + }) + + t.Run("GetDescription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + obj.Description = nil + + // Act & Assert + assert.Nil(t, obj.GetDescription(), "getter should return nil when property is nil") + }) + + t.Run("GetDescription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDescription() // Should return zero value + }) + + t.Run("GetTwitterUsername", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var expected *string + obj.TwitterUsername = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTwitterUsername(), "getter should return the property value") + }) + + t.Run("GetTwitterUsername_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + obj.TwitterUsername = nil + + // Act & Assert + assert.Nil(t, obj.GetTwitterUsername(), "getter should return nil when property is nil") + }) + + t.Run("GetTwitterUsername_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTwitterUsername() // Should return zero value + }) + + t.Run("GetInstagramUsername", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var expected *string + obj.InstagramUsername = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInstagramUsername(), "getter should return the property value") + }) + + t.Run("GetInstagramUsername_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + obj.InstagramUsername = nil + + // Act & Assert + assert.Nil(t, obj.GetInstagramUsername(), "getter should return nil when property is nil") + }) + + t.Run("GetInstagramUsername_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInstagramUsername() // Should return zero value + }) + + t.Run("GetFacebookURL", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var expected *string + obj.FacebookURL = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFacebookURL(), "getter should return the property value") + }) + + t.Run("GetFacebookURL_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + obj.FacebookURL = nil + + // Act & Assert + assert.Nil(t, obj.GetFacebookURL(), "getter should return nil when property is nil") + }) + + t.Run("GetFacebookURL_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFacebookURL() // Should return zero value + }) + + t.Run("GetCoordinates", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var expected *Coordinates + obj.Coordinates = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCoordinates(), "getter should return the property value") + }) + + t.Run("GetCoordinates_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + obj.Coordinates = nil + + // Act & Assert + assert.Nil(t, obj.GetCoordinates(), "getter should return nil when property is nil") + }) + + t.Run("GetCoordinates_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCoordinates() // Should return zero value + }) + + t.Run("GetLogoURL", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var expected *string + obj.LogoURL = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLogoURL(), "getter should return the property value") + }) + + t.Run("GetLogoURL_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + obj.LogoURL = nil + + // Act & Assert + assert.Nil(t, obj.GetLogoURL(), "getter should return nil when property is nil") + }) + + t.Run("GetLogoURL_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLogoURL() // Should return zero value + }) + + t.Run("GetPosBackgroundURL", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var expected *string + obj.PosBackgroundURL = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPosBackgroundURL(), "getter should return the property value") + }) + + t.Run("GetPosBackgroundURL_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + obj.PosBackgroundURL = nil + + // Act & Assert + assert.Nil(t, obj.GetPosBackgroundURL(), "getter should return nil when property is nil") + }) + + t.Run("GetPosBackgroundURL_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPosBackgroundURL() // Should return zero value + }) + + t.Run("GetMcc", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var expected *string + obj.Mcc = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMcc(), "getter should return the property value") + }) + + t.Run("GetMcc_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + obj.Mcc = nil + + // Act & Assert + assert.Nil(t, obj.GetMcc(), "getter should return nil when property is nil") + }) + + t.Run("GetMcc_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMcc() // Should return zero value + }) + + t.Run("GetFullFormatLogoURL", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var expected *string + obj.FullFormatLogoURL = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFullFormatLogoURL(), "getter should return the property value") + }) + + t.Run("GetFullFormatLogoURL_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + obj.FullFormatLogoURL = nil + + // Act & Assert + assert.Nil(t, obj.GetFullFormatLogoURL(), "getter should return nil when property is nil") + }) + + t.Run("GetFullFormatLogoURL_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFullFormatLogoURL() // Should return zero value + }) + + t.Run("GetTaxIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var expected *TaxIDs + obj.TaxIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTaxIDs(), "getter should return the property value") + }) + + t.Run("GetTaxIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + obj.TaxIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetTaxIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetTaxIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTaxIDs() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLocation(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var fernTestValueAddress *Address + + // Act + obj.SetAddress(fernTestValueAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTimezone_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var fernTestValueTimezone *string + + // Act + obj.SetTimezone(fernTestValueTimezone) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCapabilities_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var fernTestValueCapabilities []LocationCapability + + // Act + obj.SetCapabilities(fernTestValueCapabilities) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var fernTestValueStatus *LocationStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCountry_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var fernTestValueCountry *Country + + // Act + obj.SetCountry(fernTestValueCountry) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLanguageCode_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var fernTestValueLanguageCode *string + + // Act + obj.SetLanguageCode(fernTestValueLanguageCode) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCurrency_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var fernTestValueCurrency *Currency + + // Act + obj.SetCurrency(fernTestValueCurrency) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPhoneNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var fernTestValuePhoneNumber *string + + // Act + obj.SetPhoneNumber(fernTestValuePhoneNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBusinessName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var fernTestValueBusinessName *string + + // Act + obj.SetBusinessName(fernTestValueBusinessName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var fernTestValueType *LocationType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetWebsiteURL_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var fernTestValueWebsiteURL *string + + // Act + obj.SetWebsiteURL(fernTestValueWebsiteURL) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBusinessHours_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var fernTestValueBusinessHours *BusinessHours + + // Act + obj.SetBusinessHours(fernTestValueBusinessHours) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBusinessEmail_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var fernTestValueBusinessEmail *string + + // Act + obj.SetBusinessEmail(fernTestValueBusinessEmail) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDescription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var fernTestValueDescription *string + + // Act + obj.SetDescription(fernTestValueDescription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTwitterUsername_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var fernTestValueTwitterUsername *string + + // Act + obj.SetTwitterUsername(fernTestValueTwitterUsername) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetInstagramUsername_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var fernTestValueInstagramUsername *string + + // Act + obj.SetInstagramUsername(fernTestValueInstagramUsername) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFacebookURL_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var fernTestValueFacebookURL *string + + // Act + obj.SetFacebookURL(fernTestValueFacebookURL) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCoordinates_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var fernTestValueCoordinates *Coordinates + + // Act + obj.SetCoordinates(fernTestValueCoordinates) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLogoURL_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var fernTestValueLogoURL *string + + // Act + obj.SetLogoURL(fernTestValueLogoURL) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPosBackgroundURL_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var fernTestValuePosBackgroundURL *string + + // Act + obj.SetPosBackgroundURL(fernTestValuePosBackgroundURL) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMcc_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var fernTestValueMcc *string + + // Act + obj.SetMcc(fernTestValueMcc) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFullFormatLogoURL_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var fernTestValueFullFormatLogoURL *string + + // Act + obj.SetFullFormatLogoURL(fernTestValueFullFormatLogoURL) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTaxIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + var fernTestValueTaxIDs *TaxIDs + + // Act + obj.SetTaxIDs(fernTestValueTaxIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTaxIDs(t *testing.T) { + t.Run("SetEuVat", func(t *testing.T) { + obj := &TaxIDs{} + var fernTestValueEuVat *string + obj.SetEuVat(fernTestValueEuVat) + assert.Equal(t, fernTestValueEuVat, obj.EuVat) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFrSiret", func(t *testing.T) { + obj := &TaxIDs{} + var fernTestValueFrSiret *string + obj.SetFrSiret(fernTestValueFrSiret) + assert.Equal(t, fernTestValueFrSiret, obj.FrSiret) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFrNaf", func(t *testing.T) { + obj := &TaxIDs{} + var fernTestValueFrNaf *string + obj.SetFrNaf(fernTestValueFrNaf) + assert.Equal(t, fernTestValueFrNaf, obj.FrNaf) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEsNif", func(t *testing.T) { + obj := &TaxIDs{} + var fernTestValueEsNif *string + obj.SetEsNif(fernTestValueEsNif) + assert.Equal(t, fernTestValueEsNif, obj.EsNif) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetJpQii", func(t *testing.T) { + obj := &TaxIDs{} + var fernTestValueJpQii *string + obj.SetJpQii(fernTestValueJpQii) + assert.Equal(t, fernTestValueJpQii, obj.JpQii) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTaxIDs(t *testing.T) { + t.Run("GetEuVat", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TaxIDs{} + var expected *string + obj.EuVat = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEuVat(), "getter should return the property value") + }) + + t.Run("GetEuVat_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TaxIDs{} + obj.EuVat = nil + + // Act & Assert + assert.Nil(t, obj.GetEuVat(), "getter should return nil when property is nil") + }) + + t.Run("GetEuVat_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TaxIDs + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEuVat() // Should return zero value + }) + + t.Run("GetFrSiret", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TaxIDs{} + var expected *string + obj.FrSiret = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFrSiret(), "getter should return the property value") + }) + + t.Run("GetFrSiret_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TaxIDs{} + obj.FrSiret = nil + + // Act & Assert + assert.Nil(t, obj.GetFrSiret(), "getter should return nil when property is nil") + }) + + t.Run("GetFrSiret_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TaxIDs + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFrSiret() // Should return zero value + }) + + t.Run("GetFrNaf", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TaxIDs{} + var expected *string + obj.FrNaf = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFrNaf(), "getter should return the property value") + }) + + t.Run("GetFrNaf_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TaxIDs{} + obj.FrNaf = nil + + // Act & Assert + assert.Nil(t, obj.GetFrNaf(), "getter should return nil when property is nil") + }) + + t.Run("GetFrNaf_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TaxIDs + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFrNaf() // Should return zero value + }) + + t.Run("GetEsNif", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TaxIDs{} + var expected *string + obj.EsNif = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEsNif(), "getter should return the property value") + }) + + t.Run("GetEsNif_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TaxIDs{} + obj.EsNif = nil + + // Act & Assert + assert.Nil(t, obj.GetEsNif(), "getter should return nil when property is nil") + }) + + t.Run("GetEsNif_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TaxIDs + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEsNif() // Should return zero value + }) + + t.Run("GetJpQii", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TaxIDs{} + var expected *string + obj.JpQii = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetJpQii(), "getter should return the property value") + }) + + t.Run("GetJpQii_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TaxIDs{} + obj.JpQii = nil + + // Act & Assert + assert.Nil(t, obj.GetJpQii(), "getter should return nil when property is nil") + }) + + t.Run("GetJpQii_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TaxIDs + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetJpQii() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTaxIDs(t *testing.T) { + t.Run("SetEuVat_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TaxIDs{} + var fernTestValueEuVat *string + + // Act + obj.SetEuVat(fernTestValueEuVat) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFrSiret_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TaxIDs{} + var fernTestValueFrSiret *string + + // Act + obj.SetFrSiret(fernTestValueFrSiret) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFrNaf_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TaxIDs{} + var fernTestValueFrNaf *string + + // Act + obj.SetFrNaf(fernTestValueFrNaf) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEsNif_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TaxIDs{} + var fernTestValueEsNif *string + + // Act + obj.SetEsNif(fernTestValueEsNif) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetJpQii_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TaxIDs{} + var fernTestValueJpQii *string + + // Act + obj.SetJpQii(fernTestValueJpQii) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateLocationResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateLocationResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocation", func(t *testing.T) { + obj := &UpdateLocationResponse{} + var fernTestValueLocation *Location + obj.SetLocation(fernTestValueLocation) + assert.Equal(t, fernTestValueLocation, obj.Location) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateLocationResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateLocationResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateLocationResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateLocationResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetLocation", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateLocationResponse{} + var expected *Location + obj.Location = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocation(), "getter should return the property value") + }) + + t.Run("GetLocation_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateLocationResponse{} + obj.Location = nil + + // Act & Assert + assert.Nil(t, obj.GetLocation(), "getter should return nil when property is nil") + }) + + t.Run("GetLocation_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateLocationResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocation() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateLocationResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateLocationResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocation_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateLocationResponse{} + var fernTestValueLocation *Location + + // Act + obj.SetLocation(fernTestValueLocation) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateLocationRequest(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &UpdateLocationRequest{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocation", func(t *testing.T) { + obj := &UpdateLocationRequest{} + var fernTestValueLocation *Location + obj.SetLocation(fernTestValueLocation) + assert.Equal(t, fernTestValueLocation, obj.Location) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateLocationRequest(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateLocationRequest{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocation_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateLocationRequest{} + var fernTestValueLocation *Location + + // Act + obj.SetLocation(fernTestValueLocation) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingBusinessHours(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessHours{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BusinessHours + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BusinessHours + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BusinessHours + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBusinessHoursPeriod(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BusinessHoursPeriod{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BusinessHoursPeriod + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BusinessHoursPeriod + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BusinessHoursPeriod + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingChargeRequestAdditionalRecipient(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ChargeRequestAdditionalRecipient{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ChargeRequestAdditionalRecipient + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ChargeRequestAdditionalRecipient + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ChargeRequestAdditionalRecipient + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCheckout(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Checkout{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Checkout + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Checkout + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Checkout + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCoordinates(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Coordinates{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Coordinates + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Coordinates + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Coordinates + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateCheckoutResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCheckoutResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateCheckoutResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateCheckoutResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateCheckoutResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateLocationResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLocationResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateLocationResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateLocationResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateLocationResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetLocationResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLocationResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetLocationResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetLocationResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetLocationResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListLocationsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListLocationsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListLocationsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListLocationsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLocation(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Location{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Location + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Location + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Location + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTaxIDs(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TaxIDs{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TaxIDs + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TaxIDs + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TaxIDs + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateLocationResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateLocationResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateLocationResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateLocationResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateLocationResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringBusinessHours(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BusinessHours{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessHours + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBusinessHoursPeriod(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BusinessHoursPeriod{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessHoursPeriod + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringChargeRequestAdditionalRecipient(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ChargeRequestAdditionalRecipient{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ChargeRequestAdditionalRecipient + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCheckout(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Checkout{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Checkout + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCoordinates(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Coordinates{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Coordinates + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateCheckoutResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateCheckoutResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCheckoutResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateLocationResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateLocationResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateLocationResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetLocationResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetLocationResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetLocationResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListLocationsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListLocationsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListLocationsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLocation(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Location{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTaxIDs(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TaxIDs{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TaxIDs + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateLocationResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateLocationResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateLocationResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestEnumLocationCapability(t *testing.T) { + t.Run("NewFromString_CREDIT_CARD_PROCESSING", func(t *testing.T) { + t.Parallel() + val, err := NewLocationCapabilityFromString("CREDIT_CARD_PROCESSING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LocationCapability("CREDIT_CARD_PROCESSING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AUTOMATIC_TRANSFERS", func(t *testing.T) { + t.Parallel() + val, err := NewLocationCapabilityFromString("AUTOMATIC_TRANSFERS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LocationCapability("AUTOMATIC_TRANSFERS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UNLINKED_REFUNDS", func(t *testing.T) { + t.Parallel() + val, err := NewLocationCapabilityFromString("UNLINKED_REFUNDS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LocationCapability("UNLINKED_REFUNDS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewLocationCapabilityFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewLocationCapabilityFromString("CREDIT_CARD_PROCESSING") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumLocationStatus(t *testing.T) { + t.Run("NewFromString_ACTIVE", func(t *testing.T) { + t.Parallel() + val, err := NewLocationStatusFromString("ACTIVE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LocationStatus("ACTIVE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INACTIVE", func(t *testing.T) { + t.Parallel() + val, err := NewLocationStatusFromString("INACTIVE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LocationStatus("INACTIVE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewLocationStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewLocationStatusFromString("ACTIVE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumLocationType(t *testing.T) { + t.Run("NewFromString_PHYSICAL", func(t *testing.T) { + t.Parallel() + val, err := NewLocationTypeFromString("PHYSICAL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LocationType("PHYSICAL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MOBILE", func(t *testing.T) { + t.Parallel() + val, err := NewLocationTypeFromString("MOBILE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LocationType("MOBILE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewLocationTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewLocationTypeFromString("PHYSICAL") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestExtraPropertiesBusinessHours(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BusinessHours{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessHours + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBusinessHoursPeriod(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BusinessHoursPeriod{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BusinessHoursPeriod + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesChargeRequestAdditionalRecipient(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ChargeRequestAdditionalRecipient{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ChargeRequestAdditionalRecipient + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCheckout(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Checkout{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Checkout + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCoordinates(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Coordinates{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Coordinates + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateCheckoutResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateCheckoutResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCheckoutResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateLocationResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateLocationResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateLocationResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetLocationResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetLocationResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetLocationResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListLocationsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListLocationsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListLocationsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLocation(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Location{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Location + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTaxIDs(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TaxIDs{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TaxIDs + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateLocationResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateLocationResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateLocationResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/loyalty.go b/loyalty.go index 56c2eb8..678bafa 100644 --- a/loyalty.go +++ b/loyalty.go @@ -62,6 +62,27 @@ func (s *SearchLoyaltyEventsRequest) SetCursor(cursor *string) { s.require(searchLoyaltyEventsRequestFieldCursor) } +func (s *SearchLoyaltyEventsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler SearchLoyaltyEventsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *s = SearchLoyaltyEventsRequest(body) + return nil +} + +func (s *SearchLoyaltyEventsRequest) MarshalJSON() ([]byte, error) { + type embed SearchLoyaltyEventsRequest + var marshaler = struct { + embed + }{ + embed: embed(*s), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, s.explicitFields) + return json.Marshal(explicitMarshaler) +} + // Filter events by date time range. var ( loyaltyEventDateTimeFilterFieldCreatedAt = big.NewInt(1 << 0) @@ -86,6 +107,9 @@ func (l *LoyaltyEventDateTimeFilter) GetCreatedAt() *TimeRange { } func (l *LoyaltyEventDateTimeFilter) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -131,6 +155,9 @@ func (l *LoyaltyEventDateTimeFilter) MarshalJSON() ([]byte, error) { } func (l *LoyaltyEventDateTimeFilter) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -209,6 +236,9 @@ func (l *LoyaltyEventFilter) GetOrderFilter() *LoyaltyEventOrderFilter { } func (l *LoyaltyEventFilter) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -282,6 +312,9 @@ func (l *LoyaltyEventFilter) MarshalJSON() ([]byte, error) { } func (l *LoyaltyEventFilter) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -319,6 +352,9 @@ func (l *LoyaltyEventLocationFilter) GetLocationIDs() []string { } func (l *LoyaltyEventLocationFilter) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -364,6 +400,9 @@ func (l *LoyaltyEventLocationFilter) MarshalJSON() ([]byte, error) { } func (l *LoyaltyEventLocationFilter) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -399,6 +438,9 @@ func (l *LoyaltyEventLoyaltyAccountFilter) GetLoyaltyAccountID() string { } func (l *LoyaltyEventLoyaltyAccountFilter) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -444,6 +486,9 @@ func (l *LoyaltyEventLoyaltyAccountFilter) MarshalJSON() ([]byte, error) { } func (l *LoyaltyEventLoyaltyAccountFilter) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -479,6 +524,9 @@ func (l *LoyaltyEventOrderFilter) GetOrderID() string { } func (l *LoyaltyEventOrderFilter) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -524,6 +572,9 @@ func (l *LoyaltyEventOrderFilter) MarshalJSON() ([]byte, error) { } func (l *LoyaltyEventOrderFilter) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -559,6 +610,9 @@ func (l *LoyaltyEventQuery) GetFilter() *LoyaltyEventFilter { } func (l *LoyaltyEventQuery) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -604,6 +658,9 @@ func (l *LoyaltyEventQuery) MarshalJSON() ([]byte, error) { } func (l *LoyaltyEventQuery) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -642,6 +699,9 @@ func (l *LoyaltyEventTypeFilter) GetTypes() []LoyaltyEventType { } func (l *LoyaltyEventTypeFilter) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -687,6 +747,9 @@ func (l *LoyaltyEventTypeFilter) MarshalJSON() ([]byte, error) { } func (l *LoyaltyEventTypeFilter) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -746,6 +809,9 @@ func (s *SearchLoyaltyEventsResponse) GetCursor() *string { } func (s *SearchLoyaltyEventsResponse) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -805,6 +871,9 @@ func (s *SearchLoyaltyEventsResponse) MarshalJSON() ([]byte, error) { } func (s *SearchLoyaltyEventsResponse) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value diff --git a/loyalty/accounts.go b/loyalty/accounts.go index af2c1b3..ea263fb 100644 --- a/loyalty/accounts.go +++ b/loyalty/accounts.go @@ -3,7 +3,9 @@ package loyalty import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" big "math/big" ) @@ -20,7 +22,7 @@ type AccumulateLoyaltyPointsRequest struct { // The points to add to the account. // If you are using the Orders API to manage orders, specify the order ID. // Otherwise, specify the points to add. - AccumulatePoints *v3.LoyaltyEventAccumulatePoints `json:"accumulate_points,omitempty" url:"-"` + AccumulatePoints *v3.LoyaltyEventAccumulatePoints `json:"accumulate_points" url:"-"` // A unique string that identifies the `AccumulateLoyaltyPoints` request. // Keys can be any valid string but must be unique for every request. IdempotencyKey string `json:"idempotency_key" url:"-"` @@ -66,6 +68,27 @@ func (a *AccumulateLoyaltyPointsRequest) SetLocationID(locationID string) { a.require(accumulateLoyaltyPointsRequestFieldLocationID) } +func (a *AccumulateLoyaltyPointsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler AccumulateLoyaltyPointsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *a = AccumulateLoyaltyPointsRequest(body) + return nil +} + +func (a *AccumulateLoyaltyPointsRequest) MarshalJSON() ([]byte, error) { + type embed AccumulateLoyaltyPointsRequest + var marshaler = struct { + embed + }{ + embed: embed(*a), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, a.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( adjustLoyaltyPointsRequestFieldAccountID = big.NewInt(1 << 0) adjustLoyaltyPointsRequestFieldIdempotencyKey = big.NewInt(1 << 1) @@ -81,7 +104,7 @@ type AdjustLoyaltyPointsRequest struct { IdempotencyKey string `json:"idempotency_key" url:"-"` // The points to add or subtract and the reason for the adjustment. To add points, specify a positive integer. // To subtract points, specify a negative integer. - AdjustPoints *v3.LoyaltyEventAdjustPoints `json:"adjust_points,omitempty" url:"-"` + AdjustPoints *v3.LoyaltyEventAdjustPoints `json:"adjust_points" url:"-"` // Indicates whether to allow a negative adjustment to result in a negative balance. If `true`, a negative // balance is allowed when subtracting points. If `false`, Square returns a `BAD_REQUEST` error when subtracting // the specified number of points would result in a negative balance. The default value is `false`. @@ -126,6 +149,27 @@ func (a *AdjustLoyaltyPointsRequest) SetAllowNegativeBalance(allowNegativeBalanc a.require(adjustLoyaltyPointsRequestFieldAllowNegativeBalance) } +func (a *AdjustLoyaltyPointsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler AdjustLoyaltyPointsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *a = AdjustLoyaltyPointsRequest(body) + return nil +} + +func (a *AdjustLoyaltyPointsRequest) MarshalJSON() ([]byte, error) { + type embed AdjustLoyaltyPointsRequest + var marshaler = struct { + embed + }{ + embed: embed(*a), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, a.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( createLoyaltyAccountRequestFieldLoyaltyAccount = big.NewInt(1 << 0) createLoyaltyAccountRequestFieldIdempotencyKey = big.NewInt(1 << 1) @@ -133,7 +177,7 @@ var ( type CreateLoyaltyAccountRequest struct { // The loyalty account to create. - LoyaltyAccount *v3.LoyaltyAccount `json:"loyalty_account,omitempty" url:"-"` + LoyaltyAccount *v3.LoyaltyAccount `json:"loyalty_account" url:"-"` // A unique string that identifies this `CreateLoyaltyAccount` request. // Keys can be any valid string, but must be unique for every request. IdempotencyKey string `json:"idempotency_key" url:"-"` @@ -163,6 +207,27 @@ func (c *CreateLoyaltyAccountRequest) SetIdempotencyKey(idempotencyKey string) { c.require(createLoyaltyAccountRequestFieldIdempotencyKey) } +func (c *CreateLoyaltyAccountRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateLoyaltyAccountRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateLoyaltyAccountRequest(body) + return nil +} + +func (c *CreateLoyaltyAccountRequest) MarshalJSON() ([]byte, error) { + type embed CreateLoyaltyAccountRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( getAccountsRequestFieldAccountID = big.NewInt(1 << 0) ) @@ -239,3 +304,24 @@ func (s *SearchLoyaltyAccountsRequest) SetCursor(cursor *string) { s.Cursor = cursor s.require(searchLoyaltyAccountsRequestFieldCursor) } + +func (s *SearchLoyaltyAccountsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler SearchLoyaltyAccountsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *s = SearchLoyaltyAccountsRequest(body) + return nil +} + +func (s *SearchLoyaltyAccountsRequest) MarshalJSON() ([]byte, error) { + type embed SearchLoyaltyAccountsRequest + var marshaler = struct { + embed + }{ + embed: embed(*s), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, s.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/loyalty/accounts/loyalty_accounts_test/loyalty_accounts_test.go b/loyalty/accounts/loyalty_accounts_test/loyalty_accounts_test.go new file mode 100644 index 0000000..4976924 --- /dev/null +++ b/loyalty/accounts/loyalty_accounts_test/loyalty_accounts_test.go @@ -0,0 +1,222 @@ +// Code generated by Fern. DO NOT EDIT. + +package loyalty_accounts_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + loyalty "github.com/square/square-go-sdk/v3/loyalty" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestLoyaltyAccountsCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &loyalty.CreateLoyaltyAccountRequest{ + LoyaltyAccount: &square.LoyaltyAccount{ + ProgramID: "d619f755-2d17-41f3-990d-c04ecedd64dd", + Mapping: &square.LoyaltyAccountMapping{ + PhoneNumber: square.String( + "+14155551234", + ), + }, + }, + IdempotencyKey: "ec78c477-b1c3-4899-a209-a4e71337c996", + } + _, invocationErr := client.Loyalty.Accounts.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLoyaltyAccountsCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLoyaltyAccountsCreateWithWireMock", "POST", "/v2/loyalty/accounts", nil, 1) +} + +func TestLoyaltyAccountsSearchWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &loyalty.SearchLoyaltyAccountsRequest{ + Query: &square.SearchLoyaltyAccountsRequestLoyaltyAccountQuery{ + Mappings: []*square.LoyaltyAccountMapping{ + &square.LoyaltyAccountMapping{ + PhoneNumber: square.String( + "+14155551234", + ), + }, + }, + }, + Limit: square.Int( + 10, + ), + } + _, invocationErr := client.Loyalty.Accounts.Search( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLoyaltyAccountsSearchWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLoyaltyAccountsSearchWithWireMock", "POST", "/v2/loyalty/accounts/search", nil, 1) +} + +func TestLoyaltyAccountsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &loyalty.GetAccountsRequest{ + AccountID: "account_id", + } + _, invocationErr := client.Loyalty.Accounts.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLoyaltyAccountsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLoyaltyAccountsGetWithWireMock", "GET", "/v2/loyalty/accounts/account_id", nil, 1) +} + +func TestLoyaltyAccountsAccumulatePointsWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &loyalty.AccumulateLoyaltyPointsRequest{ + AccountID: "account_id", + AccumulatePoints: &square.LoyaltyEventAccumulatePoints{ + OrderID: square.String( + "RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY", + ), + }, + IdempotencyKey: "58b90739-c3e8-4b11-85f7-e636d48d72cb", + LocationID: "P034NEENMD09F", + } + _, invocationErr := client.Loyalty.Accounts.AccumulatePoints( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLoyaltyAccountsAccumulatePointsWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLoyaltyAccountsAccumulatePointsWithWireMock", "POST", "/v2/loyalty/accounts/account_id/accumulate", nil, 1) +} + +func TestLoyaltyAccountsAdjustWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &loyalty.AdjustLoyaltyPointsRequest{ + AccountID: "account_id", + IdempotencyKey: "bc29a517-3dc9-450e-aa76-fae39ee849d1", + AdjustPoints: &square.LoyaltyEventAdjustPoints{ + Points: 10, + Reason: square.String( + "Complimentary points", + ), + }, + } + _, invocationErr := client.Loyalty.Accounts.Adjust( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLoyaltyAccountsAdjustWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLoyaltyAccountsAdjustWithWireMock", "POST", "/v2/loyalty/accounts/account_id/adjust", nil, 1) +} diff --git a/loyalty/accounts_test.go b/loyalty/accounts_test.go new file mode 100644 index 0000000..03417b8 --- /dev/null +++ b/loyalty/accounts_test.go @@ -0,0 +1,430 @@ +// Code generated by Fern. DO NOT EDIT. + +package loyalty + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersAccumulateLoyaltyPointsRequest(t *testing.T) { + t.Run("SetAccountID", func(t *testing.T) { + obj := &AccumulateLoyaltyPointsRequest{} + var fernTestValueAccountID string + obj.SetAccountID(fernTestValueAccountID) + assert.Equal(t, fernTestValueAccountID, obj.AccountID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &AccumulateLoyaltyPointsRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &AccumulateLoyaltyPointsRequest{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitAccumulateLoyaltyPointsRequest(t *testing.T) { + t.Run("SetAccountID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AccumulateLoyaltyPointsRequest{} + var fernTestValueAccountID string + + // Act + obj.SetAccountID(fernTestValueAccountID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AccumulateLoyaltyPointsRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AccumulateLoyaltyPointsRequest{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersAdjustLoyaltyPointsRequest(t *testing.T) { + t.Run("SetAccountID", func(t *testing.T) { + obj := &AdjustLoyaltyPointsRequest{} + var fernTestValueAccountID string + obj.SetAccountID(fernTestValueAccountID) + assert.Equal(t, fernTestValueAccountID, obj.AccountID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &AdjustLoyaltyPointsRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAllowNegativeBalance", func(t *testing.T) { + obj := &AdjustLoyaltyPointsRequest{} + var fernTestValueAllowNegativeBalance *bool + obj.SetAllowNegativeBalance(fernTestValueAllowNegativeBalance) + assert.Equal(t, fernTestValueAllowNegativeBalance, obj.AllowNegativeBalance) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitAdjustLoyaltyPointsRequest(t *testing.T) { + t.Run("SetAccountID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AdjustLoyaltyPointsRequest{} + var fernTestValueAccountID string + + // Act + obj.SetAccountID(fernTestValueAccountID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AdjustLoyaltyPointsRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAllowNegativeBalance_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AdjustLoyaltyPointsRequest{} + var fernTestValueAllowNegativeBalance *bool + + // Act + obj.SetAllowNegativeBalance(fernTestValueAllowNegativeBalance) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateLoyaltyAccountRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateLoyaltyAccountRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateLoyaltyAccountRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLoyaltyAccountRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetAccountsRequest(t *testing.T) { + t.Run("SetAccountID", func(t *testing.T) { + obj := &GetAccountsRequest{} + var fernTestValueAccountID string + obj.SetAccountID(fernTestValueAccountID) + assert.Equal(t, fernTestValueAccountID, obj.AccountID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetAccountsRequest(t *testing.T) { + t.Run("SetAccountID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetAccountsRequest{} + var fernTestValueAccountID string + + // Act + obj.SetAccountID(fernTestValueAccountID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchLoyaltyAccountsRequest(t *testing.T) { + t.Run("SetLimit", func(t *testing.T) { + obj := &SearchLoyaltyAccountsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchLoyaltyAccountsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitSearchLoyaltyAccountsRequest(t *testing.T) { + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyAccountsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyAccountsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/loyalty/loyalty_test/loyalty_test.go b/loyalty/loyalty_test/loyalty_test.go new file mode 100644 index 0000000..a600a85 --- /dev/null +++ b/loyalty/loyalty_test/loyalty_test.go @@ -0,0 +1,97 @@ +// Code generated by Fern. DO NOT EDIT. + +package loyalty_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestLoyaltySearchEventsWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.SearchLoyaltyEventsRequest{ + Query: &square.LoyaltyEventQuery{ + Filter: &square.LoyaltyEventFilter{ + OrderFilter: &square.LoyaltyEventOrderFilter{ + OrderID: "PyATxhYLfsMqpVkcKJITPydgEYfZY", + }, + }, + }, + Limit: square.Int( + 30, + ), + } + _, invocationErr := client.Loyalty.SearchEvents( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLoyaltySearchEventsWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLoyaltySearchEventsWithWireMock", "POST", "/v2/loyalty/events/search", nil, 1) +} diff --git a/loyalty/programs.go b/loyalty/programs.go index 06007d0..044ca9e 100644 --- a/loyalty/programs.go +++ b/loyalty/programs.go @@ -3,7 +3,9 @@ package loyalty import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" big "math/big" ) @@ -74,6 +76,27 @@ func (c *CalculateLoyaltyPointsRequest) SetLoyaltyAccountID(loyaltyAccountID *st c.require(calculateLoyaltyPointsRequestFieldLoyaltyAccountID) } +func (c *CalculateLoyaltyPointsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CalculateLoyaltyPointsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CalculateLoyaltyPointsRequest(body) + return nil +} + +func (c *CalculateLoyaltyPointsRequest) MarshalJSON() ([]byte, error) { + type embed CalculateLoyaltyPointsRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( getProgramsRequestFieldProgramID = big.NewInt(1 << 0) ) diff --git a/loyalty/programs/loyalty_programs_test/loyalty_programs_test.go b/loyalty/programs/loyalty_programs_test/loyalty_programs_test.go new file mode 100644 index 0000000..00f697a --- /dev/null +++ b/loyalty/programs/loyalty_programs_test/loyalty_programs_test.go @@ -0,0 +1,141 @@ +// Code generated by Fern. DO NOT EDIT. + +package loyalty_programs_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + loyalty "github.com/square/square-go-sdk/v3/loyalty" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestLoyaltyProgramsListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + _, invocationErr := client.Loyalty.Programs.List( + context.TODO(), + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLoyaltyProgramsListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLoyaltyProgramsListWithWireMock", "GET", "/v2/loyalty/programs", nil, 1) +} + +func TestLoyaltyProgramsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &loyalty.GetProgramsRequest{ + ProgramID: "program_id", + } + _, invocationErr := client.Loyalty.Programs.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLoyaltyProgramsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLoyaltyProgramsGetWithWireMock", "GET", "/v2/loyalty/programs/program_id", nil, 1) +} + +func TestLoyaltyProgramsCalculateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &loyalty.CalculateLoyaltyPointsRequest{ + ProgramID: "program_id", + OrderID: square.String( + "RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY", + ), + LoyaltyAccountID: square.String( + "79b807d2-d786-46a9-933b-918028d7a8c5", + ), + } + _, invocationErr := client.Loyalty.Programs.Calculate( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLoyaltyProgramsCalculateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLoyaltyProgramsCalculateWithWireMock", "POST", "/v2/loyalty/programs/program_id/calculate", nil, 1) +} diff --git a/loyalty/programs/promotions.go b/loyalty/programs/promotions.go index 9d78308..ea5035b 100644 --- a/loyalty/programs/promotions.go +++ b/loyalty/programs/promotions.go @@ -3,7 +3,9 @@ package programs import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" big "math/big" ) @@ -56,7 +58,7 @@ type CreateLoyaltyPromotionRequest struct { // using the `main` keyword. ProgramID string `json:"-" url:"-"` // The loyalty promotion to create. - LoyaltyPromotion *v3.LoyaltyPromotion `json:"loyalty_promotion,omitempty" url:"-"` + LoyaltyPromotion *v3.LoyaltyPromotion `json:"loyalty_promotion" url:"-"` // A unique identifier for this request, which is used to ensure idempotency. For more information, // see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). IdempotencyKey string `json:"idempotency_key" url:"-"` @@ -93,6 +95,27 @@ func (c *CreateLoyaltyPromotionRequest) SetIdempotencyKey(idempotencyKey string) c.require(createLoyaltyPromotionRequestFieldIdempotencyKey) } +func (c *CreateLoyaltyPromotionRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateLoyaltyPromotionRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateLoyaltyPromotionRequest(body) + return nil +} + +func (c *CreateLoyaltyPromotionRequest) MarshalJSON() ([]byte, error) { + type embed CreateLoyaltyPromotionRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( getPromotionsRequestFieldProgramID = big.NewInt(1 << 0) getPromotionsRequestFieldPromotionID = big.NewInt(1 << 1) diff --git a/loyalty/programs/promotions/loyalty_programs_promotions_test/loyalty_programs_promotions_test.go b/loyalty/programs/promotions/loyalty_programs_promotions_test/loyalty_programs_promotions_test.go new file mode 100644 index 0000000..d601347 --- /dev/null +++ b/loyalty/programs/promotions/loyalty_programs_promotions_test/loyalty_programs_promotions_test.go @@ -0,0 +1,207 @@ +// Code generated by Fern. DO NOT EDIT. + +package loyalty_programs_promotions_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + programs "github.com/square/square-go-sdk/v3/loyalty/programs" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestLoyaltyProgramsPromotionsListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &programs.ListPromotionsRequest{ + ProgramID: "program_id", + Status: square.LoyaltyPromotionStatusActive.Ptr(), + Cursor: square.String( + "cursor", + ), + Limit: square.Int( + 1, + ), + } + _, invocationErr := client.Loyalty.Programs.Promotions.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLoyaltyProgramsPromotionsListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLoyaltyProgramsPromotionsListWithWireMock", "GET", "/v2/loyalty/programs/program_id/promotions", map[string]string{"status": "ACTIVE", "cursor": "cursor", "limit": "1"}, 1) +} + +func TestLoyaltyProgramsPromotionsCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &programs.CreateLoyaltyPromotionRequest{ + ProgramID: "program_id", + LoyaltyPromotion: &square.LoyaltyPromotion{ + Name: "Tuesday Happy Hour Promo", + Incentive: &square.LoyaltyPromotionIncentive{ + Type: square.LoyaltyPromotionIncentiveTypePointsMultiplier, + PointsMultiplierData: &square.LoyaltyPromotionIncentivePointsMultiplierData{ + Multiplier: square.String( + "3.0", + ), + }, + }, + AvailableTime: &square.LoyaltyPromotionAvailableTimeData{ + TimePeriods: []string{ + `BEGIN:VEVENT + DTSTART:20220816T160000 + DURATION:PT2H + RRULE:FREQ=WEEKLY;BYDAY=TU + END:VEVENT`, + }, + }, + TriggerLimit: &square.LoyaltyPromotionTriggerLimit{ + Times: 1, + Interval: square.LoyaltyPromotionTriggerLimitIntervalDay.Ptr(), + }, + MinimumSpendAmountMoney: &square.Money{ + Amount: square.Int64( + int64(2000), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + QualifyingCategoryIDs: []string{ + "XTQPYLR3IIU9C44VRCB3XD12", + }, + }, + IdempotencyKey: "ec78c477-b1c3-4899-a209-a4e71337c996", + } + _, invocationErr := client.Loyalty.Programs.Promotions.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLoyaltyProgramsPromotionsCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLoyaltyProgramsPromotionsCreateWithWireMock", "POST", "/v2/loyalty/programs/program_id/promotions", nil, 1) +} + +func TestLoyaltyProgramsPromotionsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &programs.GetPromotionsRequest{ + ProgramID: "program_id", + PromotionID: "promotion_id", + } + _, invocationErr := client.Loyalty.Programs.Promotions.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLoyaltyProgramsPromotionsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLoyaltyProgramsPromotionsGetWithWireMock", "GET", "/v2/loyalty/programs/program_id/promotions/promotion_id", nil, 1) +} + +func TestLoyaltyProgramsPromotionsCancelWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &programs.CancelPromotionsRequest{ + ProgramID: "program_id", + PromotionID: "promotion_id", + } + _, invocationErr := client.Loyalty.Programs.Promotions.Cancel( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLoyaltyProgramsPromotionsCancelWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLoyaltyProgramsPromotionsCancelWithWireMock", "POST", "/v2/loyalty/programs/program_id/promotions/promotion_id/cancel", nil, 1) +} diff --git a/loyalty/programs/promotions_test.go b/loyalty/programs/promotions_test.go new file mode 100644 index 0000000..bc46c11 --- /dev/null +++ b/loyalty/programs/promotions_test.go @@ -0,0 +1,385 @@ +// Code generated by Fern. DO NOT EDIT. + +package programs + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersCancelPromotionsRequest(t *testing.T) { + t.Run("SetProgramID", func(t *testing.T) { + obj := &CancelPromotionsRequest{} + var fernTestValueProgramID string + obj.SetProgramID(fernTestValueProgramID) + assert.Equal(t, fernTestValueProgramID, obj.ProgramID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPromotionID", func(t *testing.T) { + obj := &CancelPromotionsRequest{} + var fernTestValuePromotionID string + obj.SetPromotionID(fernTestValuePromotionID) + assert.Equal(t, fernTestValuePromotionID, obj.PromotionID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCancelPromotionsRequest(t *testing.T) { + t.Run("SetProgramID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelPromotionsRequest{} + var fernTestValueProgramID string + + // Act + obj.SetProgramID(fernTestValueProgramID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPromotionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelPromotionsRequest{} + var fernTestValuePromotionID string + + // Act + obj.SetPromotionID(fernTestValuePromotionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateLoyaltyPromotionRequest(t *testing.T) { + t.Run("SetProgramID", func(t *testing.T) { + obj := &CreateLoyaltyPromotionRequest{} + var fernTestValueProgramID string + obj.SetProgramID(fernTestValueProgramID) + assert.Equal(t, fernTestValueProgramID, obj.ProgramID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateLoyaltyPromotionRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateLoyaltyPromotionRequest(t *testing.T) { + t.Run("SetProgramID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLoyaltyPromotionRequest{} + var fernTestValueProgramID string + + // Act + obj.SetProgramID(fernTestValueProgramID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLoyaltyPromotionRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetPromotionsRequest(t *testing.T) { + t.Run("SetProgramID", func(t *testing.T) { + obj := &GetPromotionsRequest{} + var fernTestValueProgramID string + obj.SetProgramID(fernTestValueProgramID) + assert.Equal(t, fernTestValueProgramID, obj.ProgramID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPromotionID", func(t *testing.T) { + obj := &GetPromotionsRequest{} + var fernTestValuePromotionID string + obj.SetPromotionID(fernTestValuePromotionID) + assert.Equal(t, fernTestValuePromotionID, obj.PromotionID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetPromotionsRequest(t *testing.T) { + t.Run("SetProgramID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPromotionsRequest{} + var fernTestValueProgramID string + + // Act + obj.SetProgramID(fernTestValueProgramID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPromotionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPromotionsRequest{} + var fernTestValuePromotionID string + + // Act + obj.SetPromotionID(fernTestValuePromotionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListPromotionsRequest(t *testing.T) { + t.Run("SetProgramID", func(t *testing.T) { + obj := &ListPromotionsRequest{} + var fernTestValueProgramID string + obj.SetProgramID(fernTestValueProgramID) + assert.Equal(t, fernTestValueProgramID, obj.ProgramID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListPromotionsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListPromotionsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListPromotionsRequest(t *testing.T) { + t.Run("SetProgramID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPromotionsRequest{} + var fernTestValueProgramID string + + // Act + obj.SetProgramID(fernTestValueProgramID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPromotionsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPromotionsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/loyalty/programs_test.go b/loyalty/programs_test.go new file mode 100644 index 0000000..940660b --- /dev/null +++ b/loyalty/programs_test.go @@ -0,0 +1,178 @@ +// Code generated by Fern. DO NOT EDIT. + +package loyalty + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersCalculateLoyaltyPointsRequest(t *testing.T) { + t.Run("SetProgramID", func(t *testing.T) { + obj := &CalculateLoyaltyPointsRequest{} + var fernTestValueProgramID string + obj.SetProgramID(fernTestValueProgramID) + assert.Equal(t, fernTestValueProgramID, obj.ProgramID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrderID", func(t *testing.T) { + obj := &CalculateLoyaltyPointsRequest{} + var fernTestValueOrderID *string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLoyaltyAccountID", func(t *testing.T) { + obj := &CalculateLoyaltyPointsRequest{} + var fernTestValueLoyaltyAccountID *string + obj.SetLoyaltyAccountID(fernTestValueLoyaltyAccountID) + assert.Equal(t, fernTestValueLoyaltyAccountID, obj.LoyaltyAccountID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCalculateLoyaltyPointsRequest(t *testing.T) { + t.Run("SetProgramID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CalculateLoyaltyPointsRequest{} + var fernTestValueProgramID string + + // Act + obj.SetProgramID(fernTestValueProgramID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CalculateLoyaltyPointsRequest{} + var fernTestValueOrderID *string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLoyaltyAccountID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CalculateLoyaltyPointsRequest{} + var fernTestValueLoyaltyAccountID *string + + // Act + obj.SetLoyaltyAccountID(fernTestValueLoyaltyAccountID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetProgramsRequest(t *testing.T) { + t.Run("SetProgramID", func(t *testing.T) { + obj := &GetProgramsRequest{} + var fernTestValueProgramID string + obj.SetProgramID(fernTestValueProgramID) + assert.Equal(t, fernTestValueProgramID, obj.ProgramID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetProgramsRequest(t *testing.T) { + t.Run("SetProgramID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetProgramsRequest{} + var fernTestValueProgramID string + + // Act + obj.SetProgramID(fernTestValueProgramID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/loyalty/rewards.go b/loyalty/rewards.go index 9722159..b0e1e4d 100644 --- a/loyalty/rewards.go +++ b/loyalty/rewards.go @@ -3,7 +3,9 @@ package loyalty import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" big "math/big" ) @@ -14,7 +16,7 @@ var ( type CreateLoyaltyRewardRequest struct { // The reward to create. - Reward *v3.LoyaltyReward `json:"reward,omitempty" url:"-"` + Reward *v3.LoyaltyReward `json:"reward" url:"-"` // A unique string that identifies this `CreateLoyaltyReward` request. // Keys can be any valid string, but must be unique for every request. IdempotencyKey string `json:"idempotency_key" url:"-"` @@ -44,6 +46,27 @@ func (c *CreateLoyaltyRewardRequest) SetIdempotencyKey(idempotencyKey string) { c.require(createLoyaltyRewardRequestFieldIdempotencyKey) } +func (c *CreateLoyaltyRewardRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateLoyaltyRewardRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateLoyaltyRewardRequest(body) + return nil +} + +func (c *CreateLoyaltyRewardRequest) MarshalJSON() ([]byte, error) { + type embed CreateLoyaltyRewardRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( deleteRewardsRequestFieldRewardID = big.NewInt(1 << 0) ) @@ -143,6 +166,27 @@ func (r *RedeemLoyaltyRewardRequest) SetLocationID(locationID string) { r.require(redeemLoyaltyRewardRequestFieldLocationID) } +func (r *RedeemLoyaltyRewardRequest) UnmarshalJSON(data []byte) error { + type unmarshaler RedeemLoyaltyRewardRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *r = RedeemLoyaltyRewardRequest(body) + return nil +} + +func (r *RedeemLoyaltyRewardRequest) MarshalJSON() ([]byte, error) { + type embed RedeemLoyaltyRewardRequest + var marshaler = struct { + embed + }{ + embed: embed(*r), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, r.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( searchLoyaltyRewardsRequestFieldQuery = big.NewInt(1 << 0) searchLoyaltyRewardsRequestFieldLimit = big.NewInt(1 << 1) @@ -193,3 +237,24 @@ func (s *SearchLoyaltyRewardsRequest) SetCursor(cursor *string) { s.Cursor = cursor s.require(searchLoyaltyRewardsRequestFieldCursor) } + +func (s *SearchLoyaltyRewardsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler SearchLoyaltyRewardsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *s = SearchLoyaltyRewardsRequest(body) + return nil +} + +func (s *SearchLoyaltyRewardsRequest) MarshalJSON() ([]byte, error) { + type embed SearchLoyaltyRewardsRequest + var marshaler = struct { + embed + }{ + embed: embed(*s), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, s.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/loyalty/rewards/loyalty_rewards_test/loyalty_rewards_test.go b/loyalty/rewards/loyalty_rewards_test/loyalty_rewards_test.go new file mode 100644 index 0000000..0294b8d --- /dev/null +++ b/loyalty/rewards/loyalty_rewards_test/loyalty_rewards_test.go @@ -0,0 +1,203 @@ +// Code generated by Fern. DO NOT EDIT. + +package loyalty_rewards_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + loyalty "github.com/square/square-go-sdk/v3/loyalty" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestLoyaltyRewardsCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &loyalty.CreateLoyaltyRewardRequest{ + Reward: &square.LoyaltyReward{ + LoyaltyAccountID: "5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd", + RewardTierID: "e1b39225-9da5-43d1-a5db-782cdd8ad94f", + OrderID: square.String( + "RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY", + ), + }, + IdempotencyKey: "18c2e5ea-a620-4b1f-ad60-7b167285e451", + } + _, invocationErr := client.Loyalty.Rewards.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLoyaltyRewardsCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLoyaltyRewardsCreateWithWireMock", "POST", "/v2/loyalty/rewards", nil, 1) +} + +func TestLoyaltyRewardsSearchWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &loyalty.SearchLoyaltyRewardsRequest{ + Query: &square.SearchLoyaltyRewardsRequestLoyaltyRewardQuery{ + LoyaltyAccountID: "5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd", + }, + Limit: square.Int( + 10, + ), + } + _, invocationErr := client.Loyalty.Rewards.Search( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLoyaltyRewardsSearchWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLoyaltyRewardsSearchWithWireMock", "POST", "/v2/loyalty/rewards/search", nil, 1) +} + +func TestLoyaltyRewardsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &loyalty.GetRewardsRequest{ + RewardID: "reward_id", + } + _, invocationErr := client.Loyalty.Rewards.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLoyaltyRewardsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLoyaltyRewardsGetWithWireMock", "GET", "/v2/loyalty/rewards/reward_id", nil, 1) +} + +func TestLoyaltyRewardsDeleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &loyalty.DeleteRewardsRequest{ + RewardID: "reward_id", + } + _, invocationErr := client.Loyalty.Rewards.Delete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLoyaltyRewardsDeleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLoyaltyRewardsDeleteWithWireMock", "DELETE", "/v2/loyalty/rewards/reward_id", nil, 1) +} + +func TestLoyaltyRewardsRedeemWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &loyalty.RedeemLoyaltyRewardRequest{ + RewardID: "reward_id", + IdempotencyKey: "98adc7f7-6963-473b-b29c-f3c9cdd7d994", + LocationID: "P034NEENMD09F", + } + _, invocationErr := client.Loyalty.Rewards.Redeem( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestLoyaltyRewardsRedeemWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestLoyaltyRewardsRedeemWithWireMock", "POST", "/v2/loyalty/rewards/reward_id/redeem", nil, 1) +} diff --git a/loyalty/rewards_test.go b/loyalty/rewards_test.go new file mode 100644 index 0000000..e1d7003 --- /dev/null +++ b/loyalty/rewards_test.go @@ -0,0 +1,352 @@ +// Code generated by Fern. DO NOT EDIT. + +package loyalty + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersCreateLoyaltyRewardRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateLoyaltyRewardRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateLoyaltyRewardRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLoyaltyRewardRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteRewardsRequest(t *testing.T) { + t.Run("SetRewardID", func(t *testing.T) { + obj := &DeleteRewardsRequest{} + var fernTestValueRewardID string + obj.SetRewardID(fernTestValueRewardID) + assert.Equal(t, fernTestValueRewardID, obj.RewardID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDeleteRewardsRequest(t *testing.T) { + t.Run("SetRewardID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteRewardsRequest{} + var fernTestValueRewardID string + + // Act + obj.SetRewardID(fernTestValueRewardID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetRewardsRequest(t *testing.T) { + t.Run("SetRewardID", func(t *testing.T) { + obj := &GetRewardsRequest{} + var fernTestValueRewardID string + obj.SetRewardID(fernTestValueRewardID) + assert.Equal(t, fernTestValueRewardID, obj.RewardID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetRewardsRequest(t *testing.T) { + t.Run("SetRewardID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetRewardsRequest{} + var fernTestValueRewardID string + + // Act + obj.SetRewardID(fernTestValueRewardID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRedeemLoyaltyRewardRequest(t *testing.T) { + t.Run("SetRewardID", func(t *testing.T) { + obj := &RedeemLoyaltyRewardRequest{} + var fernTestValueRewardID string + obj.SetRewardID(fernTestValueRewardID) + assert.Equal(t, fernTestValueRewardID, obj.RewardID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &RedeemLoyaltyRewardRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &RedeemLoyaltyRewardRequest{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitRedeemLoyaltyRewardRequest(t *testing.T) { + t.Run("SetRewardID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RedeemLoyaltyRewardRequest{} + var fernTestValueRewardID string + + // Act + obj.SetRewardID(fernTestValueRewardID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RedeemLoyaltyRewardRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RedeemLoyaltyRewardRequest{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchLoyaltyRewardsRequest(t *testing.T) { + t.Run("SetLimit", func(t *testing.T) { + obj := &SearchLoyaltyRewardsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchLoyaltyRewardsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitSearchLoyaltyRewardsRequest(t *testing.T) { + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyRewardsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyRewardsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/loyalty_test.go b/loyalty_test.go new file mode 100644 index 0000000..ad24611 --- /dev/null +++ b/loyalty_test.go @@ -0,0 +1,1769 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersSearchLoyaltyEventsRequest(t *testing.T) { + t.Run("SetQuery", func(t *testing.T) { + obj := &SearchLoyaltyEventsRequest{} + var fernTestValueQuery *LoyaltyEventQuery + obj.SetQuery(fernTestValueQuery) + assert.Equal(t, fernTestValueQuery, obj.Query) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &SearchLoyaltyEventsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchLoyaltyEventsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitSearchLoyaltyEventsRequest(t *testing.T) { + t.Run("SetQuery_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyEventsRequest{} + var fernTestValueQuery *LoyaltyEventQuery + + // Act + obj.SetQuery(fernTestValueQuery) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyEventsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyEventsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyEventDateTimeFilter(t *testing.T) { + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LoyaltyEventDateTimeFilter{} + var fernTestValueCreatedAt *TimeRange + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyEventDateTimeFilter(t *testing.T) { + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventDateTimeFilter{} + var expected *TimeRange + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventDateTimeFilter{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventDateTimeFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyEventDateTimeFilter(t *testing.T) { + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventDateTimeFilter{} + var fernTestValueCreatedAt *TimeRange + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyEventFilter(t *testing.T) { + t.Run("SetLoyaltyAccountFilter", func(t *testing.T) { + obj := &LoyaltyEventFilter{} + var fernTestValueLoyaltyAccountFilter *LoyaltyEventLoyaltyAccountFilter + obj.SetLoyaltyAccountFilter(fernTestValueLoyaltyAccountFilter) + assert.Equal(t, fernTestValueLoyaltyAccountFilter, obj.LoyaltyAccountFilter) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTypeFilter", func(t *testing.T) { + obj := &LoyaltyEventFilter{} + var fernTestValueTypeFilter *LoyaltyEventTypeFilter + obj.SetTypeFilter(fernTestValueTypeFilter) + assert.Equal(t, fernTestValueTypeFilter, obj.TypeFilter) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDateTimeFilter", func(t *testing.T) { + obj := &LoyaltyEventFilter{} + var fernTestValueDateTimeFilter *LoyaltyEventDateTimeFilter + obj.SetDateTimeFilter(fernTestValueDateTimeFilter) + assert.Equal(t, fernTestValueDateTimeFilter, obj.DateTimeFilter) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationFilter", func(t *testing.T) { + obj := &LoyaltyEventFilter{} + var fernTestValueLocationFilter *LoyaltyEventLocationFilter + obj.SetLocationFilter(fernTestValueLocationFilter) + assert.Equal(t, fernTestValueLocationFilter, obj.LocationFilter) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrderFilter", func(t *testing.T) { + obj := &LoyaltyEventFilter{} + var fernTestValueOrderFilter *LoyaltyEventOrderFilter + obj.SetOrderFilter(fernTestValueOrderFilter) + assert.Equal(t, fernTestValueOrderFilter, obj.OrderFilter) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyEventFilter(t *testing.T) { + t.Run("GetLoyaltyAccountFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventFilter{} + var expected *LoyaltyEventLoyaltyAccountFilter + obj.LoyaltyAccountFilter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyAccountFilter(), "getter should return the property value") + }) + + t.Run("GetLoyaltyAccountFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventFilter{} + obj.LoyaltyAccountFilter = nil + + // Act & Assert + assert.Nil(t, obj.GetLoyaltyAccountFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetLoyaltyAccountFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyAccountFilter() // Should return zero value + }) + + t.Run("GetTypeFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventFilter{} + var expected *LoyaltyEventTypeFilter + obj.TypeFilter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTypeFilter(), "getter should return the property value") + }) + + t.Run("GetTypeFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventFilter{} + obj.TypeFilter = nil + + // Act & Assert + assert.Nil(t, obj.GetTypeFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetTypeFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTypeFilter() // Should return zero value + }) + + t.Run("GetDateTimeFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventFilter{} + var expected *LoyaltyEventDateTimeFilter + obj.DateTimeFilter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDateTimeFilter(), "getter should return the property value") + }) + + t.Run("GetDateTimeFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventFilter{} + obj.DateTimeFilter = nil + + // Act & Assert + assert.Nil(t, obj.GetDateTimeFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetDateTimeFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDateTimeFilter() // Should return zero value + }) + + t.Run("GetLocationFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventFilter{} + var expected *LoyaltyEventLocationFilter + obj.LocationFilter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationFilter(), "getter should return the property value") + }) + + t.Run("GetLocationFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventFilter{} + obj.LocationFilter = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationFilter() // Should return zero value + }) + + t.Run("GetOrderFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventFilter{} + var expected *LoyaltyEventOrderFilter + obj.OrderFilter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderFilter(), "getter should return the property value") + }) + + t.Run("GetOrderFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventFilter{} + obj.OrderFilter = nil + + // Act & Assert + assert.Nil(t, obj.GetOrderFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetOrderFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderFilter() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyEventFilter(t *testing.T) { + t.Run("SetLoyaltyAccountFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventFilter{} + var fernTestValueLoyaltyAccountFilter *LoyaltyEventLoyaltyAccountFilter + + // Act + obj.SetLoyaltyAccountFilter(fernTestValueLoyaltyAccountFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTypeFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventFilter{} + var fernTestValueTypeFilter *LoyaltyEventTypeFilter + + // Act + obj.SetTypeFilter(fernTestValueTypeFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDateTimeFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventFilter{} + var fernTestValueDateTimeFilter *LoyaltyEventDateTimeFilter + + // Act + obj.SetDateTimeFilter(fernTestValueDateTimeFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventFilter{} + var fernTestValueLocationFilter *LoyaltyEventLocationFilter + + // Act + obj.SetLocationFilter(fernTestValueLocationFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrderFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventFilter{} + var fernTestValueOrderFilter *LoyaltyEventOrderFilter + + // Act + obj.SetOrderFilter(fernTestValueOrderFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyEventLocationFilter(t *testing.T) { + t.Run("SetLocationIDs", func(t *testing.T) { + obj := &LoyaltyEventLocationFilter{} + var fernTestValueLocationIDs []string + obj.SetLocationIDs(fernTestValueLocationIDs) + assert.Equal(t, fernTestValueLocationIDs, obj.LocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyEventLocationFilter(t *testing.T) { + t.Run("GetLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventLocationFilter{} + var expected []string + obj.LocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationIDs(), "getter should return the property value") + }) + + t.Run("GetLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventLocationFilter{} + obj.LocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventLocationFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationIDs() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyEventLocationFilter(t *testing.T) { + t.Run("SetLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventLocationFilter{} + var fernTestValueLocationIDs []string + + // Act + obj.SetLocationIDs(fernTestValueLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyEventLoyaltyAccountFilter(t *testing.T) { + t.Run("SetLoyaltyAccountID", func(t *testing.T) { + obj := &LoyaltyEventLoyaltyAccountFilter{} + var fernTestValueLoyaltyAccountID string + obj.SetLoyaltyAccountID(fernTestValueLoyaltyAccountID) + assert.Equal(t, fernTestValueLoyaltyAccountID, obj.LoyaltyAccountID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyEventLoyaltyAccountFilter(t *testing.T) { + t.Run("GetLoyaltyAccountID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventLoyaltyAccountFilter{} + var expected string + obj.LoyaltyAccountID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyAccountID(), "getter should return the property value") + }) + + t.Run("GetLoyaltyAccountID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventLoyaltyAccountFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyAccountID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyEventLoyaltyAccountFilter(t *testing.T) { + t.Run("SetLoyaltyAccountID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventLoyaltyAccountFilter{} + var fernTestValueLoyaltyAccountID string + + // Act + obj.SetLoyaltyAccountID(fernTestValueLoyaltyAccountID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyEventOrderFilter(t *testing.T) { + t.Run("SetOrderID", func(t *testing.T) { + obj := &LoyaltyEventOrderFilter{} + var fernTestValueOrderID string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyEventOrderFilter(t *testing.T) { + t.Run("GetOrderID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventOrderFilter{} + var expected string + obj.OrderID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderID(), "getter should return the property value") + }) + + t.Run("GetOrderID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventOrderFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyEventOrderFilter(t *testing.T) { + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventOrderFilter{} + var fernTestValueOrderID string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyEventQuery(t *testing.T) { + t.Run("SetFilter", func(t *testing.T) { + obj := &LoyaltyEventQuery{} + var fernTestValueFilter *LoyaltyEventFilter + obj.SetFilter(fernTestValueFilter) + assert.Equal(t, fernTestValueFilter, obj.Filter) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyEventQuery(t *testing.T) { + t.Run("GetFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventQuery{} + var expected *LoyaltyEventFilter + obj.Filter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFilter(), "getter should return the property value") + }) + + t.Run("GetFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventQuery{} + obj.Filter = nil + + // Act & Assert + assert.Nil(t, obj.GetFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFilter() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyEventQuery(t *testing.T) { + t.Run("SetFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventQuery{} + var fernTestValueFilter *LoyaltyEventFilter + + // Act + obj.SetFilter(fernTestValueFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyEventTypeFilter(t *testing.T) { + t.Run("SetTypes", func(t *testing.T) { + obj := &LoyaltyEventTypeFilter{} + var fernTestValueTypes []LoyaltyEventType + obj.SetTypes(fernTestValueTypes) + assert.Equal(t, fernTestValueTypes, obj.Types) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyEventTypeFilter(t *testing.T) { + t.Run("GetTypes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventTypeFilter{} + var expected []LoyaltyEventType + obj.Types = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTypes(), "getter should return the property value") + }) + + t.Run("GetTypes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventTypeFilter{} + obj.Types = nil + + // Act & Assert + assert.Nil(t, obj.GetTypes(), "getter should return nil when property is nil") + }) + + t.Run("GetTypes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventTypeFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTypes() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyEventTypeFilter(t *testing.T) { + t.Run("SetTypes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventTypeFilter{} + var fernTestValueTypes []LoyaltyEventType + + // Act + obj.SetTypes(fernTestValueTypes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchLoyaltyEventsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &SearchLoyaltyEventsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEvents", func(t *testing.T) { + obj := &SearchLoyaltyEventsResponse{} + var fernTestValueEvents []*LoyaltyEvent + obj.SetEvents(fernTestValueEvents) + assert.Equal(t, fernTestValueEvents, obj.Events) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchLoyaltyEventsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchLoyaltyEventsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyEventsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyEventsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchLoyaltyEventsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetEvents", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyEventsResponse{} + var expected []*LoyaltyEvent + obj.Events = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEvents(), "getter should return the property value") + }) + + t.Run("GetEvents_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyEventsResponse{} + obj.Events = nil + + // Act & Assert + assert.Nil(t, obj.GetEvents(), "getter should return nil when property is nil") + }) + + t.Run("GetEvents_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchLoyaltyEventsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEvents() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyEventsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyEventsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchLoyaltyEventsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchLoyaltyEventsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyEventsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEvents_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyEventsResponse{} + var fernTestValueEvents []*LoyaltyEvent + + // Act + obj.SetEvents(fernTestValueEvents) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyEventsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingLoyaltyEventDateTimeFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventDateTimeFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyEventDateTimeFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventDateTimeFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventDateTimeFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyEventFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyEventFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyEventLocationFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventLocationFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyEventLocationFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventLocationFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventLocationFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyEventLoyaltyAccountFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventLoyaltyAccountFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyEventLoyaltyAccountFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventLoyaltyAccountFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventLoyaltyAccountFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyEventOrderFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventOrderFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyEventOrderFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventOrderFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventOrderFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyEventQuery(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventQuery{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyEventQuery + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventQuery + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventQuery + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyEventTypeFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventTypeFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyEventTypeFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventTypeFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventTypeFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchLoyaltyEventsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyEventsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchLoyaltyEventsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchLoyaltyEventsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchLoyaltyEventsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringLoyaltyEventDateTimeFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventDateTimeFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventDateTimeFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyEventFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyEventLocationFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventLocationFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventLocationFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyEventLoyaltyAccountFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventLoyaltyAccountFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventLoyaltyAccountFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyEventOrderFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventOrderFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventOrderFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyEventQuery(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventQuery{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventQuery + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyEventTypeFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventTypeFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventTypeFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchLoyaltyEventsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchLoyaltyEventsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchLoyaltyEventsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestExtraPropertiesLoyaltyEventDateTimeFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventDateTimeFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventDateTimeFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyEventFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyEventLocationFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventLocationFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventLocationFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyEventLoyaltyAccountFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventLoyaltyAccountFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventLoyaltyAccountFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyEventOrderFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventOrderFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventOrderFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyEventQuery(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventQuery{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventQuery + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyEventTypeFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventTypeFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventTypeFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchLoyaltyEventsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchLoyaltyEventsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchLoyaltyEventsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/merchants.go b/merchants.go index 2a3aa04..ff1f81b 100644 --- a/merchants.go +++ b/merchants.go @@ -96,6 +96,9 @@ func (g *GetMerchantResponse) GetMerchant() *Merchant { } func (g *GetMerchantResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -148,6 +151,9 @@ func (g *GetMerchantResponse) MarshalJSON() ([]byte, error) { } func (g *GetMerchantResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -203,6 +209,9 @@ func (l *ListMerchantsResponse) GetCursor() *int { } func (l *ListMerchantsResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -262,6 +271,9 @@ func (l *ListMerchantsResponse) MarshalJSON() ([]byte, error) { } func (l *ListMerchantsResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -372,6 +384,9 @@ func (m *Merchant) GetCreatedAt() *string { } func (m *Merchant) GetExtraProperties() map[string]interface{} { + if m == nil { + return nil + } return m.extraProperties } @@ -466,6 +481,9 @@ func (m *Merchant) MarshalJSON() ([]byte, error) { } func (m *Merchant) String() string { + if m == nil { + return "" + } if len(m.rawJSON) > 0 { if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value diff --git a/merchants/custom_attribute_definitions.go b/merchants/custom_attribute_definitions.go index 212d3f5..9a5841b 100644 --- a/merchants/custom_attribute_definitions.go +++ b/merchants/custom_attribute_definitions.go @@ -3,7 +3,9 @@ package merchants import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" big "math/big" ) @@ -18,7 +20,7 @@ type CreateMerchantCustomAttributeDefinitionRequest struct { // definition hosted on the Square CDN. For more information, including supported values and constraints, see // [Supported data types](https://developer.squareup.com/docs/devtools/customattributes/overview#supported-data-types). // - `name` is required unless `visibility` is set to `VISIBILITY_HIDDEN`. - CustomAttributeDefinition *v3.CustomAttributeDefinition `json:"custom_attribute_definition,omitempty" url:"-"` + CustomAttributeDefinition *v3.CustomAttributeDefinition `json:"custom_attribute_definition" url:"-"` // A unique identifier for this request, used to ensure idempotency. For more information, // see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"` @@ -48,6 +50,27 @@ func (c *CreateMerchantCustomAttributeDefinitionRequest) SetIdempotencyKey(idemp c.require(createMerchantCustomAttributeDefinitionRequestFieldIdempotencyKey) } +func (c *CreateMerchantCustomAttributeDefinitionRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateMerchantCustomAttributeDefinitionRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateMerchantCustomAttributeDefinitionRequest(body) + return nil +} + +func (c *CreateMerchantCustomAttributeDefinitionRequest) MarshalJSON() ([]byte, error) { + type embed CreateMerchantCustomAttributeDefinitionRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( deleteCustomAttributeDefinitionsRequestFieldKey = big.NewInt(1 << 0) ) @@ -186,7 +209,7 @@ type UpdateMerchantCustomAttributeDefinitionRequest struct { // The version field must match the current version of the custom attribute definition to enable // [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) // If this is not important for your application, version can be set to -1. For any other values, the request fails with a BAD_REQUEST error. - CustomAttributeDefinition *v3.CustomAttributeDefinition `json:"custom_attribute_definition,omitempty" url:"-"` + CustomAttributeDefinition *v3.CustomAttributeDefinition `json:"custom_attribute_definition" url:"-"` // A unique identifier for this request, used to ensure idempotency. For more information, // see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"` @@ -222,3 +245,24 @@ func (u *UpdateMerchantCustomAttributeDefinitionRequest) SetIdempotencyKey(idemp u.IdempotencyKey = idempotencyKey u.require(updateMerchantCustomAttributeDefinitionRequestFieldIdempotencyKey) } + +func (u *UpdateMerchantCustomAttributeDefinitionRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdateMerchantCustomAttributeDefinitionRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdateMerchantCustomAttributeDefinitionRequest(body) + return nil +} + +func (u *UpdateMerchantCustomAttributeDefinitionRequest) MarshalJSON() ([]byte, error) { + type embed UpdateMerchantCustomAttributeDefinitionRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/merchants/custom_attribute_definitions_test.go b/merchants/custom_attribute_definitions_test.go new file mode 100644 index 0000000..2e8dfeb --- /dev/null +++ b/merchants/custom_attribute_definitions_test.go @@ -0,0 +1,352 @@ +// Code generated by Fern. DO NOT EDIT. + +package merchants + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersCreateMerchantCustomAttributeDefinitionRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateMerchantCustomAttributeDefinitionRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateMerchantCustomAttributeDefinitionRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateMerchantCustomAttributeDefinitionRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetKey", func(t *testing.T) { + obj := &DeleteCustomAttributeDefinitionsRequest{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDeleteCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomAttributeDefinitionsRequest{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetKey", func(t *testing.T) { + obj := &GetCustomAttributeDefinitionsRequest{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &GetCustomAttributeDefinitionsRequest{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributeDefinitionsRequest{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributeDefinitionsRequest{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetLimit", func(t *testing.T) { + obj := &ListCustomAttributeDefinitionsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListCustomAttributeDefinitionsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributeDefinitionsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributeDefinitionsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateMerchantCustomAttributeDefinitionRequest(t *testing.T) { + t.Run("SetKey", func(t *testing.T) { + obj := &UpdateMerchantCustomAttributeDefinitionRequest{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &UpdateMerchantCustomAttributeDefinitionRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateMerchantCustomAttributeDefinitionRequest(t *testing.T) { + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateMerchantCustomAttributeDefinitionRequest{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateMerchantCustomAttributeDefinitionRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/merchants/custom_attributes.go b/merchants/custom_attributes.go index 23d4edc..e3d447c 100644 --- a/merchants/custom_attributes.go +++ b/merchants/custom_attributes.go @@ -3,7 +3,9 @@ package merchants import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" big "math/big" ) @@ -14,7 +16,7 @@ var ( type BulkDeleteMerchantCustomAttributesRequest struct { // The data used to update the `CustomAttribute` objects. // The keys must be unique and are used to map to the corresponding response. - Values map[string]*v3.BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest `json:"values,omitempty" url:"-"` + Values map[string]*v3.BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest `json:"values" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -34,6 +36,27 @@ func (b *BulkDeleteMerchantCustomAttributesRequest) SetValues(values map[string] b.require(bulkDeleteMerchantCustomAttributesRequestFieldValues) } +func (b *BulkDeleteMerchantCustomAttributesRequest) UnmarshalJSON(data []byte) error { + type unmarshaler BulkDeleteMerchantCustomAttributesRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *b = BulkDeleteMerchantCustomAttributesRequest(body) + return nil +} + +func (b *BulkDeleteMerchantCustomAttributesRequest) MarshalJSON() ([]byte, error) { + type embed BulkDeleteMerchantCustomAttributesRequest + var marshaler = struct { + embed + }{ + embed: embed(*b), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, b.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( bulkUpsertMerchantCustomAttributesRequestFieldValues = big.NewInt(1 << 0) ) @@ -42,7 +65,7 @@ type BulkUpsertMerchantCustomAttributesRequest struct { // A map containing 1 to 25 individual upsert requests. For each request, provide an // arbitrary ID that is unique for this `BulkUpsertMerchantCustomAttributes` request and the // information needed to create or update a custom attribute. - Values map[string]*v3.BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest `json:"values,omitempty" url:"-"` + Values map[string]*v3.BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest `json:"values" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -62,6 +85,27 @@ func (b *BulkUpsertMerchantCustomAttributesRequest) SetValues(values map[string] b.require(bulkUpsertMerchantCustomAttributesRequestFieldValues) } +func (b *BulkUpsertMerchantCustomAttributesRequest) UnmarshalJSON(data []byte) error { + type unmarshaler BulkUpsertMerchantCustomAttributesRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *b = BulkUpsertMerchantCustomAttributesRequest(body) + return nil +} + +func (b *BulkUpsertMerchantCustomAttributesRequest) MarshalJSON() ([]byte, error) { + type embed BulkUpsertMerchantCustomAttributesRequest + var marshaler = struct { + embed + }{ + embed: embed(*b), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, b.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( deleteCustomAttributesRequestFieldMerchantID = big.NewInt(1 << 0) deleteCustomAttributesRequestFieldKey = big.NewInt(1 << 1) @@ -255,7 +299,7 @@ type UpsertMerchantCustomAttributeRequest struct { // - The version field must match the current version of the custom attribute definition to enable // [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) // If this is not important for your application, version can be set to -1. For any other values, the request fails with a BAD_REQUEST error. - CustomAttribute *v3.CustomAttribute `json:"custom_attribute,omitempty" url:"-"` + CustomAttribute *v3.CustomAttribute `json:"custom_attribute" url:"-"` // A unique identifier for this request, used to ensure idempotency. For more information, // see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"` @@ -298,3 +342,24 @@ func (u *UpsertMerchantCustomAttributeRequest) SetIdempotencyKey(idempotencyKey u.IdempotencyKey = idempotencyKey u.require(upsertMerchantCustomAttributeRequestFieldIdempotencyKey) } + +func (u *UpsertMerchantCustomAttributeRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpsertMerchantCustomAttributeRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpsertMerchantCustomAttributeRequest(body) + return nil +} + +func (u *UpsertMerchantCustomAttributeRequest) MarshalJSON() ([]byte, error) { + type embed UpsertMerchantCustomAttributeRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/merchants/custom_attributes_test.go b/merchants/custom_attributes_test.go new file mode 100644 index 0000000..da5d0a9 --- /dev/null +++ b/merchants/custom_attributes_test.go @@ -0,0 +1,541 @@ +// Code generated by Fern. DO NOT EDIT. + +package merchants + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersDeleteCustomAttributesRequest(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &DeleteCustomAttributesRequest{} + var fernTestValueMerchantID string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetKey", func(t *testing.T) { + obj := &DeleteCustomAttributesRequest{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDeleteCustomAttributesRequest(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomAttributesRequest{} + var fernTestValueMerchantID string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomAttributesRequest{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetCustomAttributesRequest(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &GetCustomAttributesRequest{} + var fernTestValueMerchantID string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetKey", func(t *testing.T) { + obj := &GetCustomAttributesRequest{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetWithDefinition", func(t *testing.T) { + obj := &GetCustomAttributesRequest{} + var fernTestValueWithDefinition *bool + obj.SetWithDefinition(fernTestValueWithDefinition) + assert.Equal(t, fernTestValueWithDefinition, obj.WithDefinition) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &GetCustomAttributesRequest{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetCustomAttributesRequest(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributesRequest{} + var fernTestValueMerchantID string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributesRequest{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetWithDefinition_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributesRequest{} + var fernTestValueWithDefinition *bool + + // Act + obj.SetWithDefinition(fernTestValueWithDefinition) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributesRequest{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListCustomAttributesRequest(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &ListCustomAttributesRequest{} + var fernTestValueMerchantID string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListCustomAttributesRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListCustomAttributesRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetWithDefinitions", func(t *testing.T) { + obj := &ListCustomAttributesRequest{} + var fernTestValueWithDefinitions *bool + obj.SetWithDefinitions(fernTestValueWithDefinitions) + assert.Equal(t, fernTestValueWithDefinitions, obj.WithDefinitions) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListCustomAttributesRequest(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributesRequest{} + var fernTestValueMerchantID string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributesRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributesRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetWithDefinitions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributesRequest{} + var fernTestValueWithDefinitions *bool + + // Act + obj.SetWithDefinitions(fernTestValueWithDefinitions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpsertMerchantCustomAttributeRequest(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &UpsertMerchantCustomAttributeRequest{} + var fernTestValueMerchantID string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetKey", func(t *testing.T) { + obj := &UpsertMerchantCustomAttributeRequest{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &UpsertMerchantCustomAttributeRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpsertMerchantCustomAttributeRequest(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertMerchantCustomAttributeRequest{} + var fernTestValueMerchantID string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertMerchantCustomAttributeRequest{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertMerchantCustomAttributeRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/merchants/customattributedefinitions/merchants_custom_attribute_definitions_test/merchants_custom_attribute_definitions_test.go b/merchants/customattributedefinitions/merchants_custom_attribute_definitions_test/merchants_custom_attribute_definitions_test.go new file mode 100644 index 0000000..029e052 --- /dev/null +++ b/merchants/customattributedefinitions/merchants_custom_attribute_definitions_test/merchants_custom_attribute_definitions_test.go @@ -0,0 +1,218 @@ +// Code generated by Fern. DO NOT EDIT. + +package merchants_custom_attribute_definitions_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + merchants "github.com/square/square-go-sdk/v3/merchants" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestMerchantsCustomAttributeDefinitionsListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &merchants.ListCustomAttributeDefinitionsRequest{ + VisibilityFilter: square.VisibilityFilterAll.Ptr(), + Limit: square.Int( + 1, + ), + Cursor: square.String( + "cursor", + ), + } + _, invocationErr := client.Merchants.CustomAttributeDefinitions.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestMerchantsCustomAttributeDefinitionsListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestMerchantsCustomAttributeDefinitionsListWithWireMock", "GET", "/v2/merchants/custom-attribute-definitions", map[string]string{"visibility_filter": "ALL", "limit": "1", "cursor": "cursor"}, 1) +} + +func TestMerchantsCustomAttributeDefinitionsCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &merchants.CreateMerchantCustomAttributeDefinitionRequest{ + CustomAttributeDefinition: &square.CustomAttributeDefinition{ + Key: square.String( + "alternative_seller_name", + ), + Schema: map[string]any{ + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String", + }, + Name: square.String( + "Alternative Merchant Name", + ), + Description: square.String( + "This is the other name this merchant goes by.", + ), + Visibility: square.CustomAttributeDefinitionVisibilityVisibilityReadOnly.Ptr(), + }, + } + _, invocationErr := client.Merchants.CustomAttributeDefinitions.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestMerchantsCustomAttributeDefinitionsCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestMerchantsCustomAttributeDefinitionsCreateWithWireMock", "POST", "/v2/merchants/custom-attribute-definitions", nil, 1) +} + +func TestMerchantsCustomAttributeDefinitionsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &merchants.GetCustomAttributeDefinitionsRequest{ + Key: "key", + Version: square.Int( + 1, + ), + } + _, invocationErr := client.Merchants.CustomAttributeDefinitions.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestMerchantsCustomAttributeDefinitionsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestMerchantsCustomAttributeDefinitionsGetWithWireMock", "GET", "/v2/merchants/custom-attribute-definitions/key", map[string]string{"version": "1"}, 1) +} + +func TestMerchantsCustomAttributeDefinitionsUpdateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &merchants.UpdateMerchantCustomAttributeDefinitionRequest{ + Key: "key", + CustomAttributeDefinition: &square.CustomAttributeDefinition{ + Description: square.String( + "Update the description as desired.", + ), + Visibility: square.CustomAttributeDefinitionVisibilityVisibilityReadOnly.Ptr(), + }, + } + _, invocationErr := client.Merchants.CustomAttributeDefinitions.Update( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestMerchantsCustomAttributeDefinitionsUpdateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestMerchantsCustomAttributeDefinitionsUpdateWithWireMock", "PUT", "/v2/merchants/custom-attribute-definitions/key", nil, 1) +} + +func TestMerchantsCustomAttributeDefinitionsDeleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &merchants.DeleteCustomAttributeDefinitionsRequest{ + Key: "key", + } + _, invocationErr := client.Merchants.CustomAttributeDefinitions.Delete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestMerchantsCustomAttributeDefinitionsDeleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestMerchantsCustomAttributeDefinitionsDeleteWithWireMock", "DELETE", "/v2/merchants/custom-attribute-definitions/key", nil, 1) +} diff --git a/merchants/customattributes/merchants_custom_attributes_test/merchants_custom_attributes_test.go b/merchants/customattributes/merchants_custom_attributes_test/merchants_custom_attributes_test.go new file mode 100644 index 0000000..e997334 --- /dev/null +++ b/merchants/customattributes/merchants_custom_attributes_test/merchants_custom_attributes_test.go @@ -0,0 +1,266 @@ +// Code generated by Fern. DO NOT EDIT. + +package merchants_custom_attributes_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + merchants "github.com/square/square-go-sdk/v3/merchants" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestMerchantsCustomAttributesBatchDeleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &merchants.BulkDeleteMerchantCustomAttributesRequest{ + Values: map[string]*square.BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest{ + "id1": &square.BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest{ + Key: square.String( + "alternative_seller_name", + ), + }, + "id2": &square.BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest{ + Key: square.String( + "has_seen_tutorial", + ), + }, + }, + } + _, invocationErr := client.Merchants.CustomAttributes.BatchDelete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestMerchantsCustomAttributesBatchDeleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestMerchantsCustomAttributesBatchDeleteWithWireMock", "POST", "/v2/merchants/custom-attributes/bulk-delete", nil, 1) +} + +func TestMerchantsCustomAttributesBatchUpsertWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &merchants.BulkUpsertMerchantCustomAttributesRequest{ + Values: map[string]*square.BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest{ + "id1": &square.BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest{ + MerchantID: "DM7VKY8Q63GNP", + CustomAttribute: &square.CustomAttribute{ + Key: square.String( + "alternative_seller_name", + ), + Value: "Ultimate Sneaker Store", + }, + }, + "id2": &square.BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest{ + MerchantID: "DM7VKY8Q63GNP", + CustomAttribute: &square.CustomAttribute{ + Key: square.String( + "has_seen_tutorial", + ), + Value: true, + }, + }, + }, + } + _, invocationErr := client.Merchants.CustomAttributes.BatchUpsert( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestMerchantsCustomAttributesBatchUpsertWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestMerchantsCustomAttributesBatchUpsertWithWireMock", "POST", "/v2/merchants/custom-attributes/bulk-upsert", nil, 1) +} + +func TestMerchantsCustomAttributesListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &merchants.ListCustomAttributesRequest{ + MerchantID: "merchant_id", + VisibilityFilter: square.VisibilityFilterAll.Ptr(), + Limit: square.Int( + 1, + ), + Cursor: square.String( + "cursor", + ), + WithDefinitions: square.Bool( + true, + ), + } + _, invocationErr := client.Merchants.CustomAttributes.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestMerchantsCustomAttributesListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestMerchantsCustomAttributesListWithWireMock", "GET", "/v2/merchants/merchant_id/custom-attributes", map[string]string{"visibility_filter": "ALL", "limit": "1", "cursor": "cursor", "with_definitions": "true"}, 1) +} + +func TestMerchantsCustomAttributesGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &merchants.GetCustomAttributesRequest{ + MerchantID: "merchant_id", + Key: "key", + WithDefinition: square.Bool( + true, + ), + Version: square.Int( + 1, + ), + } + _, invocationErr := client.Merchants.CustomAttributes.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestMerchantsCustomAttributesGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestMerchantsCustomAttributesGetWithWireMock", "GET", "/v2/merchants/merchant_id/custom-attributes/key", map[string]string{"with_definition": "true", "version": "1"}, 1) +} + +func TestMerchantsCustomAttributesUpsertWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &merchants.UpsertMerchantCustomAttributeRequest{ + MerchantID: "merchant_id", + Key: "key", + CustomAttribute: &square.CustomAttribute{ + Value: "Ultimate Sneaker Store", + }, + } + _, invocationErr := client.Merchants.CustomAttributes.Upsert( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestMerchantsCustomAttributesUpsertWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestMerchantsCustomAttributesUpsertWithWireMock", "POST", "/v2/merchants/merchant_id/custom-attributes/key", nil, 1) +} + +func TestMerchantsCustomAttributesDeleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &merchants.DeleteCustomAttributesRequest{ + MerchantID: "merchant_id", + Key: "key", + } + _, invocationErr := client.Merchants.CustomAttributes.Delete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestMerchantsCustomAttributesDeleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestMerchantsCustomAttributesDeleteWithWireMock", "DELETE", "/v2/merchants/merchant_id/custom-attributes/key", nil, 1) +} diff --git a/merchants/merchants_test/merchants_test.go b/merchants/merchants_test/merchants_test.go new file mode 100644 index 0000000..f905cde --- /dev/null +++ b/merchants/merchants_test/merchants_test.go @@ -0,0 +1,115 @@ +// Code generated by Fern. DO NOT EDIT. + +package merchants_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestMerchantsListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.ListMerchantsRequest{ + Cursor: square.Int( + 1, + ), + } + _, invocationErr := client.Merchants.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestMerchantsListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestMerchantsListWithWireMock", "GET", "/v2/merchants", map[string]string{"cursor": "1"}, 1) +} + +func TestMerchantsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.GetMerchantsRequest{ + MerchantID: "merchant_id", + } + _, invocationErr := client.Merchants.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestMerchantsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestMerchantsGetWithWireMock", "GET", "/v2/merchants/merchant_id", nil, 1) +} diff --git a/merchants_test.go b/merchants_test.go new file mode 100644 index 0000000..c7c977e --- /dev/null +++ b/merchants_test.go @@ -0,0 +1,1298 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersGetMerchantsRequest(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &GetMerchantsRequest{} + var fernTestValueMerchantID string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetMerchantsRequest(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetMerchantsRequest{} + var fernTestValueMerchantID string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListMerchantsRequest(t *testing.T) { + t.Run("SetCursor", func(t *testing.T) { + obj := &ListMerchantsRequest{} + var fernTestValueCursor *int + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListMerchantsRequest(t *testing.T) { + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantsRequest{} + var fernTestValueCursor *int + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetMerchantResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetMerchantResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMerchant", func(t *testing.T) { + obj := &GetMerchantResponse{} + var fernTestValueMerchant *Merchant + obj.SetMerchant(fernTestValueMerchant) + assert.Equal(t, fernTestValueMerchant, obj.Merchant) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetMerchantResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetMerchantResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetMerchantResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetMerchantResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetMerchant", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetMerchantResponse{} + var expected *Merchant + obj.Merchant = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchant(), "getter should return the property value") + }) + + t.Run("GetMerchant_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetMerchantResponse{} + obj.Merchant = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchant(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchant_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetMerchantResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchant() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetMerchantResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetMerchantResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMerchant_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetMerchantResponse{} + var fernTestValueMerchant *Merchant + + // Act + obj.SetMerchant(fernTestValueMerchant) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListMerchantsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &ListMerchantsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMerchant", func(t *testing.T) { + obj := &ListMerchantsResponse{} + var fernTestValueMerchant []*Merchant + obj.SetMerchant(fernTestValueMerchant) + assert.Equal(t, fernTestValueMerchant, obj.Merchant) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListMerchantsResponse{} + var fernTestValueCursor *int + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListMerchantsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListMerchantsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetMerchant", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantsResponse{} + var expected []*Merchant + obj.Merchant = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchant(), "getter should return the property value") + }) + + t.Run("GetMerchant_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantsResponse{} + obj.Merchant = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchant(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchant_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListMerchantsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchant() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantsResponse{} + var expected *int + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListMerchantsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListMerchantsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMerchant_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantsResponse{} + var fernTestValueMerchant []*Merchant + + // Act + obj.SetMerchant(fernTestValueMerchant) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantsResponse{} + var fernTestValueCursor *int + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersMerchant(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &Merchant{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBusinessName", func(t *testing.T) { + obj := &Merchant{} + var fernTestValueBusinessName *string + obj.SetBusinessName(fernTestValueBusinessName) + assert.Equal(t, fernTestValueBusinessName, obj.BusinessName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCountry", func(t *testing.T) { + obj := &Merchant{} + var fernTestValueCountry Country + obj.SetCountry(fernTestValueCountry) + assert.Equal(t, fernTestValueCountry, obj.Country) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLanguageCode", func(t *testing.T) { + obj := &Merchant{} + var fernTestValueLanguageCode *string + obj.SetLanguageCode(fernTestValueLanguageCode) + assert.Equal(t, fernTestValueLanguageCode, obj.LanguageCode) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCurrency", func(t *testing.T) { + obj := &Merchant{} + var fernTestValueCurrency *Currency + obj.SetCurrency(fernTestValueCurrency) + assert.Equal(t, fernTestValueCurrency, obj.Currency) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &Merchant{} + var fernTestValueStatus *MerchantStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMainLocationID", func(t *testing.T) { + obj := &Merchant{} + var fernTestValueMainLocationID *string + obj.SetMainLocationID(fernTestValueMainLocationID) + assert.Equal(t, fernTestValueMainLocationID, obj.MainLocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &Merchant{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersMerchant(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Merchant{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Merchant{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Merchant + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetBusinessName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Merchant{} + var expected *string + obj.BusinessName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBusinessName(), "getter should return the property value") + }) + + t.Run("GetBusinessName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Merchant{} + obj.BusinessName = nil + + // Act & Assert + assert.Nil(t, obj.GetBusinessName(), "getter should return nil when property is nil") + }) + + t.Run("GetBusinessName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Merchant + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBusinessName() // Should return zero value + }) + + t.Run("GetCountry", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Merchant{} + var expected Country + obj.Country = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCountry(), "getter should return the property value") + }) + + t.Run("GetCountry_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Merchant + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCountry() // Should return zero value + }) + + t.Run("GetLanguageCode", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Merchant{} + var expected *string + obj.LanguageCode = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLanguageCode(), "getter should return the property value") + }) + + t.Run("GetLanguageCode_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Merchant{} + obj.LanguageCode = nil + + // Act & Assert + assert.Nil(t, obj.GetLanguageCode(), "getter should return nil when property is nil") + }) + + t.Run("GetLanguageCode_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Merchant + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLanguageCode() // Should return zero value + }) + + t.Run("GetCurrency", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Merchant{} + var expected *Currency + obj.Currency = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCurrency(), "getter should return the property value") + }) + + t.Run("GetCurrency_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Merchant{} + obj.Currency = nil + + // Act & Assert + assert.Nil(t, obj.GetCurrency(), "getter should return nil when property is nil") + }) + + t.Run("GetCurrency_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Merchant + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCurrency() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Merchant{} + var expected *MerchantStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Merchant{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Merchant + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetMainLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Merchant{} + var expected *string + obj.MainLocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMainLocationID(), "getter should return the property value") + }) + + t.Run("GetMainLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Merchant{} + obj.MainLocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetMainLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetMainLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Merchant + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMainLocationID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Merchant{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Merchant{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Merchant + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitMerchant(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Merchant{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBusinessName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Merchant{} + var fernTestValueBusinessName *string + + // Act + obj.SetBusinessName(fernTestValueBusinessName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCountry_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Merchant{} + var fernTestValueCountry Country + + // Act + obj.SetCountry(fernTestValueCountry) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLanguageCode_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Merchant{} + var fernTestValueLanguageCode *string + + // Act + obj.SetLanguageCode(fernTestValueLanguageCode) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCurrency_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Merchant{} + var fernTestValueCurrency *Currency + + // Act + obj.SetCurrency(fernTestValueCurrency) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Merchant{} + var fernTestValueStatus *MerchantStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMainLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Merchant{} + var fernTestValueMainLocationID *string + + // Act + obj.SetMainLocationID(fernTestValueMainLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Merchant{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingGetMerchantResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetMerchantResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetMerchantResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetMerchantResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetMerchantResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListMerchantsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListMerchantsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListMerchantsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListMerchantsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingMerchant(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Merchant{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Merchant + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Merchant + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Merchant + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringGetMerchantResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetMerchantResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetMerchantResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListMerchantsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListMerchantsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListMerchantsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringMerchant(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Merchant{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Merchant + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestEnumMerchantStatus(t *testing.T) { + t.Run("NewFromString_ACTIVE", func(t *testing.T) { + t.Parallel() + val, err := NewMerchantStatusFromString("ACTIVE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MerchantStatus("ACTIVE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INACTIVE", func(t *testing.T) { + t.Parallel() + val, err := NewMerchantStatusFromString("INACTIVE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MerchantStatus("INACTIVE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewMerchantStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewMerchantStatusFromString("ACTIVE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestExtraPropertiesGetMerchantResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetMerchantResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetMerchantResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListMerchantsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListMerchantsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListMerchantsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesMerchant(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Merchant{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Merchant + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/o_auth.go b/o_auth.go index 205c20a..4da9afe 100644 --- a/o_auth.go +++ b/o_auth.go @@ -175,6 +175,27 @@ func (o *ObtainTokenRequest) SetUseJwt(useJwt *bool) { o.require(obtainTokenRequestFieldUseJwt) } +func (o *ObtainTokenRequest) UnmarshalJSON(data []byte) error { + type unmarshaler ObtainTokenRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *o = ObtainTokenRequest(body) + return nil +} + +func (o *ObtainTokenRequest) MarshalJSON() ([]byte, error) { + type embed ObtainTokenRequest + var marshaler = struct { + embed + }{ + embed: embed(*o), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, o.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( revokeTokenRequestFieldClientID = big.NewInt(1 << 0) revokeTokenRequestFieldAccessToken = big.NewInt(1 << 1) @@ -236,6 +257,27 @@ func (r *RevokeTokenRequest) SetRevokeOnlyAccessToken(revokeOnlyAccessToken *boo r.require(revokeTokenRequestFieldRevokeOnlyAccessToken) } +func (r *RevokeTokenRequest) UnmarshalJSON(data []byte) error { + type unmarshaler RevokeTokenRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *r = RevokeTokenRequest(body) + return nil +} + +func (r *RevokeTokenRequest) MarshalJSON() ([]byte, error) { + type embed RevokeTokenRequest + var marshaler = struct { + embed + }{ + embed: embed(*r), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, r.explicitFields) + return json.Marshal(explicitMarshaler) +} + // Represents an [ObtainToken](api-endpoint:OAuth-ObtainToken) response. var ( obtainTokenResponseFieldAccessToken = big.NewInt(1 << 0) @@ -386,6 +428,9 @@ func (o *ObtainTokenResponse) GetRefreshTokenExpiresAt() *string { } func (o *ObtainTokenResponse) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -501,6 +546,9 @@ func (o *ObtainTokenResponse) MarshalJSON() ([]byte, error) { } func (o *ObtainTokenResponse) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -577,6 +625,9 @@ func (r *RetrieveTokenStatusResponse) GetErrors() []*Error { } func (r *RetrieveTokenStatusResponse) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -650,6 +701,9 @@ func (r *RetrieveTokenStatusResponse) MarshalJSON() ([]byte, error) { } func (r *RetrieveTokenStatusResponse) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -694,6 +748,9 @@ func (r *RevokeTokenResponse) GetErrors() []*Error { } func (r *RevokeTokenResponse) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -746,6 +803,9 @@ func (r *RevokeTokenResponse) MarshalJSON() ([]byte, error) { } func (r *RevokeTokenResponse) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value diff --git a/o_auth_test.go b/o_auth_test.go new file mode 100644 index 0000000..5b790ff --- /dev/null +++ b/o_auth_test.go @@ -0,0 +1,2146 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersObtainTokenRequest(t *testing.T) { + t.Run("SetClientID", func(t *testing.T) { + obj := &ObtainTokenRequest{} + var fernTestValueClientID string + obj.SetClientID(fernTestValueClientID) + assert.Equal(t, fernTestValueClientID, obj.ClientID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetClientSecret", func(t *testing.T) { + obj := &ObtainTokenRequest{} + var fernTestValueClientSecret *string + obj.SetClientSecret(fernTestValueClientSecret) + assert.Equal(t, fernTestValueClientSecret, obj.ClientSecret) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCode", func(t *testing.T) { + obj := &ObtainTokenRequest{} + var fernTestValueCode *string + obj.SetCode(fernTestValueCode) + assert.Equal(t, fernTestValueCode, obj.Code) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRedirectURI", func(t *testing.T) { + obj := &ObtainTokenRequest{} + var fernTestValueRedirectURI *string + obj.SetRedirectURI(fernTestValueRedirectURI) + assert.Equal(t, fernTestValueRedirectURI, obj.RedirectURI) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGrantType", func(t *testing.T) { + obj := &ObtainTokenRequest{} + var fernTestValueGrantType string + obj.SetGrantType(fernTestValueGrantType) + assert.Equal(t, fernTestValueGrantType, obj.GrantType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRefreshToken", func(t *testing.T) { + obj := &ObtainTokenRequest{} + var fernTestValueRefreshToken *string + obj.SetRefreshToken(fernTestValueRefreshToken) + assert.Equal(t, fernTestValueRefreshToken, obj.RefreshToken) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMigrationToken", func(t *testing.T) { + obj := &ObtainTokenRequest{} + var fernTestValueMigrationToken *string + obj.SetMigrationToken(fernTestValueMigrationToken) + assert.Equal(t, fernTestValueMigrationToken, obj.MigrationToken) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetScopes", func(t *testing.T) { + obj := &ObtainTokenRequest{} + var fernTestValueScopes []string + obj.SetScopes(fernTestValueScopes) + assert.Equal(t, fernTestValueScopes, obj.Scopes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetShortLived", func(t *testing.T) { + obj := &ObtainTokenRequest{} + var fernTestValueShortLived *bool + obj.SetShortLived(fernTestValueShortLived) + assert.Equal(t, fernTestValueShortLived, obj.ShortLived) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCodeVerifier", func(t *testing.T) { + obj := &ObtainTokenRequest{} + var fernTestValueCodeVerifier *string + obj.SetCodeVerifier(fernTestValueCodeVerifier) + assert.Equal(t, fernTestValueCodeVerifier, obj.CodeVerifier) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUseJwt", func(t *testing.T) { + obj := &ObtainTokenRequest{} + var fernTestValueUseJwt *bool + obj.SetUseJwt(fernTestValueUseJwt) + assert.Equal(t, fernTestValueUseJwt, obj.UseJwt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitObtainTokenRequest(t *testing.T) { + t.Run("SetClientID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenRequest{} + var fernTestValueClientID string + + // Act + obj.SetClientID(fernTestValueClientID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetClientSecret_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenRequest{} + var fernTestValueClientSecret *string + + // Act + obj.SetClientSecret(fernTestValueClientSecret) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCode_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenRequest{} + var fernTestValueCode *string + + // Act + obj.SetCode(fernTestValueCode) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRedirectURI_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenRequest{} + var fernTestValueRedirectURI *string + + // Act + obj.SetRedirectURI(fernTestValueRedirectURI) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGrantType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenRequest{} + var fernTestValueGrantType string + + // Act + obj.SetGrantType(fernTestValueGrantType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRefreshToken_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenRequest{} + var fernTestValueRefreshToken *string + + // Act + obj.SetRefreshToken(fernTestValueRefreshToken) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMigrationToken_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenRequest{} + var fernTestValueMigrationToken *string + + // Act + obj.SetMigrationToken(fernTestValueMigrationToken) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetScopes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenRequest{} + var fernTestValueScopes []string + + // Act + obj.SetScopes(fernTestValueScopes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetShortLived_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenRequest{} + var fernTestValueShortLived *bool + + // Act + obj.SetShortLived(fernTestValueShortLived) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCodeVerifier_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenRequest{} + var fernTestValueCodeVerifier *string + + // Act + obj.SetCodeVerifier(fernTestValueCodeVerifier) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUseJwt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenRequest{} + var fernTestValueUseJwt *bool + + // Act + obj.SetUseJwt(fernTestValueUseJwt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRevokeTokenRequest(t *testing.T) { + t.Run("SetClientID", func(t *testing.T) { + obj := &RevokeTokenRequest{} + var fernTestValueClientID *string + obj.SetClientID(fernTestValueClientID) + assert.Equal(t, fernTestValueClientID, obj.ClientID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAccessToken", func(t *testing.T) { + obj := &RevokeTokenRequest{} + var fernTestValueAccessToken *string + obj.SetAccessToken(fernTestValueAccessToken) + assert.Equal(t, fernTestValueAccessToken, obj.AccessToken) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMerchantID", func(t *testing.T) { + obj := &RevokeTokenRequest{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRevokeOnlyAccessToken", func(t *testing.T) { + obj := &RevokeTokenRequest{} + var fernTestValueRevokeOnlyAccessToken *bool + obj.SetRevokeOnlyAccessToken(fernTestValueRevokeOnlyAccessToken) + assert.Equal(t, fernTestValueRevokeOnlyAccessToken, obj.RevokeOnlyAccessToken) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitRevokeTokenRequest(t *testing.T) { + t.Run("SetClientID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RevokeTokenRequest{} + var fernTestValueClientID *string + + // Act + obj.SetClientID(fernTestValueClientID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAccessToken_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RevokeTokenRequest{} + var fernTestValueAccessToken *string + + // Act + obj.SetAccessToken(fernTestValueAccessToken) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RevokeTokenRequest{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRevokeOnlyAccessToken_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RevokeTokenRequest{} + var fernTestValueRevokeOnlyAccessToken *bool + + // Act + obj.SetRevokeOnlyAccessToken(fernTestValueRevokeOnlyAccessToken) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersObtainTokenResponse(t *testing.T) { + t.Run("SetAccessToken", func(t *testing.T) { + obj := &ObtainTokenResponse{} + var fernTestValueAccessToken *string + obj.SetAccessToken(fernTestValueAccessToken) + assert.Equal(t, fernTestValueAccessToken, obj.AccessToken) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTokenType", func(t *testing.T) { + obj := &ObtainTokenResponse{} + var fernTestValueTokenType *string + obj.SetTokenType(fernTestValueTokenType) + assert.Equal(t, fernTestValueTokenType, obj.TokenType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExpiresAt", func(t *testing.T) { + obj := &ObtainTokenResponse{} + var fernTestValueExpiresAt *string + obj.SetExpiresAt(fernTestValueExpiresAt) + assert.Equal(t, fernTestValueExpiresAt, obj.ExpiresAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMerchantID", func(t *testing.T) { + obj := &ObtainTokenResponse{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSubscriptionID", func(t *testing.T) { + obj := &ObtainTokenResponse{} + var fernTestValueSubscriptionID *string + obj.SetSubscriptionID(fernTestValueSubscriptionID) + assert.Equal(t, fernTestValueSubscriptionID, obj.SubscriptionID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPlanID", func(t *testing.T) { + obj := &ObtainTokenResponse{} + var fernTestValuePlanID *string + obj.SetPlanID(fernTestValuePlanID) + assert.Equal(t, fernTestValuePlanID, obj.PlanID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIDToken", func(t *testing.T) { + obj := &ObtainTokenResponse{} + var fernTestValueIDToken *string + obj.SetIDToken(fernTestValueIDToken) + assert.Equal(t, fernTestValueIDToken, obj.IDToken) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRefreshToken", func(t *testing.T) { + obj := &ObtainTokenResponse{} + var fernTestValueRefreshToken *string + obj.SetRefreshToken(fernTestValueRefreshToken) + assert.Equal(t, fernTestValueRefreshToken, obj.RefreshToken) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetShortLived", func(t *testing.T) { + obj := &ObtainTokenResponse{} + var fernTestValueShortLived *bool + obj.SetShortLived(fernTestValueShortLived) + assert.Equal(t, fernTestValueShortLived, obj.ShortLived) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &ObtainTokenResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRefreshTokenExpiresAt", func(t *testing.T) { + obj := &ObtainTokenResponse{} + var fernTestValueRefreshTokenExpiresAt *string + obj.SetRefreshTokenExpiresAt(fernTestValueRefreshTokenExpiresAt) + assert.Equal(t, fernTestValueRefreshTokenExpiresAt, obj.RefreshTokenExpiresAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersObtainTokenResponse(t *testing.T) { + t.Run("GetAccessToken", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + var expected *string + obj.AccessToken = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAccessToken(), "getter should return the property value") + }) + + t.Run("GetAccessToken_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + obj.AccessToken = nil + + // Act & Assert + assert.Nil(t, obj.GetAccessToken(), "getter should return nil when property is nil") + }) + + t.Run("GetAccessToken_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ObtainTokenResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAccessToken() // Should return zero value + }) + + t.Run("GetTokenType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + var expected *string + obj.TokenType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTokenType(), "getter should return the property value") + }) + + t.Run("GetTokenType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + obj.TokenType = nil + + // Act & Assert + assert.Nil(t, obj.GetTokenType(), "getter should return nil when property is nil") + }) + + t.Run("GetTokenType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ObtainTokenResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTokenType() // Should return zero value + }) + + t.Run("GetExpiresAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + var expected *string + obj.ExpiresAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExpiresAt(), "getter should return the property value") + }) + + t.Run("GetExpiresAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + obj.ExpiresAt = nil + + // Act & Assert + assert.Nil(t, obj.GetExpiresAt(), "getter should return nil when property is nil") + }) + + t.Run("GetExpiresAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ObtainTokenResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExpiresAt() // Should return zero value + }) + + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ObtainTokenResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetSubscriptionID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + var expected *string + obj.SubscriptionID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscriptionID(), "getter should return the property value") + }) + + t.Run("GetSubscriptionID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + obj.SubscriptionID = nil + + // Act & Assert + assert.Nil(t, obj.GetSubscriptionID(), "getter should return nil when property is nil") + }) + + t.Run("GetSubscriptionID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ObtainTokenResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscriptionID() // Should return zero value + }) + + t.Run("GetPlanID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + var expected *string + obj.PlanID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPlanID(), "getter should return the property value") + }) + + t.Run("GetPlanID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + obj.PlanID = nil + + // Act & Assert + assert.Nil(t, obj.GetPlanID(), "getter should return nil when property is nil") + }) + + t.Run("GetPlanID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ObtainTokenResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPlanID() // Should return zero value + }) + + t.Run("GetIDToken", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + var expected *string + obj.IDToken = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIDToken(), "getter should return the property value") + }) + + t.Run("GetIDToken_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + obj.IDToken = nil + + // Act & Assert + assert.Nil(t, obj.GetIDToken(), "getter should return nil when property is nil") + }) + + t.Run("GetIDToken_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ObtainTokenResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIDToken() // Should return zero value + }) + + t.Run("GetRefreshToken", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + var expected *string + obj.RefreshToken = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRefreshToken(), "getter should return the property value") + }) + + t.Run("GetRefreshToken_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + obj.RefreshToken = nil + + // Act & Assert + assert.Nil(t, obj.GetRefreshToken(), "getter should return nil when property is nil") + }) + + t.Run("GetRefreshToken_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ObtainTokenResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRefreshToken() // Should return zero value + }) + + t.Run("GetShortLived", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + var expected *bool + obj.ShortLived = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetShortLived(), "getter should return the property value") + }) + + t.Run("GetShortLived_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + obj.ShortLived = nil + + // Act & Assert + assert.Nil(t, obj.GetShortLived(), "getter should return nil when property is nil") + }) + + t.Run("GetShortLived_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ObtainTokenResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetShortLived() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ObtainTokenResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetRefreshTokenExpiresAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + var expected *string + obj.RefreshTokenExpiresAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRefreshTokenExpiresAt(), "getter should return the property value") + }) + + t.Run("GetRefreshTokenExpiresAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + obj.RefreshTokenExpiresAt = nil + + // Act & Assert + assert.Nil(t, obj.GetRefreshTokenExpiresAt(), "getter should return nil when property is nil") + }) + + t.Run("GetRefreshTokenExpiresAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ObtainTokenResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRefreshTokenExpiresAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitObtainTokenResponse(t *testing.T) { + t.Run("SetAccessToken_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + var fernTestValueAccessToken *string + + // Act + obj.SetAccessToken(fernTestValueAccessToken) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTokenType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + var fernTestValueTokenType *string + + // Act + obj.SetTokenType(fernTestValueTokenType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExpiresAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + var fernTestValueExpiresAt *string + + // Act + obj.SetExpiresAt(fernTestValueExpiresAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSubscriptionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + var fernTestValueSubscriptionID *string + + // Act + obj.SetSubscriptionID(fernTestValueSubscriptionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPlanID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + var fernTestValuePlanID *string + + // Act + obj.SetPlanID(fernTestValuePlanID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIDToken_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + var fernTestValueIDToken *string + + // Act + obj.SetIDToken(fernTestValueIDToken) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRefreshToken_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + var fernTestValueRefreshToken *string + + // Act + obj.SetRefreshToken(fernTestValueRefreshToken) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetShortLived_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + var fernTestValueShortLived *bool + + // Act + obj.SetShortLived(fernTestValueShortLived) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRefreshTokenExpiresAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + var fernTestValueRefreshTokenExpiresAt *string + + // Act + obj.SetRefreshTokenExpiresAt(fernTestValueRefreshTokenExpiresAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRetrieveTokenStatusResponse(t *testing.T) { + t.Run("SetScopes", func(t *testing.T) { + obj := &RetrieveTokenStatusResponse{} + var fernTestValueScopes []string + obj.SetScopes(fernTestValueScopes) + assert.Equal(t, fernTestValueScopes, obj.Scopes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExpiresAt", func(t *testing.T) { + obj := &RetrieveTokenStatusResponse{} + var fernTestValueExpiresAt *string + obj.SetExpiresAt(fernTestValueExpiresAt) + assert.Equal(t, fernTestValueExpiresAt, obj.ExpiresAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetClientID", func(t *testing.T) { + obj := &RetrieveTokenStatusResponse{} + var fernTestValueClientID *string + obj.SetClientID(fernTestValueClientID) + assert.Equal(t, fernTestValueClientID, obj.ClientID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMerchantID", func(t *testing.T) { + obj := &RetrieveTokenStatusResponse{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &RetrieveTokenStatusResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRetrieveTokenStatusResponse(t *testing.T) { + t.Run("GetScopes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTokenStatusResponse{} + var expected []string + obj.Scopes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetScopes(), "getter should return the property value") + }) + + t.Run("GetScopes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTokenStatusResponse{} + obj.Scopes = nil + + // Act & Assert + assert.Nil(t, obj.GetScopes(), "getter should return nil when property is nil") + }) + + t.Run("GetScopes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveTokenStatusResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetScopes() // Should return zero value + }) + + t.Run("GetExpiresAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTokenStatusResponse{} + var expected *string + obj.ExpiresAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExpiresAt(), "getter should return the property value") + }) + + t.Run("GetExpiresAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTokenStatusResponse{} + obj.ExpiresAt = nil + + // Act & Assert + assert.Nil(t, obj.GetExpiresAt(), "getter should return nil when property is nil") + }) + + t.Run("GetExpiresAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveTokenStatusResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExpiresAt() // Should return zero value + }) + + t.Run("GetClientID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTokenStatusResponse{} + var expected *string + obj.ClientID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetClientID(), "getter should return the property value") + }) + + t.Run("GetClientID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTokenStatusResponse{} + obj.ClientID = nil + + // Act & Assert + assert.Nil(t, obj.GetClientID(), "getter should return nil when property is nil") + }) + + t.Run("GetClientID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveTokenStatusResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetClientID() // Should return zero value + }) + + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTokenStatusResponse{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTokenStatusResponse{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveTokenStatusResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTokenStatusResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTokenStatusResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveTokenStatusResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRetrieveTokenStatusResponse(t *testing.T) { + t.Run("SetScopes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTokenStatusResponse{} + var fernTestValueScopes []string + + // Act + obj.SetScopes(fernTestValueScopes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExpiresAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTokenStatusResponse{} + var fernTestValueExpiresAt *string + + // Act + obj.SetExpiresAt(fernTestValueExpiresAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetClientID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTokenStatusResponse{} + var fernTestValueClientID *string + + // Act + obj.SetClientID(fernTestValueClientID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTokenStatusResponse{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTokenStatusResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRevokeTokenResponse(t *testing.T) { + t.Run("SetSuccess", func(t *testing.T) { + obj := &RevokeTokenResponse{} + var fernTestValueSuccess *bool + obj.SetSuccess(fernTestValueSuccess) + assert.Equal(t, fernTestValueSuccess, obj.Success) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &RevokeTokenResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRevokeTokenResponse(t *testing.T) { + t.Run("GetSuccess", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RevokeTokenResponse{} + var expected *bool + obj.Success = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSuccess(), "getter should return the property value") + }) + + t.Run("GetSuccess_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RevokeTokenResponse{} + obj.Success = nil + + // Act & Assert + assert.Nil(t, obj.GetSuccess(), "getter should return nil when property is nil") + }) + + t.Run("GetSuccess_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RevokeTokenResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSuccess() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RevokeTokenResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RevokeTokenResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RevokeTokenResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRevokeTokenResponse(t *testing.T) { + t.Run("SetSuccess_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RevokeTokenResponse{} + var fernTestValueSuccess *bool + + // Act + obj.SetSuccess(fernTestValueSuccess) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RevokeTokenResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingObtainTokenResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ObtainTokenResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ObtainTokenResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ObtainTokenResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ObtainTokenResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRetrieveTokenStatusResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTokenStatusResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RetrieveTokenStatusResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RetrieveTokenStatusResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RetrieveTokenStatusResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRevokeTokenResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RevokeTokenResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RevokeTokenResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RevokeTokenResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RevokeTokenResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringObtainTokenResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ObtainTokenResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ObtainTokenResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRetrieveTokenStatusResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RetrieveTokenStatusResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveTokenStatusResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRevokeTokenResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RevokeTokenResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RevokeTokenResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestExtraPropertiesObtainTokenResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ObtainTokenResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ObtainTokenResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRetrieveTokenStatusResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RetrieveTokenStatusResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveTokenStatusResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRevokeTokenResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RevokeTokenResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RevokeTokenResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/oauth/o_auth_test/o_auth_test.go b/oauth/o_auth_test/o_auth_test.go new file mode 100644 index 0000000..888a834 --- /dev/null +++ b/oauth/o_auth_test/o_auth_test.go @@ -0,0 +1,167 @@ +// Code generated by Fern. DO NOT EDIT. + +package o_auth_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestOAuthRevokeTokenWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.RevokeTokenRequest{ + ClientID: square.String( + "CLIENT_ID", + ), + AccessToken: square.String( + "ACCESS_TOKEN", + ), + } + _, invocationErr := client.OAuth.RevokeToken( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestOAuthRevokeTokenWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestOAuthRevokeTokenWithWireMock", "POST", "/oauth2/revoke", nil, 1) +} + +func TestOAuthObtainTokenWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.ObtainTokenRequest{ + ClientID: "sq0idp-uaPHILoPzWZk3tlJqlML0g", + ClientSecret: square.String( + "sq0csp-30a-4C_tVOnTh14Piza2BfTPBXyLafLPWSzY1qAjeBfM", + ), + Code: square.String( + "sq0cgb-l0SBqxs4uwxErTVyYOdemg", + ), + GrantType: "authorization_code", + } + _, invocationErr := client.OAuth.ObtainToken( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestOAuthObtainTokenWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestOAuthObtainTokenWithWireMock", "POST", "/oauth2/token", nil, 1) +} + +func TestOAuthRetrieveTokenStatusWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + _, invocationErr := client.OAuth.RetrieveTokenStatus( + context.TODO(), + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestOAuthRetrieveTokenStatusWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestOAuthRetrieveTokenStatusWithWireMock", "POST", "/oauth2/token/status", nil, 1) +} + +func TestOAuthAuthorizeWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + invocationErr := client.OAuth.Authorize( + context.TODO(), + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestOAuthAuthorizeWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestOAuthAuthorizeWithWireMock", "GET", "/oauth2/authorize", nil, 1) +} diff --git a/orders.go b/orders.go index d2b1790..bfb4744 100644 --- a/orders.go +++ b/orders.go @@ -19,7 +19,7 @@ type BatchGetOrdersRequest struct { // orders within the scope of the current authorization's merchant ID. LocationID *string `json:"location_id,omitempty" url:"-"` // The IDs of the orders to retrieve. A maximum of 100 orders can be retrieved per request. - OrderIDs []string `json:"order_ids,omitempty" url:"-"` + OrderIDs []string `json:"order_ids" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -46,6 +46,27 @@ func (b *BatchGetOrdersRequest) SetOrderIDs(orderIDs []string) { b.require(batchGetOrdersRequestFieldOrderIDs) } +func (b *BatchGetOrdersRequest) UnmarshalJSON(data []byte) error { + type unmarshaler BatchGetOrdersRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *b = BatchGetOrdersRequest(body) + return nil +} + +func (b *BatchGetOrdersRequest) MarshalJSON() ([]byte, error) { + type embed BatchGetOrdersRequest + var marshaler = struct { + embed + }{ + embed: embed(*b), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, b.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( calculateOrderRequestFieldOrder = big.NewInt(1 << 0) calculateOrderRequestFieldProposedRewards = big.NewInt(1 << 1) @@ -53,7 +74,7 @@ var ( type CalculateOrderRequest struct { // The order to be calculated. Expects the entire order, not a sparse update. - Order *Order `json:"order,omitempty" url:"-"` + Order *Order `json:"order" url:"-"` // Identifies one or more loyalty reward tiers to apply during the order calculation. // The discounts defined by the reward tiers are added to the order only to preview the // effect of applying the specified rewards. The rewards do not correspond to actual @@ -86,6 +107,27 @@ func (c *CalculateOrderRequest) SetProposedRewards(proposedRewards []*OrderRewar c.require(calculateOrderRequestFieldProposedRewards) } +func (c *CalculateOrderRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CalculateOrderRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CalculateOrderRequest(body) + return nil +} + +func (c *CalculateOrderRequest) MarshalJSON() ([]byte, error) { + type embed CalculateOrderRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( cloneOrderRequestFieldOrderID = big.NewInt(1 << 0) cloneOrderRequestFieldVersion = big.NewInt(1 << 1) @@ -142,6 +184,27 @@ func (c *CloneOrderRequest) SetIdempotencyKey(idempotencyKey *string) { c.require(cloneOrderRequestFieldIdempotencyKey) } +func (c *CloneOrderRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CloneOrderRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CloneOrderRequest(body) + return nil +} + +func (c *CloneOrderRequest) MarshalJSON() ([]byte, error) { + type embed CloneOrderRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( getOrdersRequestFieldOrderID = big.NewInt(1 << 0) ) @@ -229,6 +292,27 @@ func (p *PayOrderRequest) SetPaymentIDs(paymentIDs []string) { p.require(payOrderRequestFieldPaymentIDs) } +func (p *PayOrderRequest) UnmarshalJSON(data []byte) error { + type unmarshaler PayOrderRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *p = PayOrderRequest(body) + return nil +} + +func (p *PayOrderRequest) MarshalJSON() ([]byte, error) { + type embed PayOrderRequest + var marshaler = struct { + embed + }{ + embed: embed(*p), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, p.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( searchOrdersRequestFieldLocationIDs = big.NewInt(1 << 0) searchOrdersRequestFieldCursor = big.NewInt(1 << 1) @@ -308,6 +392,27 @@ func (s *SearchOrdersRequest) SetReturnEntries(returnEntries *bool) { s.require(searchOrdersRequestFieldReturnEntries) } +func (s *SearchOrdersRequest) UnmarshalJSON(data []byte) error { + type unmarshaler SearchOrdersRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *s = SearchOrdersRequest(body) + return nil +} + +func (s *SearchOrdersRequest) MarshalJSON() ([]byte, error) { + type embed SearchOrdersRequest + var marshaler = struct { + embed + }{ + embed: embed(*s), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, s.explicitFields) + return json.Marshal(explicitMarshaler) +} + // Defines the fields that are included in the response body of // a request to the `BatchRetrieveOrders` endpoint. var ( @@ -343,6 +448,9 @@ func (b *BatchGetOrdersResponse) GetErrors() []*Error { } func (b *BatchGetOrdersResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -395,6 +503,9 @@ func (b *BatchGetOrdersResponse) MarshalJSON() ([]byte, error) { } func (b *BatchGetOrdersResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -439,6 +550,9 @@ func (c *CalculateOrderResponse) GetErrors() []*Error { } func (c *CalculateOrderResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -491,6 +605,9 @@ func (c *CalculateOrderResponse) MarshalJSON() ([]byte, error) { } func (c *CalculateOrderResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -537,6 +654,9 @@ func (c *CloneOrderResponse) GetErrors() []*Error { } func (c *CloneOrderResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -589,6 +709,9 @@ func (c *CloneOrderResponse) MarshalJSON() ([]byte, error) { } func (c *CloneOrderResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -637,6 +760,9 @@ func (c *CreateOrderResponse) GetErrors() []*Error { } func (c *CreateOrderResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -689,6 +815,9 @@ func (c *CreateOrderResponse) MarshalJSON() ([]byte, error) { } func (c *CreateOrderResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -733,6 +862,9 @@ func (g *GetOrderResponse) GetErrors() []*Error { } func (g *GetOrderResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -785,6 +917,9 @@ func (g *GetOrderResponse) MarshalJSON() ([]byte, error) { } func (g *GetOrderResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -845,6 +980,9 @@ func (o *OrderEntry) GetLocationID() *string { } func (o *OrderEntry) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -904,6 +1042,9 @@ func (o *OrderEntry) MarshalJSON() ([]byte, error) { } func (o *OrderEntry) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -950,6 +1091,9 @@ func (p *PayOrderResponse) GetOrder() *Order { } func (p *PayOrderResponse) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -1002,6 +1146,9 @@ func (p *PayOrderResponse) MarshalJSON() ([]byte, error) { } func (p *PayOrderResponse) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -1041,6 +1188,9 @@ func (s *SearchOrdersCustomerFilter) GetCustomerIDs() []string { } func (s *SearchOrdersCustomerFilter) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -1086,6 +1236,9 @@ func (s *SearchOrdersCustomerFilter) MarshalJSON() ([]byte, error) { } func (s *SearchOrdersCustomerFilter) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -1160,6 +1313,9 @@ func (s *SearchOrdersDateTimeFilter) GetClosedAt() *TimeRange { } func (s *SearchOrdersDateTimeFilter) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -1219,6 +1375,9 @@ func (s *SearchOrdersDateTimeFilter) MarshalJSON() ([]byte, error) { } func (s *SearchOrdersDateTimeFilter) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -1299,6 +1458,9 @@ func (s *SearchOrdersFilter) GetCustomerFilter() *SearchOrdersCustomerFilter { } func (s *SearchOrdersFilter) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -1372,6 +1534,9 @@ func (s *SearchOrdersFilter) MarshalJSON() ([]byte, error) { } func (s *SearchOrdersFilter) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -1423,6 +1588,9 @@ func (s *SearchOrdersFulfillmentFilter) GetFulfillmentStates() []FulfillmentStat } func (s *SearchOrdersFulfillmentFilter) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -1475,6 +1643,9 @@ func (s *SearchOrdersFulfillmentFilter) MarshalJSON() ([]byte, error) { } func (s *SearchOrdersFulfillmentFilter) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -1520,6 +1691,9 @@ func (s *SearchOrdersQuery) GetSort() *SearchOrdersSort { } func (s *SearchOrdersQuery) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -1572,6 +1746,9 @@ func (s *SearchOrdersQuery) MarshalJSON() ([]byte, error) { } func (s *SearchOrdersQuery) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -1643,6 +1820,9 @@ func (s *SearchOrdersResponse) GetErrors() []*Error { } func (s *SearchOrdersResponse) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -1709,6 +1889,9 @@ func (s *SearchOrdersResponse) MarshalJSON() ([]byte, error) { } func (s *SearchOrdersResponse) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -1766,6 +1949,9 @@ func (s *SearchOrdersSort) GetSortOrder() *SortOrder { } func (s *SearchOrdersSort) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -1818,6 +2004,9 @@ func (s *SearchOrdersSort) MarshalJSON() ([]byte, error) { } func (s *SearchOrdersSort) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -1908,6 +2097,9 @@ func (s *SearchOrdersSourceFilter) GetSourceClientOus() []string { } func (s *SearchOrdersSourceFilter) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -1967,6 +2159,9 @@ func (s *SearchOrdersSourceFilter) MarshalJSON() ([]byte, error) { } func (s *SearchOrdersSourceFilter) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -2003,6 +2198,9 @@ func (s *SearchOrdersStateFilter) GetStates() []OrderState { } func (s *SearchOrdersStateFilter) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -2048,6 +2246,9 @@ func (s *SearchOrdersStateFilter) MarshalJSON() ([]byte, error) { } func (s *SearchOrdersStateFilter) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -2094,6 +2295,9 @@ func (u *UpdateOrderResponse) GetErrors() []*Error { } func (u *UpdateOrderResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -2146,6 +2350,9 @@ func (u *UpdateOrderResponse) MarshalJSON() ([]byte, error) { } func (u *UpdateOrderResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -2223,3 +2430,24 @@ func (u *UpdateOrderRequest) SetIdempotencyKey(idempotencyKey *string) { u.IdempotencyKey = idempotencyKey u.require(updateOrderRequestFieldIdempotencyKey) } + +func (u *UpdateOrderRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdateOrderRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdateOrderRequest(body) + return nil +} + +func (u *UpdateOrderRequest) MarshalJSON() ([]byte, error) { + type embed UpdateOrderRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/orders/custom_attribute_definitions.go b/orders/custom_attribute_definitions.go index 9bce1e8..a1c67f9 100644 --- a/orders/custom_attribute_definitions.go +++ b/orders/custom_attribute_definitions.go @@ -3,7 +3,9 @@ package orders import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" big "math/big" ) @@ -19,7 +21,7 @@ type CreateOrderCustomAttributeDefinitionRequest struct { // [Specifying the schema](https://developer.squareup.com/docs/customer-custom-attributes-api/custom-attribute-definitions#specify-schema). // - If provided, `name` must be unique (case-sensitive) across all visible customer-related custom attribute definitions for the seller. // - All custom attributes are visible in exported customer data, including those set to `VISIBILITY_HIDDEN`. - CustomAttributeDefinition *v3.CustomAttributeDefinition `json:"custom_attribute_definition,omitempty" url:"-"` + CustomAttributeDefinition *v3.CustomAttributeDefinition `json:"custom_attribute_definition" url:"-"` // A unique identifier for this request, used to ensure idempotency. // For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"` @@ -49,6 +51,27 @@ func (c *CreateOrderCustomAttributeDefinitionRequest) SetIdempotencyKey(idempote c.require(createOrderCustomAttributeDefinitionRequestFieldIdempotencyKey) } +func (c *CreateOrderCustomAttributeDefinitionRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateOrderCustomAttributeDefinitionRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateOrderCustomAttributeDefinitionRequest(body) + return nil +} + +func (c *CreateOrderCustomAttributeDefinitionRequest) MarshalJSON() ([]byte, error) { + type embed CreateOrderCustomAttributeDefinitionRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( deleteCustomAttributeDefinitionsRequestFieldKey = big.NewInt(1 << 0) ) @@ -177,7 +200,7 @@ type UpdateOrderCustomAttributeDefinitionRequest struct { // [Updatable definition fields](https://developer.squareup.com/docs/orders-custom-attributes-api/custom-attribute-definitions#updatable-definition-fields). // // To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) control, include the optional `version` field and specify the current version of the custom attribute definition. - CustomAttributeDefinition *v3.CustomAttributeDefinition `json:"custom_attribute_definition,omitempty" url:"-"` + CustomAttributeDefinition *v3.CustomAttributeDefinition `json:"custom_attribute_definition" url:"-"` // A unique identifier for this request, used to ensure idempotency. // For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"` @@ -213,3 +236,24 @@ func (u *UpdateOrderCustomAttributeDefinitionRequest) SetIdempotencyKey(idempote u.IdempotencyKey = idempotencyKey u.require(updateOrderCustomAttributeDefinitionRequestFieldIdempotencyKey) } + +func (u *UpdateOrderCustomAttributeDefinitionRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdateOrderCustomAttributeDefinitionRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdateOrderCustomAttributeDefinitionRequest(body) + return nil +} + +func (u *UpdateOrderCustomAttributeDefinitionRequest) MarshalJSON() ([]byte, error) { + type embed UpdateOrderCustomAttributeDefinitionRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/orders/custom_attribute_definitions_test.go b/orders/custom_attribute_definitions_test.go new file mode 100644 index 0000000..de710f7 --- /dev/null +++ b/orders/custom_attribute_definitions_test.go @@ -0,0 +1,352 @@ +// Code generated by Fern. DO NOT EDIT. + +package orders + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersCreateOrderCustomAttributeDefinitionRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateOrderCustomAttributeDefinitionRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateOrderCustomAttributeDefinitionRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateOrderCustomAttributeDefinitionRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetKey", func(t *testing.T) { + obj := &DeleteCustomAttributeDefinitionsRequest{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDeleteCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomAttributeDefinitionsRequest{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetKey", func(t *testing.T) { + obj := &GetCustomAttributeDefinitionsRequest{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &GetCustomAttributeDefinitionsRequest{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributeDefinitionsRequest{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributeDefinitionsRequest{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetCursor", func(t *testing.T) { + obj := &ListCustomAttributeDefinitionsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListCustomAttributeDefinitionsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListCustomAttributeDefinitionsRequest(t *testing.T) { + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributeDefinitionsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributeDefinitionsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateOrderCustomAttributeDefinitionRequest(t *testing.T) { + t.Run("SetKey", func(t *testing.T) { + obj := &UpdateOrderCustomAttributeDefinitionRequest{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &UpdateOrderCustomAttributeDefinitionRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateOrderCustomAttributeDefinitionRequest(t *testing.T) { + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateOrderCustomAttributeDefinitionRequest{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateOrderCustomAttributeDefinitionRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/orders/custom_attributes.go b/orders/custom_attributes.go index be4b3d1..d797cad 100644 --- a/orders/custom_attributes.go +++ b/orders/custom_attributes.go @@ -3,7 +3,9 @@ package orders import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" big "math/big" ) @@ -13,7 +15,7 @@ var ( type BulkDeleteOrderCustomAttributesRequest struct { // A map of requests that correspond to individual delete operations for custom attributes. - Values map[string]*v3.BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute `json:"values,omitempty" url:"-"` + Values map[string]*v3.BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute `json:"values" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -33,13 +35,34 @@ func (b *BulkDeleteOrderCustomAttributesRequest) SetValues(values map[string]*v3 b.require(bulkDeleteOrderCustomAttributesRequestFieldValues) } +func (b *BulkDeleteOrderCustomAttributesRequest) UnmarshalJSON(data []byte) error { + type unmarshaler BulkDeleteOrderCustomAttributesRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *b = BulkDeleteOrderCustomAttributesRequest(body) + return nil +} + +func (b *BulkDeleteOrderCustomAttributesRequest) MarshalJSON() ([]byte, error) { + type embed BulkDeleteOrderCustomAttributesRequest + var marshaler = struct { + embed + }{ + embed: embed(*b), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, b.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( bulkUpsertOrderCustomAttributesRequestFieldValues = big.NewInt(1 << 0) ) type BulkUpsertOrderCustomAttributesRequest struct { // A map of requests that correspond to individual upsert operations for custom attributes. - Values map[string]*v3.BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute `json:"values,omitempty" url:"-"` + Values map[string]*v3.BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute `json:"values" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -59,6 +82,27 @@ func (b *BulkUpsertOrderCustomAttributesRequest) SetValues(values map[string]*v3 b.require(bulkUpsertOrderCustomAttributesRequestFieldValues) } +func (b *BulkUpsertOrderCustomAttributesRequest) UnmarshalJSON(data []byte) error { + type unmarshaler BulkUpsertOrderCustomAttributesRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *b = BulkUpsertOrderCustomAttributesRequest(body) + return nil +} + +func (b *BulkUpsertOrderCustomAttributesRequest) MarshalJSON() ([]byte, error) { + type embed BulkUpsertOrderCustomAttributesRequest + var marshaler = struct { + embed + }{ + embed: embed(*b), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, b.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( deleteCustomAttributesRequestFieldOrderID = big.NewInt(1 << 0) deleteCustomAttributesRequestFieldCustomAttributeKey = big.NewInt(1 << 1) @@ -249,7 +293,7 @@ type UpsertOrderCustomAttributeRequest struct { // // - `version`. To enable [optimistic concurrency](https://developer.squareup.com/docs/build-basics/common-api-patterns/optimistic-concurrency) // control, include this optional field and specify the current version of the custom attribute. - CustomAttribute *v3.CustomAttribute `json:"custom_attribute,omitempty" url:"-"` + CustomAttribute *v3.CustomAttribute `json:"custom_attribute" url:"-"` // A unique identifier for this request, used to ensure idempotency. // For more information, see [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"` @@ -292,3 +336,24 @@ func (u *UpsertOrderCustomAttributeRequest) SetIdempotencyKey(idempotencyKey *st u.IdempotencyKey = idempotencyKey u.require(upsertOrderCustomAttributeRequestFieldIdempotencyKey) } + +func (u *UpsertOrderCustomAttributeRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpsertOrderCustomAttributeRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpsertOrderCustomAttributeRequest(body) + return nil +} + +func (u *UpsertOrderCustomAttributeRequest) MarshalJSON() ([]byte, error) { + type embed UpsertOrderCustomAttributeRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/orders/custom_attributes_test.go b/orders/custom_attributes_test.go new file mode 100644 index 0000000..97cdecc --- /dev/null +++ b/orders/custom_attributes_test.go @@ -0,0 +1,541 @@ +// Code generated by Fern. DO NOT EDIT. + +package orders + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersDeleteCustomAttributesRequest(t *testing.T) { + t.Run("SetOrderID", func(t *testing.T) { + obj := &DeleteCustomAttributesRequest{} + var fernTestValueOrderID string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttributeKey", func(t *testing.T) { + obj := &DeleteCustomAttributesRequest{} + var fernTestValueCustomAttributeKey string + obj.SetCustomAttributeKey(fernTestValueCustomAttributeKey) + assert.Equal(t, fernTestValueCustomAttributeKey, obj.CustomAttributeKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDeleteCustomAttributesRequest(t *testing.T) { + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomAttributesRequest{} + var fernTestValueOrderID string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttributeKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomAttributesRequest{} + var fernTestValueCustomAttributeKey string + + // Act + obj.SetCustomAttributeKey(fernTestValueCustomAttributeKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetCustomAttributesRequest(t *testing.T) { + t.Run("SetOrderID", func(t *testing.T) { + obj := &GetCustomAttributesRequest{} + var fernTestValueOrderID string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttributeKey", func(t *testing.T) { + obj := &GetCustomAttributesRequest{} + var fernTestValueCustomAttributeKey string + obj.SetCustomAttributeKey(fernTestValueCustomAttributeKey) + assert.Equal(t, fernTestValueCustomAttributeKey, obj.CustomAttributeKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &GetCustomAttributesRequest{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetWithDefinition", func(t *testing.T) { + obj := &GetCustomAttributesRequest{} + var fernTestValueWithDefinition *bool + obj.SetWithDefinition(fernTestValueWithDefinition) + assert.Equal(t, fernTestValueWithDefinition, obj.WithDefinition) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetCustomAttributesRequest(t *testing.T) { + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributesRequest{} + var fernTestValueOrderID string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttributeKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributesRequest{} + var fernTestValueCustomAttributeKey string + + // Act + obj.SetCustomAttributeKey(fernTestValueCustomAttributeKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributesRequest{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetWithDefinition_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomAttributesRequest{} + var fernTestValueWithDefinition *bool + + // Act + obj.SetWithDefinition(fernTestValueWithDefinition) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListCustomAttributesRequest(t *testing.T) { + t.Run("SetOrderID", func(t *testing.T) { + obj := &ListCustomAttributesRequest{} + var fernTestValueOrderID string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListCustomAttributesRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListCustomAttributesRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetWithDefinitions", func(t *testing.T) { + obj := &ListCustomAttributesRequest{} + var fernTestValueWithDefinitions *bool + obj.SetWithDefinitions(fernTestValueWithDefinitions) + assert.Equal(t, fernTestValueWithDefinitions, obj.WithDefinitions) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListCustomAttributesRequest(t *testing.T) { + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributesRequest{} + var fernTestValueOrderID string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributesRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributesRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetWithDefinitions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomAttributesRequest{} + var fernTestValueWithDefinitions *bool + + // Act + obj.SetWithDefinitions(fernTestValueWithDefinitions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpsertOrderCustomAttributeRequest(t *testing.T) { + t.Run("SetOrderID", func(t *testing.T) { + obj := &UpsertOrderCustomAttributeRequest{} + var fernTestValueOrderID string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttributeKey", func(t *testing.T) { + obj := &UpsertOrderCustomAttributeRequest{} + var fernTestValueCustomAttributeKey string + obj.SetCustomAttributeKey(fernTestValueCustomAttributeKey) + assert.Equal(t, fernTestValueCustomAttributeKey, obj.CustomAttributeKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &UpsertOrderCustomAttributeRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpsertOrderCustomAttributeRequest(t *testing.T) { + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertOrderCustomAttributeRequest{} + var fernTestValueOrderID string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttributeKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertOrderCustomAttributeRequest{} + var fernTestValueCustomAttributeKey string + + // Act + obj.SetCustomAttributeKey(fernTestValueCustomAttributeKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertOrderCustomAttributeRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/orders/customattributedefinitions/orders_custom_attribute_definitions_test/orders_custom_attribute_definitions_test.go b/orders/customattributedefinitions/orders_custom_attribute_definitions_test/orders_custom_attribute_definitions_test.go new file mode 100644 index 0000000..a2c7788 --- /dev/null +++ b/orders/customattributedefinitions/orders_custom_attribute_definitions_test/orders_custom_attribute_definitions_test.go @@ -0,0 +1,227 @@ +// Code generated by Fern. DO NOT EDIT. + +package orders_custom_attribute_definitions_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + orders "github.com/square/square-go-sdk/v3/orders" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestOrdersCustomAttributeDefinitionsListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &orders.ListCustomAttributeDefinitionsRequest{ + VisibilityFilter: square.VisibilityFilterAll.Ptr(), + Cursor: square.String( + "cursor", + ), + Limit: square.Int( + 1, + ), + } + _, invocationErr := client.Orders.CustomAttributeDefinitions.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestOrdersCustomAttributeDefinitionsListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestOrdersCustomAttributeDefinitionsListWithWireMock", "GET", "/v2/orders/custom-attribute-definitions", map[string]string{"visibility_filter": "ALL", "cursor": "cursor", "limit": "1"}, 1) +} + +func TestOrdersCustomAttributeDefinitionsCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &orders.CreateOrderCustomAttributeDefinitionRequest{ + CustomAttributeDefinition: &square.CustomAttributeDefinition{ + Key: square.String( + "cover-count", + ), + Schema: map[string]any{ + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number", + }, + Name: square.String( + "Cover count", + ), + Description: square.String( + "The number of people seated at a table", + ), + Visibility: square.CustomAttributeDefinitionVisibilityVisibilityReadWriteValues.Ptr(), + }, + IdempotencyKey: square.String( + "IDEMPOTENCY_KEY", + ), + } + _, invocationErr := client.Orders.CustomAttributeDefinitions.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestOrdersCustomAttributeDefinitionsCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestOrdersCustomAttributeDefinitionsCreateWithWireMock", "POST", "/v2/orders/custom-attribute-definitions", nil, 1) +} + +func TestOrdersCustomAttributeDefinitionsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &orders.GetCustomAttributeDefinitionsRequest{ + Key: "key", + Version: square.Int( + 1, + ), + } + _, invocationErr := client.Orders.CustomAttributeDefinitions.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestOrdersCustomAttributeDefinitionsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestOrdersCustomAttributeDefinitionsGetWithWireMock", "GET", "/v2/orders/custom-attribute-definitions/key", map[string]string{"version": "1"}, 1) +} + +func TestOrdersCustomAttributeDefinitionsUpdateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &orders.UpdateOrderCustomAttributeDefinitionRequest{ + Key: "key", + CustomAttributeDefinition: &square.CustomAttributeDefinition{ + Key: square.String( + "cover-count", + ), + Visibility: square.CustomAttributeDefinitionVisibilityVisibilityReadOnly.Ptr(), + Version: square.Int( + 1, + ), + }, + IdempotencyKey: square.String( + "IDEMPOTENCY_KEY", + ), + } + _, invocationErr := client.Orders.CustomAttributeDefinitions.Update( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestOrdersCustomAttributeDefinitionsUpdateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestOrdersCustomAttributeDefinitionsUpdateWithWireMock", "PUT", "/v2/orders/custom-attribute-definitions/key", nil, 1) +} + +func TestOrdersCustomAttributeDefinitionsDeleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &orders.DeleteCustomAttributeDefinitionsRequest{ + Key: "key", + } + _, invocationErr := client.Orders.CustomAttributeDefinitions.Delete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestOrdersCustomAttributeDefinitionsDeleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestOrdersCustomAttributeDefinitionsDeleteWithWireMock", "DELETE", "/v2/orders/custom-attribute-definitions/key", nil, 1) +} diff --git a/orders/customattributes/orders_custom_attributes_test/orders_custom_attributes_test.go b/orders/customattributes/orders_custom_attributes_test/orders_custom_attributes_test.go new file mode 100644 index 0000000..ab1525c --- /dev/null +++ b/orders/customattributes/orders_custom_attributes_test/orders_custom_attributes_test.go @@ -0,0 +1,280 @@ +// Code generated by Fern. DO NOT EDIT. + +package orders_custom_attributes_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + orders "github.com/square/square-go-sdk/v3/orders" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestOrdersCustomAttributesBatchDeleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &orders.BulkDeleteOrderCustomAttributesRequest{ + Values: map[string]*square.BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute{ + "cover-count": &square.BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute{ + Key: square.String( + "cover-count", + ), + OrderID: "7BbXGEIWNldxAzrtGf9GPVZTwZ4F", + }, + "table-number": &square.BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute{ + Key: square.String( + "table-number", + ), + OrderID: "7BbXGEIWNldxAzrtGf9GPVZTwZ4F", + }, + }, + } + _, invocationErr := client.Orders.CustomAttributes.BatchDelete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestOrdersCustomAttributesBatchDeleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestOrdersCustomAttributesBatchDeleteWithWireMock", "POST", "/v2/orders/custom-attributes/bulk-delete", nil, 1) +} + +func TestOrdersCustomAttributesBatchUpsertWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &orders.BulkUpsertOrderCustomAttributesRequest{ + Values: map[string]*square.BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute{ + "cover-count": &square.BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute{ + CustomAttribute: &square.CustomAttribute{ + Key: square.String( + "cover-count", + ), + Value: "6", + Version: square.Int( + 2, + ), + }, + OrderID: "7BbXGEIWNldxAzrtGf9GPVZTwZ4F", + }, + "table-number": &square.BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute{ + CustomAttribute: &square.CustomAttribute{ + Key: square.String( + "table-number", + ), + Value: "11", + Version: square.Int( + 4, + ), + }, + OrderID: "7BbXGEIWNldxAzrtGf9GPVZTwZ4F", + }, + }, + } + _, invocationErr := client.Orders.CustomAttributes.BatchUpsert( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestOrdersCustomAttributesBatchUpsertWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestOrdersCustomAttributesBatchUpsertWithWireMock", "POST", "/v2/orders/custom-attributes/bulk-upsert", nil, 1) +} + +func TestOrdersCustomAttributesListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &orders.ListCustomAttributesRequest{ + OrderID: "order_id", + VisibilityFilter: square.VisibilityFilterAll.Ptr(), + Cursor: square.String( + "cursor", + ), + Limit: square.Int( + 1, + ), + WithDefinitions: square.Bool( + true, + ), + } + _, invocationErr := client.Orders.CustomAttributes.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestOrdersCustomAttributesListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestOrdersCustomAttributesListWithWireMock", "GET", "/v2/orders/order_id/custom-attributes", map[string]string{"visibility_filter": "ALL", "cursor": "cursor", "limit": "1", "with_definitions": "true"}, 1) +} + +func TestOrdersCustomAttributesGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &orders.GetCustomAttributesRequest{ + OrderID: "order_id", + CustomAttributeKey: "custom_attribute_key", + Version: square.Int( + 1, + ), + WithDefinition: square.Bool( + true, + ), + } + _, invocationErr := client.Orders.CustomAttributes.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestOrdersCustomAttributesGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestOrdersCustomAttributesGetWithWireMock", "GET", "/v2/orders/order_id/custom-attributes/custom_attribute_key", map[string]string{"version": "1", "with_definition": "true"}, 1) +} + +func TestOrdersCustomAttributesUpsertWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &orders.UpsertOrderCustomAttributeRequest{ + OrderID: "order_id", + CustomAttributeKey: "custom_attribute_key", + CustomAttribute: &square.CustomAttribute{ + Key: square.String( + "table-number", + ), + Value: "42", + Version: square.Int( + 1, + ), + }, + } + _, invocationErr := client.Orders.CustomAttributes.Upsert( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestOrdersCustomAttributesUpsertWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestOrdersCustomAttributesUpsertWithWireMock", "POST", "/v2/orders/order_id/custom-attributes/custom_attribute_key", nil, 1) +} + +func TestOrdersCustomAttributesDeleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &orders.DeleteCustomAttributesRequest{ + OrderID: "order_id", + CustomAttributeKey: "custom_attribute_key", + } + _, invocationErr := client.Orders.CustomAttributes.Delete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestOrdersCustomAttributesDeleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestOrdersCustomAttributesDeleteWithWireMock", "DELETE", "/v2/orders/order_id/custom-attributes/custom_attribute_key", nil, 1) +} diff --git a/orders/orders_test/orders_test.go b/orders/orders_test/orders_test.go new file mode 100644 index 0000000..7cbfda4 --- /dev/null +++ b/orders/orders_test/orders_test.go @@ -0,0 +1,472 @@ +// Code generated by Fern. DO NOT EDIT. + +package orders_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestOrdersCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CreateOrderRequest{ + Order: &square.Order{ + LocationID: "057P5VYJ4A5X1", + ReferenceID: square.String( + "my-order-001", + ), + LineItems: []*square.OrderLineItem{ + &square.OrderLineItem{ + Name: square.String( + "New York Strip Steak", + ), + Quantity: "1", + BasePriceMoney: &square.Money{ + Amount: square.Int64( + int64(1599), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + }, + &square.OrderLineItem{ + Quantity: "2", + CatalogObjectID: square.String( + "BEMYCSMIJL46OCDV4KYIKXIB", + ), + Modifiers: []*square.OrderLineItemModifier{ + &square.OrderLineItemModifier{ + CatalogObjectID: square.String( + "CHQX7Y4KY6N5KINJKZCFURPZ", + ), + }, + }, + AppliedDiscounts: []*square.OrderLineItemAppliedDiscount{ + &square.OrderLineItemAppliedDiscount{ + DiscountUID: "one-dollar-off", + }, + }, + }, + }, + Taxes: []*square.OrderLineItemTax{ + &square.OrderLineItemTax{ + UID: square.String( + "state-sales-tax", + ), + Name: square.String( + "State Sales Tax", + ), + Percentage: square.String( + "9", + ), + Scope: square.OrderLineItemTaxScopeOrder.Ptr(), + }, + }, + Discounts: []*square.OrderLineItemDiscount{ + &square.OrderLineItemDiscount{ + UID: square.String( + "labor-day-sale", + ), + Name: square.String( + "Labor Day Sale", + ), + Percentage: square.String( + "5", + ), + Scope: square.OrderLineItemDiscountScopeOrder.Ptr(), + }, + &square.OrderLineItemDiscount{ + UID: square.String( + "membership-discount", + ), + CatalogObjectID: square.String( + "DB7L55ZH2BGWI4H23ULIWOQ7", + ), + Scope: square.OrderLineItemDiscountScopeOrder.Ptr(), + }, + &square.OrderLineItemDiscount{ + UID: square.String( + "one-dollar-off", + ), + Name: square.String( + "Sale - $1.00 off", + ), + AmountMoney: &square.Money{ + Amount: square.Int64( + int64(100), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + Scope: square.OrderLineItemDiscountScopeLineItem.Ptr(), + }, + }, + }, + IdempotencyKey: square.String( + "8193148c-9586-11e6-99f9-28cfe92138cf", + ), + } + _, invocationErr := client.Orders.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestOrdersCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestOrdersCreateWithWireMock", "POST", "/v2/orders", nil, 1) +} + +func TestOrdersBatchGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.BatchGetOrdersRequest{ + LocationID: square.String( + "057P5VYJ4A5X1", + ), + OrderIDs: []string{ + "CAISEM82RcpmcFBM0TfOyiHV3es", + "CAISENgvlJ6jLWAzERDzjyHVybY", + }, + } + _, invocationErr := client.Orders.BatchGet( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestOrdersBatchGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestOrdersBatchGetWithWireMock", "POST", "/v2/orders/batch-retrieve", nil, 1) +} + +func TestOrdersCalculateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CalculateOrderRequest{ + Order: &square.Order{ + LocationID: "D7AVYMEAPJ3A3", + LineItems: []*square.OrderLineItem{ + &square.OrderLineItem{ + Name: square.String( + "Item 1", + ), + Quantity: "1", + BasePriceMoney: &square.Money{ + Amount: square.Int64( + int64(500), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + }, + &square.OrderLineItem{ + Name: square.String( + "Item 2", + ), + Quantity: "2", + BasePriceMoney: &square.Money{ + Amount: square.Int64( + int64(300), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + }, + }, + Discounts: []*square.OrderLineItemDiscount{ + &square.OrderLineItemDiscount{ + Name: square.String( + "50% Off", + ), + Percentage: square.String( + "50", + ), + Scope: square.OrderLineItemDiscountScopeOrder.Ptr(), + }, + }, + }, + } + _, invocationErr := client.Orders.Calculate( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestOrdersCalculateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestOrdersCalculateWithWireMock", "POST", "/v2/orders/calculate", nil, 1) +} + +func TestOrdersCloneWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CloneOrderRequest{ + OrderID: "ZAISEM52YcpmcWAzERDOyiWS123", + Version: square.Int( + 3, + ), + IdempotencyKey: square.String( + "UNIQUE_STRING", + ), + } + _, invocationErr := client.Orders.Clone( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestOrdersCloneWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestOrdersCloneWithWireMock", "POST", "/v2/orders/clone", nil, 1) +} + +func TestOrdersSearchWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.SearchOrdersRequest{ + LocationIDs: []string{ + "057P5VYJ4A5X1", + "18YC4JDH91E1H", + }, + Query: &square.SearchOrdersQuery{ + Filter: &square.SearchOrdersFilter{ + StateFilter: &square.SearchOrdersStateFilter{ + States: []square.OrderState{ + square.OrderStateCompleted, + }, + }, + DateTimeFilter: &square.SearchOrdersDateTimeFilter{ + ClosedAt: &square.TimeRange{ + StartAt: square.String( + "2018-03-03T20:00:00+00:00", + ), + EndAt: square.String( + "2019-03-04T21:54:45+00:00", + ), + }, + }, + }, + Sort: &square.SearchOrdersSort{ + SortField: square.SearchOrdersSortFieldClosedAt, + SortOrder: square.SortOrderDesc.Ptr(), + }, + }, + Limit: square.Int( + 3, + ), + ReturnEntries: square.Bool( + true, + ), + } + _, invocationErr := client.Orders.Search( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestOrdersSearchWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestOrdersSearchWithWireMock", "POST", "/v2/orders/search", nil, 1) +} + +func TestOrdersGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.GetOrdersRequest{ + OrderID: "order_id", + } + _, invocationErr := client.Orders.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestOrdersGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestOrdersGetWithWireMock", "GET", "/v2/orders/order_id", nil, 1) +} + +func TestOrdersUpdateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.UpdateOrderRequest{ + OrderID: "order_id", + Order: &square.Order{ + LocationID: "location_id", + LineItems: []*square.OrderLineItem{ + &square.OrderLineItem{ + UID: square.String( + "cookie_uid", + ), + Name: square.String( + "COOKIE", + ), + Quantity: "2", + BasePriceMoney: &square.Money{ + Amount: square.Int64( + int64(200), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + }, + }, + Version: square.Int( + 1, + ), + }, + FieldsToClear: []string{ + "discounts", + }, + IdempotencyKey: square.String( + "UNIQUE_STRING", + ), + } + _, invocationErr := client.Orders.Update( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestOrdersUpdateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestOrdersUpdateWithWireMock", "PUT", "/v2/orders/order_id", nil, 1) +} + +func TestOrdersPayWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.PayOrderRequest{ + OrderID: "order_id", + IdempotencyKey: "c043a359-7ad9-4136-82a9-c3f1d66dcbff", + PaymentIDs: []string{ + "EnZdNAlWCmfh6Mt5FMNST1o7taB", + "0LRiVlbXVwe8ozu4KbZxd12mvaB", + }, + } + _, invocationErr := client.Orders.Pay( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestOrdersPayWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestOrdersPayWithWireMock", "POST", "/v2/orders/order_id/pay", nil, 1) +} diff --git a/orders_test.go b/orders_test.go new file mode 100644 index 0000000..da857a4 --- /dev/null +++ b/orders_test.go @@ -0,0 +1,5154 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersBatchGetOrdersRequest(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &BatchGetOrdersRequest{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrderIDs", func(t *testing.T) { + obj := &BatchGetOrdersRequest{} + var fernTestValueOrderIDs []string + obj.SetOrderIDs(fernTestValueOrderIDs) + assert.Equal(t, fernTestValueOrderIDs, obj.OrderIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitBatchGetOrdersRequest(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetOrdersRequest{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrderIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetOrdersRequest{} + var fernTestValueOrderIDs []string + + // Act + obj.SetOrderIDs(fernTestValueOrderIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCalculateOrderRequest(t *testing.T) { + t.Run("SetOrder", func(t *testing.T) { + obj := &CalculateOrderRequest{} + var fernTestValueOrder *Order + obj.SetOrder(fernTestValueOrder) + assert.Equal(t, fernTestValueOrder, obj.Order) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetProposedRewards", func(t *testing.T) { + obj := &CalculateOrderRequest{} + var fernTestValueProposedRewards []*OrderReward + obj.SetProposedRewards(fernTestValueProposedRewards) + assert.Equal(t, fernTestValueProposedRewards, obj.ProposedRewards) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCalculateOrderRequest(t *testing.T) { + t.Run("SetOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CalculateOrderRequest{} + var fernTestValueOrder *Order + + // Act + obj.SetOrder(fernTestValueOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetProposedRewards_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CalculateOrderRequest{} + var fernTestValueProposedRewards []*OrderReward + + // Act + obj.SetProposedRewards(fernTestValueProposedRewards) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCloneOrderRequest(t *testing.T) { + t.Run("SetOrderID", func(t *testing.T) { + obj := &CloneOrderRequest{} + var fernTestValueOrderID string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &CloneOrderRequest{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CloneOrderRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCloneOrderRequest(t *testing.T) { + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CloneOrderRequest{} + var fernTestValueOrderID string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CloneOrderRequest{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CloneOrderRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetOrdersRequest(t *testing.T) { + t.Run("SetOrderID", func(t *testing.T) { + obj := &GetOrdersRequest{} + var fernTestValueOrderID string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetOrdersRequest(t *testing.T) { + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetOrdersRequest{} + var fernTestValueOrderID string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPayOrderRequest(t *testing.T) { + t.Run("SetOrderID", func(t *testing.T) { + obj := &PayOrderRequest{} + var fernTestValueOrderID string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &PayOrderRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrderVersion", func(t *testing.T) { + obj := &PayOrderRequest{} + var fernTestValueOrderVersion *int + obj.SetOrderVersion(fernTestValueOrderVersion) + assert.Equal(t, fernTestValueOrderVersion, obj.OrderVersion) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPaymentIDs", func(t *testing.T) { + obj := &PayOrderRequest{} + var fernTestValuePaymentIDs []string + obj.SetPaymentIDs(fernTestValuePaymentIDs) + assert.Equal(t, fernTestValuePaymentIDs, obj.PaymentIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitPayOrderRequest(t *testing.T) { + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayOrderRequest{} + var fernTestValueOrderID string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayOrderRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrderVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayOrderRequest{} + var fernTestValueOrderVersion *int + + // Act + obj.SetOrderVersion(fernTestValueOrderVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPaymentIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayOrderRequest{} + var fernTestValuePaymentIDs []string + + // Act + obj.SetPaymentIDs(fernTestValuePaymentIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchOrdersRequest(t *testing.T) { + t.Run("SetLocationIDs", func(t *testing.T) { + obj := &SearchOrdersRequest{} + var fernTestValueLocationIDs []string + obj.SetLocationIDs(fernTestValueLocationIDs) + assert.Equal(t, fernTestValueLocationIDs, obj.LocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchOrdersRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuery", func(t *testing.T) { + obj := &SearchOrdersRequest{} + var fernTestValueQuery *SearchOrdersQuery + obj.SetQuery(fernTestValueQuery) + assert.Equal(t, fernTestValueQuery, obj.Query) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &SearchOrdersRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReturnEntries", func(t *testing.T) { + obj := &SearchOrdersRequest{} + var fernTestValueReturnEntries *bool + obj.SetReturnEntries(fernTestValueReturnEntries) + assert.Equal(t, fernTestValueReturnEntries, obj.ReturnEntries) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitSearchOrdersRequest(t *testing.T) { + t.Run("SetLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersRequest{} + var fernTestValueLocationIDs []string + + // Act + obj.SetLocationIDs(fernTestValueLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuery_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersRequest{} + var fernTestValueQuery *SearchOrdersQuery + + // Act + obj.SetQuery(fernTestValueQuery) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReturnEntries_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersRequest{} + var fernTestValueReturnEntries *bool + + // Act + obj.SetReturnEntries(fernTestValueReturnEntries) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBatchGetOrdersResponse(t *testing.T) { + t.Run("SetOrders", func(t *testing.T) { + obj := &BatchGetOrdersResponse{} + var fernTestValueOrders []*Order + obj.SetOrders(fernTestValueOrders) + assert.Equal(t, fernTestValueOrders, obj.Orders) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &BatchGetOrdersResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBatchGetOrdersResponse(t *testing.T) { + t.Run("GetOrders", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetOrdersResponse{} + var expected []*Order + obj.Orders = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrders(), "getter should return the property value") + }) + + t.Run("GetOrders_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetOrdersResponse{} + obj.Orders = nil + + // Act & Assert + assert.Nil(t, obj.GetOrders(), "getter should return nil when property is nil") + }) + + t.Run("GetOrders_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetOrdersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrders() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetOrdersResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetOrdersResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetOrdersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBatchGetOrdersResponse(t *testing.T) { + t.Run("SetOrders_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetOrdersResponse{} + var fernTestValueOrders []*Order + + // Act + obj.SetOrders(fernTestValueOrders) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetOrdersResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCalculateOrderResponse(t *testing.T) { + t.Run("SetOrder", func(t *testing.T) { + obj := &CalculateOrderResponse{} + var fernTestValueOrder *Order + obj.SetOrder(fernTestValueOrder) + assert.Equal(t, fernTestValueOrder, obj.Order) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &CalculateOrderResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCalculateOrderResponse(t *testing.T) { + t.Run("GetOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CalculateOrderResponse{} + var expected *Order + obj.Order = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrder(), "getter should return the property value") + }) + + t.Run("GetOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CalculateOrderResponse{} + obj.Order = nil + + // Act & Assert + assert.Nil(t, obj.GetOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CalculateOrderResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrder() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CalculateOrderResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CalculateOrderResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CalculateOrderResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCalculateOrderResponse(t *testing.T) { + t.Run("SetOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CalculateOrderResponse{} + var fernTestValueOrder *Order + + // Act + obj.SetOrder(fernTestValueOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CalculateOrderResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCloneOrderResponse(t *testing.T) { + t.Run("SetOrder", func(t *testing.T) { + obj := &CloneOrderResponse{} + var fernTestValueOrder *Order + obj.SetOrder(fernTestValueOrder) + assert.Equal(t, fernTestValueOrder, obj.Order) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &CloneOrderResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCloneOrderResponse(t *testing.T) { + t.Run("GetOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CloneOrderResponse{} + var expected *Order + obj.Order = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrder(), "getter should return the property value") + }) + + t.Run("GetOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CloneOrderResponse{} + obj.Order = nil + + // Act & Assert + assert.Nil(t, obj.GetOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CloneOrderResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrder() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CloneOrderResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CloneOrderResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CloneOrderResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCloneOrderResponse(t *testing.T) { + t.Run("SetOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CloneOrderResponse{} + var fernTestValueOrder *Order + + // Act + obj.SetOrder(fernTestValueOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CloneOrderResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateOrderResponse(t *testing.T) { + t.Run("SetOrder", func(t *testing.T) { + obj := &CreateOrderResponse{} + var fernTestValueOrder *Order + obj.SetOrder(fernTestValueOrder) + assert.Equal(t, fernTestValueOrder, obj.Order) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateOrderResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateOrderResponse(t *testing.T) { + t.Run("GetOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateOrderResponse{} + var expected *Order + obj.Order = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrder(), "getter should return the property value") + }) + + t.Run("GetOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateOrderResponse{} + obj.Order = nil + + // Act & Assert + assert.Nil(t, obj.GetOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateOrderResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrder() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateOrderResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateOrderResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateOrderResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateOrderResponse(t *testing.T) { + t.Run("SetOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateOrderResponse{} + var fernTestValueOrder *Order + + // Act + obj.SetOrder(fernTestValueOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateOrderResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetOrderResponse(t *testing.T) { + t.Run("SetOrder", func(t *testing.T) { + obj := &GetOrderResponse{} + var fernTestValueOrder *Order + obj.SetOrder(fernTestValueOrder) + assert.Equal(t, fernTestValueOrder, obj.Order) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &GetOrderResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetOrderResponse(t *testing.T) { + t.Run("GetOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetOrderResponse{} + var expected *Order + obj.Order = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrder(), "getter should return the property value") + }) + + t.Run("GetOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetOrderResponse{} + obj.Order = nil + + // Act & Assert + assert.Nil(t, obj.GetOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetOrderResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrder() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetOrderResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetOrderResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetOrderResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetOrderResponse(t *testing.T) { + t.Run("SetOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetOrderResponse{} + var fernTestValueOrder *Order + + // Act + obj.SetOrder(fernTestValueOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetOrderResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderEntry(t *testing.T) { + t.Run("SetOrderID", func(t *testing.T) { + obj := &OrderEntry{} + var fernTestValueOrderID *string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &OrderEntry{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &OrderEntry{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderEntry(t *testing.T) { + t.Run("GetOrderID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderEntry{} + var expected *string + obj.OrderID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderID(), "getter should return the property value") + }) + + t.Run("GetOrderID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderEntry{} + obj.OrderID = nil + + // Act & Assert + assert.Nil(t, obj.GetOrderID(), "getter should return nil when property is nil") + }) + + t.Run("GetOrderID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderID() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderEntry{} + var expected *int + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderEntry{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderEntry{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderEntry{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderEntry(t *testing.T) { + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderEntry{} + var fernTestValueOrderID *string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderEntry{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderEntry{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPayOrderResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &PayOrderResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrder", func(t *testing.T) { + obj := &PayOrderResponse{} + var fernTestValueOrder *Order + obj.SetOrder(fernTestValueOrder) + assert.Equal(t, fernTestValueOrder, obj.Order) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPayOrderResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayOrderResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayOrderResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayOrderResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayOrderResponse{} + var expected *Order + obj.Order = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrder(), "getter should return the property value") + }) + + t.Run("GetOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayOrderResponse{} + obj.Order = nil + + // Act & Assert + assert.Nil(t, obj.GetOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayOrderResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrder() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPayOrderResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayOrderResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayOrderResponse{} + var fernTestValueOrder *Order + + // Act + obj.SetOrder(fernTestValueOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchOrdersCustomerFilter(t *testing.T) { + t.Run("SetCustomerIDs", func(t *testing.T) { + obj := &SearchOrdersCustomerFilter{} + var fernTestValueCustomerIDs []string + obj.SetCustomerIDs(fernTestValueCustomerIDs) + assert.Equal(t, fernTestValueCustomerIDs, obj.CustomerIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchOrdersCustomerFilter(t *testing.T) { + t.Run("GetCustomerIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersCustomerFilter{} + var expected []string + obj.CustomerIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomerIDs(), "getter should return the property value") + }) + + t.Run("GetCustomerIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersCustomerFilter{} + obj.CustomerIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomerIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomerIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersCustomerFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomerIDs() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchOrdersCustomerFilter(t *testing.T) { + t.Run("SetCustomerIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersCustomerFilter{} + var fernTestValueCustomerIDs []string + + // Act + obj.SetCustomerIDs(fernTestValueCustomerIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchOrdersDateTimeFilter(t *testing.T) { + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &SearchOrdersDateTimeFilter{} + var fernTestValueCreatedAt *TimeRange + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &SearchOrdersDateTimeFilter{} + var fernTestValueUpdatedAt *TimeRange + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetClosedAt", func(t *testing.T) { + obj := &SearchOrdersDateTimeFilter{} + var fernTestValueClosedAt *TimeRange + obj.SetClosedAt(fernTestValueClosedAt) + assert.Equal(t, fernTestValueClosedAt, obj.ClosedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchOrdersDateTimeFilter(t *testing.T) { + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersDateTimeFilter{} + var expected *TimeRange + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersDateTimeFilter{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersDateTimeFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersDateTimeFilter{} + var expected *TimeRange + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersDateTimeFilter{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersDateTimeFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetClosedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersDateTimeFilter{} + var expected *TimeRange + obj.ClosedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetClosedAt(), "getter should return the property value") + }) + + t.Run("GetClosedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersDateTimeFilter{} + obj.ClosedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetClosedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetClosedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersDateTimeFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetClosedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchOrdersDateTimeFilter(t *testing.T) { + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersDateTimeFilter{} + var fernTestValueCreatedAt *TimeRange + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersDateTimeFilter{} + var fernTestValueUpdatedAt *TimeRange + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetClosedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersDateTimeFilter{} + var fernTestValueClosedAt *TimeRange + + // Act + obj.SetClosedAt(fernTestValueClosedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchOrdersFilter(t *testing.T) { + t.Run("SetStateFilter", func(t *testing.T) { + obj := &SearchOrdersFilter{} + var fernTestValueStateFilter *SearchOrdersStateFilter + obj.SetStateFilter(fernTestValueStateFilter) + assert.Equal(t, fernTestValueStateFilter, obj.StateFilter) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDateTimeFilter", func(t *testing.T) { + obj := &SearchOrdersFilter{} + var fernTestValueDateTimeFilter *SearchOrdersDateTimeFilter + obj.SetDateTimeFilter(fernTestValueDateTimeFilter) + assert.Equal(t, fernTestValueDateTimeFilter, obj.DateTimeFilter) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFulfillmentFilter", func(t *testing.T) { + obj := &SearchOrdersFilter{} + var fernTestValueFulfillmentFilter *SearchOrdersFulfillmentFilter + obj.SetFulfillmentFilter(fernTestValueFulfillmentFilter) + assert.Equal(t, fernTestValueFulfillmentFilter, obj.FulfillmentFilter) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSourceFilter", func(t *testing.T) { + obj := &SearchOrdersFilter{} + var fernTestValueSourceFilter *SearchOrdersSourceFilter + obj.SetSourceFilter(fernTestValueSourceFilter) + assert.Equal(t, fernTestValueSourceFilter, obj.SourceFilter) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerFilter", func(t *testing.T) { + obj := &SearchOrdersFilter{} + var fernTestValueCustomerFilter *SearchOrdersCustomerFilter + obj.SetCustomerFilter(fernTestValueCustomerFilter) + assert.Equal(t, fernTestValueCustomerFilter, obj.CustomerFilter) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchOrdersFilter(t *testing.T) { + t.Run("GetStateFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersFilter{} + var expected *SearchOrdersStateFilter + obj.StateFilter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStateFilter(), "getter should return the property value") + }) + + t.Run("GetStateFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersFilter{} + obj.StateFilter = nil + + // Act & Assert + assert.Nil(t, obj.GetStateFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetStateFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStateFilter() // Should return zero value + }) + + t.Run("GetDateTimeFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersFilter{} + var expected *SearchOrdersDateTimeFilter + obj.DateTimeFilter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDateTimeFilter(), "getter should return the property value") + }) + + t.Run("GetDateTimeFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersFilter{} + obj.DateTimeFilter = nil + + // Act & Assert + assert.Nil(t, obj.GetDateTimeFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetDateTimeFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDateTimeFilter() // Should return zero value + }) + + t.Run("GetFulfillmentFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersFilter{} + var expected *SearchOrdersFulfillmentFilter + obj.FulfillmentFilter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFulfillmentFilter(), "getter should return the property value") + }) + + t.Run("GetFulfillmentFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersFilter{} + obj.FulfillmentFilter = nil + + // Act & Assert + assert.Nil(t, obj.GetFulfillmentFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetFulfillmentFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFulfillmentFilter() // Should return zero value + }) + + t.Run("GetSourceFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersFilter{} + var expected *SearchOrdersSourceFilter + obj.SourceFilter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSourceFilter(), "getter should return the property value") + }) + + t.Run("GetSourceFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersFilter{} + obj.SourceFilter = nil + + // Act & Assert + assert.Nil(t, obj.GetSourceFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetSourceFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSourceFilter() // Should return zero value + }) + + t.Run("GetCustomerFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersFilter{} + var expected *SearchOrdersCustomerFilter + obj.CustomerFilter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomerFilter(), "getter should return the property value") + }) + + t.Run("GetCustomerFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersFilter{} + obj.CustomerFilter = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomerFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomerFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomerFilter() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchOrdersFilter(t *testing.T) { + t.Run("SetStateFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersFilter{} + var fernTestValueStateFilter *SearchOrdersStateFilter + + // Act + obj.SetStateFilter(fernTestValueStateFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDateTimeFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersFilter{} + var fernTestValueDateTimeFilter *SearchOrdersDateTimeFilter + + // Act + obj.SetDateTimeFilter(fernTestValueDateTimeFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFulfillmentFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersFilter{} + var fernTestValueFulfillmentFilter *SearchOrdersFulfillmentFilter + + // Act + obj.SetFulfillmentFilter(fernTestValueFulfillmentFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSourceFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersFilter{} + var fernTestValueSourceFilter *SearchOrdersSourceFilter + + // Act + obj.SetSourceFilter(fernTestValueSourceFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersFilter{} + var fernTestValueCustomerFilter *SearchOrdersCustomerFilter + + // Act + obj.SetCustomerFilter(fernTestValueCustomerFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchOrdersFulfillmentFilter(t *testing.T) { + t.Run("SetFulfillmentTypes", func(t *testing.T) { + obj := &SearchOrdersFulfillmentFilter{} + var fernTestValueFulfillmentTypes []FulfillmentType + obj.SetFulfillmentTypes(fernTestValueFulfillmentTypes) + assert.Equal(t, fernTestValueFulfillmentTypes, obj.FulfillmentTypes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFulfillmentStates", func(t *testing.T) { + obj := &SearchOrdersFulfillmentFilter{} + var fernTestValueFulfillmentStates []FulfillmentState + obj.SetFulfillmentStates(fernTestValueFulfillmentStates) + assert.Equal(t, fernTestValueFulfillmentStates, obj.FulfillmentStates) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchOrdersFulfillmentFilter(t *testing.T) { + t.Run("GetFulfillmentTypes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersFulfillmentFilter{} + var expected []FulfillmentType + obj.FulfillmentTypes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFulfillmentTypes(), "getter should return the property value") + }) + + t.Run("GetFulfillmentTypes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersFulfillmentFilter{} + obj.FulfillmentTypes = nil + + // Act & Assert + assert.Nil(t, obj.GetFulfillmentTypes(), "getter should return nil when property is nil") + }) + + t.Run("GetFulfillmentTypes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersFulfillmentFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFulfillmentTypes() // Should return zero value + }) + + t.Run("GetFulfillmentStates", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersFulfillmentFilter{} + var expected []FulfillmentState + obj.FulfillmentStates = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFulfillmentStates(), "getter should return the property value") + }) + + t.Run("GetFulfillmentStates_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersFulfillmentFilter{} + obj.FulfillmentStates = nil + + // Act & Assert + assert.Nil(t, obj.GetFulfillmentStates(), "getter should return nil when property is nil") + }) + + t.Run("GetFulfillmentStates_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersFulfillmentFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFulfillmentStates() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchOrdersFulfillmentFilter(t *testing.T) { + t.Run("SetFulfillmentTypes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersFulfillmentFilter{} + var fernTestValueFulfillmentTypes []FulfillmentType + + // Act + obj.SetFulfillmentTypes(fernTestValueFulfillmentTypes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFulfillmentStates_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersFulfillmentFilter{} + var fernTestValueFulfillmentStates []FulfillmentState + + // Act + obj.SetFulfillmentStates(fernTestValueFulfillmentStates) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchOrdersQuery(t *testing.T) { + t.Run("SetFilter", func(t *testing.T) { + obj := &SearchOrdersQuery{} + var fernTestValueFilter *SearchOrdersFilter + obj.SetFilter(fernTestValueFilter) + assert.Equal(t, fernTestValueFilter, obj.Filter) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSort", func(t *testing.T) { + obj := &SearchOrdersQuery{} + var fernTestValueSort *SearchOrdersSort + obj.SetSort(fernTestValueSort) + assert.Equal(t, fernTestValueSort, obj.Sort) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchOrdersQuery(t *testing.T) { + t.Run("GetFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersQuery{} + var expected *SearchOrdersFilter + obj.Filter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFilter(), "getter should return the property value") + }) + + t.Run("GetFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersQuery{} + obj.Filter = nil + + // Act & Assert + assert.Nil(t, obj.GetFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFilter() // Should return zero value + }) + + t.Run("GetSort", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersQuery{} + var expected *SearchOrdersSort + obj.Sort = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSort(), "getter should return the property value") + }) + + t.Run("GetSort_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersQuery{} + obj.Sort = nil + + // Act & Assert + assert.Nil(t, obj.GetSort(), "getter should return nil when property is nil") + }) + + t.Run("GetSort_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSort() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchOrdersQuery(t *testing.T) { + t.Run("SetFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersQuery{} + var fernTestValueFilter *SearchOrdersFilter + + // Act + obj.SetFilter(fernTestValueFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSort_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersQuery{} + var fernTestValueSort *SearchOrdersSort + + // Act + obj.SetSort(fernTestValueSort) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchOrdersResponse(t *testing.T) { + t.Run("SetOrderEntries", func(t *testing.T) { + obj := &SearchOrdersResponse{} + var fernTestValueOrderEntries []*OrderEntry + obj.SetOrderEntries(fernTestValueOrderEntries) + assert.Equal(t, fernTestValueOrderEntries, obj.OrderEntries) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrders", func(t *testing.T) { + obj := &SearchOrdersResponse{} + var fernTestValueOrders []*Order + obj.SetOrders(fernTestValueOrders) + assert.Equal(t, fernTestValueOrders, obj.Orders) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchOrdersResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &SearchOrdersResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchOrdersResponse(t *testing.T) { + t.Run("GetOrderEntries", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersResponse{} + var expected []*OrderEntry + obj.OrderEntries = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderEntries(), "getter should return the property value") + }) + + t.Run("GetOrderEntries_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersResponse{} + obj.OrderEntries = nil + + // Act & Assert + assert.Nil(t, obj.GetOrderEntries(), "getter should return nil when property is nil") + }) + + t.Run("GetOrderEntries_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderEntries() // Should return zero value + }) + + t.Run("GetOrders", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersResponse{} + var expected []*Order + obj.Orders = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrders(), "getter should return the property value") + }) + + t.Run("GetOrders_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersResponse{} + obj.Orders = nil + + // Act & Assert + assert.Nil(t, obj.GetOrders(), "getter should return nil when property is nil") + }) + + t.Run("GetOrders_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrders() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchOrdersResponse(t *testing.T) { + t.Run("SetOrderEntries_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersResponse{} + var fernTestValueOrderEntries []*OrderEntry + + // Act + obj.SetOrderEntries(fernTestValueOrderEntries) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrders_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersResponse{} + var fernTestValueOrders []*Order + + // Act + obj.SetOrders(fernTestValueOrders) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchOrdersSort(t *testing.T) { + t.Run("SetSortField", func(t *testing.T) { + obj := &SearchOrdersSort{} + var fernTestValueSortField SearchOrdersSortField + obj.SetSortField(fernTestValueSortField) + assert.Equal(t, fernTestValueSortField, obj.SortField) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSortOrder", func(t *testing.T) { + obj := &SearchOrdersSort{} + var fernTestValueSortOrder *SortOrder + obj.SetSortOrder(fernTestValueSortOrder) + assert.Equal(t, fernTestValueSortOrder, obj.SortOrder) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchOrdersSort(t *testing.T) { + t.Run("GetSortField", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersSort{} + var expected SearchOrdersSortField + obj.SortField = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSortField(), "getter should return the property value") + }) + + t.Run("GetSortField_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersSort + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSortField() // Should return zero value + }) + + t.Run("GetSortOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersSort{} + var expected *SortOrder + obj.SortOrder = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSortOrder(), "getter should return the property value") + }) + + t.Run("GetSortOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersSort{} + obj.SortOrder = nil + + // Act & Assert + assert.Nil(t, obj.GetSortOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetSortOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersSort + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSortOrder() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchOrdersSort(t *testing.T) { + t.Run("SetSortField_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersSort{} + var fernTestValueSortField SearchOrdersSortField + + // Act + obj.SetSortField(fernTestValueSortField) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSortOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersSort{} + var fernTestValueSortOrder *SortOrder + + // Act + obj.SetSortOrder(fernTestValueSortOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchOrdersSourceFilter(t *testing.T) { + t.Run("SetSourceNames", func(t *testing.T) { + obj := &SearchOrdersSourceFilter{} + var fernTestValueSourceNames []string + obj.SetSourceNames(fernTestValueSourceNames) + assert.Equal(t, fernTestValueSourceNames, obj.SourceNames) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSourceApplicationIDs", func(t *testing.T) { + obj := &SearchOrdersSourceFilter{} + var fernTestValueSourceApplicationIDs []string + obj.SetSourceApplicationIDs(fernTestValueSourceApplicationIDs) + assert.Equal(t, fernTestValueSourceApplicationIDs, obj.SourceApplicationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSourceClientOus", func(t *testing.T) { + obj := &SearchOrdersSourceFilter{} + var fernTestValueSourceClientOus []string + obj.SetSourceClientOus(fernTestValueSourceClientOus) + assert.Equal(t, fernTestValueSourceClientOus, obj.SourceClientOus) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchOrdersSourceFilter(t *testing.T) { + t.Run("GetSourceNames", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersSourceFilter{} + var expected []string + obj.SourceNames = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSourceNames(), "getter should return the property value") + }) + + t.Run("GetSourceNames_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersSourceFilter{} + obj.SourceNames = nil + + // Act & Assert + assert.Nil(t, obj.GetSourceNames(), "getter should return nil when property is nil") + }) + + t.Run("GetSourceNames_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersSourceFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSourceNames() // Should return zero value + }) + + t.Run("GetSourceApplicationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersSourceFilter{} + var expected []string + obj.SourceApplicationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSourceApplicationIDs(), "getter should return the property value") + }) + + t.Run("GetSourceApplicationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersSourceFilter{} + obj.SourceApplicationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetSourceApplicationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetSourceApplicationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersSourceFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSourceApplicationIDs() // Should return zero value + }) + + t.Run("GetSourceClientOus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersSourceFilter{} + var expected []string + obj.SourceClientOus = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSourceClientOus(), "getter should return the property value") + }) + + t.Run("GetSourceClientOus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersSourceFilter{} + obj.SourceClientOus = nil + + // Act & Assert + assert.Nil(t, obj.GetSourceClientOus(), "getter should return nil when property is nil") + }) + + t.Run("GetSourceClientOus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersSourceFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSourceClientOus() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchOrdersSourceFilter(t *testing.T) { + t.Run("SetSourceNames_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersSourceFilter{} + var fernTestValueSourceNames []string + + // Act + obj.SetSourceNames(fernTestValueSourceNames) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSourceApplicationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersSourceFilter{} + var fernTestValueSourceApplicationIDs []string + + // Act + obj.SetSourceApplicationIDs(fernTestValueSourceApplicationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSourceClientOus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersSourceFilter{} + var fernTestValueSourceClientOus []string + + // Act + obj.SetSourceClientOus(fernTestValueSourceClientOus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchOrdersStateFilter(t *testing.T) { + t.Run("SetStates", func(t *testing.T) { + obj := &SearchOrdersStateFilter{} + var fernTestValueStates []OrderState + obj.SetStates(fernTestValueStates) + assert.Equal(t, fernTestValueStates, obj.States) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchOrdersStateFilter(t *testing.T) { + t.Run("GetStates", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersStateFilter{} + var expected []OrderState + obj.States = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStates(), "getter should return the property value") + }) + + t.Run("GetStates_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersStateFilter{} + obj.States = nil + + // Act & Assert + assert.Nil(t, obj.GetStates(), "getter should return nil when property is nil") + }) + + t.Run("GetStates_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersStateFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStates() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchOrdersStateFilter(t *testing.T) { + t.Run("SetStates_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersStateFilter{} + var fernTestValueStates []OrderState + + // Act + obj.SetStates(fernTestValueStates) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateOrderResponse(t *testing.T) { + t.Run("SetOrder", func(t *testing.T) { + obj := &UpdateOrderResponse{} + var fernTestValueOrder *Order + obj.SetOrder(fernTestValueOrder) + assert.Equal(t, fernTestValueOrder, obj.Order) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateOrderResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateOrderResponse(t *testing.T) { + t.Run("GetOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateOrderResponse{} + var expected *Order + obj.Order = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrder(), "getter should return the property value") + }) + + t.Run("GetOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateOrderResponse{} + obj.Order = nil + + // Act & Assert + assert.Nil(t, obj.GetOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateOrderResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrder() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateOrderResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateOrderResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateOrderResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateOrderResponse(t *testing.T) { + t.Run("SetOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateOrderResponse{} + var fernTestValueOrder *Order + + // Act + obj.SetOrder(fernTestValueOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateOrderResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateOrderRequest(t *testing.T) { + t.Run("SetOrderID", func(t *testing.T) { + obj := &UpdateOrderRequest{} + var fernTestValueOrderID string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrder", func(t *testing.T) { + obj := &UpdateOrderRequest{} + var fernTestValueOrder *Order + obj.SetOrder(fernTestValueOrder) + assert.Equal(t, fernTestValueOrder, obj.Order) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFieldsToClear", func(t *testing.T) { + obj := &UpdateOrderRequest{} + var fernTestValueFieldsToClear []string + obj.SetFieldsToClear(fernTestValueFieldsToClear) + assert.Equal(t, fernTestValueFieldsToClear, obj.FieldsToClear) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &UpdateOrderRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateOrderRequest(t *testing.T) { + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateOrderRequest{} + var fernTestValueOrderID string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateOrderRequest{} + var fernTestValueOrder *Order + + // Act + obj.SetOrder(fernTestValueOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFieldsToClear_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateOrderRequest{} + var fernTestValueFieldsToClear []string + + // Act + obj.SetFieldsToClear(fernTestValueFieldsToClear) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateOrderRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingBatchGetOrdersResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetOrdersResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BatchGetOrdersResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BatchGetOrdersResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BatchGetOrdersResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCalculateOrderResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CalculateOrderResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CalculateOrderResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CalculateOrderResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CalculateOrderResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCloneOrderResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CloneOrderResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CloneOrderResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CloneOrderResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CloneOrderResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateOrderResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateOrderResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateOrderResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateOrderResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateOrderResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetOrderResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetOrderResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetOrderResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetOrderResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetOrderResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderEntry(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderEntry{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderEntry + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderEntry + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderEntry + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPayOrderResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayOrderResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PayOrderResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PayOrderResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PayOrderResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchOrdersCustomerFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersCustomerFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchOrdersCustomerFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchOrdersCustomerFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchOrdersCustomerFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchOrdersDateTimeFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersDateTimeFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchOrdersDateTimeFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchOrdersDateTimeFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchOrdersDateTimeFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchOrdersFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchOrdersFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchOrdersFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchOrdersFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchOrdersFulfillmentFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersFulfillmentFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchOrdersFulfillmentFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchOrdersFulfillmentFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchOrdersFulfillmentFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchOrdersQuery(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersQuery{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchOrdersQuery + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchOrdersQuery + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchOrdersQuery + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchOrdersResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchOrdersResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchOrdersResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchOrdersResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchOrdersSort(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersSort{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchOrdersSort + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchOrdersSort + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchOrdersSort + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchOrdersSourceFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersSourceFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchOrdersSourceFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchOrdersSourceFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchOrdersSourceFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchOrdersStateFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchOrdersStateFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchOrdersStateFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchOrdersStateFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchOrdersStateFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateOrderResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateOrderResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateOrderResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateOrderResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateOrderResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringBatchGetOrdersResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BatchGetOrdersResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetOrdersResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCalculateOrderResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CalculateOrderResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CalculateOrderResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCloneOrderResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CloneOrderResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CloneOrderResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateOrderResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateOrderResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateOrderResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetOrderResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetOrderResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetOrderResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderEntry(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderEntry{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderEntry + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPayOrderResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PayOrderResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayOrderResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchOrdersCustomerFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchOrdersCustomerFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersCustomerFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchOrdersDateTimeFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchOrdersDateTimeFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersDateTimeFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchOrdersFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchOrdersFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchOrdersFulfillmentFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchOrdersFulfillmentFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersFulfillmentFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchOrdersQuery(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchOrdersQuery{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersQuery + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchOrdersResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchOrdersResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchOrdersSort(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchOrdersSort{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersSort + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchOrdersSourceFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchOrdersSourceFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersSourceFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchOrdersStateFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchOrdersStateFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersStateFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateOrderResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateOrderResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateOrderResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestEnumSearchOrdersSortField(t *testing.T) { + t.Run("NewFromString_CREATED_AT", func(t *testing.T) { + t.Parallel() + val, err := NewSearchOrdersSortFieldFromString("CREATED_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SearchOrdersSortField("CREATED_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UPDATED_AT", func(t *testing.T) { + t.Parallel() + val, err := NewSearchOrdersSortFieldFromString("UPDATED_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SearchOrdersSortField("UPDATED_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CLOSED_AT", func(t *testing.T) { + t.Parallel() + val, err := NewSearchOrdersSortFieldFromString("CLOSED_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SearchOrdersSortField("CLOSED_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewSearchOrdersSortFieldFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewSearchOrdersSortFieldFromString("CREATED_AT") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestExtraPropertiesBatchGetOrdersResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BatchGetOrdersResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetOrdersResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCalculateOrderResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CalculateOrderResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CalculateOrderResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCloneOrderResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CloneOrderResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CloneOrderResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateOrderResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateOrderResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateOrderResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetOrderResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetOrderResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetOrderResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderEntry(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderEntry{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderEntry + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPayOrderResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PayOrderResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayOrderResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchOrdersCustomerFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchOrdersCustomerFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersCustomerFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchOrdersDateTimeFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchOrdersDateTimeFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersDateTimeFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchOrdersFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchOrdersFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchOrdersFulfillmentFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchOrdersFulfillmentFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersFulfillmentFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchOrdersQuery(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchOrdersQuery{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersQuery + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchOrdersResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchOrdersResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchOrdersSort(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchOrdersSort{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersSort + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchOrdersSourceFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchOrdersSourceFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersSourceFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchOrdersStateFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchOrdersStateFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchOrdersStateFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateOrderResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateOrderResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateOrderResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/payments.go b/payments.go index 1224e15..1a1fc12 100644 --- a/payments.go +++ b/payments.go @@ -61,6 +61,27 @@ func (c *CancelPaymentByIdempotencyKeyRequest) SetIdempotencyKey(idempotencyKey c.require(cancelPaymentByIdempotencyKeyRequestFieldIdempotencyKey) } +func (c *CancelPaymentByIdempotencyKeyRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CancelPaymentByIdempotencyKeyRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CancelPaymentByIdempotencyKeyRequest(body) + return nil +} + +func (c *CancelPaymentByIdempotencyKeyRequest) MarshalJSON() ([]byte, error) { + type embed CancelPaymentByIdempotencyKeyRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( completePaymentRequestFieldPaymentID = big.NewInt(1 << 0) completePaymentRequestFieldVersionToken = big.NewInt(1 << 1) @@ -99,6 +120,27 @@ func (c *CompletePaymentRequest) SetVersionToken(versionToken *string) { c.require(completePaymentRequestFieldVersionToken) } +func (c *CompletePaymentRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CompletePaymentRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CompletePaymentRequest(body) + return nil +} + +func (c *CompletePaymentRequest) MarshalJSON() ([]byte, error) { + type embed CompletePaymentRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( createPaymentRequestFieldSourceID = big.NewInt(1 << 0) createPaymentRequestFieldIdempotencyKey = big.NewInt(1 << 1) @@ -464,6 +506,27 @@ func (c *CreatePaymentRequest) SetOfflinePaymentDetails(offlinePaymentDetails *O c.require(createPaymentRequestFieldOfflinePaymentDetails) } +func (c *CreatePaymentRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreatePaymentRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreatePaymentRequest(body) + return nil +} + +func (c *CreatePaymentRequest) MarshalJSON() ([]byte, error) { + type embed CreatePaymentRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( getPaymentsRequestFieldPaymentID = big.NewInt(1 << 0) ) @@ -730,6 +793,9 @@ func (a *AchDetails) GetAccountType() *string { } func (a *AchDetails) GetExtraProperties() map[string]interface{} { + if a == nil { + return nil + } return a.extraProperties } @@ -789,6 +855,9 @@ func (a *AchDetails) MarshalJSON() ([]byte, error) { } func (a *AchDetails) String() string { + if a == nil { + return "" + } if len(a.rawJSON) > 0 { if value, err := internal.StringifyJSON(a.rawJSON); err == nil { return value @@ -824,6 +893,9 @@ func (a *AfterpayDetails) GetEmailAddress() *string { } func (a *AfterpayDetails) GetExtraProperties() map[string]interface{} { + if a == nil { + return nil + } return a.extraProperties } @@ -869,6 +941,9 @@ func (a *AfterpayDetails) MarshalJSON() ([]byte, error) { } func (a *AfterpayDetails) String() string { + if a == nil { + return "" + } if len(a.rawJSON) > 0 { if value, err := internal.StringifyJSON(a.rawJSON); err == nil { return value @@ -922,6 +997,9 @@ func (a *ApplicationDetails) GetApplicationID() *string { } func (a *ApplicationDetails) GetExtraProperties() map[string]interface{} { + if a == nil { + return nil + } return a.extraProperties } @@ -974,6 +1052,9 @@ func (a *ApplicationDetails) MarshalJSON() ([]byte, error) { } func (a *ApplicationDetails) String() string { + if a == nil { + return "" + } if len(a.rawJSON) > 0 { if value, err := internal.StringifyJSON(a.rawJSON); err == nil { return value @@ -1129,6 +1210,9 @@ func (b *BankAccountPaymentDetails) GetErrors() []*Error { } func (b *BankAccountPaymentDetails) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -1223,6 +1307,9 @@ func (b *BankAccountPaymentDetails) MarshalJSON() ([]byte, error) { } func (b *BankAccountPaymentDetails) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -1291,6 +1378,9 @@ func (b *BuyNowPayLaterDetails) GetErrors() []*Error { } func (b *BuyNowPayLaterDetails) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -1357,6 +1447,9 @@ func (b *BuyNowPayLaterDetails) MarshalJSON() ([]byte, error) { } func (b *BuyNowPayLaterDetails) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -1394,6 +1487,9 @@ func (c *CancelPaymentByIdempotencyKeyResponse) GetErrors() []*Error { } func (c *CancelPaymentByIdempotencyKeyResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -1439,6 +1535,9 @@ func (c *CancelPaymentByIdempotencyKeyResponse) MarshalJSON() ([]byte, error) { } func (c *CancelPaymentByIdempotencyKeyResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -1484,6 +1583,9 @@ func (c *CancelPaymentResponse) GetPayment() *Payment { } func (c *CancelPaymentResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -1536,6 +1638,9 @@ func (c *CancelPaymentResponse) MarshalJSON() ([]byte, error) { } func (c *CancelPaymentResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -1734,6 +1839,9 @@ func (c *CardPaymentDetails) GetErrors() []*Error { } func (c *CardPaymentDetails) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -1884,6 +1992,9 @@ func (c *CardPaymentDetails) MarshalJSON() ([]byte, error) { } func (c *CardPaymentDetails) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -1939,6 +2050,9 @@ func (c *CardPaymentTimeline) GetVoidedAt() *string { } func (c *CardPaymentTimeline) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -1998,6 +2112,9 @@ func (c *CardPaymentTimeline) MarshalJSON() ([]byte, error) { } func (c *CardPaymentTimeline) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -2055,6 +2172,9 @@ func (c *CashAppDetails) GetBuyerCashtag() *string { } func (c *CashAppDetails) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -2114,6 +2234,9 @@ func (c *CashAppDetails) MarshalJSON() ([]byte, error) { } func (c *CashAppDetails) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -2162,6 +2285,9 @@ func (c *CashPaymentDetails) GetChangeBackMoney() *Money { } func (c *CashPaymentDetails) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -2214,6 +2340,9 @@ func (c *CashPaymentDetails) MarshalJSON() ([]byte, error) { } func (c *CashPaymentDetails) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -2249,6 +2378,9 @@ func (c *ClearpayDetails) GetEmailAddress() *string { } func (c *ClearpayDetails) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -2294,6 +2426,9 @@ func (c *ClearpayDetails) MarshalJSON() ([]byte, error) { } func (c *ClearpayDetails) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -2339,6 +2474,9 @@ func (c *CompletePaymentResponse) GetPayment() *Payment { } func (c *CompletePaymentResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -2391,6 +2529,9 @@ func (c *CompletePaymentResponse) MarshalJSON() ([]byte, error) { } func (c *CompletePaymentResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -2439,6 +2580,9 @@ func (c *CreatePaymentResponse) GetPayment() *Payment { } func (c *CreatePaymentResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -2491,6 +2635,9 @@ func (c *CreatePaymentResponse) MarshalJSON() ([]byte, error) { } func (c *CreatePaymentResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -2537,6 +2684,9 @@ func (c *CustomerDetails) GetSellerKeyedIn() *bool { } func (c *CustomerDetails) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -2589,6 +2739,9 @@ func (c *CustomerDetails) MarshalJSON() ([]byte, error) { } func (c *CustomerDetails) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -2644,6 +2797,9 @@ func (d *DeviceDetails) GetDeviceName() *string { } func (d *DeviceDetails) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -2703,6 +2859,9 @@ func (d *DeviceDetails) MarshalJSON() ([]byte, error) { } func (d *DeviceDetails) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -2770,6 +2929,9 @@ func (d *DigitalWalletDetails) GetErrors() []*Error { } func (d *DigitalWalletDetails) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -2836,6 +2998,9 @@ func (d *DigitalWalletDetails) MarshalJSON() ([]byte, error) { } func (d *DigitalWalletDetails) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -2917,6 +3082,9 @@ func (e *ExternalPaymentDetails) GetSourceFeeMoney() *Money { } func (e *ExternalPaymentDetails) GetExtraProperties() map[string]interface{} { + if e == nil { + return nil + } return e.extraProperties } @@ -2983,6 +3151,9 @@ func (e *ExternalPaymentDetails) MarshalJSON() ([]byte, error) { } func (e *ExternalPaymentDetails) String() string { + if e == nil { + return "" + } if len(e.rawJSON) > 0 { if value, err := internal.StringifyJSON(e.rawJSON); err == nil { return value @@ -3028,6 +3199,9 @@ func (g *GetPaymentResponse) GetPayment() *Payment { } func (g *GetPaymentResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -3080,6 +3254,9 @@ func (g *GetPaymentResponse) MarshalJSON() ([]byte, error) { } func (g *GetPaymentResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -3163,6 +3340,9 @@ func (l *ListPaymentsResponse) GetCursor() *string { } func (l *ListPaymentsResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -3222,6 +3402,9 @@ func (l *ListPaymentsResponse) MarshalJSON() ([]byte, error) { } func (l *ListPaymentsResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -3257,6 +3440,9 @@ func (o *OfflinePaymentDetails) GetClientCreatedAt() *string { } func (o *OfflinePaymentDetails) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -3302,6 +3488,9 @@ func (o *OfflinePaymentDetails) MarshalJSON() ([]byte, error) { } func (o *OfflinePaymentDetails) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -3851,6 +4040,9 @@ func (p *Payment) GetVersionToken() *string { } func (p *Payment) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -4197,6 +4389,9 @@ func (p *Payment) MarshalJSON() ([]byte, error) { } func (p *Payment) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -4248,6 +4443,9 @@ func (r *RiskEvaluation) GetRiskLevel() *RiskEvaluationRiskLevel { } func (r *RiskEvaluation) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -4300,6 +4498,9 @@ func (r *RiskEvaluation) MarshalJSON() ([]byte, error) { } func (r *RiskEvaluation) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -4373,6 +4574,9 @@ func (s *SquareAccountDetails) GetErrors() []*Error { } func (s *SquareAccountDetails) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -4425,6 +4629,9 @@ func (s *SquareAccountDetails) MarshalJSON() ([]byte, error) { } func (s *SquareAccountDetails) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -4471,6 +4678,9 @@ func (u *UpdatePaymentResponse) GetPayment() *Payment { } func (u *UpdatePaymentResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -4523,6 +4733,9 @@ func (u *UpdatePaymentResponse) MarshalJSON() ([]byte, error) { } func (u *UpdatePaymentResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -4582,3 +4795,24 @@ func (u *UpdatePaymentRequest) SetIdempotencyKey(idempotencyKey string) { u.IdempotencyKey = idempotencyKey u.require(updatePaymentRequestFieldIdempotencyKey) } + +func (u *UpdatePaymentRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdatePaymentRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdatePaymentRequest(body) + return nil +} + +func (u *UpdatePaymentRequest) MarshalJSON() ([]byte, error) { + type embed UpdatePaymentRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/payments/payments_test/payments_test.go b/payments/payments_test/payments_test.go new file mode 100644 index 0000000..71574cf --- /dev/null +++ b/payments/payments_test/payments_test.go @@ -0,0 +1,326 @@ +// Code generated by Fern. DO NOT EDIT. + +package payments_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestPaymentsListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.ListPaymentsRequest{ + BeginTime: square.String( + "begin_time", + ), + EndTime: square.String( + "end_time", + ), + SortOrder: square.String( + "sort_order", + ), + Cursor: square.String( + "cursor", + ), + LocationID: square.String( + "location_id", + ), + Total: square.Int64( + int64(1000000), + ), + Last4: square.String( + "last_4", + ), + CardBrand: square.String( + "card_brand", + ), + Limit: square.Int( + 1, + ), + IsOfflinePayment: square.Bool( + true, + ), + OfflineBeginTime: square.String( + "offline_begin_time", + ), + OfflineEndTime: square.String( + "offline_end_time", + ), + UpdatedAtBeginTime: square.String( + "updated_at_begin_time", + ), + UpdatedAtEndTime: square.String( + "updated_at_end_time", + ), + SortField: square.ListPaymentsRequestSortFieldCreatedAt.Ptr(), + } + _, invocationErr := client.Payments.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestPaymentsListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestPaymentsListWithWireMock", "GET", "/v2/payments", map[string]string{"begin_time": "begin_time", "end_time": "end_time", "sort_order": "sort_order", "cursor": "cursor", "location_id": "location_id", "total": "1000000", "last_4": "last_4", "card_brand": "card_brand", "limit": "1", "is_offline_payment": "true", "offline_begin_time": "offline_begin_time", "offline_end_time": "offline_end_time", "updated_at_begin_time": "updated_at_begin_time", "updated_at_end_time": "updated_at_end_time", "sort_field": "CREATED_AT"}, 1) +} + +func TestPaymentsCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CreatePaymentRequest{ + SourceID: "ccof:GaJGNaZa8x4OgDJn4GB", + IdempotencyKey: "7b0f3ec5-086a-4871-8f13-3c81b3875218", + AmountMoney: &square.Money{ + Amount: square.Int64( + int64(1000), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + AppFeeMoney: &square.Money{ + Amount: square.Int64( + int64(10), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + Autocomplete: square.Bool( + true, + ), + CustomerID: square.String( + "W92WH6P11H4Z77CTET0RNTGFW8", + ), + LocationID: square.String( + "L88917AVBK2S5", + ), + ReferenceID: square.String( + "123456", + ), + Note: square.String( + "Brief description", + ), + } + _, invocationErr := client.Payments.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestPaymentsCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestPaymentsCreateWithWireMock", "POST", "/v2/payments", nil, 1) +} + +func TestPaymentsCancelByIdempotencyKeyWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CancelPaymentByIdempotencyKeyRequest{ + IdempotencyKey: "a7e36d40-d24b-11e8-b568-0800200c9a66", + } + _, invocationErr := client.Payments.CancelByIdempotencyKey( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestPaymentsCancelByIdempotencyKeyWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestPaymentsCancelByIdempotencyKeyWithWireMock", "POST", "/v2/payments/cancel", nil, 1) +} + +func TestPaymentsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.GetPaymentsRequest{ + PaymentID: "payment_id", + } + _, invocationErr := client.Payments.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestPaymentsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestPaymentsGetWithWireMock", "GET", "/v2/payments/payment_id", nil, 1) +} + +func TestPaymentsUpdateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.UpdatePaymentRequest{ + PaymentID: "payment_id", + Payment: &square.Payment{ + AmountMoney: &square.Money{ + Amount: square.Int64( + int64(1000), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + TipMoney: &square.Money{ + Amount: square.Int64( + int64(100), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + VersionToken: square.String( + "ODhwVQ35xwlzRuoZEwKXucfu7583sPTzK48c5zoGd0g6o", + ), + }, + IdempotencyKey: "956f8b13-e4ec-45d6-85e8-d1d95ef0c5de", + } + _, invocationErr := client.Payments.Update( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestPaymentsUpdateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestPaymentsUpdateWithWireMock", "PUT", "/v2/payments/payment_id", nil, 1) +} + +func TestPaymentsCancelWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CancelPaymentsRequest{ + PaymentID: "payment_id", + } + _, invocationErr := client.Payments.Cancel( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestPaymentsCancelWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestPaymentsCancelWithWireMock", "POST", "/v2/payments/payment_id/cancel", nil, 1) +} + +func TestPaymentsCompleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CompletePaymentRequest{ + PaymentID: "payment_id", + } + _, invocationErr := client.Payments.Complete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestPaymentsCompleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestPaymentsCompleteWithWireMock", "POST", "/v2/payments/payment_id/complete", nil, 1) +} diff --git a/payments_test.go b/payments_test.go new file mode 100644 index 0000000..2e20110 --- /dev/null +++ b/payments_test.go @@ -0,0 +1,12661 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersCancelPaymentsRequest(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &CancelPaymentsRequest{} + var fernTestValuePaymentID string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCancelPaymentsRequest(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelPaymentsRequest{} + var fernTestValuePaymentID string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCancelPaymentByIdempotencyKeyRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CancelPaymentByIdempotencyKeyRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCancelPaymentByIdempotencyKeyRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelPaymentByIdempotencyKeyRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCompletePaymentRequest(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &CompletePaymentRequest{} + var fernTestValuePaymentID string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersionToken", func(t *testing.T) { + obj := &CompletePaymentRequest{} + var fernTestValueVersionToken *string + obj.SetVersionToken(fernTestValueVersionToken) + assert.Equal(t, fernTestValueVersionToken, obj.VersionToken) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCompletePaymentRequest(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CompletePaymentRequest{} + var fernTestValuePaymentID string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersionToken_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CompletePaymentRequest{} + var fernTestValueVersionToken *string + + // Act + obj.SetVersionToken(fernTestValueVersionToken) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreatePaymentRequest(t *testing.T) { + t.Run("SetSourceID", func(t *testing.T) { + obj := &CreatePaymentRequest{} + var fernTestValueSourceID string + obj.SetSourceID(fernTestValueSourceID) + assert.Equal(t, fernTestValueSourceID, obj.SourceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreatePaymentRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &CreatePaymentRequest{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTipMoney", func(t *testing.T) { + obj := &CreatePaymentRequest{} + var fernTestValueTipMoney *Money + obj.SetTipMoney(fernTestValueTipMoney) + assert.Equal(t, fernTestValueTipMoney, obj.TipMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppFeeMoney", func(t *testing.T) { + obj := &CreatePaymentRequest{} + var fernTestValueAppFeeMoney *Money + obj.SetAppFeeMoney(fernTestValueAppFeeMoney) + assert.Equal(t, fernTestValueAppFeeMoney, obj.AppFeeMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDelayDuration", func(t *testing.T) { + obj := &CreatePaymentRequest{} + var fernTestValueDelayDuration *string + obj.SetDelayDuration(fernTestValueDelayDuration) + assert.Equal(t, fernTestValueDelayDuration, obj.DelayDuration) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDelayAction", func(t *testing.T) { + obj := &CreatePaymentRequest{} + var fernTestValueDelayAction *string + obj.SetDelayAction(fernTestValueDelayAction) + assert.Equal(t, fernTestValueDelayAction, obj.DelayAction) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAutocomplete", func(t *testing.T) { + obj := &CreatePaymentRequest{} + var fernTestValueAutocomplete *bool + obj.SetAutocomplete(fernTestValueAutocomplete) + assert.Equal(t, fernTestValueAutocomplete, obj.Autocomplete) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrderID", func(t *testing.T) { + obj := &CreatePaymentRequest{} + var fernTestValueOrderID *string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerID", func(t *testing.T) { + obj := &CreatePaymentRequest{} + var fernTestValueCustomerID *string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &CreatePaymentRequest{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTeamMemberID", func(t *testing.T) { + obj := &CreatePaymentRequest{} + var fernTestValueTeamMemberID *string + obj.SetTeamMemberID(fernTestValueTeamMemberID) + assert.Equal(t, fernTestValueTeamMemberID, obj.TeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReferenceID", func(t *testing.T) { + obj := &CreatePaymentRequest{} + var fernTestValueReferenceID *string + obj.SetReferenceID(fernTestValueReferenceID) + assert.Equal(t, fernTestValueReferenceID, obj.ReferenceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVerificationToken", func(t *testing.T) { + obj := &CreatePaymentRequest{} + var fernTestValueVerificationToken *string + obj.SetVerificationToken(fernTestValueVerificationToken) + assert.Equal(t, fernTestValueVerificationToken, obj.VerificationToken) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAcceptPartialAuthorization", func(t *testing.T) { + obj := &CreatePaymentRequest{} + var fernTestValueAcceptPartialAuthorization *bool + obj.SetAcceptPartialAuthorization(fernTestValueAcceptPartialAuthorization) + assert.Equal(t, fernTestValueAcceptPartialAuthorization, obj.AcceptPartialAuthorization) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBuyerEmailAddress", func(t *testing.T) { + obj := &CreatePaymentRequest{} + var fernTestValueBuyerEmailAddress *string + obj.SetBuyerEmailAddress(fernTestValueBuyerEmailAddress) + assert.Equal(t, fernTestValueBuyerEmailAddress, obj.BuyerEmailAddress) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBuyerPhoneNumber", func(t *testing.T) { + obj := &CreatePaymentRequest{} + var fernTestValueBuyerPhoneNumber *string + obj.SetBuyerPhoneNumber(fernTestValueBuyerPhoneNumber) + assert.Equal(t, fernTestValueBuyerPhoneNumber, obj.BuyerPhoneNumber) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBillingAddress", func(t *testing.T) { + obj := &CreatePaymentRequest{} + var fernTestValueBillingAddress *Address + obj.SetBillingAddress(fernTestValueBillingAddress) + assert.Equal(t, fernTestValueBillingAddress, obj.BillingAddress) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetShippingAddress", func(t *testing.T) { + obj := &CreatePaymentRequest{} + var fernTestValueShippingAddress *Address + obj.SetShippingAddress(fernTestValueShippingAddress) + assert.Equal(t, fernTestValueShippingAddress, obj.ShippingAddress) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNote", func(t *testing.T) { + obj := &CreatePaymentRequest{} + var fernTestValueNote *string + obj.SetNote(fernTestValueNote) + assert.Equal(t, fernTestValueNote, obj.Note) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatementDescriptionIdentifier", func(t *testing.T) { + obj := &CreatePaymentRequest{} + var fernTestValueStatementDescriptionIdentifier *string + obj.SetStatementDescriptionIdentifier(fernTestValueStatementDescriptionIdentifier) + assert.Equal(t, fernTestValueStatementDescriptionIdentifier, obj.StatementDescriptionIdentifier) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCashDetails", func(t *testing.T) { + obj := &CreatePaymentRequest{} + var fernTestValueCashDetails *CashPaymentDetails + obj.SetCashDetails(fernTestValueCashDetails) + assert.Equal(t, fernTestValueCashDetails, obj.CashDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExternalDetails", func(t *testing.T) { + obj := &CreatePaymentRequest{} + var fernTestValueExternalDetails *ExternalPaymentDetails + obj.SetExternalDetails(fernTestValueExternalDetails) + assert.Equal(t, fernTestValueExternalDetails, obj.ExternalDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerDetails", func(t *testing.T) { + obj := &CreatePaymentRequest{} + var fernTestValueCustomerDetails *CustomerDetails + obj.SetCustomerDetails(fernTestValueCustomerDetails) + assert.Equal(t, fernTestValueCustomerDetails, obj.CustomerDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOfflinePaymentDetails", func(t *testing.T) { + obj := &CreatePaymentRequest{} + var fernTestValueOfflinePaymentDetails *OfflinePaymentDetails + obj.SetOfflinePaymentDetails(fernTestValueOfflinePaymentDetails) + assert.Equal(t, fernTestValueOfflinePaymentDetails, obj.OfflinePaymentDetails) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreatePaymentRequest(t *testing.T) { + t.Run("SetSourceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentRequest{} + var fernTestValueSourceID string + + // Act + obj.SetSourceID(fernTestValueSourceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentRequest{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTipMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentRequest{} + var fernTestValueTipMoney *Money + + // Act + obj.SetTipMoney(fernTestValueTipMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppFeeMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentRequest{} + var fernTestValueAppFeeMoney *Money + + // Act + obj.SetAppFeeMoney(fernTestValueAppFeeMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDelayDuration_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentRequest{} + var fernTestValueDelayDuration *string + + // Act + obj.SetDelayDuration(fernTestValueDelayDuration) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDelayAction_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentRequest{} + var fernTestValueDelayAction *string + + // Act + obj.SetDelayAction(fernTestValueDelayAction) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAutocomplete_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentRequest{} + var fernTestValueAutocomplete *bool + + // Act + obj.SetAutocomplete(fernTestValueAutocomplete) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentRequest{} + var fernTestValueOrderID *string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentRequest{} + var fernTestValueCustomerID *string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentRequest{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentRequest{} + var fernTestValueTeamMemberID *string + + // Act + obj.SetTeamMemberID(fernTestValueTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReferenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentRequest{} + var fernTestValueReferenceID *string + + // Act + obj.SetReferenceID(fernTestValueReferenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVerificationToken_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentRequest{} + var fernTestValueVerificationToken *string + + // Act + obj.SetVerificationToken(fernTestValueVerificationToken) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAcceptPartialAuthorization_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentRequest{} + var fernTestValueAcceptPartialAuthorization *bool + + // Act + obj.SetAcceptPartialAuthorization(fernTestValueAcceptPartialAuthorization) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBuyerEmailAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentRequest{} + var fernTestValueBuyerEmailAddress *string + + // Act + obj.SetBuyerEmailAddress(fernTestValueBuyerEmailAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBuyerPhoneNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentRequest{} + var fernTestValueBuyerPhoneNumber *string + + // Act + obj.SetBuyerPhoneNumber(fernTestValueBuyerPhoneNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBillingAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentRequest{} + var fernTestValueBillingAddress *Address + + // Act + obj.SetBillingAddress(fernTestValueBillingAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetShippingAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentRequest{} + var fernTestValueShippingAddress *Address + + // Act + obj.SetShippingAddress(fernTestValueShippingAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNote_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentRequest{} + var fernTestValueNote *string + + // Act + obj.SetNote(fernTestValueNote) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatementDescriptionIdentifier_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentRequest{} + var fernTestValueStatementDescriptionIdentifier *string + + // Act + obj.SetStatementDescriptionIdentifier(fernTestValueStatementDescriptionIdentifier) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCashDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentRequest{} + var fernTestValueCashDetails *CashPaymentDetails + + // Act + obj.SetCashDetails(fernTestValueCashDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExternalDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentRequest{} + var fernTestValueExternalDetails *ExternalPaymentDetails + + // Act + obj.SetExternalDetails(fernTestValueExternalDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentRequest{} + var fernTestValueCustomerDetails *CustomerDetails + + // Act + obj.SetCustomerDetails(fernTestValueCustomerDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOfflinePaymentDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentRequest{} + var fernTestValueOfflinePaymentDetails *OfflinePaymentDetails + + // Act + obj.SetOfflinePaymentDetails(fernTestValueOfflinePaymentDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetPaymentsRequest(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &GetPaymentsRequest{} + var fernTestValuePaymentID string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetPaymentsRequest(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPaymentsRequest{} + var fernTestValuePaymentID string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListPaymentsRequest(t *testing.T) { + t.Run("SetBeginTime", func(t *testing.T) { + obj := &ListPaymentsRequest{} + var fernTestValueBeginTime *string + obj.SetBeginTime(fernTestValueBeginTime) + assert.Equal(t, fernTestValueBeginTime, obj.BeginTime) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEndTime", func(t *testing.T) { + obj := &ListPaymentsRequest{} + var fernTestValueEndTime *string + obj.SetEndTime(fernTestValueEndTime) + assert.Equal(t, fernTestValueEndTime, obj.EndTime) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSortOrder", func(t *testing.T) { + obj := &ListPaymentsRequest{} + var fernTestValueSortOrder *string + obj.SetSortOrder(fernTestValueSortOrder) + assert.Equal(t, fernTestValueSortOrder, obj.SortOrder) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListPaymentsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &ListPaymentsRequest{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTotal", func(t *testing.T) { + obj := &ListPaymentsRequest{} + var fernTestValueTotal *int64 + obj.SetTotal(fernTestValueTotal) + assert.Equal(t, fernTestValueTotal, obj.Total) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLast4", func(t *testing.T) { + obj := &ListPaymentsRequest{} + var fernTestValueLast4 *string + obj.SetLast4(fernTestValueLast4) + assert.Equal(t, fernTestValueLast4, obj.Last4) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCardBrand", func(t *testing.T) { + obj := &ListPaymentsRequest{} + var fernTestValueCardBrand *string + obj.SetCardBrand(fernTestValueCardBrand) + assert.Equal(t, fernTestValueCardBrand, obj.CardBrand) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListPaymentsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsOfflinePayment", func(t *testing.T) { + obj := &ListPaymentsRequest{} + var fernTestValueIsOfflinePayment *bool + obj.SetIsOfflinePayment(fernTestValueIsOfflinePayment) + assert.Equal(t, fernTestValueIsOfflinePayment, obj.IsOfflinePayment) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOfflineBeginTime", func(t *testing.T) { + obj := &ListPaymentsRequest{} + var fernTestValueOfflineBeginTime *string + obj.SetOfflineBeginTime(fernTestValueOfflineBeginTime) + assert.Equal(t, fernTestValueOfflineBeginTime, obj.OfflineBeginTime) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOfflineEndTime", func(t *testing.T) { + obj := &ListPaymentsRequest{} + var fernTestValueOfflineEndTime *string + obj.SetOfflineEndTime(fernTestValueOfflineEndTime) + assert.Equal(t, fernTestValueOfflineEndTime, obj.OfflineEndTime) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAtBeginTime", func(t *testing.T) { + obj := &ListPaymentsRequest{} + var fernTestValueUpdatedAtBeginTime *string + obj.SetUpdatedAtBeginTime(fernTestValueUpdatedAtBeginTime) + assert.Equal(t, fernTestValueUpdatedAtBeginTime, obj.UpdatedAtBeginTime) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAtEndTime", func(t *testing.T) { + obj := &ListPaymentsRequest{} + var fernTestValueUpdatedAtEndTime *string + obj.SetUpdatedAtEndTime(fernTestValueUpdatedAtEndTime) + assert.Equal(t, fernTestValueUpdatedAtEndTime, obj.UpdatedAtEndTime) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSortField", func(t *testing.T) { + obj := &ListPaymentsRequest{} + var fernTestValueSortField *ListPaymentsRequestSortField + obj.SetSortField(fernTestValueSortField) + assert.Equal(t, fernTestValueSortField, obj.SortField) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListPaymentsRequest(t *testing.T) { + t.Run("SetBeginTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentsRequest{} + var fernTestValueBeginTime *string + + // Act + obj.SetBeginTime(fernTestValueBeginTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEndTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentsRequest{} + var fernTestValueEndTime *string + + // Act + obj.SetEndTime(fernTestValueEndTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSortOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentsRequest{} + var fernTestValueSortOrder *string + + // Act + obj.SetSortOrder(fernTestValueSortOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentsRequest{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTotal_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentsRequest{} + var fernTestValueTotal *int64 + + // Act + obj.SetTotal(fernTestValueTotal) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLast4_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentsRequest{} + var fernTestValueLast4 *string + + // Act + obj.SetLast4(fernTestValueLast4) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCardBrand_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentsRequest{} + var fernTestValueCardBrand *string + + // Act + obj.SetCardBrand(fernTestValueCardBrand) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsOfflinePayment_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentsRequest{} + var fernTestValueIsOfflinePayment *bool + + // Act + obj.SetIsOfflinePayment(fernTestValueIsOfflinePayment) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOfflineBeginTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentsRequest{} + var fernTestValueOfflineBeginTime *string + + // Act + obj.SetOfflineBeginTime(fernTestValueOfflineBeginTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOfflineEndTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentsRequest{} + var fernTestValueOfflineEndTime *string + + // Act + obj.SetOfflineEndTime(fernTestValueOfflineEndTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAtBeginTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentsRequest{} + var fernTestValueUpdatedAtBeginTime *string + + // Act + obj.SetUpdatedAtBeginTime(fernTestValueUpdatedAtBeginTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAtEndTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentsRequest{} + var fernTestValueUpdatedAtEndTime *string + + // Act + obj.SetUpdatedAtEndTime(fernTestValueUpdatedAtEndTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSortField_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentsRequest{} + var fernTestValueSortField *ListPaymentsRequestSortField + + // Act + obj.SetSortField(fernTestValueSortField) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersAchDetails(t *testing.T) { + t.Run("SetRoutingNumber", func(t *testing.T) { + obj := &AchDetails{} + var fernTestValueRoutingNumber *string + obj.SetRoutingNumber(fernTestValueRoutingNumber) + assert.Equal(t, fernTestValueRoutingNumber, obj.RoutingNumber) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAccountNumberSuffix", func(t *testing.T) { + obj := &AchDetails{} + var fernTestValueAccountNumberSuffix *string + obj.SetAccountNumberSuffix(fernTestValueAccountNumberSuffix) + assert.Equal(t, fernTestValueAccountNumberSuffix, obj.AccountNumberSuffix) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAccountType", func(t *testing.T) { + obj := &AchDetails{} + var fernTestValueAccountType *string + obj.SetAccountType(fernTestValueAccountType) + assert.Equal(t, fernTestValueAccountType, obj.AccountType) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersAchDetails(t *testing.T) { + t.Run("GetRoutingNumber", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AchDetails{} + var expected *string + obj.RoutingNumber = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRoutingNumber(), "getter should return the property value") + }) + + t.Run("GetRoutingNumber_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AchDetails{} + obj.RoutingNumber = nil + + // Act & Assert + assert.Nil(t, obj.GetRoutingNumber(), "getter should return nil when property is nil") + }) + + t.Run("GetRoutingNumber_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AchDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRoutingNumber() // Should return zero value + }) + + t.Run("GetAccountNumberSuffix", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AchDetails{} + var expected *string + obj.AccountNumberSuffix = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAccountNumberSuffix(), "getter should return the property value") + }) + + t.Run("GetAccountNumberSuffix_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AchDetails{} + obj.AccountNumberSuffix = nil + + // Act & Assert + assert.Nil(t, obj.GetAccountNumberSuffix(), "getter should return nil when property is nil") + }) + + t.Run("GetAccountNumberSuffix_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AchDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAccountNumberSuffix() // Should return zero value + }) + + t.Run("GetAccountType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AchDetails{} + var expected *string + obj.AccountType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAccountType(), "getter should return the property value") + }) + + t.Run("GetAccountType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AchDetails{} + obj.AccountType = nil + + // Act & Assert + assert.Nil(t, obj.GetAccountType(), "getter should return nil when property is nil") + }) + + t.Run("GetAccountType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AchDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAccountType() // Should return zero value + }) + +} + +func TestSettersMarkExplicitAchDetails(t *testing.T) { + t.Run("SetRoutingNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AchDetails{} + var fernTestValueRoutingNumber *string + + // Act + obj.SetRoutingNumber(fernTestValueRoutingNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAccountNumberSuffix_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AchDetails{} + var fernTestValueAccountNumberSuffix *string + + // Act + obj.SetAccountNumberSuffix(fernTestValueAccountNumberSuffix) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAccountType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AchDetails{} + var fernTestValueAccountType *string + + // Act + obj.SetAccountType(fernTestValueAccountType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersAfterpayDetails(t *testing.T) { + t.Run("SetEmailAddress", func(t *testing.T) { + obj := &AfterpayDetails{} + var fernTestValueEmailAddress *string + obj.SetEmailAddress(fernTestValueEmailAddress) + assert.Equal(t, fernTestValueEmailAddress, obj.EmailAddress) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersAfterpayDetails(t *testing.T) { + t.Run("GetEmailAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AfterpayDetails{} + var expected *string + obj.EmailAddress = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEmailAddress(), "getter should return the property value") + }) + + t.Run("GetEmailAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AfterpayDetails{} + obj.EmailAddress = nil + + // Act & Assert + assert.Nil(t, obj.GetEmailAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetEmailAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AfterpayDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEmailAddress() // Should return zero value + }) + +} + +func TestSettersMarkExplicitAfterpayDetails(t *testing.T) { + t.Run("SetEmailAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AfterpayDetails{} + var fernTestValueEmailAddress *string + + // Act + obj.SetEmailAddress(fernTestValueEmailAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersApplicationDetails(t *testing.T) { + t.Run("SetSquareProduct", func(t *testing.T) { + obj := &ApplicationDetails{} + var fernTestValueSquareProduct *ApplicationDetailsExternalSquareProduct + obj.SetSquareProduct(fernTestValueSquareProduct) + assert.Equal(t, fernTestValueSquareProduct, obj.SquareProduct) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetApplicationID", func(t *testing.T) { + obj := &ApplicationDetails{} + var fernTestValueApplicationID *string + obj.SetApplicationID(fernTestValueApplicationID) + assert.Equal(t, fernTestValueApplicationID, obj.ApplicationID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersApplicationDetails(t *testing.T) { + t.Run("GetSquareProduct", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ApplicationDetails{} + var expected *ApplicationDetailsExternalSquareProduct + obj.SquareProduct = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSquareProduct(), "getter should return the property value") + }) + + t.Run("GetSquareProduct_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ApplicationDetails{} + obj.SquareProduct = nil + + // Act & Assert + assert.Nil(t, obj.GetSquareProduct(), "getter should return nil when property is nil") + }) + + t.Run("GetSquareProduct_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ApplicationDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSquareProduct() // Should return zero value + }) + + t.Run("GetApplicationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ApplicationDetails{} + var expected *string + obj.ApplicationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetApplicationID(), "getter should return the property value") + }) + + t.Run("GetApplicationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ApplicationDetails{} + obj.ApplicationID = nil + + // Act & Assert + assert.Nil(t, obj.GetApplicationID(), "getter should return nil when property is nil") + }) + + t.Run("GetApplicationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ApplicationDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetApplicationID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitApplicationDetails(t *testing.T) { + t.Run("SetSquareProduct_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ApplicationDetails{} + var fernTestValueSquareProduct *ApplicationDetailsExternalSquareProduct + + // Act + obj.SetSquareProduct(fernTestValueSquareProduct) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetApplicationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ApplicationDetails{} + var fernTestValueApplicationID *string + + // Act + obj.SetApplicationID(fernTestValueApplicationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBankAccountPaymentDetails(t *testing.T) { + t.Run("SetBankName", func(t *testing.T) { + obj := &BankAccountPaymentDetails{} + var fernTestValueBankName *string + obj.SetBankName(fernTestValueBankName) + assert.Equal(t, fernTestValueBankName, obj.BankName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTransferType", func(t *testing.T) { + obj := &BankAccountPaymentDetails{} + var fernTestValueTransferType *string + obj.SetTransferType(fernTestValueTransferType) + assert.Equal(t, fernTestValueTransferType, obj.TransferType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAccountOwnershipType", func(t *testing.T) { + obj := &BankAccountPaymentDetails{} + var fernTestValueAccountOwnershipType *string + obj.SetAccountOwnershipType(fernTestValueAccountOwnershipType) + assert.Equal(t, fernTestValueAccountOwnershipType, obj.AccountOwnershipType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFingerprint", func(t *testing.T) { + obj := &BankAccountPaymentDetails{} + var fernTestValueFingerprint *string + obj.SetFingerprint(fernTestValueFingerprint) + assert.Equal(t, fernTestValueFingerprint, obj.Fingerprint) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCountry", func(t *testing.T) { + obj := &BankAccountPaymentDetails{} + var fernTestValueCountry *string + obj.SetCountry(fernTestValueCountry) + assert.Equal(t, fernTestValueCountry, obj.Country) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatementDescription", func(t *testing.T) { + obj := &BankAccountPaymentDetails{} + var fernTestValueStatementDescription *string + obj.SetStatementDescription(fernTestValueStatementDescription) + assert.Equal(t, fernTestValueStatementDescription, obj.StatementDescription) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAchDetails", func(t *testing.T) { + obj := &BankAccountPaymentDetails{} + var fernTestValueAchDetails *AchDetails + obj.SetAchDetails(fernTestValueAchDetails) + assert.Equal(t, fernTestValueAchDetails, obj.AchDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &BankAccountPaymentDetails{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBankAccountPaymentDetails(t *testing.T) { + t.Run("GetBankName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountPaymentDetails{} + var expected *string + obj.BankName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBankName(), "getter should return the property value") + }) + + t.Run("GetBankName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountPaymentDetails{} + obj.BankName = nil + + // Act & Assert + assert.Nil(t, obj.GetBankName(), "getter should return nil when property is nil") + }) + + t.Run("GetBankName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBankName() // Should return zero value + }) + + t.Run("GetTransferType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountPaymentDetails{} + var expected *string + obj.TransferType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTransferType(), "getter should return the property value") + }) + + t.Run("GetTransferType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountPaymentDetails{} + obj.TransferType = nil + + // Act & Assert + assert.Nil(t, obj.GetTransferType(), "getter should return nil when property is nil") + }) + + t.Run("GetTransferType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTransferType() // Should return zero value + }) + + t.Run("GetAccountOwnershipType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountPaymentDetails{} + var expected *string + obj.AccountOwnershipType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAccountOwnershipType(), "getter should return the property value") + }) + + t.Run("GetAccountOwnershipType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountPaymentDetails{} + obj.AccountOwnershipType = nil + + // Act & Assert + assert.Nil(t, obj.GetAccountOwnershipType(), "getter should return nil when property is nil") + }) + + t.Run("GetAccountOwnershipType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAccountOwnershipType() // Should return zero value + }) + + t.Run("GetFingerprint", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountPaymentDetails{} + var expected *string + obj.Fingerprint = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFingerprint(), "getter should return the property value") + }) + + t.Run("GetFingerprint_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountPaymentDetails{} + obj.Fingerprint = nil + + // Act & Assert + assert.Nil(t, obj.GetFingerprint(), "getter should return nil when property is nil") + }) + + t.Run("GetFingerprint_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFingerprint() // Should return zero value + }) + + t.Run("GetCountry", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountPaymentDetails{} + var expected *string + obj.Country = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCountry(), "getter should return the property value") + }) + + t.Run("GetCountry_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountPaymentDetails{} + obj.Country = nil + + // Act & Assert + assert.Nil(t, obj.GetCountry(), "getter should return nil when property is nil") + }) + + t.Run("GetCountry_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCountry() // Should return zero value + }) + + t.Run("GetStatementDescription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountPaymentDetails{} + var expected *string + obj.StatementDescription = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatementDescription(), "getter should return the property value") + }) + + t.Run("GetStatementDescription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountPaymentDetails{} + obj.StatementDescription = nil + + // Act & Assert + assert.Nil(t, obj.GetStatementDescription(), "getter should return nil when property is nil") + }) + + t.Run("GetStatementDescription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatementDescription() // Should return zero value + }) + + t.Run("GetAchDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountPaymentDetails{} + var expected *AchDetails + obj.AchDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAchDetails(), "getter should return the property value") + }) + + t.Run("GetAchDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountPaymentDetails{} + obj.AchDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetAchDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetAchDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAchDetails() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountPaymentDetails{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountPaymentDetails{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBankAccountPaymentDetails(t *testing.T) { + t.Run("SetBankName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountPaymentDetails{} + var fernTestValueBankName *string + + // Act + obj.SetBankName(fernTestValueBankName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTransferType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountPaymentDetails{} + var fernTestValueTransferType *string + + // Act + obj.SetTransferType(fernTestValueTransferType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAccountOwnershipType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountPaymentDetails{} + var fernTestValueAccountOwnershipType *string + + // Act + obj.SetAccountOwnershipType(fernTestValueAccountOwnershipType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFingerprint_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountPaymentDetails{} + var fernTestValueFingerprint *string + + // Act + obj.SetFingerprint(fernTestValueFingerprint) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCountry_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountPaymentDetails{} + var fernTestValueCountry *string + + // Act + obj.SetCountry(fernTestValueCountry) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatementDescription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountPaymentDetails{} + var fernTestValueStatementDescription *string + + // Act + obj.SetStatementDescription(fernTestValueStatementDescription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAchDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountPaymentDetails{} + var fernTestValueAchDetails *AchDetails + + // Act + obj.SetAchDetails(fernTestValueAchDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountPaymentDetails{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBuyNowPayLaterDetails(t *testing.T) { + t.Run("SetBrand", func(t *testing.T) { + obj := &BuyNowPayLaterDetails{} + var fernTestValueBrand *string + obj.SetBrand(fernTestValueBrand) + assert.Equal(t, fernTestValueBrand, obj.Brand) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAfterpayDetails", func(t *testing.T) { + obj := &BuyNowPayLaterDetails{} + var fernTestValueAfterpayDetails *AfterpayDetails + obj.SetAfterpayDetails(fernTestValueAfterpayDetails) + assert.Equal(t, fernTestValueAfterpayDetails, obj.AfterpayDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetClearpayDetails", func(t *testing.T) { + obj := &BuyNowPayLaterDetails{} + var fernTestValueClearpayDetails *ClearpayDetails + obj.SetClearpayDetails(fernTestValueClearpayDetails) + assert.Equal(t, fernTestValueClearpayDetails, obj.ClearpayDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &BuyNowPayLaterDetails{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBuyNowPayLaterDetails(t *testing.T) { + t.Run("GetBrand", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BuyNowPayLaterDetails{} + var expected *string + obj.Brand = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBrand(), "getter should return the property value") + }) + + t.Run("GetBrand_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BuyNowPayLaterDetails{} + obj.Brand = nil + + // Act & Assert + assert.Nil(t, obj.GetBrand(), "getter should return nil when property is nil") + }) + + t.Run("GetBrand_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BuyNowPayLaterDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBrand() // Should return zero value + }) + + t.Run("GetAfterpayDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BuyNowPayLaterDetails{} + var expected *AfterpayDetails + obj.AfterpayDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAfterpayDetails(), "getter should return the property value") + }) + + t.Run("GetAfterpayDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BuyNowPayLaterDetails{} + obj.AfterpayDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetAfterpayDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetAfterpayDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BuyNowPayLaterDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAfterpayDetails() // Should return zero value + }) + + t.Run("GetClearpayDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BuyNowPayLaterDetails{} + var expected *ClearpayDetails + obj.ClearpayDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetClearpayDetails(), "getter should return the property value") + }) + + t.Run("GetClearpayDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BuyNowPayLaterDetails{} + obj.ClearpayDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetClearpayDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetClearpayDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BuyNowPayLaterDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetClearpayDetails() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BuyNowPayLaterDetails{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BuyNowPayLaterDetails{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BuyNowPayLaterDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBuyNowPayLaterDetails(t *testing.T) { + t.Run("SetBrand_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BuyNowPayLaterDetails{} + var fernTestValueBrand *string + + // Act + obj.SetBrand(fernTestValueBrand) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAfterpayDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BuyNowPayLaterDetails{} + var fernTestValueAfterpayDetails *AfterpayDetails + + // Act + obj.SetAfterpayDetails(fernTestValueAfterpayDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetClearpayDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BuyNowPayLaterDetails{} + var fernTestValueClearpayDetails *ClearpayDetails + + // Act + obj.SetClearpayDetails(fernTestValueClearpayDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BuyNowPayLaterDetails{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCancelPaymentByIdempotencyKeyResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CancelPaymentByIdempotencyKeyResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCancelPaymentByIdempotencyKeyResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelPaymentByIdempotencyKeyResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelPaymentByIdempotencyKeyResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelPaymentByIdempotencyKeyResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCancelPaymentByIdempotencyKeyResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelPaymentByIdempotencyKeyResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCancelPaymentResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CancelPaymentResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPayment", func(t *testing.T) { + obj := &CancelPaymentResponse{} + var fernTestValuePayment *Payment + obj.SetPayment(fernTestValuePayment) + assert.Equal(t, fernTestValuePayment, obj.Payment) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCancelPaymentResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelPaymentResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelPaymentResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelPaymentResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetPayment", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelPaymentResponse{} + var expected *Payment + obj.Payment = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPayment(), "getter should return the property value") + }) + + t.Run("GetPayment_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelPaymentResponse{} + obj.Payment = nil + + // Act & Assert + assert.Nil(t, obj.GetPayment(), "getter should return nil when property is nil") + }) + + t.Run("GetPayment_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelPaymentResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPayment() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCancelPaymentResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelPaymentResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPayment_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelPaymentResponse{} + var fernTestValuePayment *Payment + + // Act + obj.SetPayment(fernTestValuePayment) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCardPaymentDetails(t *testing.T) { + t.Run("SetStatus", func(t *testing.T) { + obj := &CardPaymentDetails{} + var fernTestValueStatus *string + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCard", func(t *testing.T) { + obj := &CardPaymentDetails{} + var fernTestValueCard *Card + obj.SetCard(fernTestValueCard) + assert.Equal(t, fernTestValueCard, obj.Card) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEntryMethod", func(t *testing.T) { + obj := &CardPaymentDetails{} + var fernTestValueEntryMethod *string + obj.SetEntryMethod(fernTestValueEntryMethod) + assert.Equal(t, fernTestValueEntryMethod, obj.EntryMethod) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCvvStatus", func(t *testing.T) { + obj := &CardPaymentDetails{} + var fernTestValueCvvStatus *string + obj.SetCvvStatus(fernTestValueCvvStatus) + assert.Equal(t, fernTestValueCvvStatus, obj.CvvStatus) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAvsStatus", func(t *testing.T) { + obj := &CardPaymentDetails{} + var fernTestValueAvsStatus *string + obj.SetAvsStatus(fernTestValueAvsStatus) + assert.Equal(t, fernTestValueAvsStatus, obj.AvsStatus) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAuthResultCode", func(t *testing.T) { + obj := &CardPaymentDetails{} + var fernTestValueAuthResultCode *string + obj.SetAuthResultCode(fernTestValueAuthResultCode) + assert.Equal(t, fernTestValueAuthResultCode, obj.AuthResultCode) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetApplicationIdentifier", func(t *testing.T) { + obj := &CardPaymentDetails{} + var fernTestValueApplicationIdentifier *string + obj.SetApplicationIdentifier(fernTestValueApplicationIdentifier) + assert.Equal(t, fernTestValueApplicationIdentifier, obj.ApplicationIdentifier) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetApplicationName", func(t *testing.T) { + obj := &CardPaymentDetails{} + var fernTestValueApplicationName *string + obj.SetApplicationName(fernTestValueApplicationName) + assert.Equal(t, fernTestValueApplicationName, obj.ApplicationName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetApplicationCryptogram", func(t *testing.T) { + obj := &CardPaymentDetails{} + var fernTestValueApplicationCryptogram *string + obj.SetApplicationCryptogram(fernTestValueApplicationCryptogram) + assert.Equal(t, fernTestValueApplicationCryptogram, obj.ApplicationCryptogram) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVerificationMethod", func(t *testing.T) { + obj := &CardPaymentDetails{} + var fernTestValueVerificationMethod *string + obj.SetVerificationMethod(fernTestValueVerificationMethod) + assert.Equal(t, fernTestValueVerificationMethod, obj.VerificationMethod) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVerificationResults", func(t *testing.T) { + obj := &CardPaymentDetails{} + var fernTestValueVerificationResults *string + obj.SetVerificationResults(fernTestValueVerificationResults) + assert.Equal(t, fernTestValueVerificationResults, obj.VerificationResults) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatementDescription", func(t *testing.T) { + obj := &CardPaymentDetails{} + var fernTestValueStatementDescription *string + obj.SetStatementDescription(fernTestValueStatementDescription) + assert.Equal(t, fernTestValueStatementDescription, obj.StatementDescription) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeviceDetails", func(t *testing.T) { + obj := &CardPaymentDetails{} + var fernTestValueDeviceDetails *DeviceDetails + obj.SetDeviceDetails(fernTestValueDeviceDetails) + assert.Equal(t, fernTestValueDeviceDetails, obj.DeviceDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCardPaymentTimeline", func(t *testing.T) { + obj := &CardPaymentDetails{} + var fernTestValueCardPaymentTimeline *CardPaymentTimeline + obj.SetCardPaymentTimeline(fernTestValueCardPaymentTimeline) + assert.Equal(t, fernTestValueCardPaymentTimeline, obj.CardPaymentTimeline) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRefundRequiresCardPresence", func(t *testing.T) { + obj := &CardPaymentDetails{} + var fernTestValueRefundRequiresCardPresence *bool + obj.SetRefundRequiresCardPresence(fernTestValueRefundRequiresCardPresence) + assert.Equal(t, fernTestValueRefundRequiresCardPresence, obj.RefundRequiresCardPresence) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &CardPaymentDetails{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCardPaymentDetails(t *testing.T) { + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var expected *string + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetCard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var expected *Card + obj.Card = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCard(), "getter should return the property value") + }) + + t.Run("GetCard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + obj.Card = nil + + // Act & Assert + assert.Nil(t, obj.GetCard(), "getter should return nil when property is nil") + }) + + t.Run("GetCard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCard() // Should return zero value + }) + + t.Run("GetEntryMethod", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var expected *string + obj.EntryMethod = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEntryMethod(), "getter should return the property value") + }) + + t.Run("GetEntryMethod_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + obj.EntryMethod = nil + + // Act & Assert + assert.Nil(t, obj.GetEntryMethod(), "getter should return nil when property is nil") + }) + + t.Run("GetEntryMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEntryMethod() // Should return zero value + }) + + t.Run("GetCvvStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var expected *string + obj.CvvStatus = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCvvStatus(), "getter should return the property value") + }) + + t.Run("GetCvvStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + obj.CvvStatus = nil + + // Act & Assert + assert.Nil(t, obj.GetCvvStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetCvvStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCvvStatus() // Should return zero value + }) + + t.Run("GetAvsStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var expected *string + obj.AvsStatus = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAvsStatus(), "getter should return the property value") + }) + + t.Run("GetAvsStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + obj.AvsStatus = nil + + // Act & Assert + assert.Nil(t, obj.GetAvsStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetAvsStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAvsStatus() // Should return zero value + }) + + t.Run("GetAuthResultCode", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var expected *string + obj.AuthResultCode = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAuthResultCode(), "getter should return the property value") + }) + + t.Run("GetAuthResultCode_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + obj.AuthResultCode = nil + + // Act & Assert + assert.Nil(t, obj.GetAuthResultCode(), "getter should return nil when property is nil") + }) + + t.Run("GetAuthResultCode_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAuthResultCode() // Should return zero value + }) + + t.Run("GetApplicationIdentifier", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var expected *string + obj.ApplicationIdentifier = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetApplicationIdentifier(), "getter should return the property value") + }) + + t.Run("GetApplicationIdentifier_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + obj.ApplicationIdentifier = nil + + // Act & Assert + assert.Nil(t, obj.GetApplicationIdentifier(), "getter should return nil when property is nil") + }) + + t.Run("GetApplicationIdentifier_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetApplicationIdentifier() // Should return zero value + }) + + t.Run("GetApplicationName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var expected *string + obj.ApplicationName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetApplicationName(), "getter should return the property value") + }) + + t.Run("GetApplicationName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + obj.ApplicationName = nil + + // Act & Assert + assert.Nil(t, obj.GetApplicationName(), "getter should return nil when property is nil") + }) + + t.Run("GetApplicationName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetApplicationName() // Should return zero value + }) + + t.Run("GetApplicationCryptogram", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var expected *string + obj.ApplicationCryptogram = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetApplicationCryptogram(), "getter should return the property value") + }) + + t.Run("GetApplicationCryptogram_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + obj.ApplicationCryptogram = nil + + // Act & Assert + assert.Nil(t, obj.GetApplicationCryptogram(), "getter should return nil when property is nil") + }) + + t.Run("GetApplicationCryptogram_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetApplicationCryptogram() // Should return zero value + }) + + t.Run("GetVerificationMethod", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var expected *string + obj.VerificationMethod = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVerificationMethod(), "getter should return the property value") + }) + + t.Run("GetVerificationMethod_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + obj.VerificationMethod = nil + + // Act & Assert + assert.Nil(t, obj.GetVerificationMethod(), "getter should return nil when property is nil") + }) + + t.Run("GetVerificationMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVerificationMethod() // Should return zero value + }) + + t.Run("GetVerificationResults", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var expected *string + obj.VerificationResults = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVerificationResults(), "getter should return the property value") + }) + + t.Run("GetVerificationResults_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + obj.VerificationResults = nil + + // Act & Assert + assert.Nil(t, obj.GetVerificationResults(), "getter should return nil when property is nil") + }) + + t.Run("GetVerificationResults_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVerificationResults() // Should return zero value + }) + + t.Run("GetStatementDescription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var expected *string + obj.StatementDescription = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatementDescription(), "getter should return the property value") + }) + + t.Run("GetStatementDescription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + obj.StatementDescription = nil + + // Act & Assert + assert.Nil(t, obj.GetStatementDescription(), "getter should return nil when property is nil") + }) + + t.Run("GetStatementDescription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatementDescription() // Should return zero value + }) + + t.Run("GetDeviceDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var expected *DeviceDetails + obj.DeviceDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeviceDetails(), "getter should return the property value") + }) + + t.Run("GetDeviceDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + obj.DeviceDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetDeviceDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetDeviceDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeviceDetails() // Should return zero value + }) + + t.Run("GetCardPaymentTimeline", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var expected *CardPaymentTimeline + obj.CardPaymentTimeline = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCardPaymentTimeline(), "getter should return the property value") + }) + + t.Run("GetCardPaymentTimeline_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + obj.CardPaymentTimeline = nil + + // Act & Assert + assert.Nil(t, obj.GetCardPaymentTimeline(), "getter should return nil when property is nil") + }) + + t.Run("GetCardPaymentTimeline_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCardPaymentTimeline() // Should return zero value + }) + + t.Run("GetRefundRequiresCardPresence", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var expected *bool + obj.RefundRequiresCardPresence = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRefundRequiresCardPresence(), "getter should return the property value") + }) + + t.Run("GetRefundRequiresCardPresence_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + obj.RefundRequiresCardPresence = nil + + // Act & Assert + assert.Nil(t, obj.GetRefundRequiresCardPresence(), "getter should return nil when property is nil") + }) + + t.Run("GetRefundRequiresCardPresence_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRefundRequiresCardPresence() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCardPaymentDetails(t *testing.T) { + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var fernTestValueStatus *string + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var fernTestValueCard *Card + + // Act + obj.SetCard(fernTestValueCard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEntryMethod_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var fernTestValueEntryMethod *string + + // Act + obj.SetEntryMethod(fernTestValueEntryMethod) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCvvStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var fernTestValueCvvStatus *string + + // Act + obj.SetCvvStatus(fernTestValueCvvStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAvsStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var fernTestValueAvsStatus *string + + // Act + obj.SetAvsStatus(fernTestValueAvsStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAuthResultCode_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var fernTestValueAuthResultCode *string + + // Act + obj.SetAuthResultCode(fernTestValueAuthResultCode) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetApplicationIdentifier_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var fernTestValueApplicationIdentifier *string + + // Act + obj.SetApplicationIdentifier(fernTestValueApplicationIdentifier) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetApplicationName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var fernTestValueApplicationName *string + + // Act + obj.SetApplicationName(fernTestValueApplicationName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetApplicationCryptogram_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var fernTestValueApplicationCryptogram *string + + // Act + obj.SetApplicationCryptogram(fernTestValueApplicationCryptogram) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVerificationMethod_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var fernTestValueVerificationMethod *string + + // Act + obj.SetVerificationMethod(fernTestValueVerificationMethod) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVerificationResults_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var fernTestValueVerificationResults *string + + // Act + obj.SetVerificationResults(fernTestValueVerificationResults) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatementDescription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var fernTestValueStatementDescription *string + + // Act + obj.SetStatementDescription(fernTestValueStatementDescription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeviceDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var fernTestValueDeviceDetails *DeviceDetails + + // Act + obj.SetDeviceDetails(fernTestValueDeviceDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCardPaymentTimeline_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var fernTestValueCardPaymentTimeline *CardPaymentTimeline + + // Act + obj.SetCardPaymentTimeline(fernTestValueCardPaymentTimeline) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRefundRequiresCardPresence_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var fernTestValueRefundRequiresCardPresence *bool + + // Act + obj.SetRefundRequiresCardPresence(fernTestValueRefundRequiresCardPresence) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCardPaymentTimeline(t *testing.T) { + t.Run("SetAuthorizedAt", func(t *testing.T) { + obj := &CardPaymentTimeline{} + var fernTestValueAuthorizedAt *string + obj.SetAuthorizedAt(fernTestValueAuthorizedAt) + assert.Equal(t, fernTestValueAuthorizedAt, obj.AuthorizedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCapturedAt", func(t *testing.T) { + obj := &CardPaymentTimeline{} + var fernTestValueCapturedAt *string + obj.SetCapturedAt(fernTestValueCapturedAt) + assert.Equal(t, fernTestValueCapturedAt, obj.CapturedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVoidedAt", func(t *testing.T) { + obj := &CardPaymentTimeline{} + var fernTestValueVoidedAt *string + obj.SetVoidedAt(fernTestValueVoidedAt) + assert.Equal(t, fernTestValueVoidedAt, obj.VoidedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCardPaymentTimeline(t *testing.T) { + t.Run("GetAuthorizedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentTimeline{} + var expected *string + obj.AuthorizedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAuthorizedAt(), "getter should return the property value") + }) + + t.Run("GetAuthorizedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentTimeline{} + obj.AuthorizedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetAuthorizedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetAuthorizedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardPaymentTimeline + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAuthorizedAt() // Should return zero value + }) + + t.Run("GetCapturedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentTimeline{} + var expected *string + obj.CapturedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCapturedAt(), "getter should return the property value") + }) + + t.Run("GetCapturedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentTimeline{} + obj.CapturedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCapturedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCapturedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardPaymentTimeline + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCapturedAt() // Should return zero value + }) + + t.Run("GetVoidedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentTimeline{} + var expected *string + obj.VoidedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVoidedAt(), "getter should return the property value") + }) + + t.Run("GetVoidedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentTimeline{} + obj.VoidedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetVoidedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetVoidedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardPaymentTimeline + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVoidedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCardPaymentTimeline(t *testing.T) { + t.Run("SetAuthorizedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentTimeline{} + var fernTestValueAuthorizedAt *string + + // Act + obj.SetAuthorizedAt(fernTestValueAuthorizedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCapturedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentTimeline{} + var fernTestValueCapturedAt *string + + // Act + obj.SetCapturedAt(fernTestValueCapturedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVoidedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentTimeline{} + var fernTestValueVoidedAt *string + + // Act + obj.SetVoidedAt(fernTestValueVoidedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCashAppDetails(t *testing.T) { + t.Run("SetBuyerFullName", func(t *testing.T) { + obj := &CashAppDetails{} + var fernTestValueBuyerFullName *string + obj.SetBuyerFullName(fernTestValueBuyerFullName) + assert.Equal(t, fernTestValueBuyerFullName, obj.BuyerFullName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBuyerCountryCode", func(t *testing.T) { + obj := &CashAppDetails{} + var fernTestValueBuyerCountryCode *string + obj.SetBuyerCountryCode(fernTestValueBuyerCountryCode) + assert.Equal(t, fernTestValueBuyerCountryCode, obj.BuyerCountryCode) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBuyerCashtag", func(t *testing.T) { + obj := &CashAppDetails{} + var fernTestValueBuyerCashtag *string + obj.SetBuyerCashtag(fernTestValueBuyerCashtag) + assert.Equal(t, fernTestValueBuyerCashtag, obj.BuyerCashtag) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCashAppDetails(t *testing.T) { + t.Run("GetBuyerFullName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashAppDetails{} + var expected *string + obj.BuyerFullName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBuyerFullName(), "getter should return the property value") + }) + + t.Run("GetBuyerFullName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashAppDetails{} + obj.BuyerFullName = nil + + // Act & Assert + assert.Nil(t, obj.GetBuyerFullName(), "getter should return nil when property is nil") + }) + + t.Run("GetBuyerFullName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashAppDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBuyerFullName() // Should return zero value + }) + + t.Run("GetBuyerCountryCode", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashAppDetails{} + var expected *string + obj.BuyerCountryCode = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBuyerCountryCode(), "getter should return the property value") + }) + + t.Run("GetBuyerCountryCode_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashAppDetails{} + obj.BuyerCountryCode = nil + + // Act & Assert + assert.Nil(t, obj.GetBuyerCountryCode(), "getter should return nil when property is nil") + }) + + t.Run("GetBuyerCountryCode_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashAppDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBuyerCountryCode() // Should return zero value + }) + + t.Run("GetBuyerCashtag", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashAppDetails{} + var expected *string + obj.BuyerCashtag = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBuyerCashtag(), "getter should return the property value") + }) + + t.Run("GetBuyerCashtag_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashAppDetails{} + obj.BuyerCashtag = nil + + // Act & Assert + assert.Nil(t, obj.GetBuyerCashtag(), "getter should return nil when property is nil") + }) + + t.Run("GetBuyerCashtag_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashAppDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBuyerCashtag() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCashAppDetails(t *testing.T) { + t.Run("SetBuyerFullName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashAppDetails{} + var fernTestValueBuyerFullName *string + + // Act + obj.SetBuyerFullName(fernTestValueBuyerFullName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBuyerCountryCode_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashAppDetails{} + var fernTestValueBuyerCountryCode *string + + // Act + obj.SetBuyerCountryCode(fernTestValueBuyerCountryCode) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBuyerCashtag_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashAppDetails{} + var fernTestValueBuyerCashtag *string + + // Act + obj.SetBuyerCashtag(fernTestValueBuyerCashtag) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCashPaymentDetails(t *testing.T) { + t.Run("SetBuyerSuppliedMoney", func(t *testing.T) { + obj := &CashPaymentDetails{} + var fernTestValueBuyerSuppliedMoney *Money + obj.SetBuyerSuppliedMoney(fernTestValueBuyerSuppliedMoney) + assert.Equal(t, fernTestValueBuyerSuppliedMoney, obj.BuyerSuppliedMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetChangeBackMoney", func(t *testing.T) { + obj := &CashPaymentDetails{} + var fernTestValueChangeBackMoney *Money + obj.SetChangeBackMoney(fernTestValueChangeBackMoney) + assert.Equal(t, fernTestValueChangeBackMoney, obj.ChangeBackMoney) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCashPaymentDetails(t *testing.T) { + t.Run("GetBuyerSuppliedMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashPaymentDetails{} + var expected *Money + obj.BuyerSuppliedMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBuyerSuppliedMoney(), "getter should return the property value") + }) + + t.Run("GetBuyerSuppliedMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashPaymentDetails{} + obj.BuyerSuppliedMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetBuyerSuppliedMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetBuyerSuppliedMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBuyerSuppliedMoney() // Should return zero value + }) + + t.Run("GetChangeBackMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashPaymentDetails{} + var expected *Money + obj.ChangeBackMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetChangeBackMoney(), "getter should return the property value") + }) + + t.Run("GetChangeBackMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashPaymentDetails{} + obj.ChangeBackMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetChangeBackMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetChangeBackMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetChangeBackMoney() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCashPaymentDetails(t *testing.T) { + t.Run("SetBuyerSuppliedMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashPaymentDetails{} + var fernTestValueBuyerSuppliedMoney *Money + + // Act + obj.SetBuyerSuppliedMoney(fernTestValueBuyerSuppliedMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetChangeBackMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashPaymentDetails{} + var fernTestValueChangeBackMoney *Money + + // Act + obj.SetChangeBackMoney(fernTestValueChangeBackMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersClearpayDetails(t *testing.T) { + t.Run("SetEmailAddress", func(t *testing.T) { + obj := &ClearpayDetails{} + var fernTestValueEmailAddress *string + obj.SetEmailAddress(fernTestValueEmailAddress) + assert.Equal(t, fernTestValueEmailAddress, obj.EmailAddress) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersClearpayDetails(t *testing.T) { + t.Run("GetEmailAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ClearpayDetails{} + var expected *string + obj.EmailAddress = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEmailAddress(), "getter should return the property value") + }) + + t.Run("GetEmailAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ClearpayDetails{} + obj.EmailAddress = nil + + // Act & Assert + assert.Nil(t, obj.GetEmailAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetEmailAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ClearpayDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEmailAddress() // Should return zero value + }) + +} + +func TestSettersMarkExplicitClearpayDetails(t *testing.T) { + t.Run("SetEmailAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ClearpayDetails{} + var fernTestValueEmailAddress *string + + // Act + obj.SetEmailAddress(fernTestValueEmailAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCompletePaymentResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CompletePaymentResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPayment", func(t *testing.T) { + obj := &CompletePaymentResponse{} + var fernTestValuePayment *Payment + obj.SetPayment(fernTestValuePayment) + assert.Equal(t, fernTestValuePayment, obj.Payment) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCompletePaymentResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CompletePaymentResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CompletePaymentResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CompletePaymentResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetPayment", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CompletePaymentResponse{} + var expected *Payment + obj.Payment = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPayment(), "getter should return the property value") + }) + + t.Run("GetPayment_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CompletePaymentResponse{} + obj.Payment = nil + + // Act & Assert + assert.Nil(t, obj.GetPayment(), "getter should return nil when property is nil") + }) + + t.Run("GetPayment_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CompletePaymentResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPayment() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCompletePaymentResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CompletePaymentResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPayment_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CompletePaymentResponse{} + var fernTestValuePayment *Payment + + // Act + obj.SetPayment(fernTestValuePayment) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreatePaymentResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CreatePaymentResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPayment", func(t *testing.T) { + obj := &CreatePaymentResponse{} + var fernTestValuePayment *Payment + obj.SetPayment(fernTestValuePayment) + assert.Equal(t, fernTestValuePayment, obj.Payment) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreatePaymentResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreatePaymentResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetPayment", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentResponse{} + var expected *Payment + obj.Payment = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPayment(), "getter should return the property value") + }) + + t.Run("GetPayment_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentResponse{} + obj.Payment = nil + + // Act & Assert + assert.Nil(t, obj.GetPayment(), "getter should return nil when property is nil") + }) + + t.Run("GetPayment_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreatePaymentResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPayment() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreatePaymentResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPayment_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentResponse{} + var fernTestValuePayment *Payment + + // Act + obj.SetPayment(fernTestValuePayment) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerDetails(t *testing.T) { + t.Run("SetCustomerInitiated", func(t *testing.T) { + obj := &CustomerDetails{} + var fernTestValueCustomerInitiated *bool + obj.SetCustomerInitiated(fernTestValueCustomerInitiated) + assert.Equal(t, fernTestValueCustomerInitiated, obj.CustomerInitiated) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSellerKeyedIn", func(t *testing.T) { + obj := &CustomerDetails{} + var fernTestValueSellerKeyedIn *bool + obj.SetSellerKeyedIn(fernTestValueSellerKeyedIn) + assert.Equal(t, fernTestValueSellerKeyedIn, obj.SellerKeyedIn) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerDetails(t *testing.T) { + t.Run("GetCustomerInitiated", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDetails{} + var expected *bool + obj.CustomerInitiated = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomerInitiated(), "getter should return the property value") + }) + + t.Run("GetCustomerInitiated_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDetails{} + obj.CustomerInitiated = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomerInitiated(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomerInitiated_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomerInitiated() // Should return zero value + }) + + t.Run("GetSellerKeyedIn", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDetails{} + var expected *bool + obj.SellerKeyedIn = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSellerKeyedIn(), "getter should return the property value") + }) + + t.Run("GetSellerKeyedIn_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDetails{} + obj.SellerKeyedIn = nil + + // Act & Assert + assert.Nil(t, obj.GetSellerKeyedIn(), "getter should return nil when property is nil") + }) + + t.Run("GetSellerKeyedIn_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSellerKeyedIn() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerDetails(t *testing.T) { + t.Run("SetCustomerInitiated_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDetails{} + var fernTestValueCustomerInitiated *bool + + // Act + obj.SetCustomerInitiated(fernTestValueCustomerInitiated) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSellerKeyedIn_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDetails{} + var fernTestValueSellerKeyedIn *bool + + // Act + obj.SetSellerKeyedIn(fernTestValueSellerKeyedIn) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeviceDetails(t *testing.T) { + t.Run("SetDeviceID", func(t *testing.T) { + obj := &DeviceDetails{} + var fernTestValueDeviceID *string + obj.SetDeviceID(fernTestValueDeviceID) + assert.Equal(t, fernTestValueDeviceID, obj.DeviceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeviceInstallationID", func(t *testing.T) { + obj := &DeviceDetails{} + var fernTestValueDeviceInstallationID *string + obj.SetDeviceInstallationID(fernTestValueDeviceInstallationID) + assert.Equal(t, fernTestValueDeviceInstallationID, obj.DeviceInstallationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeviceName", func(t *testing.T) { + obj := &DeviceDetails{} + var fernTestValueDeviceName *string + obj.SetDeviceName(fernTestValueDeviceName) + assert.Equal(t, fernTestValueDeviceName, obj.DeviceName) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeviceDetails(t *testing.T) { + t.Run("GetDeviceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceDetails{} + var expected *string + obj.DeviceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeviceID(), "getter should return the property value") + }) + + t.Run("GetDeviceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceDetails{} + obj.DeviceID = nil + + // Act & Assert + assert.Nil(t, obj.GetDeviceID(), "getter should return nil when property is nil") + }) + + t.Run("GetDeviceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeviceID() // Should return zero value + }) + + t.Run("GetDeviceInstallationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceDetails{} + var expected *string + obj.DeviceInstallationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeviceInstallationID(), "getter should return the property value") + }) + + t.Run("GetDeviceInstallationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceDetails{} + obj.DeviceInstallationID = nil + + // Act & Assert + assert.Nil(t, obj.GetDeviceInstallationID(), "getter should return nil when property is nil") + }) + + t.Run("GetDeviceInstallationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeviceInstallationID() // Should return zero value + }) + + t.Run("GetDeviceName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceDetails{} + var expected *string + obj.DeviceName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeviceName(), "getter should return the property value") + }) + + t.Run("GetDeviceName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceDetails{} + obj.DeviceName = nil + + // Act & Assert + assert.Nil(t, obj.GetDeviceName(), "getter should return nil when property is nil") + }) + + t.Run("GetDeviceName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeviceName() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeviceDetails(t *testing.T) { + t.Run("SetDeviceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceDetails{} + var fernTestValueDeviceID *string + + // Act + obj.SetDeviceID(fernTestValueDeviceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeviceInstallationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceDetails{} + var fernTestValueDeviceInstallationID *string + + // Act + obj.SetDeviceInstallationID(fernTestValueDeviceInstallationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeviceName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceDetails{} + var fernTestValueDeviceName *string + + // Act + obj.SetDeviceName(fernTestValueDeviceName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDigitalWalletDetails(t *testing.T) { + t.Run("SetStatus", func(t *testing.T) { + obj := &DigitalWalletDetails{} + var fernTestValueStatus *string + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBrand", func(t *testing.T) { + obj := &DigitalWalletDetails{} + var fernTestValueBrand *string + obj.SetBrand(fernTestValueBrand) + assert.Equal(t, fernTestValueBrand, obj.Brand) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCashAppDetails", func(t *testing.T) { + obj := &DigitalWalletDetails{} + var fernTestValueCashAppDetails *CashAppDetails + obj.SetCashAppDetails(fernTestValueCashAppDetails) + assert.Equal(t, fernTestValueCashAppDetails, obj.CashAppDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &DigitalWalletDetails{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDigitalWalletDetails(t *testing.T) { + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DigitalWalletDetails{} + var expected *string + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DigitalWalletDetails{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DigitalWalletDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetBrand", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DigitalWalletDetails{} + var expected *string + obj.Brand = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBrand(), "getter should return the property value") + }) + + t.Run("GetBrand_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DigitalWalletDetails{} + obj.Brand = nil + + // Act & Assert + assert.Nil(t, obj.GetBrand(), "getter should return nil when property is nil") + }) + + t.Run("GetBrand_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DigitalWalletDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBrand() // Should return zero value + }) + + t.Run("GetCashAppDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DigitalWalletDetails{} + var expected *CashAppDetails + obj.CashAppDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCashAppDetails(), "getter should return the property value") + }) + + t.Run("GetCashAppDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DigitalWalletDetails{} + obj.CashAppDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetCashAppDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetCashAppDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DigitalWalletDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCashAppDetails() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DigitalWalletDetails{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DigitalWalletDetails{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DigitalWalletDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDigitalWalletDetails(t *testing.T) { + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DigitalWalletDetails{} + var fernTestValueStatus *string + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBrand_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DigitalWalletDetails{} + var fernTestValueBrand *string + + // Act + obj.SetBrand(fernTestValueBrand) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCashAppDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DigitalWalletDetails{} + var fernTestValueCashAppDetails *CashAppDetails + + // Act + obj.SetCashAppDetails(fernTestValueCashAppDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DigitalWalletDetails{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersExternalPaymentDetails(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &ExternalPaymentDetails{} + var fernTestValueType string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSource", func(t *testing.T) { + obj := &ExternalPaymentDetails{} + var fernTestValueSource string + obj.SetSource(fernTestValueSource) + assert.Equal(t, fernTestValueSource, obj.Source) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSourceID", func(t *testing.T) { + obj := &ExternalPaymentDetails{} + var fernTestValueSourceID *string + obj.SetSourceID(fernTestValueSourceID) + assert.Equal(t, fernTestValueSourceID, obj.SourceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSourceFeeMoney", func(t *testing.T) { + obj := &ExternalPaymentDetails{} + var fernTestValueSourceFeeMoney *Money + obj.SetSourceFeeMoney(fernTestValueSourceFeeMoney) + assert.Equal(t, fernTestValueSourceFeeMoney, obj.SourceFeeMoney) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersExternalPaymentDetails(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ExternalPaymentDetails{} + var expected string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ExternalPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetSource", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ExternalPaymentDetails{} + var expected string + obj.Source = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSource(), "getter should return the property value") + }) + + t.Run("GetSource_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ExternalPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSource() // Should return zero value + }) + + t.Run("GetSourceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ExternalPaymentDetails{} + var expected *string + obj.SourceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSourceID(), "getter should return the property value") + }) + + t.Run("GetSourceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ExternalPaymentDetails{} + obj.SourceID = nil + + // Act & Assert + assert.Nil(t, obj.GetSourceID(), "getter should return nil when property is nil") + }) + + t.Run("GetSourceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ExternalPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSourceID() // Should return zero value + }) + + t.Run("GetSourceFeeMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ExternalPaymentDetails{} + var expected *Money + obj.SourceFeeMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSourceFeeMoney(), "getter should return the property value") + }) + + t.Run("GetSourceFeeMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ExternalPaymentDetails{} + obj.SourceFeeMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetSourceFeeMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetSourceFeeMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ExternalPaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSourceFeeMoney() // Should return zero value + }) + +} + +func TestSettersMarkExplicitExternalPaymentDetails(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ExternalPaymentDetails{} + var fernTestValueType string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSource_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ExternalPaymentDetails{} + var fernTestValueSource string + + // Act + obj.SetSource(fernTestValueSource) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSourceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ExternalPaymentDetails{} + var fernTestValueSourceID *string + + // Act + obj.SetSourceID(fernTestValueSourceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSourceFeeMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ExternalPaymentDetails{} + var fernTestValueSourceFeeMoney *Money + + // Act + obj.SetSourceFeeMoney(fernTestValueSourceFeeMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetPaymentResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetPaymentResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPayment", func(t *testing.T) { + obj := &GetPaymentResponse{} + var fernTestValuePayment *Payment + obj.SetPayment(fernTestValuePayment) + assert.Equal(t, fernTestValuePayment, obj.Payment) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetPaymentResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPaymentResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPaymentResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetPaymentResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetPayment", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPaymentResponse{} + var expected *Payment + obj.Payment = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPayment(), "getter should return the property value") + }) + + t.Run("GetPayment_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPaymentResponse{} + obj.Payment = nil + + // Act & Assert + assert.Nil(t, obj.GetPayment(), "getter should return nil when property is nil") + }) + + t.Run("GetPayment_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetPaymentResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPayment() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetPaymentResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPaymentResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPayment_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPaymentResponse{} + var fernTestValuePayment *Payment + + // Act + obj.SetPayment(fernTestValuePayment) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListPaymentsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &ListPaymentsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPayments", func(t *testing.T) { + obj := &ListPaymentsResponse{} + var fernTestValuePayments []*Payment + obj.SetPayments(fernTestValuePayments) + assert.Equal(t, fernTestValuePayments, obj.Payments) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListPaymentsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListPaymentsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListPaymentsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetPayments", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentsResponse{} + var expected []*Payment + obj.Payments = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPayments(), "getter should return the property value") + }) + + t.Run("GetPayments_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentsResponse{} + obj.Payments = nil + + // Act & Assert + assert.Nil(t, obj.GetPayments(), "getter should return nil when property is nil") + }) + + t.Run("GetPayments_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListPaymentsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPayments() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListPaymentsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListPaymentsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPayments_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentsResponse{} + var fernTestValuePayments []*Payment + + // Act + obj.SetPayments(fernTestValuePayments) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOfflinePaymentDetails(t *testing.T) { + t.Run("SetClientCreatedAt", func(t *testing.T) { + obj := &OfflinePaymentDetails{} + var fernTestValueClientCreatedAt *string + obj.SetClientCreatedAt(fernTestValueClientCreatedAt) + assert.Equal(t, fernTestValueClientCreatedAt, obj.ClientCreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOfflinePaymentDetails(t *testing.T) { + t.Run("GetClientCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OfflinePaymentDetails{} + var expected *string + obj.ClientCreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetClientCreatedAt(), "getter should return the property value") + }) + + t.Run("GetClientCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OfflinePaymentDetails{} + obj.ClientCreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetClientCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetClientCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OfflinePaymentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetClientCreatedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOfflinePaymentDetails(t *testing.T) { + t.Run("SetClientCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OfflinePaymentDetails{} + var fernTestValueClientCreatedAt *string + + // Act + obj.SetClientCreatedAt(fernTestValueClientCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPayment(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &Payment{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &Payment{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &Payment{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &Payment{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTipMoney", func(t *testing.T) { + obj := &Payment{} + var fernTestValueTipMoney *Money + obj.SetTipMoney(fernTestValueTipMoney) + assert.Equal(t, fernTestValueTipMoney, obj.TipMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTotalMoney", func(t *testing.T) { + obj := &Payment{} + var fernTestValueTotalMoney *Money + obj.SetTotalMoney(fernTestValueTotalMoney) + assert.Equal(t, fernTestValueTotalMoney, obj.TotalMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppFeeMoney", func(t *testing.T) { + obj := &Payment{} + var fernTestValueAppFeeMoney *Money + obj.SetAppFeeMoney(fernTestValueAppFeeMoney) + assert.Equal(t, fernTestValueAppFeeMoney, obj.AppFeeMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetApprovedMoney", func(t *testing.T) { + obj := &Payment{} + var fernTestValueApprovedMoney *Money + obj.SetApprovedMoney(fernTestValueApprovedMoney) + assert.Equal(t, fernTestValueApprovedMoney, obj.ApprovedMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetProcessingFee", func(t *testing.T) { + obj := &Payment{} + var fernTestValueProcessingFee []*ProcessingFee + obj.SetProcessingFee(fernTestValueProcessingFee) + assert.Equal(t, fernTestValueProcessingFee, obj.ProcessingFee) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRefundedMoney", func(t *testing.T) { + obj := &Payment{} + var fernTestValueRefundedMoney *Money + obj.SetRefundedMoney(fernTestValueRefundedMoney) + assert.Equal(t, fernTestValueRefundedMoney, obj.RefundedMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &Payment{} + var fernTestValueStatus *string + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDelayDuration", func(t *testing.T) { + obj := &Payment{} + var fernTestValueDelayDuration *string + obj.SetDelayDuration(fernTestValueDelayDuration) + assert.Equal(t, fernTestValueDelayDuration, obj.DelayDuration) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDelayAction", func(t *testing.T) { + obj := &Payment{} + var fernTestValueDelayAction *string + obj.SetDelayAction(fernTestValueDelayAction) + assert.Equal(t, fernTestValueDelayAction, obj.DelayAction) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDelayedUntil", func(t *testing.T) { + obj := &Payment{} + var fernTestValueDelayedUntil *string + obj.SetDelayedUntil(fernTestValueDelayedUntil) + assert.Equal(t, fernTestValueDelayedUntil, obj.DelayedUntil) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSourceType", func(t *testing.T) { + obj := &Payment{} + var fernTestValueSourceType *string + obj.SetSourceType(fernTestValueSourceType) + assert.Equal(t, fernTestValueSourceType, obj.SourceType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCardDetails", func(t *testing.T) { + obj := &Payment{} + var fernTestValueCardDetails *CardPaymentDetails + obj.SetCardDetails(fernTestValueCardDetails) + assert.Equal(t, fernTestValueCardDetails, obj.CardDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCashDetails", func(t *testing.T) { + obj := &Payment{} + var fernTestValueCashDetails *CashPaymentDetails + obj.SetCashDetails(fernTestValueCashDetails) + assert.Equal(t, fernTestValueCashDetails, obj.CashDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBankAccountDetails", func(t *testing.T) { + obj := &Payment{} + var fernTestValueBankAccountDetails *BankAccountPaymentDetails + obj.SetBankAccountDetails(fernTestValueBankAccountDetails) + assert.Equal(t, fernTestValueBankAccountDetails, obj.BankAccountDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExternalDetails", func(t *testing.T) { + obj := &Payment{} + var fernTestValueExternalDetails *ExternalPaymentDetails + obj.SetExternalDetails(fernTestValueExternalDetails) + assert.Equal(t, fernTestValueExternalDetails, obj.ExternalDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetWalletDetails", func(t *testing.T) { + obj := &Payment{} + var fernTestValueWalletDetails *DigitalWalletDetails + obj.SetWalletDetails(fernTestValueWalletDetails) + assert.Equal(t, fernTestValueWalletDetails, obj.WalletDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBuyNowPayLaterDetails", func(t *testing.T) { + obj := &Payment{} + var fernTestValueBuyNowPayLaterDetails *BuyNowPayLaterDetails + obj.SetBuyNowPayLaterDetails(fernTestValueBuyNowPayLaterDetails) + assert.Equal(t, fernTestValueBuyNowPayLaterDetails, obj.BuyNowPayLaterDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSquareAccountDetails", func(t *testing.T) { + obj := &Payment{} + var fernTestValueSquareAccountDetails *SquareAccountDetails + obj.SetSquareAccountDetails(fernTestValueSquareAccountDetails) + assert.Equal(t, fernTestValueSquareAccountDetails, obj.SquareAccountDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &Payment{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrderID", func(t *testing.T) { + obj := &Payment{} + var fernTestValueOrderID *string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReferenceID", func(t *testing.T) { + obj := &Payment{} + var fernTestValueReferenceID *string + obj.SetReferenceID(fernTestValueReferenceID) + assert.Equal(t, fernTestValueReferenceID, obj.ReferenceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerID", func(t *testing.T) { + obj := &Payment{} + var fernTestValueCustomerID *string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEmployeeID", func(t *testing.T) { + obj := &Payment{} + var fernTestValueEmployeeID *string + obj.SetEmployeeID(fernTestValueEmployeeID) + assert.Equal(t, fernTestValueEmployeeID, obj.EmployeeID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTeamMemberID", func(t *testing.T) { + obj := &Payment{} + var fernTestValueTeamMemberID *string + obj.SetTeamMemberID(fernTestValueTeamMemberID) + assert.Equal(t, fernTestValueTeamMemberID, obj.TeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRefundIDs", func(t *testing.T) { + obj := &Payment{} + var fernTestValueRefundIDs []string + obj.SetRefundIDs(fernTestValueRefundIDs) + assert.Equal(t, fernTestValueRefundIDs, obj.RefundIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRiskEvaluation", func(t *testing.T) { + obj := &Payment{} + var fernTestValueRiskEvaluation *RiskEvaluation + obj.SetRiskEvaluation(fernTestValueRiskEvaluation) + assert.Equal(t, fernTestValueRiskEvaluation, obj.RiskEvaluation) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTerminalCheckoutID", func(t *testing.T) { + obj := &Payment{} + var fernTestValueTerminalCheckoutID *string + obj.SetTerminalCheckoutID(fernTestValueTerminalCheckoutID) + assert.Equal(t, fernTestValueTerminalCheckoutID, obj.TerminalCheckoutID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBuyerEmailAddress", func(t *testing.T) { + obj := &Payment{} + var fernTestValueBuyerEmailAddress *string + obj.SetBuyerEmailAddress(fernTestValueBuyerEmailAddress) + assert.Equal(t, fernTestValueBuyerEmailAddress, obj.BuyerEmailAddress) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBillingAddress", func(t *testing.T) { + obj := &Payment{} + var fernTestValueBillingAddress *Address + obj.SetBillingAddress(fernTestValueBillingAddress) + assert.Equal(t, fernTestValueBillingAddress, obj.BillingAddress) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetShippingAddress", func(t *testing.T) { + obj := &Payment{} + var fernTestValueShippingAddress *Address + obj.SetShippingAddress(fernTestValueShippingAddress) + assert.Equal(t, fernTestValueShippingAddress, obj.ShippingAddress) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNote", func(t *testing.T) { + obj := &Payment{} + var fernTestValueNote *string + obj.SetNote(fernTestValueNote) + assert.Equal(t, fernTestValueNote, obj.Note) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatementDescriptionIdentifier", func(t *testing.T) { + obj := &Payment{} + var fernTestValueStatementDescriptionIdentifier *string + obj.SetStatementDescriptionIdentifier(fernTestValueStatementDescriptionIdentifier) + assert.Equal(t, fernTestValueStatementDescriptionIdentifier, obj.StatementDescriptionIdentifier) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCapabilities", func(t *testing.T) { + obj := &Payment{} + var fernTestValueCapabilities []string + obj.SetCapabilities(fernTestValueCapabilities) + assert.Equal(t, fernTestValueCapabilities, obj.Capabilities) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReceiptNumber", func(t *testing.T) { + obj := &Payment{} + var fernTestValueReceiptNumber *string + obj.SetReceiptNumber(fernTestValueReceiptNumber) + assert.Equal(t, fernTestValueReceiptNumber, obj.ReceiptNumber) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReceiptURL", func(t *testing.T) { + obj := &Payment{} + var fernTestValueReceiptURL *string + obj.SetReceiptURL(fernTestValueReceiptURL) + assert.Equal(t, fernTestValueReceiptURL, obj.ReceiptURL) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeviceDetails", func(t *testing.T) { + obj := &Payment{} + var fernTestValueDeviceDetails *DeviceDetails + obj.SetDeviceDetails(fernTestValueDeviceDetails) + assert.Equal(t, fernTestValueDeviceDetails, obj.DeviceDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetApplicationDetails", func(t *testing.T) { + obj := &Payment{} + var fernTestValueApplicationDetails *ApplicationDetails + obj.SetApplicationDetails(fernTestValueApplicationDetails) + assert.Equal(t, fernTestValueApplicationDetails, obj.ApplicationDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsOfflinePayment", func(t *testing.T) { + obj := &Payment{} + var fernTestValueIsOfflinePayment *bool + obj.SetIsOfflinePayment(fernTestValueIsOfflinePayment) + assert.Equal(t, fernTestValueIsOfflinePayment, obj.IsOfflinePayment) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOfflinePaymentDetails", func(t *testing.T) { + obj := &Payment{} + var fernTestValueOfflinePaymentDetails *OfflinePaymentDetails + obj.SetOfflinePaymentDetails(fernTestValueOfflinePaymentDetails) + assert.Equal(t, fernTestValueOfflinePaymentDetails, obj.OfflinePaymentDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersionToken", func(t *testing.T) { + obj := &Payment{} + var fernTestValueVersionToken *string + obj.SetVersionToken(fernTestValueVersionToken) + assert.Equal(t, fernTestValueVersionToken, obj.VersionToken) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPayment(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + + t.Run("GetTipMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *Money + obj.TipMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTipMoney(), "getter should return the property value") + }) + + t.Run("GetTipMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.TipMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTipMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTipMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTipMoney() // Should return zero value + }) + + t.Run("GetTotalMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *Money + obj.TotalMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTotalMoney(), "getter should return the property value") + }) + + t.Run("GetTotalMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.TotalMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTotalMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTotalMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTotalMoney() // Should return zero value + }) + + t.Run("GetAppFeeMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *Money + obj.AppFeeMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppFeeMoney(), "getter should return the property value") + }) + + t.Run("GetAppFeeMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.AppFeeMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAppFeeMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAppFeeMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppFeeMoney() // Should return zero value + }) + + t.Run("GetApprovedMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *Money + obj.ApprovedMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetApprovedMoney(), "getter should return the property value") + }) + + t.Run("GetApprovedMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.ApprovedMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetApprovedMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetApprovedMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetApprovedMoney() // Should return zero value + }) + + t.Run("GetProcessingFee", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected []*ProcessingFee + obj.ProcessingFee = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetProcessingFee(), "getter should return the property value") + }) + + t.Run("GetProcessingFee_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.ProcessingFee = nil + + // Act & Assert + assert.Nil(t, obj.GetProcessingFee(), "getter should return nil when property is nil") + }) + + t.Run("GetProcessingFee_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetProcessingFee() // Should return zero value + }) + + t.Run("GetRefundedMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *Money + obj.RefundedMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRefundedMoney(), "getter should return the property value") + }) + + t.Run("GetRefundedMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.RefundedMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetRefundedMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetRefundedMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRefundedMoney() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *string + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetDelayDuration", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *string + obj.DelayDuration = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDelayDuration(), "getter should return the property value") + }) + + t.Run("GetDelayDuration_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.DelayDuration = nil + + // Act & Assert + assert.Nil(t, obj.GetDelayDuration(), "getter should return nil when property is nil") + }) + + t.Run("GetDelayDuration_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDelayDuration() // Should return zero value + }) + + t.Run("GetDelayAction", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *string + obj.DelayAction = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDelayAction(), "getter should return the property value") + }) + + t.Run("GetDelayAction_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.DelayAction = nil + + // Act & Assert + assert.Nil(t, obj.GetDelayAction(), "getter should return nil when property is nil") + }) + + t.Run("GetDelayAction_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDelayAction() // Should return zero value + }) + + t.Run("GetDelayedUntil", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *string + obj.DelayedUntil = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDelayedUntil(), "getter should return the property value") + }) + + t.Run("GetDelayedUntil_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.DelayedUntil = nil + + // Act & Assert + assert.Nil(t, obj.GetDelayedUntil(), "getter should return nil when property is nil") + }) + + t.Run("GetDelayedUntil_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDelayedUntil() // Should return zero value + }) + + t.Run("GetSourceType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *string + obj.SourceType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSourceType(), "getter should return the property value") + }) + + t.Run("GetSourceType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.SourceType = nil + + // Act & Assert + assert.Nil(t, obj.GetSourceType(), "getter should return nil when property is nil") + }) + + t.Run("GetSourceType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSourceType() // Should return zero value + }) + + t.Run("GetCardDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *CardPaymentDetails + obj.CardDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCardDetails(), "getter should return the property value") + }) + + t.Run("GetCardDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.CardDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetCardDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetCardDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCardDetails() // Should return zero value + }) + + t.Run("GetCashDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *CashPaymentDetails + obj.CashDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCashDetails(), "getter should return the property value") + }) + + t.Run("GetCashDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.CashDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetCashDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetCashDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCashDetails() // Should return zero value + }) + + t.Run("GetBankAccountDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *BankAccountPaymentDetails + obj.BankAccountDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBankAccountDetails(), "getter should return the property value") + }) + + t.Run("GetBankAccountDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.BankAccountDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetBankAccountDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetBankAccountDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBankAccountDetails() // Should return zero value + }) + + t.Run("GetExternalDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *ExternalPaymentDetails + obj.ExternalDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExternalDetails(), "getter should return the property value") + }) + + t.Run("GetExternalDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.ExternalDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetExternalDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetExternalDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExternalDetails() // Should return zero value + }) + + t.Run("GetWalletDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *DigitalWalletDetails + obj.WalletDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetWalletDetails(), "getter should return the property value") + }) + + t.Run("GetWalletDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.WalletDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetWalletDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetWalletDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetWalletDetails() // Should return zero value + }) + + t.Run("GetBuyNowPayLaterDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *BuyNowPayLaterDetails + obj.BuyNowPayLaterDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBuyNowPayLaterDetails(), "getter should return the property value") + }) + + t.Run("GetBuyNowPayLaterDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.BuyNowPayLaterDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetBuyNowPayLaterDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetBuyNowPayLaterDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBuyNowPayLaterDetails() // Should return zero value + }) + + t.Run("GetSquareAccountDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *SquareAccountDetails + obj.SquareAccountDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSquareAccountDetails(), "getter should return the property value") + }) + + t.Run("GetSquareAccountDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.SquareAccountDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetSquareAccountDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetSquareAccountDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSquareAccountDetails() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetOrderID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *string + obj.OrderID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderID(), "getter should return the property value") + }) + + t.Run("GetOrderID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.OrderID = nil + + // Act & Assert + assert.Nil(t, obj.GetOrderID(), "getter should return nil when property is nil") + }) + + t.Run("GetOrderID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderID() // Should return zero value + }) + + t.Run("GetReferenceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *string + obj.ReferenceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReferenceID(), "getter should return the property value") + }) + + t.Run("GetReferenceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.ReferenceID = nil + + // Act & Assert + assert.Nil(t, obj.GetReferenceID(), "getter should return nil when property is nil") + }) + + t.Run("GetReferenceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReferenceID() // Should return zero value + }) + + t.Run("GetCustomerID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *string + obj.CustomerID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomerID(), "getter should return the property value") + }) + + t.Run("GetCustomerID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.CustomerID = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomerID(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomerID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomerID() // Should return zero value + }) + + t.Run("GetEmployeeID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *string + obj.EmployeeID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEmployeeID(), "getter should return the property value") + }) + + t.Run("GetEmployeeID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.EmployeeID = nil + + // Act & Assert + assert.Nil(t, obj.GetEmployeeID(), "getter should return nil when property is nil") + }) + + t.Run("GetEmployeeID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEmployeeID() // Should return zero value + }) + + t.Run("GetTeamMemberID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *string + obj.TeamMemberID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMemberID(), "getter should return the property value") + }) + + t.Run("GetTeamMemberID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.TeamMemberID = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMemberID(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMemberID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMemberID() // Should return zero value + }) + + t.Run("GetRefundIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected []string + obj.RefundIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRefundIDs(), "getter should return the property value") + }) + + t.Run("GetRefundIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.RefundIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetRefundIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetRefundIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRefundIDs() // Should return zero value + }) + + t.Run("GetRiskEvaluation", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *RiskEvaluation + obj.RiskEvaluation = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRiskEvaluation(), "getter should return the property value") + }) + + t.Run("GetRiskEvaluation_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.RiskEvaluation = nil + + // Act & Assert + assert.Nil(t, obj.GetRiskEvaluation(), "getter should return nil when property is nil") + }) + + t.Run("GetRiskEvaluation_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRiskEvaluation() // Should return zero value + }) + + t.Run("GetTerminalCheckoutID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *string + obj.TerminalCheckoutID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTerminalCheckoutID(), "getter should return the property value") + }) + + t.Run("GetTerminalCheckoutID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.TerminalCheckoutID = nil + + // Act & Assert + assert.Nil(t, obj.GetTerminalCheckoutID(), "getter should return nil when property is nil") + }) + + t.Run("GetTerminalCheckoutID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTerminalCheckoutID() // Should return zero value + }) + + t.Run("GetBuyerEmailAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *string + obj.BuyerEmailAddress = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBuyerEmailAddress(), "getter should return the property value") + }) + + t.Run("GetBuyerEmailAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.BuyerEmailAddress = nil + + // Act & Assert + assert.Nil(t, obj.GetBuyerEmailAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetBuyerEmailAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBuyerEmailAddress() // Should return zero value + }) + + t.Run("GetBillingAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *Address + obj.BillingAddress = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBillingAddress(), "getter should return the property value") + }) + + t.Run("GetBillingAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.BillingAddress = nil + + // Act & Assert + assert.Nil(t, obj.GetBillingAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetBillingAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBillingAddress() // Should return zero value + }) + + t.Run("GetShippingAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *Address + obj.ShippingAddress = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetShippingAddress(), "getter should return the property value") + }) + + t.Run("GetShippingAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.ShippingAddress = nil + + // Act & Assert + assert.Nil(t, obj.GetShippingAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetShippingAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetShippingAddress() // Should return zero value + }) + + t.Run("GetNote", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *string + obj.Note = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNote(), "getter should return the property value") + }) + + t.Run("GetNote_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.Note = nil + + // Act & Assert + assert.Nil(t, obj.GetNote(), "getter should return nil when property is nil") + }) + + t.Run("GetNote_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNote() // Should return zero value + }) + + t.Run("GetStatementDescriptionIdentifier", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *string + obj.StatementDescriptionIdentifier = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatementDescriptionIdentifier(), "getter should return the property value") + }) + + t.Run("GetStatementDescriptionIdentifier_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.StatementDescriptionIdentifier = nil + + // Act & Assert + assert.Nil(t, obj.GetStatementDescriptionIdentifier(), "getter should return nil when property is nil") + }) + + t.Run("GetStatementDescriptionIdentifier_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatementDescriptionIdentifier() // Should return zero value + }) + + t.Run("GetCapabilities", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected []string + obj.Capabilities = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCapabilities(), "getter should return the property value") + }) + + t.Run("GetCapabilities_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.Capabilities = nil + + // Act & Assert + assert.Nil(t, obj.GetCapabilities(), "getter should return nil when property is nil") + }) + + t.Run("GetCapabilities_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCapabilities() // Should return zero value + }) + + t.Run("GetReceiptNumber", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *string + obj.ReceiptNumber = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReceiptNumber(), "getter should return the property value") + }) + + t.Run("GetReceiptNumber_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.ReceiptNumber = nil + + // Act & Assert + assert.Nil(t, obj.GetReceiptNumber(), "getter should return nil when property is nil") + }) + + t.Run("GetReceiptNumber_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReceiptNumber() // Should return zero value + }) + + t.Run("GetReceiptURL", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *string + obj.ReceiptURL = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReceiptURL(), "getter should return the property value") + }) + + t.Run("GetReceiptURL_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.ReceiptURL = nil + + // Act & Assert + assert.Nil(t, obj.GetReceiptURL(), "getter should return nil when property is nil") + }) + + t.Run("GetReceiptURL_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReceiptURL() // Should return zero value + }) + + t.Run("GetDeviceDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *DeviceDetails + obj.DeviceDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeviceDetails(), "getter should return the property value") + }) + + t.Run("GetDeviceDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.DeviceDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetDeviceDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetDeviceDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeviceDetails() // Should return zero value + }) + + t.Run("GetApplicationDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *ApplicationDetails + obj.ApplicationDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetApplicationDetails(), "getter should return the property value") + }) + + t.Run("GetApplicationDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.ApplicationDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetApplicationDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetApplicationDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetApplicationDetails() // Should return zero value + }) + + t.Run("GetIsOfflinePayment", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *bool + obj.IsOfflinePayment = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsOfflinePayment(), "getter should return the property value") + }) + + t.Run("GetIsOfflinePayment_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.IsOfflinePayment = nil + + // Act & Assert + assert.Nil(t, obj.GetIsOfflinePayment(), "getter should return nil when property is nil") + }) + + t.Run("GetIsOfflinePayment_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsOfflinePayment() // Should return zero value + }) + + t.Run("GetOfflinePaymentDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *OfflinePaymentDetails + obj.OfflinePaymentDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOfflinePaymentDetails(), "getter should return the property value") + }) + + t.Run("GetOfflinePaymentDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.OfflinePaymentDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetOfflinePaymentDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetOfflinePaymentDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOfflinePaymentDetails() // Should return zero value + }) + + t.Run("GetVersionToken", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var expected *string + obj.VersionToken = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersionToken(), "getter should return the property value") + }) + + t.Run("GetVersionToken_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + obj.VersionToken = nil + + // Act & Assert + assert.Nil(t, obj.GetVersionToken(), "getter should return nil when property is nil") + }) + + t.Run("GetVersionToken_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersionToken() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPayment(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTipMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueTipMoney *Money + + // Act + obj.SetTipMoney(fernTestValueTipMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTotalMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueTotalMoney *Money + + // Act + obj.SetTotalMoney(fernTestValueTotalMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppFeeMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueAppFeeMoney *Money + + // Act + obj.SetAppFeeMoney(fernTestValueAppFeeMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetApprovedMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueApprovedMoney *Money + + // Act + obj.SetApprovedMoney(fernTestValueApprovedMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetProcessingFee_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueProcessingFee []*ProcessingFee + + // Act + obj.SetProcessingFee(fernTestValueProcessingFee) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRefundedMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueRefundedMoney *Money + + // Act + obj.SetRefundedMoney(fernTestValueRefundedMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueStatus *string + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDelayDuration_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueDelayDuration *string + + // Act + obj.SetDelayDuration(fernTestValueDelayDuration) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDelayAction_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueDelayAction *string + + // Act + obj.SetDelayAction(fernTestValueDelayAction) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDelayedUntil_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueDelayedUntil *string + + // Act + obj.SetDelayedUntil(fernTestValueDelayedUntil) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSourceType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueSourceType *string + + // Act + obj.SetSourceType(fernTestValueSourceType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCardDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueCardDetails *CardPaymentDetails + + // Act + obj.SetCardDetails(fernTestValueCardDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCashDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueCashDetails *CashPaymentDetails + + // Act + obj.SetCashDetails(fernTestValueCashDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBankAccountDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueBankAccountDetails *BankAccountPaymentDetails + + // Act + obj.SetBankAccountDetails(fernTestValueBankAccountDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExternalDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueExternalDetails *ExternalPaymentDetails + + // Act + obj.SetExternalDetails(fernTestValueExternalDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetWalletDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueWalletDetails *DigitalWalletDetails + + // Act + obj.SetWalletDetails(fernTestValueWalletDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBuyNowPayLaterDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueBuyNowPayLaterDetails *BuyNowPayLaterDetails + + // Act + obj.SetBuyNowPayLaterDetails(fernTestValueBuyNowPayLaterDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSquareAccountDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueSquareAccountDetails *SquareAccountDetails + + // Act + obj.SetSquareAccountDetails(fernTestValueSquareAccountDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueOrderID *string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReferenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueReferenceID *string + + // Act + obj.SetReferenceID(fernTestValueReferenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueCustomerID *string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEmployeeID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueEmployeeID *string + + // Act + obj.SetEmployeeID(fernTestValueEmployeeID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueTeamMemberID *string + + // Act + obj.SetTeamMemberID(fernTestValueTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRefundIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueRefundIDs []string + + // Act + obj.SetRefundIDs(fernTestValueRefundIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRiskEvaluation_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueRiskEvaluation *RiskEvaluation + + // Act + obj.SetRiskEvaluation(fernTestValueRiskEvaluation) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTerminalCheckoutID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueTerminalCheckoutID *string + + // Act + obj.SetTerminalCheckoutID(fernTestValueTerminalCheckoutID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBuyerEmailAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueBuyerEmailAddress *string + + // Act + obj.SetBuyerEmailAddress(fernTestValueBuyerEmailAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBillingAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueBillingAddress *Address + + // Act + obj.SetBillingAddress(fernTestValueBillingAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetShippingAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueShippingAddress *Address + + // Act + obj.SetShippingAddress(fernTestValueShippingAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNote_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueNote *string + + // Act + obj.SetNote(fernTestValueNote) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatementDescriptionIdentifier_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueStatementDescriptionIdentifier *string + + // Act + obj.SetStatementDescriptionIdentifier(fernTestValueStatementDescriptionIdentifier) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCapabilities_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueCapabilities []string + + // Act + obj.SetCapabilities(fernTestValueCapabilities) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReceiptNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueReceiptNumber *string + + // Act + obj.SetReceiptNumber(fernTestValueReceiptNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReceiptURL_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueReceiptURL *string + + // Act + obj.SetReceiptURL(fernTestValueReceiptURL) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeviceDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueDeviceDetails *DeviceDetails + + // Act + obj.SetDeviceDetails(fernTestValueDeviceDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetApplicationDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueApplicationDetails *ApplicationDetails + + // Act + obj.SetApplicationDetails(fernTestValueApplicationDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsOfflinePayment_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueIsOfflinePayment *bool + + // Act + obj.SetIsOfflinePayment(fernTestValueIsOfflinePayment) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOfflinePaymentDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueOfflinePaymentDetails *OfflinePaymentDetails + + // Act + obj.SetOfflinePaymentDetails(fernTestValueOfflinePaymentDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersionToken_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + var fernTestValueVersionToken *string + + // Act + obj.SetVersionToken(fernTestValueVersionToken) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRiskEvaluation(t *testing.T) { + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &RiskEvaluation{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRiskLevel", func(t *testing.T) { + obj := &RiskEvaluation{} + var fernTestValueRiskLevel *RiskEvaluationRiskLevel + obj.SetRiskLevel(fernTestValueRiskLevel) + assert.Equal(t, fernTestValueRiskLevel, obj.RiskLevel) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRiskEvaluation(t *testing.T) { + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RiskEvaluation{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RiskEvaluation{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RiskEvaluation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetRiskLevel", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RiskEvaluation{} + var expected *RiskEvaluationRiskLevel + obj.RiskLevel = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRiskLevel(), "getter should return the property value") + }) + + t.Run("GetRiskLevel_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RiskEvaluation{} + obj.RiskLevel = nil + + // Act & Assert + assert.Nil(t, obj.GetRiskLevel(), "getter should return nil when property is nil") + }) + + t.Run("GetRiskLevel_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RiskEvaluation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRiskLevel() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRiskEvaluation(t *testing.T) { + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RiskEvaluation{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRiskLevel_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RiskEvaluation{} + var fernTestValueRiskLevel *RiskEvaluationRiskLevel + + // Act + obj.SetRiskLevel(fernTestValueRiskLevel) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSquareAccountDetails(t *testing.T) { + t.Run("SetPaymentSourceToken", func(t *testing.T) { + obj := &SquareAccountDetails{} + var fernTestValuePaymentSourceToken *string + obj.SetPaymentSourceToken(fernTestValuePaymentSourceToken) + assert.Equal(t, fernTestValuePaymentSourceToken, obj.PaymentSourceToken) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &SquareAccountDetails{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSquareAccountDetails(t *testing.T) { + t.Run("GetPaymentSourceToken", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SquareAccountDetails{} + var expected *string + obj.PaymentSourceToken = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentSourceToken(), "getter should return the property value") + }) + + t.Run("GetPaymentSourceToken_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SquareAccountDetails{} + obj.PaymentSourceToken = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentSourceToken(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentSourceToken_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SquareAccountDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentSourceToken() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SquareAccountDetails{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SquareAccountDetails{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SquareAccountDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSquareAccountDetails(t *testing.T) { + t.Run("SetPaymentSourceToken_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SquareAccountDetails{} + var fernTestValuePaymentSourceToken *string + + // Act + obj.SetPaymentSourceToken(fernTestValuePaymentSourceToken) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SquareAccountDetails{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdatePaymentResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdatePaymentResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPayment", func(t *testing.T) { + obj := &UpdatePaymentResponse{} + var fernTestValuePayment *Payment + obj.SetPayment(fernTestValuePayment) + assert.Equal(t, fernTestValuePayment, obj.Payment) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdatePaymentResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdatePaymentResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdatePaymentResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdatePaymentResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetPayment", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdatePaymentResponse{} + var expected *Payment + obj.Payment = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPayment(), "getter should return the property value") + }) + + t.Run("GetPayment_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdatePaymentResponse{} + obj.Payment = nil + + // Act & Assert + assert.Nil(t, obj.GetPayment(), "getter should return nil when property is nil") + }) + + t.Run("GetPayment_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdatePaymentResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPayment() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdatePaymentResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdatePaymentResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPayment_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdatePaymentResponse{} + var fernTestValuePayment *Payment + + // Act + obj.SetPayment(fernTestValuePayment) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdatePaymentRequest(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &UpdatePaymentRequest{} + var fernTestValuePaymentID string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPayment", func(t *testing.T) { + obj := &UpdatePaymentRequest{} + var fernTestValuePayment *Payment + obj.SetPayment(fernTestValuePayment) + assert.Equal(t, fernTestValuePayment, obj.Payment) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &UpdatePaymentRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdatePaymentRequest(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdatePaymentRequest{} + var fernTestValuePaymentID string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPayment_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdatePaymentRequest{} + var fernTestValuePayment *Payment + + // Act + obj.SetPayment(fernTestValuePayment) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdatePaymentRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingAchDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AchDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled AchDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj AchDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj AchDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingAfterpayDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AfterpayDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled AfterpayDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj AfterpayDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj AfterpayDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingApplicationDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ApplicationDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ApplicationDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ApplicationDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ApplicationDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBankAccountPaymentDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountPaymentDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BankAccountPaymentDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BankAccountPaymentDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BankAccountPaymentDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBuyNowPayLaterDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BuyNowPayLaterDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BuyNowPayLaterDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BuyNowPayLaterDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BuyNowPayLaterDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCancelPaymentByIdempotencyKeyResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelPaymentByIdempotencyKeyResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CancelPaymentByIdempotencyKeyResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CancelPaymentByIdempotencyKeyResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CancelPaymentByIdempotencyKeyResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCancelPaymentResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelPaymentResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CancelPaymentResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CancelPaymentResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CancelPaymentResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCardPaymentDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CardPaymentDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CardPaymentDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CardPaymentDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCardPaymentTimeline(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardPaymentTimeline{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CardPaymentTimeline + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CardPaymentTimeline + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CardPaymentTimeline + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCashAppDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashAppDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CashAppDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CashAppDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CashAppDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCashPaymentDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashPaymentDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CashPaymentDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CashPaymentDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CashPaymentDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingClearpayDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ClearpayDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ClearpayDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ClearpayDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ClearpayDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCompletePaymentResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CompletePaymentResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CompletePaymentResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CompletePaymentResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CompletePaymentResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreatePaymentResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreatePaymentResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreatePaymentResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreatePaymentResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeviceDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeviceDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeviceDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeviceDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDigitalWalletDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DigitalWalletDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DigitalWalletDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DigitalWalletDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DigitalWalletDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingExternalPaymentDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ExternalPaymentDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ExternalPaymentDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ExternalPaymentDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ExternalPaymentDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetPaymentResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPaymentResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetPaymentResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetPaymentResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetPaymentResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListPaymentsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListPaymentsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListPaymentsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListPaymentsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOfflinePaymentDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OfflinePaymentDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OfflinePaymentDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OfflinePaymentDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OfflinePaymentDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPayment(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payment{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Payment + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Payment + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Payment + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRiskEvaluation(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RiskEvaluation{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RiskEvaluation + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RiskEvaluation + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RiskEvaluation + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSquareAccountDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SquareAccountDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SquareAccountDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SquareAccountDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SquareAccountDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdatePaymentResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdatePaymentResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdatePaymentResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdatePaymentResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdatePaymentResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringAchDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &AchDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AchDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringAfterpayDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &AfterpayDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AfterpayDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringApplicationDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ApplicationDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ApplicationDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBankAccountPaymentDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BankAccountPaymentDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountPaymentDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBuyNowPayLaterDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BuyNowPayLaterDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BuyNowPayLaterDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCancelPaymentByIdempotencyKeyResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CancelPaymentByIdempotencyKeyResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelPaymentByIdempotencyKeyResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCancelPaymentResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CancelPaymentResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelPaymentResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCardPaymentDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CardPaymentDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardPaymentDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCardPaymentTimeline(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CardPaymentTimeline{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardPaymentTimeline + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCashAppDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CashAppDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashAppDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCashPaymentDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CashPaymentDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashPaymentDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringClearpayDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ClearpayDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ClearpayDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCompletePaymentResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CompletePaymentResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CompletePaymentResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreatePaymentResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreatePaymentResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreatePaymentResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeviceDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeviceDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDigitalWalletDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DigitalWalletDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DigitalWalletDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringExternalPaymentDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ExternalPaymentDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ExternalPaymentDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetPaymentResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetPaymentResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetPaymentResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListPaymentsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListPaymentsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListPaymentsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOfflinePaymentDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OfflinePaymentDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OfflinePaymentDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPayment(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Payment{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRiskEvaluation(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RiskEvaluation{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RiskEvaluation + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSquareAccountDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SquareAccountDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SquareAccountDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdatePaymentResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdatePaymentResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdatePaymentResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestEnumApplicationDetailsExternalSquareProduct(t *testing.T) { + t.Run("NewFromString_APPOINTMENTS", func(t *testing.T) { + t.Parallel() + val, err := NewApplicationDetailsExternalSquareProductFromString("APPOINTMENTS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ApplicationDetailsExternalSquareProduct("APPOINTMENTS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ECOMMERCE_API", func(t *testing.T) { + t.Parallel() + val, err := NewApplicationDetailsExternalSquareProductFromString("ECOMMERCE_API") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ApplicationDetailsExternalSquareProduct("ECOMMERCE_API"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVOICES", func(t *testing.T) { + t.Parallel() + val, err := NewApplicationDetailsExternalSquareProductFromString("INVOICES") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ApplicationDetailsExternalSquareProduct("INVOICES"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ONLINE_STORE", func(t *testing.T) { + t.Parallel() + val, err := NewApplicationDetailsExternalSquareProductFromString("ONLINE_STORE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ApplicationDetailsExternalSquareProduct("ONLINE_STORE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_OTHER", func(t *testing.T) { + t.Parallel() + val, err := NewApplicationDetailsExternalSquareProductFromString("OTHER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ApplicationDetailsExternalSquareProduct("OTHER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RESTAURANTS", func(t *testing.T) { + t.Parallel() + val, err := NewApplicationDetailsExternalSquareProductFromString("RESTAURANTS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ApplicationDetailsExternalSquareProduct("RESTAURANTS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RETAIL", func(t *testing.T) { + t.Parallel() + val, err := NewApplicationDetailsExternalSquareProductFromString("RETAIL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ApplicationDetailsExternalSquareProduct("RETAIL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SQUARE_POS", func(t *testing.T) { + t.Parallel() + val, err := NewApplicationDetailsExternalSquareProductFromString("SQUARE_POS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ApplicationDetailsExternalSquareProduct("SQUARE_POS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TERMINAL_API", func(t *testing.T) { + t.Parallel() + val, err := NewApplicationDetailsExternalSquareProductFromString("TERMINAL_API") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ApplicationDetailsExternalSquareProduct("TERMINAL_API"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VIRTUAL_TERMINAL", func(t *testing.T) { + t.Parallel() + val, err := NewApplicationDetailsExternalSquareProductFromString("VIRTUAL_TERMINAL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ApplicationDetailsExternalSquareProduct("VIRTUAL_TERMINAL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewApplicationDetailsExternalSquareProductFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewApplicationDetailsExternalSquareProductFromString("APPOINTMENTS") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumListPaymentsRequestSortField(t *testing.T) { + t.Run("NewFromString_CREATED_AT", func(t *testing.T) { + t.Parallel() + val, err := NewListPaymentsRequestSortFieldFromString("CREATED_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ListPaymentsRequestSortField("CREATED_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_OFFLINE_CREATED_AT", func(t *testing.T) { + t.Parallel() + val, err := NewListPaymentsRequestSortFieldFromString("OFFLINE_CREATED_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ListPaymentsRequestSortField("OFFLINE_CREATED_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UPDATED_AT", func(t *testing.T) { + t.Parallel() + val, err := NewListPaymentsRequestSortFieldFromString("UPDATED_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ListPaymentsRequestSortField("UPDATED_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewListPaymentsRequestSortFieldFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewListPaymentsRequestSortFieldFromString("CREATED_AT") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumRiskEvaluationRiskLevel(t *testing.T) { + t.Run("NewFromString_PENDING", func(t *testing.T) { + t.Parallel() + val, err := NewRiskEvaluationRiskLevelFromString("PENDING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, RiskEvaluationRiskLevel("PENDING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NORMAL", func(t *testing.T) { + t.Parallel() + val, err := NewRiskEvaluationRiskLevelFromString("NORMAL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, RiskEvaluationRiskLevel("NORMAL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MODERATE", func(t *testing.T) { + t.Parallel() + val, err := NewRiskEvaluationRiskLevelFromString("MODERATE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, RiskEvaluationRiskLevel("MODERATE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_HIGH", func(t *testing.T) { + t.Parallel() + val, err := NewRiskEvaluationRiskLevelFromString("HIGH") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, RiskEvaluationRiskLevel("HIGH"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewRiskEvaluationRiskLevelFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewRiskEvaluationRiskLevelFromString("PENDING") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestExtraPropertiesAchDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &AchDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AchDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesAfterpayDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &AfterpayDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AfterpayDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesApplicationDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ApplicationDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ApplicationDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBankAccountPaymentDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BankAccountPaymentDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountPaymentDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBuyNowPayLaterDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BuyNowPayLaterDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BuyNowPayLaterDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCancelPaymentByIdempotencyKeyResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CancelPaymentByIdempotencyKeyResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelPaymentByIdempotencyKeyResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCancelPaymentResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CancelPaymentResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelPaymentResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCardPaymentDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CardPaymentDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardPaymentDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCardPaymentTimeline(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CardPaymentTimeline{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardPaymentTimeline + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCashAppDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CashAppDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashAppDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCashPaymentDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CashPaymentDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashPaymentDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesClearpayDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ClearpayDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ClearpayDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCompletePaymentResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CompletePaymentResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CompletePaymentResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreatePaymentResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreatePaymentResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreatePaymentResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeviceDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeviceDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDigitalWalletDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DigitalWalletDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DigitalWalletDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesExternalPaymentDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ExternalPaymentDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ExternalPaymentDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetPaymentResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetPaymentResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetPaymentResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListPaymentsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListPaymentsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListPaymentsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOfflinePaymentDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OfflinePaymentDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OfflinePaymentDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPayment(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Payment{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payment + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRiskEvaluation(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RiskEvaluation{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RiskEvaluation + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSquareAccountDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SquareAccountDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SquareAccountDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdatePaymentResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdatePaymentResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdatePaymentResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/payouts.go b/payouts.go index 296ce81..0245316 100644 --- a/payouts.go +++ b/payouts.go @@ -419,6 +419,9 @@ func (d *Destination) GetID() *string { } func (d *Destination) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -471,6 +474,9 @@ func (d *Destination) MarshalJSON() ([]byte, error) { } func (d *Destination) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -544,6 +550,9 @@ func (g *GetPayoutResponse) GetErrors() []*Error { } func (g *GetPayoutResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -596,6 +605,9 @@ func (g *GetPayoutResponse) MarshalJSON() ([]byte, error) { } func (g *GetPayoutResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -652,6 +664,9 @@ func (l *ListPayoutEntriesResponse) GetErrors() []*Error { } func (l *ListPayoutEntriesResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -711,6 +726,9 @@ func (l *ListPayoutEntriesResponse) MarshalJSON() ([]byte, error) { } func (l *ListPayoutEntriesResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -767,6 +785,9 @@ func (l *ListPayoutsResponse) GetErrors() []*Error { } func (l *ListPayoutsResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -826,6 +847,9 @@ func (l *ListPayoutsResponse) MarshalJSON() ([]byte, error) { } func (l *ListPayoutsResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -880,6 +904,9 @@ func (p *PaymentBalanceActivityAppFeeRefundDetail) GetLocationID() *string { } func (p *PaymentBalanceActivityAppFeeRefundDetail) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -939,6 +966,9 @@ func (p *PaymentBalanceActivityAppFeeRefundDetail) MarshalJSON() ([]byte, error) } func (p *PaymentBalanceActivityAppFeeRefundDetail) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -983,6 +1013,9 @@ func (p *PaymentBalanceActivityAppFeeRevenueDetail) GetLocationID() *string { } func (p *PaymentBalanceActivityAppFeeRevenueDetail) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -1035,6 +1068,9 @@ func (p *PaymentBalanceActivityAppFeeRevenueDetail) MarshalJSON() ([]byte, error } func (p *PaymentBalanceActivityAppFeeRevenueDetail) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -1079,6 +1115,9 @@ func (p *PaymentBalanceActivityAutomaticSavingsDetail) GetPayoutID() *string { } func (p *PaymentBalanceActivityAutomaticSavingsDetail) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -1131,6 +1170,9 @@ func (p *PaymentBalanceActivityAutomaticSavingsDetail) MarshalJSON() ([]byte, er } func (p *PaymentBalanceActivityAutomaticSavingsDetail) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -1175,6 +1217,9 @@ func (p *PaymentBalanceActivityAutomaticSavingsReversedDetail) GetPayoutID() *st } func (p *PaymentBalanceActivityAutomaticSavingsReversedDetail) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -1227,6 +1272,9 @@ func (p *PaymentBalanceActivityAutomaticSavingsReversedDetail) MarshalJSON() ([] } func (p *PaymentBalanceActivityAutomaticSavingsReversedDetail) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -1261,6 +1309,9 @@ func (p *PaymentBalanceActivityChargeDetail) GetPaymentID() *string { } func (p *PaymentBalanceActivityChargeDetail) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -1306,6 +1357,9 @@ func (p *PaymentBalanceActivityChargeDetail) MarshalJSON() ([]byte, error) { } func (p *PaymentBalanceActivityChargeDetail) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -1340,6 +1394,9 @@ func (p *PaymentBalanceActivityDepositFeeDetail) GetPayoutID() *string { } func (p *PaymentBalanceActivityDepositFeeDetail) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -1385,6 +1442,9 @@ func (p *PaymentBalanceActivityDepositFeeDetail) MarshalJSON() ([]byte, error) { } func (p *PaymentBalanceActivityDepositFeeDetail) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -1419,6 +1479,9 @@ func (p *PaymentBalanceActivityDepositFeeReversedDetail) GetPayoutID() *string { } func (p *PaymentBalanceActivityDepositFeeReversedDetail) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -1464,6 +1527,9 @@ func (p *PaymentBalanceActivityDepositFeeReversedDetail) MarshalJSON() ([]byte, } func (p *PaymentBalanceActivityDepositFeeReversedDetail) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -1508,6 +1574,9 @@ func (p *PaymentBalanceActivityDisputeDetail) GetDisputeID() *string { } func (p *PaymentBalanceActivityDisputeDetail) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -1560,6 +1629,9 @@ func (p *PaymentBalanceActivityDisputeDetail) MarshalJSON() ([]byte, error) { } func (p *PaymentBalanceActivityDisputeDetail) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -1597,6 +1669,9 @@ func (p *PaymentBalanceActivityFeeDetail) GetPaymentID() *string { } func (p *PaymentBalanceActivityFeeDetail) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -1642,6 +1717,9 @@ func (p *PaymentBalanceActivityFeeDetail) MarshalJSON() ([]byte, error) { } func (p *PaymentBalanceActivityFeeDetail) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -1676,6 +1754,9 @@ func (p *PaymentBalanceActivityFreeProcessingDetail) GetPaymentID() *string { } func (p *PaymentBalanceActivityFreeProcessingDetail) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -1721,6 +1802,9 @@ func (p *PaymentBalanceActivityFreeProcessingDetail) MarshalJSON() ([]byte, erro } func (p *PaymentBalanceActivityFreeProcessingDetail) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -1755,6 +1839,9 @@ func (p *PaymentBalanceActivityHoldAdjustmentDetail) GetPaymentID() *string { } func (p *PaymentBalanceActivityHoldAdjustmentDetail) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -1800,6 +1887,9 @@ func (p *PaymentBalanceActivityHoldAdjustmentDetail) MarshalJSON() ([]byte, erro } func (p *PaymentBalanceActivityHoldAdjustmentDetail) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -1844,6 +1934,9 @@ func (p *PaymentBalanceActivityOpenDisputeDetail) GetDisputeID() *string { } func (p *PaymentBalanceActivityOpenDisputeDetail) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -1896,6 +1989,9 @@ func (p *PaymentBalanceActivityOpenDisputeDetail) MarshalJSON() ([]byte, error) } func (p *PaymentBalanceActivityOpenDisputeDetail) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -1930,6 +2026,9 @@ func (p *PaymentBalanceActivityOtherAdjustmentDetail) GetPaymentID() *string { } func (p *PaymentBalanceActivityOtherAdjustmentDetail) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -1975,6 +2074,9 @@ func (p *PaymentBalanceActivityOtherAdjustmentDetail) MarshalJSON() ([]byte, err } func (p *PaymentBalanceActivityOtherAdjustmentDetail) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -2009,6 +2111,9 @@ func (p *PaymentBalanceActivityOtherDetail) GetPaymentID() *string { } func (p *PaymentBalanceActivityOtherDetail) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -2054,6 +2159,9 @@ func (p *PaymentBalanceActivityOtherDetail) MarshalJSON() ([]byte, error) { } func (p *PaymentBalanceActivityOtherDetail) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -2098,6 +2206,9 @@ func (p *PaymentBalanceActivityRefundDetail) GetRefundID() *string { } func (p *PaymentBalanceActivityRefundDetail) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -2150,6 +2261,9 @@ func (p *PaymentBalanceActivityRefundDetail) MarshalJSON() ([]byte, error) { } func (p *PaymentBalanceActivityRefundDetail) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -2184,6 +2298,9 @@ func (p *PaymentBalanceActivityReleaseAdjustmentDetail) GetPaymentID() *string { } func (p *PaymentBalanceActivityReleaseAdjustmentDetail) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -2229,6 +2346,9 @@ func (p *PaymentBalanceActivityReleaseAdjustmentDetail) MarshalJSON() ([]byte, e } func (p *PaymentBalanceActivityReleaseAdjustmentDetail) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -2263,6 +2383,9 @@ func (p *PaymentBalanceActivityReserveHoldDetail) GetPaymentID() *string { } func (p *PaymentBalanceActivityReserveHoldDetail) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -2308,6 +2431,9 @@ func (p *PaymentBalanceActivityReserveHoldDetail) MarshalJSON() ([]byte, error) } func (p *PaymentBalanceActivityReserveHoldDetail) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -2342,6 +2468,9 @@ func (p *PaymentBalanceActivityReserveReleaseDetail) GetPaymentID() *string { } func (p *PaymentBalanceActivityReserveReleaseDetail) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -2387,6 +2516,9 @@ func (p *PaymentBalanceActivityReserveReleaseDetail) MarshalJSON() ([]byte, erro } func (p *PaymentBalanceActivityReserveReleaseDetail) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -2421,6 +2553,9 @@ func (p *PaymentBalanceActivitySquareCapitalPaymentDetail) GetPaymentID() *strin } func (p *PaymentBalanceActivitySquareCapitalPaymentDetail) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -2466,6 +2601,9 @@ func (p *PaymentBalanceActivitySquareCapitalPaymentDetail) MarshalJSON() ([]byte } func (p *PaymentBalanceActivitySquareCapitalPaymentDetail) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -2500,6 +2638,9 @@ func (p *PaymentBalanceActivitySquareCapitalReversedPaymentDetail) GetPaymentID( } func (p *PaymentBalanceActivitySquareCapitalReversedPaymentDetail) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -2545,6 +2686,9 @@ func (p *PaymentBalanceActivitySquareCapitalReversedPaymentDetail) MarshalJSON() } func (p *PaymentBalanceActivitySquareCapitalReversedPaymentDetail) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -2579,6 +2723,9 @@ func (p *PaymentBalanceActivitySquarePayrollTransferDetail) GetPaymentID() *stri } func (p *PaymentBalanceActivitySquarePayrollTransferDetail) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -2624,6 +2771,9 @@ func (p *PaymentBalanceActivitySquarePayrollTransferDetail) MarshalJSON() ([]byt } func (p *PaymentBalanceActivitySquarePayrollTransferDetail) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -2658,6 +2808,9 @@ func (p *PaymentBalanceActivitySquarePayrollTransferReversedDetail) GetPaymentID } func (p *PaymentBalanceActivitySquarePayrollTransferReversedDetail) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -2703,6 +2856,9 @@ func (p *PaymentBalanceActivitySquarePayrollTransferReversedDetail) MarshalJSON( } func (p *PaymentBalanceActivitySquarePayrollTransferReversedDetail) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -2747,6 +2903,9 @@ func (p *PaymentBalanceActivityTaxOnFeeDetail) GetTaxRateDescription() *string { } func (p *PaymentBalanceActivityTaxOnFeeDetail) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -2799,6 +2958,9 @@ func (p *PaymentBalanceActivityTaxOnFeeDetail) MarshalJSON() ([]byte, error) { } func (p *PaymentBalanceActivityTaxOnFeeDetail) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -2833,6 +2995,9 @@ func (p *PaymentBalanceActivityThirdPartyFeeDetail) GetPaymentID() *string { } func (p *PaymentBalanceActivityThirdPartyFeeDetail) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -2878,6 +3043,9 @@ func (p *PaymentBalanceActivityThirdPartyFeeDetail) MarshalJSON() ([]byte, error } func (p *PaymentBalanceActivityThirdPartyFeeDetail) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -2922,6 +3090,9 @@ func (p *PaymentBalanceActivityThirdPartyFeeRefundDetail) GetRefundID() *string } func (p *PaymentBalanceActivityThirdPartyFeeRefundDetail) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -2974,6 +3145,9 @@ func (p *PaymentBalanceActivityThirdPartyFeeRefundDetail) MarshalJSON() ([]byte, } func (p *PaymentBalanceActivityThirdPartyFeeRefundDetail) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -3124,6 +3298,9 @@ func (p *Payout) GetEndToEndID() *string { } func (p *Payout) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -3246,6 +3423,9 @@ func (p *Payout) MarshalJSON() ([]byte, error) { } func (p *Payout) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -3593,6 +3773,9 @@ func (p *PayoutEntry) GetTypeSquarePayrollTransferReversedDetails() *PaymentBala } func (p *PayoutEntry) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -3855,6 +4038,9 @@ func (p *PayoutEntry) MarshalJSON() ([]byte, error) { } func (p *PayoutEntry) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -3911,6 +4097,9 @@ func (p *PayoutFee) GetType() *PayoutFeeType { } func (p *PayoutFee) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -3970,6 +4159,9 @@ func (p *PayoutFee) MarshalJSON() ([]byte, error) { } func (p *PayoutFee) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value diff --git a/payouts/payouts_test/payouts_test.go b/payouts/payouts_test/payouts_test.go new file mode 100644 index 0000000..7343823 --- /dev/null +++ b/payouts/payouts_test/payouts_test.go @@ -0,0 +1,161 @@ +// Code generated by Fern. DO NOT EDIT. + +package payouts_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestPayoutsListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.ListPayoutsRequest{ + LocationID: square.String( + "location_id", + ), + Status: square.PayoutStatusSent.Ptr(), + BeginTime: square.String( + "begin_time", + ), + EndTime: square.String( + "end_time", + ), + SortOrder: square.SortOrderDesc.Ptr(), + Cursor: square.String( + "cursor", + ), + Limit: square.Int( + 1, + ), + } + _, invocationErr := client.Payouts.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestPayoutsListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestPayoutsListWithWireMock", "GET", "/v2/payouts", map[string]string{"location_id": "location_id", "status": "SENT", "begin_time": "begin_time", "end_time": "end_time", "sort_order": "DESC", "cursor": "cursor", "limit": "1"}, 1) +} + +func TestPayoutsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.GetPayoutsRequest{ + PayoutID: "payout_id", + } + _, invocationErr := client.Payouts.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestPayoutsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestPayoutsGetWithWireMock", "GET", "/v2/payouts/payout_id", nil, 1) +} + +func TestPayoutsListEntriesWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.ListEntriesPayoutsRequest{ + PayoutID: "payout_id", + SortOrder: square.SortOrderDesc.Ptr(), + Cursor: square.String( + "cursor", + ), + Limit: square.Int( + 1, + ), + } + _, invocationErr := client.Payouts.ListEntries( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestPayoutsListEntriesWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestPayoutsListEntriesWithWireMock", "GET", "/v2/payouts/payout_id/payout-entries", map[string]string{"sort_order": "DESC", "cursor": "cursor", "limit": "1"}, 1) +} diff --git a/payouts_test.go b/payouts_test.go new file mode 100644 index 0000000..7d78b5e --- /dev/null +++ b/payouts_test.go @@ -0,0 +1,10230 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersListEntriesPayoutsRequest(t *testing.T) { + t.Run("SetPayoutID", func(t *testing.T) { + obj := &ListEntriesPayoutsRequest{} + var fernTestValuePayoutID string + obj.SetPayoutID(fernTestValuePayoutID) + assert.Equal(t, fernTestValuePayoutID, obj.PayoutID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSortOrder", func(t *testing.T) { + obj := &ListEntriesPayoutsRequest{} + var fernTestValueSortOrder *SortOrder + obj.SetSortOrder(fernTestValueSortOrder) + assert.Equal(t, fernTestValueSortOrder, obj.SortOrder) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListEntriesPayoutsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListEntriesPayoutsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListEntriesPayoutsRequest(t *testing.T) { + t.Run("SetPayoutID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEntriesPayoutsRequest{} + var fernTestValuePayoutID string + + // Act + obj.SetPayoutID(fernTestValuePayoutID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSortOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEntriesPayoutsRequest{} + var fernTestValueSortOrder *SortOrder + + // Act + obj.SetSortOrder(fernTestValueSortOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEntriesPayoutsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEntriesPayoutsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetPayoutsRequest(t *testing.T) { + t.Run("SetPayoutID", func(t *testing.T) { + obj := &GetPayoutsRequest{} + var fernTestValuePayoutID string + obj.SetPayoutID(fernTestValuePayoutID) + assert.Equal(t, fernTestValuePayoutID, obj.PayoutID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetPayoutsRequest(t *testing.T) { + t.Run("SetPayoutID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPayoutsRequest{} + var fernTestValuePayoutID string + + // Act + obj.SetPayoutID(fernTestValuePayoutID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListPayoutsRequest(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &ListPayoutsRequest{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &ListPayoutsRequest{} + var fernTestValueStatus *PayoutStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBeginTime", func(t *testing.T) { + obj := &ListPayoutsRequest{} + var fernTestValueBeginTime *string + obj.SetBeginTime(fernTestValueBeginTime) + assert.Equal(t, fernTestValueBeginTime, obj.BeginTime) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEndTime", func(t *testing.T) { + obj := &ListPayoutsRequest{} + var fernTestValueEndTime *string + obj.SetEndTime(fernTestValueEndTime) + assert.Equal(t, fernTestValueEndTime, obj.EndTime) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSortOrder", func(t *testing.T) { + obj := &ListPayoutsRequest{} + var fernTestValueSortOrder *SortOrder + obj.SetSortOrder(fernTestValueSortOrder) + assert.Equal(t, fernTestValueSortOrder, obj.SortOrder) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListPayoutsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListPayoutsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListPayoutsRequest(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPayoutsRequest{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPayoutsRequest{} + var fernTestValueStatus *PayoutStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBeginTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPayoutsRequest{} + var fernTestValueBeginTime *string + + // Act + obj.SetBeginTime(fernTestValueBeginTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEndTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPayoutsRequest{} + var fernTestValueEndTime *string + + // Act + obj.SetEndTime(fernTestValueEndTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSortOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPayoutsRequest{} + var fernTestValueSortOrder *SortOrder + + // Act + obj.SetSortOrder(fernTestValueSortOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPayoutsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPayoutsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDestination(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &Destination{} + var fernTestValueType *DestinationType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &Destination{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDestination(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Destination{} + var expected *DestinationType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Destination{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Destination + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Destination{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Destination{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Destination + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDestination(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Destination{} + var fernTestValueType *DestinationType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Destination{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetPayoutResponse(t *testing.T) { + t.Run("SetPayout", func(t *testing.T) { + obj := &GetPayoutResponse{} + var fernTestValuePayout *Payout + obj.SetPayout(fernTestValuePayout) + assert.Equal(t, fernTestValuePayout, obj.Payout) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &GetPayoutResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetPayoutResponse(t *testing.T) { + t.Run("GetPayout", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPayoutResponse{} + var expected *Payout + obj.Payout = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPayout(), "getter should return the property value") + }) + + t.Run("GetPayout_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPayoutResponse{} + obj.Payout = nil + + // Act & Assert + assert.Nil(t, obj.GetPayout(), "getter should return nil when property is nil") + }) + + t.Run("GetPayout_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetPayoutResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPayout() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPayoutResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPayoutResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetPayoutResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetPayoutResponse(t *testing.T) { + t.Run("SetPayout_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPayoutResponse{} + var fernTestValuePayout *Payout + + // Act + obj.SetPayout(fernTestValuePayout) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPayoutResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListPayoutEntriesResponse(t *testing.T) { + t.Run("SetPayoutEntries", func(t *testing.T) { + obj := &ListPayoutEntriesResponse{} + var fernTestValuePayoutEntries []*PayoutEntry + obj.SetPayoutEntries(fernTestValuePayoutEntries) + assert.Equal(t, fernTestValuePayoutEntries, obj.PayoutEntries) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListPayoutEntriesResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &ListPayoutEntriesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListPayoutEntriesResponse(t *testing.T) { + t.Run("GetPayoutEntries", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPayoutEntriesResponse{} + var expected []*PayoutEntry + obj.PayoutEntries = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPayoutEntries(), "getter should return the property value") + }) + + t.Run("GetPayoutEntries_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPayoutEntriesResponse{} + obj.PayoutEntries = nil + + // Act & Assert + assert.Nil(t, obj.GetPayoutEntries(), "getter should return nil when property is nil") + }) + + t.Run("GetPayoutEntries_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListPayoutEntriesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPayoutEntries() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPayoutEntriesResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPayoutEntriesResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListPayoutEntriesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPayoutEntriesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPayoutEntriesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListPayoutEntriesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListPayoutEntriesResponse(t *testing.T) { + t.Run("SetPayoutEntries_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPayoutEntriesResponse{} + var fernTestValuePayoutEntries []*PayoutEntry + + // Act + obj.SetPayoutEntries(fernTestValuePayoutEntries) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPayoutEntriesResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPayoutEntriesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListPayoutsResponse(t *testing.T) { + t.Run("SetPayouts", func(t *testing.T) { + obj := &ListPayoutsResponse{} + var fernTestValuePayouts []*Payout + obj.SetPayouts(fernTestValuePayouts) + assert.Equal(t, fernTestValuePayouts, obj.Payouts) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListPayoutsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &ListPayoutsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListPayoutsResponse(t *testing.T) { + t.Run("GetPayouts", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPayoutsResponse{} + var expected []*Payout + obj.Payouts = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPayouts(), "getter should return the property value") + }) + + t.Run("GetPayouts_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPayoutsResponse{} + obj.Payouts = nil + + // Act & Assert + assert.Nil(t, obj.GetPayouts(), "getter should return nil when property is nil") + }) + + t.Run("GetPayouts_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListPayoutsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPayouts() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPayoutsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPayoutsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListPayoutsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPayoutsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPayoutsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListPayoutsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListPayoutsResponse(t *testing.T) { + t.Run("SetPayouts_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPayoutsResponse{} + var fernTestValuePayouts []*Payout + + // Act + obj.SetPayouts(fernTestValuePayouts) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPayoutsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPayoutsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentBalanceActivityAppFeeRefundDetail(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &PaymentBalanceActivityAppFeeRefundDetail{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRefundID", func(t *testing.T) { + obj := &PaymentBalanceActivityAppFeeRefundDetail{} + var fernTestValueRefundID *string + obj.SetRefundID(fernTestValueRefundID) + assert.Equal(t, fernTestValueRefundID, obj.RefundID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &PaymentBalanceActivityAppFeeRefundDetail{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentBalanceActivityAppFeeRefundDetail(t *testing.T) { + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAppFeeRefundDetail{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAppFeeRefundDetail{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityAppFeeRefundDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + + t.Run("GetRefundID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAppFeeRefundDetail{} + var expected *string + obj.RefundID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRefundID(), "getter should return the property value") + }) + + t.Run("GetRefundID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAppFeeRefundDetail{} + obj.RefundID = nil + + // Act & Assert + assert.Nil(t, obj.GetRefundID(), "getter should return nil when property is nil") + }) + + t.Run("GetRefundID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityAppFeeRefundDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRefundID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAppFeeRefundDetail{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAppFeeRefundDetail{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityAppFeeRefundDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentBalanceActivityAppFeeRefundDetail(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAppFeeRefundDetail{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRefundID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAppFeeRefundDetail{} + var fernTestValueRefundID *string + + // Act + obj.SetRefundID(fernTestValueRefundID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAppFeeRefundDetail{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentBalanceActivityAppFeeRevenueDetail(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &PaymentBalanceActivityAppFeeRevenueDetail{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &PaymentBalanceActivityAppFeeRevenueDetail{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentBalanceActivityAppFeeRevenueDetail(t *testing.T) { + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAppFeeRevenueDetail{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAppFeeRevenueDetail{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityAppFeeRevenueDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAppFeeRevenueDetail{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAppFeeRevenueDetail{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityAppFeeRevenueDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentBalanceActivityAppFeeRevenueDetail(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAppFeeRevenueDetail{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAppFeeRevenueDetail{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentBalanceActivityAutomaticSavingsDetail(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &PaymentBalanceActivityAutomaticSavingsDetail{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPayoutID", func(t *testing.T) { + obj := &PaymentBalanceActivityAutomaticSavingsDetail{} + var fernTestValuePayoutID *string + obj.SetPayoutID(fernTestValuePayoutID) + assert.Equal(t, fernTestValuePayoutID, obj.PayoutID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentBalanceActivityAutomaticSavingsDetail(t *testing.T) { + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAutomaticSavingsDetail{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAutomaticSavingsDetail{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityAutomaticSavingsDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + + t.Run("GetPayoutID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAutomaticSavingsDetail{} + var expected *string + obj.PayoutID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPayoutID(), "getter should return the property value") + }) + + t.Run("GetPayoutID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAutomaticSavingsDetail{} + obj.PayoutID = nil + + // Act & Assert + assert.Nil(t, obj.GetPayoutID(), "getter should return nil when property is nil") + }) + + t.Run("GetPayoutID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityAutomaticSavingsDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPayoutID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentBalanceActivityAutomaticSavingsDetail(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAutomaticSavingsDetail{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPayoutID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAutomaticSavingsDetail{} + var fernTestValuePayoutID *string + + // Act + obj.SetPayoutID(fernTestValuePayoutID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentBalanceActivityAutomaticSavingsReversedDetail(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &PaymentBalanceActivityAutomaticSavingsReversedDetail{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPayoutID", func(t *testing.T) { + obj := &PaymentBalanceActivityAutomaticSavingsReversedDetail{} + var fernTestValuePayoutID *string + obj.SetPayoutID(fernTestValuePayoutID) + assert.Equal(t, fernTestValuePayoutID, obj.PayoutID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentBalanceActivityAutomaticSavingsReversedDetail(t *testing.T) { + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAutomaticSavingsReversedDetail{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAutomaticSavingsReversedDetail{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityAutomaticSavingsReversedDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + + t.Run("GetPayoutID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAutomaticSavingsReversedDetail{} + var expected *string + obj.PayoutID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPayoutID(), "getter should return the property value") + }) + + t.Run("GetPayoutID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAutomaticSavingsReversedDetail{} + obj.PayoutID = nil + + // Act & Assert + assert.Nil(t, obj.GetPayoutID(), "getter should return nil when property is nil") + }) + + t.Run("GetPayoutID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityAutomaticSavingsReversedDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPayoutID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentBalanceActivityAutomaticSavingsReversedDetail(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAutomaticSavingsReversedDetail{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPayoutID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAutomaticSavingsReversedDetail{} + var fernTestValuePayoutID *string + + // Act + obj.SetPayoutID(fernTestValuePayoutID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentBalanceActivityChargeDetail(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &PaymentBalanceActivityChargeDetail{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentBalanceActivityChargeDetail(t *testing.T) { + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityChargeDetail{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityChargeDetail{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityChargeDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentBalanceActivityChargeDetail(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityChargeDetail{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentBalanceActivityDepositFeeDetail(t *testing.T) { + t.Run("SetPayoutID", func(t *testing.T) { + obj := &PaymentBalanceActivityDepositFeeDetail{} + var fernTestValuePayoutID *string + obj.SetPayoutID(fernTestValuePayoutID) + assert.Equal(t, fernTestValuePayoutID, obj.PayoutID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentBalanceActivityDepositFeeDetail(t *testing.T) { + t.Run("GetPayoutID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityDepositFeeDetail{} + var expected *string + obj.PayoutID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPayoutID(), "getter should return the property value") + }) + + t.Run("GetPayoutID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityDepositFeeDetail{} + obj.PayoutID = nil + + // Act & Assert + assert.Nil(t, obj.GetPayoutID(), "getter should return nil when property is nil") + }) + + t.Run("GetPayoutID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityDepositFeeDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPayoutID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentBalanceActivityDepositFeeDetail(t *testing.T) { + t.Run("SetPayoutID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityDepositFeeDetail{} + var fernTestValuePayoutID *string + + // Act + obj.SetPayoutID(fernTestValuePayoutID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentBalanceActivityDepositFeeReversedDetail(t *testing.T) { + t.Run("SetPayoutID", func(t *testing.T) { + obj := &PaymentBalanceActivityDepositFeeReversedDetail{} + var fernTestValuePayoutID *string + obj.SetPayoutID(fernTestValuePayoutID) + assert.Equal(t, fernTestValuePayoutID, obj.PayoutID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentBalanceActivityDepositFeeReversedDetail(t *testing.T) { + t.Run("GetPayoutID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityDepositFeeReversedDetail{} + var expected *string + obj.PayoutID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPayoutID(), "getter should return the property value") + }) + + t.Run("GetPayoutID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityDepositFeeReversedDetail{} + obj.PayoutID = nil + + // Act & Assert + assert.Nil(t, obj.GetPayoutID(), "getter should return nil when property is nil") + }) + + t.Run("GetPayoutID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityDepositFeeReversedDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPayoutID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentBalanceActivityDepositFeeReversedDetail(t *testing.T) { + t.Run("SetPayoutID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityDepositFeeReversedDetail{} + var fernTestValuePayoutID *string + + // Act + obj.SetPayoutID(fernTestValuePayoutID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentBalanceActivityDisputeDetail(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &PaymentBalanceActivityDisputeDetail{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDisputeID", func(t *testing.T) { + obj := &PaymentBalanceActivityDisputeDetail{} + var fernTestValueDisputeID *string + obj.SetDisputeID(fernTestValueDisputeID) + assert.Equal(t, fernTestValueDisputeID, obj.DisputeID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentBalanceActivityDisputeDetail(t *testing.T) { + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityDisputeDetail{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityDisputeDetail{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityDisputeDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + + t.Run("GetDisputeID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityDisputeDetail{} + var expected *string + obj.DisputeID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDisputeID(), "getter should return the property value") + }) + + t.Run("GetDisputeID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityDisputeDetail{} + obj.DisputeID = nil + + // Act & Assert + assert.Nil(t, obj.GetDisputeID(), "getter should return nil when property is nil") + }) + + t.Run("GetDisputeID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityDisputeDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDisputeID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentBalanceActivityDisputeDetail(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityDisputeDetail{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDisputeID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityDisputeDetail{} + var fernTestValueDisputeID *string + + // Act + obj.SetDisputeID(fernTestValueDisputeID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentBalanceActivityFeeDetail(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &PaymentBalanceActivityFeeDetail{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentBalanceActivityFeeDetail(t *testing.T) { + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityFeeDetail{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityFeeDetail{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityFeeDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentBalanceActivityFeeDetail(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityFeeDetail{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentBalanceActivityFreeProcessingDetail(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &PaymentBalanceActivityFreeProcessingDetail{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentBalanceActivityFreeProcessingDetail(t *testing.T) { + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityFreeProcessingDetail{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityFreeProcessingDetail{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityFreeProcessingDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentBalanceActivityFreeProcessingDetail(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityFreeProcessingDetail{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentBalanceActivityHoldAdjustmentDetail(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &PaymentBalanceActivityHoldAdjustmentDetail{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentBalanceActivityHoldAdjustmentDetail(t *testing.T) { + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityHoldAdjustmentDetail{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityHoldAdjustmentDetail{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityHoldAdjustmentDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentBalanceActivityHoldAdjustmentDetail(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityHoldAdjustmentDetail{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentBalanceActivityOpenDisputeDetail(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &PaymentBalanceActivityOpenDisputeDetail{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDisputeID", func(t *testing.T) { + obj := &PaymentBalanceActivityOpenDisputeDetail{} + var fernTestValueDisputeID *string + obj.SetDisputeID(fernTestValueDisputeID) + assert.Equal(t, fernTestValueDisputeID, obj.DisputeID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentBalanceActivityOpenDisputeDetail(t *testing.T) { + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityOpenDisputeDetail{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityOpenDisputeDetail{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityOpenDisputeDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + + t.Run("GetDisputeID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityOpenDisputeDetail{} + var expected *string + obj.DisputeID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDisputeID(), "getter should return the property value") + }) + + t.Run("GetDisputeID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityOpenDisputeDetail{} + obj.DisputeID = nil + + // Act & Assert + assert.Nil(t, obj.GetDisputeID(), "getter should return nil when property is nil") + }) + + t.Run("GetDisputeID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityOpenDisputeDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDisputeID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentBalanceActivityOpenDisputeDetail(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityOpenDisputeDetail{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDisputeID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityOpenDisputeDetail{} + var fernTestValueDisputeID *string + + // Act + obj.SetDisputeID(fernTestValueDisputeID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentBalanceActivityOtherAdjustmentDetail(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &PaymentBalanceActivityOtherAdjustmentDetail{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentBalanceActivityOtherAdjustmentDetail(t *testing.T) { + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityOtherAdjustmentDetail{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityOtherAdjustmentDetail{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityOtherAdjustmentDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentBalanceActivityOtherAdjustmentDetail(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityOtherAdjustmentDetail{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentBalanceActivityOtherDetail(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &PaymentBalanceActivityOtherDetail{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentBalanceActivityOtherDetail(t *testing.T) { + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityOtherDetail{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityOtherDetail{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityOtherDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentBalanceActivityOtherDetail(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityOtherDetail{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentBalanceActivityRefundDetail(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &PaymentBalanceActivityRefundDetail{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRefundID", func(t *testing.T) { + obj := &PaymentBalanceActivityRefundDetail{} + var fernTestValueRefundID *string + obj.SetRefundID(fernTestValueRefundID) + assert.Equal(t, fernTestValueRefundID, obj.RefundID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentBalanceActivityRefundDetail(t *testing.T) { + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityRefundDetail{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityRefundDetail{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityRefundDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + + t.Run("GetRefundID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityRefundDetail{} + var expected *string + obj.RefundID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRefundID(), "getter should return the property value") + }) + + t.Run("GetRefundID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityRefundDetail{} + obj.RefundID = nil + + // Act & Assert + assert.Nil(t, obj.GetRefundID(), "getter should return nil when property is nil") + }) + + t.Run("GetRefundID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityRefundDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRefundID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentBalanceActivityRefundDetail(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityRefundDetail{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRefundID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityRefundDetail{} + var fernTestValueRefundID *string + + // Act + obj.SetRefundID(fernTestValueRefundID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentBalanceActivityReleaseAdjustmentDetail(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &PaymentBalanceActivityReleaseAdjustmentDetail{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentBalanceActivityReleaseAdjustmentDetail(t *testing.T) { + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityReleaseAdjustmentDetail{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityReleaseAdjustmentDetail{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityReleaseAdjustmentDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentBalanceActivityReleaseAdjustmentDetail(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityReleaseAdjustmentDetail{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentBalanceActivityReserveHoldDetail(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &PaymentBalanceActivityReserveHoldDetail{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentBalanceActivityReserveHoldDetail(t *testing.T) { + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityReserveHoldDetail{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityReserveHoldDetail{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityReserveHoldDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentBalanceActivityReserveHoldDetail(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityReserveHoldDetail{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentBalanceActivityReserveReleaseDetail(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &PaymentBalanceActivityReserveReleaseDetail{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentBalanceActivityReserveReleaseDetail(t *testing.T) { + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityReserveReleaseDetail{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityReserveReleaseDetail{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityReserveReleaseDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentBalanceActivityReserveReleaseDetail(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityReserveReleaseDetail{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentBalanceActivitySquareCapitalPaymentDetail(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &PaymentBalanceActivitySquareCapitalPaymentDetail{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentBalanceActivitySquareCapitalPaymentDetail(t *testing.T) { + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivitySquareCapitalPaymentDetail{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivitySquareCapitalPaymentDetail{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivitySquareCapitalPaymentDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentBalanceActivitySquareCapitalPaymentDetail(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivitySquareCapitalPaymentDetail{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentBalanceActivitySquareCapitalReversedPaymentDetail(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &PaymentBalanceActivitySquareCapitalReversedPaymentDetail{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentBalanceActivitySquareCapitalReversedPaymentDetail(t *testing.T) { + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivitySquareCapitalReversedPaymentDetail{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivitySquareCapitalReversedPaymentDetail{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivitySquareCapitalReversedPaymentDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentBalanceActivitySquareCapitalReversedPaymentDetail(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivitySquareCapitalReversedPaymentDetail{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentBalanceActivitySquarePayrollTransferDetail(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &PaymentBalanceActivitySquarePayrollTransferDetail{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentBalanceActivitySquarePayrollTransferDetail(t *testing.T) { + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivitySquarePayrollTransferDetail{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivitySquarePayrollTransferDetail{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivitySquarePayrollTransferDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentBalanceActivitySquarePayrollTransferDetail(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivitySquarePayrollTransferDetail{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentBalanceActivitySquarePayrollTransferReversedDetail(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &PaymentBalanceActivitySquarePayrollTransferReversedDetail{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentBalanceActivitySquarePayrollTransferReversedDetail(t *testing.T) { + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivitySquarePayrollTransferReversedDetail{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivitySquarePayrollTransferReversedDetail{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivitySquarePayrollTransferReversedDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentBalanceActivitySquarePayrollTransferReversedDetail(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivitySquarePayrollTransferReversedDetail{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentBalanceActivityTaxOnFeeDetail(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &PaymentBalanceActivityTaxOnFeeDetail{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTaxRateDescription", func(t *testing.T) { + obj := &PaymentBalanceActivityTaxOnFeeDetail{} + var fernTestValueTaxRateDescription *string + obj.SetTaxRateDescription(fernTestValueTaxRateDescription) + assert.Equal(t, fernTestValueTaxRateDescription, obj.TaxRateDescription) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentBalanceActivityTaxOnFeeDetail(t *testing.T) { + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityTaxOnFeeDetail{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityTaxOnFeeDetail{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityTaxOnFeeDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + + t.Run("GetTaxRateDescription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityTaxOnFeeDetail{} + var expected *string + obj.TaxRateDescription = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTaxRateDescription(), "getter should return the property value") + }) + + t.Run("GetTaxRateDescription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityTaxOnFeeDetail{} + obj.TaxRateDescription = nil + + // Act & Assert + assert.Nil(t, obj.GetTaxRateDescription(), "getter should return nil when property is nil") + }) + + t.Run("GetTaxRateDescription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityTaxOnFeeDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTaxRateDescription() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentBalanceActivityTaxOnFeeDetail(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityTaxOnFeeDetail{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTaxRateDescription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityTaxOnFeeDetail{} + var fernTestValueTaxRateDescription *string + + // Act + obj.SetTaxRateDescription(fernTestValueTaxRateDescription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentBalanceActivityThirdPartyFeeDetail(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &PaymentBalanceActivityThirdPartyFeeDetail{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentBalanceActivityThirdPartyFeeDetail(t *testing.T) { + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityThirdPartyFeeDetail{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityThirdPartyFeeDetail{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityThirdPartyFeeDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentBalanceActivityThirdPartyFeeDetail(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityThirdPartyFeeDetail{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentBalanceActivityThirdPartyFeeRefundDetail(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &PaymentBalanceActivityThirdPartyFeeRefundDetail{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRefundID", func(t *testing.T) { + obj := &PaymentBalanceActivityThirdPartyFeeRefundDetail{} + var fernTestValueRefundID *string + obj.SetRefundID(fernTestValueRefundID) + assert.Equal(t, fernTestValueRefundID, obj.RefundID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentBalanceActivityThirdPartyFeeRefundDetail(t *testing.T) { + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityThirdPartyFeeRefundDetail{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityThirdPartyFeeRefundDetail{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityThirdPartyFeeRefundDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + + t.Run("GetRefundID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityThirdPartyFeeRefundDetail{} + var expected *string + obj.RefundID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRefundID(), "getter should return the property value") + }) + + t.Run("GetRefundID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityThirdPartyFeeRefundDetail{} + obj.RefundID = nil + + // Act & Assert + assert.Nil(t, obj.GetRefundID(), "getter should return nil when property is nil") + }) + + t.Run("GetRefundID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityThirdPartyFeeRefundDetail + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRefundID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentBalanceActivityThirdPartyFeeRefundDetail(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityThirdPartyFeeRefundDetail{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRefundID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityThirdPartyFeeRefundDetail{} + var fernTestValueRefundID *string + + // Act + obj.SetRefundID(fernTestValueRefundID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPayout(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &Payout{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &Payout{} + var fernTestValueStatus *PayoutStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &Payout{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &Payout{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &Payout{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &Payout{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDestination", func(t *testing.T) { + obj := &Payout{} + var fernTestValueDestination *Destination + obj.SetDestination(fernTestValueDestination) + assert.Equal(t, fernTestValueDestination, obj.Destination) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &Payout{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &Payout{} + var fernTestValueType *PayoutType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPayoutFee", func(t *testing.T) { + obj := &Payout{} + var fernTestValuePayoutFee []*PayoutFee + obj.SetPayoutFee(fernTestValuePayoutFee) + assert.Equal(t, fernTestValuePayoutFee, obj.PayoutFee) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetArrivalDate", func(t *testing.T) { + obj := &Payout{} + var fernTestValueArrivalDate *string + obj.SetArrivalDate(fernTestValueArrivalDate) + assert.Equal(t, fernTestValueArrivalDate, obj.ArrivalDate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEndToEndID", func(t *testing.T) { + obj := &Payout{} + var fernTestValueEndToEndID *string + obj.SetEndToEndID(fernTestValueEndToEndID) + assert.Equal(t, fernTestValueEndToEndID, obj.EndToEndID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPayout(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + var expected string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + var expected *PayoutStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + var expected string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + + t.Run("GetDestination", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + var expected *Destination + obj.Destination = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDestination(), "getter should return the property value") + }) + + t.Run("GetDestination_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + obj.Destination = nil + + // Act & Assert + assert.Nil(t, obj.GetDestination(), "getter should return nil when property is nil") + }) + + t.Run("GetDestination_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDestination() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + var expected *int + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + var expected *PayoutType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetPayoutFee", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + var expected []*PayoutFee + obj.PayoutFee = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPayoutFee(), "getter should return the property value") + }) + + t.Run("GetPayoutFee_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + obj.PayoutFee = nil + + // Act & Assert + assert.Nil(t, obj.GetPayoutFee(), "getter should return nil when property is nil") + }) + + t.Run("GetPayoutFee_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPayoutFee() // Should return zero value + }) + + t.Run("GetArrivalDate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + var expected *string + obj.ArrivalDate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetArrivalDate(), "getter should return the property value") + }) + + t.Run("GetArrivalDate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + obj.ArrivalDate = nil + + // Act & Assert + assert.Nil(t, obj.GetArrivalDate(), "getter should return nil when property is nil") + }) + + t.Run("GetArrivalDate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetArrivalDate() // Should return zero value + }) + + t.Run("GetEndToEndID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + var expected *string + obj.EndToEndID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEndToEndID(), "getter should return the property value") + }) + + t.Run("GetEndToEndID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + obj.EndToEndID = nil + + // Act & Assert + assert.Nil(t, obj.GetEndToEndID(), "getter should return nil when property is nil") + }) + + t.Run("GetEndToEndID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEndToEndID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPayout(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + var fernTestValueStatus *PayoutStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDestination_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + var fernTestValueDestination *Destination + + // Act + obj.SetDestination(fernTestValueDestination) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + var fernTestValueType *PayoutType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPayoutFee_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + var fernTestValuePayoutFee []*PayoutFee + + // Act + obj.SetPayoutFee(fernTestValuePayoutFee) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetArrivalDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + var fernTestValueArrivalDate *string + + // Act + obj.SetArrivalDate(fernTestValueArrivalDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEndToEndID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + var fernTestValueEndToEndID *string + + // Act + obj.SetEndToEndID(fernTestValueEndToEndID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPayoutEntry(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPayoutID", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValuePayoutID string + obj.SetPayoutID(fernTestValuePayoutID) + assert.Equal(t, fernTestValuePayoutID, obj.PayoutID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEffectiveAt", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueEffectiveAt *string + obj.SetEffectiveAt(fernTestValueEffectiveAt) + assert.Equal(t, fernTestValueEffectiveAt, obj.EffectiveAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueType *ActivityType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGrossAmountMoney", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueGrossAmountMoney *Money + obj.SetGrossAmountMoney(fernTestValueGrossAmountMoney) + assert.Equal(t, fernTestValueGrossAmountMoney, obj.GrossAmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFeeAmountMoney", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueFeeAmountMoney *Money + obj.SetFeeAmountMoney(fernTestValueFeeAmountMoney) + assert.Equal(t, fernTestValueFeeAmountMoney, obj.FeeAmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNetAmountMoney", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueNetAmountMoney *Money + obj.SetNetAmountMoney(fernTestValueNetAmountMoney) + assert.Equal(t, fernTestValueNetAmountMoney, obj.NetAmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTypeAppFeeRevenueDetails", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueTypeAppFeeRevenueDetails *PaymentBalanceActivityAppFeeRevenueDetail + obj.SetTypeAppFeeRevenueDetails(fernTestValueTypeAppFeeRevenueDetails) + assert.Equal(t, fernTestValueTypeAppFeeRevenueDetails, obj.TypeAppFeeRevenueDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTypeAppFeeRefundDetails", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueTypeAppFeeRefundDetails *PaymentBalanceActivityAppFeeRefundDetail + obj.SetTypeAppFeeRefundDetails(fernTestValueTypeAppFeeRefundDetails) + assert.Equal(t, fernTestValueTypeAppFeeRefundDetails, obj.TypeAppFeeRefundDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTypeAutomaticSavingsDetails", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueTypeAutomaticSavingsDetails *PaymentBalanceActivityAutomaticSavingsDetail + obj.SetTypeAutomaticSavingsDetails(fernTestValueTypeAutomaticSavingsDetails) + assert.Equal(t, fernTestValueTypeAutomaticSavingsDetails, obj.TypeAutomaticSavingsDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTypeAutomaticSavingsReversedDetails", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueTypeAutomaticSavingsReversedDetails *PaymentBalanceActivityAutomaticSavingsReversedDetail + obj.SetTypeAutomaticSavingsReversedDetails(fernTestValueTypeAutomaticSavingsReversedDetails) + assert.Equal(t, fernTestValueTypeAutomaticSavingsReversedDetails, obj.TypeAutomaticSavingsReversedDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTypeChargeDetails", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueTypeChargeDetails *PaymentBalanceActivityChargeDetail + obj.SetTypeChargeDetails(fernTestValueTypeChargeDetails) + assert.Equal(t, fernTestValueTypeChargeDetails, obj.TypeChargeDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTypeDepositFeeDetails", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueTypeDepositFeeDetails *PaymentBalanceActivityDepositFeeDetail + obj.SetTypeDepositFeeDetails(fernTestValueTypeDepositFeeDetails) + assert.Equal(t, fernTestValueTypeDepositFeeDetails, obj.TypeDepositFeeDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTypeDepositFeeReversedDetails", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueTypeDepositFeeReversedDetails *PaymentBalanceActivityDepositFeeReversedDetail + obj.SetTypeDepositFeeReversedDetails(fernTestValueTypeDepositFeeReversedDetails) + assert.Equal(t, fernTestValueTypeDepositFeeReversedDetails, obj.TypeDepositFeeReversedDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTypeDisputeDetails", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueTypeDisputeDetails *PaymentBalanceActivityDisputeDetail + obj.SetTypeDisputeDetails(fernTestValueTypeDisputeDetails) + assert.Equal(t, fernTestValueTypeDisputeDetails, obj.TypeDisputeDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTypeFeeDetails", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueTypeFeeDetails *PaymentBalanceActivityFeeDetail + obj.SetTypeFeeDetails(fernTestValueTypeFeeDetails) + assert.Equal(t, fernTestValueTypeFeeDetails, obj.TypeFeeDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTypeFreeProcessingDetails", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueTypeFreeProcessingDetails *PaymentBalanceActivityFreeProcessingDetail + obj.SetTypeFreeProcessingDetails(fernTestValueTypeFreeProcessingDetails) + assert.Equal(t, fernTestValueTypeFreeProcessingDetails, obj.TypeFreeProcessingDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTypeHoldAdjustmentDetails", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueTypeHoldAdjustmentDetails *PaymentBalanceActivityHoldAdjustmentDetail + obj.SetTypeHoldAdjustmentDetails(fernTestValueTypeHoldAdjustmentDetails) + assert.Equal(t, fernTestValueTypeHoldAdjustmentDetails, obj.TypeHoldAdjustmentDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTypeOpenDisputeDetails", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueTypeOpenDisputeDetails *PaymentBalanceActivityOpenDisputeDetail + obj.SetTypeOpenDisputeDetails(fernTestValueTypeOpenDisputeDetails) + assert.Equal(t, fernTestValueTypeOpenDisputeDetails, obj.TypeOpenDisputeDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTypeOtherDetails", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueTypeOtherDetails *PaymentBalanceActivityOtherDetail + obj.SetTypeOtherDetails(fernTestValueTypeOtherDetails) + assert.Equal(t, fernTestValueTypeOtherDetails, obj.TypeOtherDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTypeOtherAdjustmentDetails", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueTypeOtherAdjustmentDetails *PaymentBalanceActivityOtherAdjustmentDetail + obj.SetTypeOtherAdjustmentDetails(fernTestValueTypeOtherAdjustmentDetails) + assert.Equal(t, fernTestValueTypeOtherAdjustmentDetails, obj.TypeOtherAdjustmentDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTypeRefundDetails", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueTypeRefundDetails *PaymentBalanceActivityRefundDetail + obj.SetTypeRefundDetails(fernTestValueTypeRefundDetails) + assert.Equal(t, fernTestValueTypeRefundDetails, obj.TypeRefundDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTypeReleaseAdjustmentDetails", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueTypeReleaseAdjustmentDetails *PaymentBalanceActivityReleaseAdjustmentDetail + obj.SetTypeReleaseAdjustmentDetails(fernTestValueTypeReleaseAdjustmentDetails) + assert.Equal(t, fernTestValueTypeReleaseAdjustmentDetails, obj.TypeReleaseAdjustmentDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTypeReserveHoldDetails", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueTypeReserveHoldDetails *PaymentBalanceActivityReserveHoldDetail + obj.SetTypeReserveHoldDetails(fernTestValueTypeReserveHoldDetails) + assert.Equal(t, fernTestValueTypeReserveHoldDetails, obj.TypeReserveHoldDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTypeReserveReleaseDetails", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueTypeReserveReleaseDetails *PaymentBalanceActivityReserveReleaseDetail + obj.SetTypeReserveReleaseDetails(fernTestValueTypeReserveReleaseDetails) + assert.Equal(t, fernTestValueTypeReserveReleaseDetails, obj.TypeReserveReleaseDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTypeSquareCapitalPaymentDetails", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueTypeSquareCapitalPaymentDetails *PaymentBalanceActivitySquareCapitalPaymentDetail + obj.SetTypeSquareCapitalPaymentDetails(fernTestValueTypeSquareCapitalPaymentDetails) + assert.Equal(t, fernTestValueTypeSquareCapitalPaymentDetails, obj.TypeSquareCapitalPaymentDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTypeSquareCapitalReversedPaymentDetails", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueTypeSquareCapitalReversedPaymentDetails *PaymentBalanceActivitySquareCapitalReversedPaymentDetail + obj.SetTypeSquareCapitalReversedPaymentDetails(fernTestValueTypeSquareCapitalReversedPaymentDetails) + assert.Equal(t, fernTestValueTypeSquareCapitalReversedPaymentDetails, obj.TypeSquareCapitalReversedPaymentDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTypeTaxOnFeeDetails", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueTypeTaxOnFeeDetails *PaymentBalanceActivityTaxOnFeeDetail + obj.SetTypeTaxOnFeeDetails(fernTestValueTypeTaxOnFeeDetails) + assert.Equal(t, fernTestValueTypeTaxOnFeeDetails, obj.TypeTaxOnFeeDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTypeThirdPartyFeeDetails", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueTypeThirdPartyFeeDetails *PaymentBalanceActivityThirdPartyFeeDetail + obj.SetTypeThirdPartyFeeDetails(fernTestValueTypeThirdPartyFeeDetails) + assert.Equal(t, fernTestValueTypeThirdPartyFeeDetails, obj.TypeThirdPartyFeeDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTypeThirdPartyFeeRefundDetails", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueTypeThirdPartyFeeRefundDetails *PaymentBalanceActivityThirdPartyFeeRefundDetail + obj.SetTypeThirdPartyFeeRefundDetails(fernTestValueTypeThirdPartyFeeRefundDetails) + assert.Equal(t, fernTestValueTypeThirdPartyFeeRefundDetails, obj.TypeThirdPartyFeeRefundDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTypeSquarePayrollTransferDetails", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueTypeSquarePayrollTransferDetails *PaymentBalanceActivitySquarePayrollTransferDetail + obj.SetTypeSquarePayrollTransferDetails(fernTestValueTypeSquarePayrollTransferDetails) + assert.Equal(t, fernTestValueTypeSquarePayrollTransferDetails, obj.TypeSquarePayrollTransferDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTypeSquarePayrollTransferReversedDetails", func(t *testing.T) { + obj := &PayoutEntry{} + var fernTestValueTypeSquarePayrollTransferReversedDetails *PaymentBalanceActivitySquarePayrollTransferReversedDetail + obj.SetTypeSquarePayrollTransferReversedDetails(fernTestValueTypeSquarePayrollTransferReversedDetails) + assert.Equal(t, fernTestValueTypeSquarePayrollTransferReversedDetails, obj.TypeSquarePayrollTransferReversedDetails) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPayoutEntry(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetPayoutID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected string + obj.PayoutID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPayoutID(), "getter should return the property value") + }) + + t.Run("GetPayoutID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPayoutID() // Should return zero value + }) + + t.Run("GetEffectiveAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *string + obj.EffectiveAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEffectiveAt(), "getter should return the property value") + }) + + t.Run("GetEffectiveAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.EffectiveAt = nil + + // Act & Assert + assert.Nil(t, obj.GetEffectiveAt(), "getter should return nil when property is nil") + }) + + t.Run("GetEffectiveAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEffectiveAt() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *ActivityType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetGrossAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *Money + obj.GrossAmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGrossAmountMoney(), "getter should return the property value") + }) + + t.Run("GetGrossAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.GrossAmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetGrossAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetGrossAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGrossAmountMoney() // Should return zero value + }) + + t.Run("GetFeeAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *Money + obj.FeeAmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFeeAmountMoney(), "getter should return the property value") + }) + + t.Run("GetFeeAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.FeeAmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetFeeAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetFeeAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFeeAmountMoney() // Should return zero value + }) + + t.Run("GetNetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *Money + obj.NetAmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetNetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.NetAmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetNetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetNetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNetAmountMoney() // Should return zero value + }) + + t.Run("GetTypeAppFeeRevenueDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *PaymentBalanceActivityAppFeeRevenueDetail + obj.TypeAppFeeRevenueDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTypeAppFeeRevenueDetails(), "getter should return the property value") + }) + + t.Run("GetTypeAppFeeRevenueDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.TypeAppFeeRevenueDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetTypeAppFeeRevenueDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetTypeAppFeeRevenueDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTypeAppFeeRevenueDetails() // Should return zero value + }) + + t.Run("GetTypeAppFeeRefundDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *PaymentBalanceActivityAppFeeRefundDetail + obj.TypeAppFeeRefundDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTypeAppFeeRefundDetails(), "getter should return the property value") + }) + + t.Run("GetTypeAppFeeRefundDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.TypeAppFeeRefundDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetTypeAppFeeRefundDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetTypeAppFeeRefundDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTypeAppFeeRefundDetails() // Should return zero value + }) + + t.Run("GetTypeAutomaticSavingsDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *PaymentBalanceActivityAutomaticSavingsDetail + obj.TypeAutomaticSavingsDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTypeAutomaticSavingsDetails(), "getter should return the property value") + }) + + t.Run("GetTypeAutomaticSavingsDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.TypeAutomaticSavingsDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetTypeAutomaticSavingsDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetTypeAutomaticSavingsDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTypeAutomaticSavingsDetails() // Should return zero value + }) + + t.Run("GetTypeAutomaticSavingsReversedDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *PaymentBalanceActivityAutomaticSavingsReversedDetail + obj.TypeAutomaticSavingsReversedDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTypeAutomaticSavingsReversedDetails(), "getter should return the property value") + }) + + t.Run("GetTypeAutomaticSavingsReversedDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.TypeAutomaticSavingsReversedDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetTypeAutomaticSavingsReversedDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetTypeAutomaticSavingsReversedDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTypeAutomaticSavingsReversedDetails() // Should return zero value + }) + + t.Run("GetTypeChargeDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *PaymentBalanceActivityChargeDetail + obj.TypeChargeDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTypeChargeDetails(), "getter should return the property value") + }) + + t.Run("GetTypeChargeDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.TypeChargeDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetTypeChargeDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetTypeChargeDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTypeChargeDetails() // Should return zero value + }) + + t.Run("GetTypeDepositFeeDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *PaymentBalanceActivityDepositFeeDetail + obj.TypeDepositFeeDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTypeDepositFeeDetails(), "getter should return the property value") + }) + + t.Run("GetTypeDepositFeeDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.TypeDepositFeeDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetTypeDepositFeeDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetTypeDepositFeeDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTypeDepositFeeDetails() // Should return zero value + }) + + t.Run("GetTypeDepositFeeReversedDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *PaymentBalanceActivityDepositFeeReversedDetail + obj.TypeDepositFeeReversedDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTypeDepositFeeReversedDetails(), "getter should return the property value") + }) + + t.Run("GetTypeDepositFeeReversedDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.TypeDepositFeeReversedDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetTypeDepositFeeReversedDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetTypeDepositFeeReversedDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTypeDepositFeeReversedDetails() // Should return zero value + }) + + t.Run("GetTypeDisputeDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *PaymentBalanceActivityDisputeDetail + obj.TypeDisputeDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTypeDisputeDetails(), "getter should return the property value") + }) + + t.Run("GetTypeDisputeDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.TypeDisputeDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetTypeDisputeDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetTypeDisputeDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTypeDisputeDetails() // Should return zero value + }) + + t.Run("GetTypeFeeDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *PaymentBalanceActivityFeeDetail + obj.TypeFeeDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTypeFeeDetails(), "getter should return the property value") + }) + + t.Run("GetTypeFeeDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.TypeFeeDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetTypeFeeDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetTypeFeeDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTypeFeeDetails() // Should return zero value + }) + + t.Run("GetTypeFreeProcessingDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *PaymentBalanceActivityFreeProcessingDetail + obj.TypeFreeProcessingDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTypeFreeProcessingDetails(), "getter should return the property value") + }) + + t.Run("GetTypeFreeProcessingDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.TypeFreeProcessingDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetTypeFreeProcessingDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetTypeFreeProcessingDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTypeFreeProcessingDetails() // Should return zero value + }) + + t.Run("GetTypeHoldAdjustmentDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *PaymentBalanceActivityHoldAdjustmentDetail + obj.TypeHoldAdjustmentDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTypeHoldAdjustmentDetails(), "getter should return the property value") + }) + + t.Run("GetTypeHoldAdjustmentDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.TypeHoldAdjustmentDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetTypeHoldAdjustmentDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetTypeHoldAdjustmentDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTypeHoldAdjustmentDetails() // Should return zero value + }) + + t.Run("GetTypeOpenDisputeDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *PaymentBalanceActivityOpenDisputeDetail + obj.TypeOpenDisputeDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTypeOpenDisputeDetails(), "getter should return the property value") + }) + + t.Run("GetTypeOpenDisputeDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.TypeOpenDisputeDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetTypeOpenDisputeDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetTypeOpenDisputeDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTypeOpenDisputeDetails() // Should return zero value + }) + + t.Run("GetTypeOtherDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *PaymentBalanceActivityOtherDetail + obj.TypeOtherDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTypeOtherDetails(), "getter should return the property value") + }) + + t.Run("GetTypeOtherDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.TypeOtherDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetTypeOtherDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetTypeOtherDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTypeOtherDetails() // Should return zero value + }) + + t.Run("GetTypeOtherAdjustmentDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *PaymentBalanceActivityOtherAdjustmentDetail + obj.TypeOtherAdjustmentDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTypeOtherAdjustmentDetails(), "getter should return the property value") + }) + + t.Run("GetTypeOtherAdjustmentDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.TypeOtherAdjustmentDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetTypeOtherAdjustmentDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetTypeOtherAdjustmentDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTypeOtherAdjustmentDetails() // Should return zero value + }) + + t.Run("GetTypeRefundDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *PaymentBalanceActivityRefundDetail + obj.TypeRefundDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTypeRefundDetails(), "getter should return the property value") + }) + + t.Run("GetTypeRefundDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.TypeRefundDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetTypeRefundDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetTypeRefundDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTypeRefundDetails() // Should return zero value + }) + + t.Run("GetTypeReleaseAdjustmentDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *PaymentBalanceActivityReleaseAdjustmentDetail + obj.TypeReleaseAdjustmentDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTypeReleaseAdjustmentDetails(), "getter should return the property value") + }) + + t.Run("GetTypeReleaseAdjustmentDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.TypeReleaseAdjustmentDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetTypeReleaseAdjustmentDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetTypeReleaseAdjustmentDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTypeReleaseAdjustmentDetails() // Should return zero value + }) + + t.Run("GetTypeReserveHoldDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *PaymentBalanceActivityReserveHoldDetail + obj.TypeReserveHoldDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTypeReserveHoldDetails(), "getter should return the property value") + }) + + t.Run("GetTypeReserveHoldDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.TypeReserveHoldDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetTypeReserveHoldDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetTypeReserveHoldDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTypeReserveHoldDetails() // Should return zero value + }) + + t.Run("GetTypeReserveReleaseDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *PaymentBalanceActivityReserveReleaseDetail + obj.TypeReserveReleaseDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTypeReserveReleaseDetails(), "getter should return the property value") + }) + + t.Run("GetTypeReserveReleaseDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.TypeReserveReleaseDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetTypeReserveReleaseDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetTypeReserveReleaseDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTypeReserveReleaseDetails() // Should return zero value + }) + + t.Run("GetTypeSquareCapitalPaymentDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *PaymentBalanceActivitySquareCapitalPaymentDetail + obj.TypeSquareCapitalPaymentDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTypeSquareCapitalPaymentDetails(), "getter should return the property value") + }) + + t.Run("GetTypeSquareCapitalPaymentDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.TypeSquareCapitalPaymentDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetTypeSquareCapitalPaymentDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetTypeSquareCapitalPaymentDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTypeSquareCapitalPaymentDetails() // Should return zero value + }) + + t.Run("GetTypeSquareCapitalReversedPaymentDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *PaymentBalanceActivitySquareCapitalReversedPaymentDetail + obj.TypeSquareCapitalReversedPaymentDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTypeSquareCapitalReversedPaymentDetails(), "getter should return the property value") + }) + + t.Run("GetTypeSquareCapitalReversedPaymentDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.TypeSquareCapitalReversedPaymentDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetTypeSquareCapitalReversedPaymentDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetTypeSquareCapitalReversedPaymentDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTypeSquareCapitalReversedPaymentDetails() // Should return zero value + }) + + t.Run("GetTypeTaxOnFeeDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *PaymentBalanceActivityTaxOnFeeDetail + obj.TypeTaxOnFeeDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTypeTaxOnFeeDetails(), "getter should return the property value") + }) + + t.Run("GetTypeTaxOnFeeDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.TypeTaxOnFeeDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetTypeTaxOnFeeDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetTypeTaxOnFeeDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTypeTaxOnFeeDetails() // Should return zero value + }) + + t.Run("GetTypeThirdPartyFeeDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *PaymentBalanceActivityThirdPartyFeeDetail + obj.TypeThirdPartyFeeDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTypeThirdPartyFeeDetails(), "getter should return the property value") + }) + + t.Run("GetTypeThirdPartyFeeDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.TypeThirdPartyFeeDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetTypeThirdPartyFeeDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetTypeThirdPartyFeeDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTypeThirdPartyFeeDetails() // Should return zero value + }) + + t.Run("GetTypeThirdPartyFeeRefundDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *PaymentBalanceActivityThirdPartyFeeRefundDetail + obj.TypeThirdPartyFeeRefundDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTypeThirdPartyFeeRefundDetails(), "getter should return the property value") + }) + + t.Run("GetTypeThirdPartyFeeRefundDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.TypeThirdPartyFeeRefundDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetTypeThirdPartyFeeRefundDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetTypeThirdPartyFeeRefundDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTypeThirdPartyFeeRefundDetails() // Should return zero value + }) + + t.Run("GetTypeSquarePayrollTransferDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *PaymentBalanceActivitySquarePayrollTransferDetail + obj.TypeSquarePayrollTransferDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTypeSquarePayrollTransferDetails(), "getter should return the property value") + }) + + t.Run("GetTypeSquarePayrollTransferDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.TypeSquarePayrollTransferDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetTypeSquarePayrollTransferDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetTypeSquarePayrollTransferDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTypeSquarePayrollTransferDetails() // Should return zero value + }) + + t.Run("GetTypeSquarePayrollTransferReversedDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var expected *PaymentBalanceActivitySquarePayrollTransferReversedDetail + obj.TypeSquarePayrollTransferReversedDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTypeSquarePayrollTransferReversedDetails(), "getter should return the property value") + }) + + t.Run("GetTypeSquarePayrollTransferReversedDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + obj.TypeSquarePayrollTransferReversedDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetTypeSquarePayrollTransferReversedDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetTypeSquarePayrollTransferReversedDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTypeSquarePayrollTransferReversedDetails() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPayoutEntry(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPayoutID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValuePayoutID string + + // Act + obj.SetPayoutID(fernTestValuePayoutID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEffectiveAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueEffectiveAt *string + + // Act + obj.SetEffectiveAt(fernTestValueEffectiveAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueType *ActivityType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGrossAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueGrossAmountMoney *Money + + // Act + obj.SetGrossAmountMoney(fernTestValueGrossAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFeeAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueFeeAmountMoney *Money + + // Act + obj.SetFeeAmountMoney(fernTestValueFeeAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueNetAmountMoney *Money + + // Act + obj.SetNetAmountMoney(fernTestValueNetAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTypeAppFeeRevenueDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueTypeAppFeeRevenueDetails *PaymentBalanceActivityAppFeeRevenueDetail + + // Act + obj.SetTypeAppFeeRevenueDetails(fernTestValueTypeAppFeeRevenueDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTypeAppFeeRefundDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueTypeAppFeeRefundDetails *PaymentBalanceActivityAppFeeRefundDetail + + // Act + obj.SetTypeAppFeeRefundDetails(fernTestValueTypeAppFeeRefundDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTypeAutomaticSavingsDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueTypeAutomaticSavingsDetails *PaymentBalanceActivityAutomaticSavingsDetail + + // Act + obj.SetTypeAutomaticSavingsDetails(fernTestValueTypeAutomaticSavingsDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTypeAutomaticSavingsReversedDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueTypeAutomaticSavingsReversedDetails *PaymentBalanceActivityAutomaticSavingsReversedDetail + + // Act + obj.SetTypeAutomaticSavingsReversedDetails(fernTestValueTypeAutomaticSavingsReversedDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTypeChargeDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueTypeChargeDetails *PaymentBalanceActivityChargeDetail + + // Act + obj.SetTypeChargeDetails(fernTestValueTypeChargeDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTypeDepositFeeDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueTypeDepositFeeDetails *PaymentBalanceActivityDepositFeeDetail + + // Act + obj.SetTypeDepositFeeDetails(fernTestValueTypeDepositFeeDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTypeDepositFeeReversedDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueTypeDepositFeeReversedDetails *PaymentBalanceActivityDepositFeeReversedDetail + + // Act + obj.SetTypeDepositFeeReversedDetails(fernTestValueTypeDepositFeeReversedDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTypeDisputeDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueTypeDisputeDetails *PaymentBalanceActivityDisputeDetail + + // Act + obj.SetTypeDisputeDetails(fernTestValueTypeDisputeDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTypeFeeDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueTypeFeeDetails *PaymentBalanceActivityFeeDetail + + // Act + obj.SetTypeFeeDetails(fernTestValueTypeFeeDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTypeFreeProcessingDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueTypeFreeProcessingDetails *PaymentBalanceActivityFreeProcessingDetail + + // Act + obj.SetTypeFreeProcessingDetails(fernTestValueTypeFreeProcessingDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTypeHoldAdjustmentDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueTypeHoldAdjustmentDetails *PaymentBalanceActivityHoldAdjustmentDetail + + // Act + obj.SetTypeHoldAdjustmentDetails(fernTestValueTypeHoldAdjustmentDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTypeOpenDisputeDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueTypeOpenDisputeDetails *PaymentBalanceActivityOpenDisputeDetail + + // Act + obj.SetTypeOpenDisputeDetails(fernTestValueTypeOpenDisputeDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTypeOtherDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueTypeOtherDetails *PaymentBalanceActivityOtherDetail + + // Act + obj.SetTypeOtherDetails(fernTestValueTypeOtherDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTypeOtherAdjustmentDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueTypeOtherAdjustmentDetails *PaymentBalanceActivityOtherAdjustmentDetail + + // Act + obj.SetTypeOtherAdjustmentDetails(fernTestValueTypeOtherAdjustmentDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTypeRefundDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueTypeRefundDetails *PaymentBalanceActivityRefundDetail + + // Act + obj.SetTypeRefundDetails(fernTestValueTypeRefundDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTypeReleaseAdjustmentDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueTypeReleaseAdjustmentDetails *PaymentBalanceActivityReleaseAdjustmentDetail + + // Act + obj.SetTypeReleaseAdjustmentDetails(fernTestValueTypeReleaseAdjustmentDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTypeReserveHoldDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueTypeReserveHoldDetails *PaymentBalanceActivityReserveHoldDetail + + // Act + obj.SetTypeReserveHoldDetails(fernTestValueTypeReserveHoldDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTypeReserveReleaseDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueTypeReserveReleaseDetails *PaymentBalanceActivityReserveReleaseDetail + + // Act + obj.SetTypeReserveReleaseDetails(fernTestValueTypeReserveReleaseDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTypeSquareCapitalPaymentDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueTypeSquareCapitalPaymentDetails *PaymentBalanceActivitySquareCapitalPaymentDetail + + // Act + obj.SetTypeSquareCapitalPaymentDetails(fernTestValueTypeSquareCapitalPaymentDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTypeSquareCapitalReversedPaymentDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueTypeSquareCapitalReversedPaymentDetails *PaymentBalanceActivitySquareCapitalReversedPaymentDetail + + // Act + obj.SetTypeSquareCapitalReversedPaymentDetails(fernTestValueTypeSquareCapitalReversedPaymentDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTypeTaxOnFeeDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueTypeTaxOnFeeDetails *PaymentBalanceActivityTaxOnFeeDetail + + // Act + obj.SetTypeTaxOnFeeDetails(fernTestValueTypeTaxOnFeeDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTypeThirdPartyFeeDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueTypeThirdPartyFeeDetails *PaymentBalanceActivityThirdPartyFeeDetail + + // Act + obj.SetTypeThirdPartyFeeDetails(fernTestValueTypeThirdPartyFeeDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTypeThirdPartyFeeRefundDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueTypeThirdPartyFeeRefundDetails *PaymentBalanceActivityThirdPartyFeeRefundDetail + + // Act + obj.SetTypeThirdPartyFeeRefundDetails(fernTestValueTypeThirdPartyFeeRefundDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTypeSquarePayrollTransferDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueTypeSquarePayrollTransferDetails *PaymentBalanceActivitySquarePayrollTransferDetail + + // Act + obj.SetTypeSquarePayrollTransferDetails(fernTestValueTypeSquarePayrollTransferDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTypeSquarePayrollTransferReversedDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + var fernTestValueTypeSquarePayrollTransferReversedDetails *PaymentBalanceActivitySquarePayrollTransferReversedDetail + + // Act + obj.SetTypeSquarePayrollTransferReversedDetails(fernTestValueTypeSquarePayrollTransferReversedDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPayoutFee(t *testing.T) { + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &PayoutFee{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEffectiveAt", func(t *testing.T) { + obj := &PayoutFee{} + var fernTestValueEffectiveAt *string + obj.SetEffectiveAt(fernTestValueEffectiveAt) + assert.Equal(t, fernTestValueEffectiveAt, obj.EffectiveAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &PayoutFee{} + var fernTestValueType *PayoutFeeType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPayoutFee(t *testing.T) { + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFee{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFee{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutFee + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + + t.Run("GetEffectiveAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFee{} + var expected *string + obj.EffectiveAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEffectiveAt(), "getter should return the property value") + }) + + t.Run("GetEffectiveAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFee{} + obj.EffectiveAt = nil + + // Act & Assert + assert.Nil(t, obj.GetEffectiveAt(), "getter should return nil when property is nil") + }) + + t.Run("GetEffectiveAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutFee + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEffectiveAt() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFee{} + var expected *PayoutFeeType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFee{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutFee + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPayoutFee(t *testing.T) { + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFee{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEffectiveAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFee{} + var fernTestValueEffectiveAt *string + + // Act + obj.SetEffectiveAt(fernTestValueEffectiveAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFee{} + var fernTestValueType *PayoutFeeType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingDestination(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Destination{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Destination + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Destination + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Destination + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetPayoutResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPayoutResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetPayoutResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetPayoutResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetPayoutResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListPayoutEntriesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPayoutEntriesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListPayoutEntriesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListPayoutEntriesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListPayoutEntriesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListPayoutsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPayoutsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListPayoutsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListPayoutsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListPayoutsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentBalanceActivityAppFeeRefundDetail(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAppFeeRefundDetail{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentBalanceActivityAppFeeRefundDetail + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityAppFeeRefundDetail + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityAppFeeRefundDetail + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentBalanceActivityAppFeeRevenueDetail(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAppFeeRevenueDetail{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentBalanceActivityAppFeeRevenueDetail + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityAppFeeRevenueDetail + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityAppFeeRevenueDetail + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentBalanceActivityAutomaticSavingsDetail(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAutomaticSavingsDetail{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentBalanceActivityAutomaticSavingsDetail + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityAutomaticSavingsDetail + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityAutomaticSavingsDetail + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentBalanceActivityAutomaticSavingsReversedDetail(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityAutomaticSavingsReversedDetail{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentBalanceActivityAutomaticSavingsReversedDetail + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityAutomaticSavingsReversedDetail + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityAutomaticSavingsReversedDetail + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentBalanceActivityChargeDetail(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityChargeDetail{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentBalanceActivityChargeDetail + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityChargeDetail + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityChargeDetail + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentBalanceActivityDepositFeeDetail(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityDepositFeeDetail{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentBalanceActivityDepositFeeDetail + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityDepositFeeDetail + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityDepositFeeDetail + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentBalanceActivityDepositFeeReversedDetail(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityDepositFeeReversedDetail{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentBalanceActivityDepositFeeReversedDetail + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityDepositFeeReversedDetail + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityDepositFeeReversedDetail + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentBalanceActivityDisputeDetail(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityDisputeDetail{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentBalanceActivityDisputeDetail + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityDisputeDetail + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityDisputeDetail + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentBalanceActivityFeeDetail(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityFeeDetail{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentBalanceActivityFeeDetail + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityFeeDetail + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityFeeDetail + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentBalanceActivityFreeProcessingDetail(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityFreeProcessingDetail{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentBalanceActivityFreeProcessingDetail + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityFreeProcessingDetail + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityFreeProcessingDetail + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentBalanceActivityHoldAdjustmentDetail(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityHoldAdjustmentDetail{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentBalanceActivityHoldAdjustmentDetail + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityHoldAdjustmentDetail + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityHoldAdjustmentDetail + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentBalanceActivityOpenDisputeDetail(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityOpenDisputeDetail{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentBalanceActivityOpenDisputeDetail + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityOpenDisputeDetail + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityOpenDisputeDetail + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentBalanceActivityOtherAdjustmentDetail(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityOtherAdjustmentDetail{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentBalanceActivityOtherAdjustmentDetail + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityOtherAdjustmentDetail + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityOtherAdjustmentDetail + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentBalanceActivityOtherDetail(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityOtherDetail{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentBalanceActivityOtherDetail + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityOtherDetail + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityOtherDetail + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentBalanceActivityRefundDetail(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityRefundDetail{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentBalanceActivityRefundDetail + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityRefundDetail + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityRefundDetail + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentBalanceActivityReleaseAdjustmentDetail(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityReleaseAdjustmentDetail{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentBalanceActivityReleaseAdjustmentDetail + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityReleaseAdjustmentDetail + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityReleaseAdjustmentDetail + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentBalanceActivityReserveHoldDetail(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityReserveHoldDetail{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentBalanceActivityReserveHoldDetail + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityReserveHoldDetail + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityReserveHoldDetail + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentBalanceActivityReserveReleaseDetail(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityReserveReleaseDetail{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentBalanceActivityReserveReleaseDetail + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityReserveReleaseDetail + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityReserveReleaseDetail + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentBalanceActivitySquareCapitalPaymentDetail(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivitySquareCapitalPaymentDetail{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentBalanceActivitySquareCapitalPaymentDetail + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivitySquareCapitalPaymentDetail + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivitySquareCapitalPaymentDetail + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentBalanceActivitySquareCapitalReversedPaymentDetail(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivitySquareCapitalReversedPaymentDetail{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentBalanceActivitySquareCapitalReversedPaymentDetail + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivitySquareCapitalReversedPaymentDetail + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivitySquareCapitalReversedPaymentDetail + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentBalanceActivitySquarePayrollTransferDetail(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivitySquarePayrollTransferDetail{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentBalanceActivitySquarePayrollTransferDetail + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivitySquarePayrollTransferDetail + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivitySquarePayrollTransferDetail + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentBalanceActivitySquarePayrollTransferReversedDetail(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivitySquarePayrollTransferReversedDetail{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentBalanceActivitySquarePayrollTransferReversedDetail + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivitySquarePayrollTransferReversedDetail + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivitySquarePayrollTransferReversedDetail + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentBalanceActivityTaxOnFeeDetail(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityTaxOnFeeDetail{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentBalanceActivityTaxOnFeeDetail + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityTaxOnFeeDetail + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityTaxOnFeeDetail + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentBalanceActivityThirdPartyFeeDetail(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityThirdPartyFeeDetail{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentBalanceActivityThirdPartyFeeDetail + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityThirdPartyFeeDetail + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityThirdPartyFeeDetail + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentBalanceActivityThirdPartyFeeRefundDetail(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentBalanceActivityThirdPartyFeeRefundDetail{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentBalanceActivityThirdPartyFeeRefundDetail + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityThirdPartyFeeRefundDetail + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentBalanceActivityThirdPartyFeeRefundDetail + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPayout(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Payout{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Payout + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Payout + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Payout + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPayoutEntry(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutEntry{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PayoutEntry + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PayoutEntry + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PayoutEntry + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPayoutFee(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFee{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PayoutFee + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PayoutFee + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PayoutFee + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringDestination(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Destination{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Destination + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetPayoutResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetPayoutResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetPayoutResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListPayoutEntriesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListPayoutEntriesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListPayoutEntriesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListPayoutsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListPayoutsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListPayoutsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentBalanceActivityAppFeeRefundDetail(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityAppFeeRefundDetail{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityAppFeeRefundDetail + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentBalanceActivityAppFeeRevenueDetail(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityAppFeeRevenueDetail{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityAppFeeRevenueDetail + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentBalanceActivityAutomaticSavingsDetail(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityAutomaticSavingsDetail{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityAutomaticSavingsDetail + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentBalanceActivityAutomaticSavingsReversedDetail(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityAutomaticSavingsReversedDetail{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityAutomaticSavingsReversedDetail + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentBalanceActivityChargeDetail(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityChargeDetail{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityChargeDetail + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentBalanceActivityDepositFeeDetail(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityDepositFeeDetail{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityDepositFeeDetail + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentBalanceActivityDepositFeeReversedDetail(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityDepositFeeReversedDetail{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityDepositFeeReversedDetail + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentBalanceActivityDisputeDetail(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityDisputeDetail{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityDisputeDetail + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentBalanceActivityFeeDetail(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityFeeDetail{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityFeeDetail + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentBalanceActivityFreeProcessingDetail(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityFreeProcessingDetail{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityFreeProcessingDetail + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentBalanceActivityHoldAdjustmentDetail(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityHoldAdjustmentDetail{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityHoldAdjustmentDetail + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentBalanceActivityOpenDisputeDetail(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityOpenDisputeDetail{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityOpenDisputeDetail + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentBalanceActivityOtherAdjustmentDetail(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityOtherAdjustmentDetail{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityOtherAdjustmentDetail + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentBalanceActivityOtherDetail(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityOtherDetail{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityOtherDetail + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentBalanceActivityRefundDetail(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityRefundDetail{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityRefundDetail + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentBalanceActivityReleaseAdjustmentDetail(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityReleaseAdjustmentDetail{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityReleaseAdjustmentDetail + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentBalanceActivityReserveHoldDetail(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityReserveHoldDetail{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityReserveHoldDetail + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentBalanceActivityReserveReleaseDetail(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityReserveReleaseDetail{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityReserveReleaseDetail + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentBalanceActivitySquareCapitalPaymentDetail(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivitySquareCapitalPaymentDetail{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivitySquareCapitalPaymentDetail + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentBalanceActivitySquareCapitalReversedPaymentDetail(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivitySquareCapitalReversedPaymentDetail{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivitySquareCapitalReversedPaymentDetail + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentBalanceActivitySquarePayrollTransferDetail(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivitySquarePayrollTransferDetail{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivitySquarePayrollTransferDetail + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentBalanceActivitySquarePayrollTransferReversedDetail(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivitySquarePayrollTransferReversedDetail{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivitySquarePayrollTransferReversedDetail + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentBalanceActivityTaxOnFeeDetail(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityTaxOnFeeDetail{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityTaxOnFeeDetail + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentBalanceActivityThirdPartyFeeDetail(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityThirdPartyFeeDetail{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityThirdPartyFeeDetail + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentBalanceActivityThirdPartyFeeRefundDetail(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityThirdPartyFeeRefundDetail{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityThirdPartyFeeRefundDetail + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPayout(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Payout{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payout + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPayoutEntry(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PayoutEntry{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPayoutFee(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PayoutFee{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutFee + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestEnumActivityType(t *testing.T) { + t.Run("NewFromString_ADJUSTMENT", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("ADJUSTMENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("ADJUSTMENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_APP_FEE_REFUND", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("APP_FEE_REFUND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("APP_FEE_REFUND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_APP_FEE_REVENUE", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("APP_FEE_REVENUE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("APP_FEE_REVENUE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AUTOMATIC_SAVINGS", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("AUTOMATIC_SAVINGS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("AUTOMATIC_SAVINGS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AUTOMATIC_SAVINGS_REVERSED", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("AUTOMATIC_SAVINGS_REVERSED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("AUTOMATIC_SAVINGS_REVERSED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CHARGE", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("CHARGE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("CHARGE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DEPOSIT_FEE", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("DEPOSIT_FEE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("DEPOSIT_FEE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DEPOSIT_FEE_REVERSED", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("DEPOSIT_FEE_REVERSED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("DEPOSIT_FEE_REVERSED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DISPUTE", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("DISPUTE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("DISPUTE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ESCHEATMENT", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("ESCHEATMENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("ESCHEATMENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FEE", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("FEE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("FEE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FREE_PROCESSING", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("FREE_PROCESSING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("FREE_PROCESSING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_HOLD_ADJUSTMENT", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("HOLD_ADJUSTMENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("HOLD_ADJUSTMENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INITIAL_BALANCE_CHANGE", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("INITIAL_BALANCE_CHANGE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("INITIAL_BALANCE_CHANGE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MONEY_TRANSFER", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("MONEY_TRANSFER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("MONEY_TRANSFER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MONEY_TRANSFER_REVERSAL", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("MONEY_TRANSFER_REVERSAL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("MONEY_TRANSFER_REVERSAL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_OPEN_DISPUTE", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("OPEN_DISPUTE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("OPEN_DISPUTE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_OTHER", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("OTHER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("OTHER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_OTHER_ADJUSTMENT", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("OTHER_ADJUSTMENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("OTHER_ADJUSTMENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PAID_SERVICE_FEE", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("PAID_SERVICE_FEE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("PAID_SERVICE_FEE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PAID_SERVICE_FEE_REFUND", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("PAID_SERVICE_FEE_REFUND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("PAID_SERVICE_FEE_REFUND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_REDEMPTION_CODE", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("REDEMPTION_CODE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("REDEMPTION_CODE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_REFUND", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("REFUND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("REFUND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RELEASE_ADJUSTMENT", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("RELEASE_ADJUSTMENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("RELEASE_ADJUSTMENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RESERVE_HOLD", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("RESERVE_HOLD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("RESERVE_HOLD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RESERVE_RELEASE", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("RESERVE_RELEASE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("RESERVE_RELEASE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RETURNED_PAYOUT", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("RETURNED_PAYOUT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("RETURNED_PAYOUT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SQUARE_CAPITAL_PAYMENT", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("SQUARE_CAPITAL_PAYMENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("SQUARE_CAPITAL_PAYMENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SQUARE_CAPITAL_REVERSED_PAYMENT", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("SQUARE_CAPITAL_REVERSED_PAYMENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("SQUARE_CAPITAL_REVERSED_PAYMENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SUBSCRIPTION_FEE", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("SUBSCRIPTION_FEE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("SUBSCRIPTION_FEE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SUBSCRIPTION_FEE_PAID_REFUND", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("SUBSCRIPTION_FEE_PAID_REFUND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("SUBSCRIPTION_FEE_PAID_REFUND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SUBSCRIPTION_FEE_REFUND", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("SUBSCRIPTION_FEE_REFUND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("SUBSCRIPTION_FEE_REFUND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TAX_ON_FEE", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("TAX_ON_FEE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("TAX_ON_FEE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_THIRD_PARTY_FEE", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("THIRD_PARTY_FEE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("THIRD_PARTY_FEE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_THIRD_PARTY_FEE_REFUND", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("THIRD_PARTY_FEE_REFUND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("THIRD_PARTY_FEE_REFUND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PAYOUT", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("PAYOUT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("PAYOUT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AUTOMATIC_BITCOIN_CONVERSIONS", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("AUTOMATIC_BITCOIN_CONVERSIONS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("AUTOMATIC_BITCOIN_CONVERSIONS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AUTOMATIC_BITCOIN_CONVERSIONS_REVERSED", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("AUTOMATIC_BITCOIN_CONVERSIONS_REVERSED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("AUTOMATIC_BITCOIN_CONVERSIONS_REVERSED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CREDIT_CARD_REPAYMENT", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("CREDIT_CARD_REPAYMENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("CREDIT_CARD_REPAYMENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CREDIT_CARD_REPAYMENT_REVERSED", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("CREDIT_CARD_REPAYMENT_REVERSED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("CREDIT_CARD_REPAYMENT_REVERSED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LOCAL_OFFERS_CASHBACK", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("LOCAL_OFFERS_CASHBACK") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("LOCAL_OFFERS_CASHBACK"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LOCAL_OFFERS_FEE", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("LOCAL_OFFERS_FEE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("LOCAL_OFFERS_FEE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PERCENTAGE_PROCESSING_ENROLLMENT", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("PERCENTAGE_PROCESSING_ENROLLMENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("PERCENTAGE_PROCESSING_ENROLLMENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PERCENTAGE_PROCESSING_DEACTIVATION", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("PERCENTAGE_PROCESSING_DEACTIVATION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("PERCENTAGE_PROCESSING_DEACTIVATION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PERCENTAGE_PROCESSING_REPAYMENT", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("PERCENTAGE_PROCESSING_REPAYMENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("PERCENTAGE_PROCESSING_REPAYMENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PERCENTAGE_PROCESSING_REPAYMENT_REVERSED", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("PERCENTAGE_PROCESSING_REPAYMENT_REVERSED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("PERCENTAGE_PROCESSING_REPAYMENT_REVERSED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PROCESSING_FEE", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("PROCESSING_FEE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("PROCESSING_FEE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PROCESSING_FEE_REFUND", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("PROCESSING_FEE_REFUND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("PROCESSING_FEE_REFUND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UNDO_PROCESSING_FEE_REFUND", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("UNDO_PROCESSING_FEE_REFUND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("UNDO_PROCESSING_FEE_REFUND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GIFT_CARD_LOAD_FEE", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("GIFT_CARD_LOAD_FEE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("GIFT_CARD_LOAD_FEE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GIFT_CARD_LOAD_FEE_REFUND", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("GIFT_CARD_LOAD_FEE_REFUND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("GIFT_CARD_LOAD_FEE_REFUND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UNDO_GIFT_CARD_LOAD_FEE_REFUND", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("UNDO_GIFT_CARD_LOAD_FEE_REFUND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("UNDO_GIFT_CARD_LOAD_FEE_REFUND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BALANCE_FOLDERS_TRANSFER", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("BALANCE_FOLDERS_TRANSFER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("BALANCE_FOLDERS_TRANSFER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BALANCE_FOLDERS_TRANSFER_REVERSED", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("BALANCE_FOLDERS_TRANSFER_REVERSED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("BALANCE_FOLDERS_TRANSFER_REVERSED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GIFT_CARD_POOL_TRANSFER", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("GIFT_CARD_POOL_TRANSFER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("GIFT_CARD_POOL_TRANSFER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GIFT_CARD_POOL_TRANSFER_REVERSED", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("GIFT_CARD_POOL_TRANSFER_REVERSED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("GIFT_CARD_POOL_TRANSFER_REVERSED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SQUARE_PAYROLL_TRANSFER", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("SQUARE_PAYROLL_TRANSFER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("SQUARE_PAYROLL_TRANSFER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SQUARE_PAYROLL_TRANSFER_REVERSED", func(t *testing.T) { + t.Parallel() + val, err := NewActivityTypeFromString("SQUARE_PAYROLL_TRANSFER_REVERSED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActivityType("SQUARE_PAYROLL_TRANSFER_REVERSED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewActivityTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewActivityTypeFromString("ADJUSTMENT") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumDestinationType(t *testing.T) { + t.Run("NewFromString_BANK_ACCOUNT", func(t *testing.T) { + t.Parallel() + val, err := NewDestinationTypeFromString("BANK_ACCOUNT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DestinationType("BANK_ACCOUNT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CARD", func(t *testing.T) { + t.Parallel() + val, err := NewDestinationTypeFromString("CARD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DestinationType("CARD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SQUARE_BALANCE", func(t *testing.T) { + t.Parallel() + val, err := NewDestinationTypeFromString("SQUARE_BALANCE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DestinationType("SQUARE_BALANCE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SQUARE_STORED_BALANCE", func(t *testing.T) { + t.Parallel() + val, err := NewDestinationTypeFromString("SQUARE_STORED_BALANCE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DestinationType("SQUARE_STORED_BALANCE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewDestinationTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewDestinationTypeFromString("BANK_ACCOUNT") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumPayoutFeeType(t *testing.T) { + t.Run("NewFromString_TRANSFER_FEE", func(t *testing.T) { + t.Parallel() + val, err := NewPayoutFeeTypeFromString("TRANSFER_FEE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, PayoutFeeType("TRANSFER_FEE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TAX_ON_TRANSFER_FEE", func(t *testing.T) { + t.Parallel() + val, err := NewPayoutFeeTypeFromString("TAX_ON_TRANSFER_FEE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, PayoutFeeType("TAX_ON_TRANSFER_FEE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewPayoutFeeTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewPayoutFeeTypeFromString("TRANSFER_FEE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumPayoutStatus(t *testing.T) { + t.Run("NewFromString_SENT", func(t *testing.T) { + t.Parallel() + val, err := NewPayoutStatusFromString("SENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, PayoutStatus("SENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FAILED", func(t *testing.T) { + t.Parallel() + val, err := NewPayoutStatusFromString("FAILED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, PayoutStatus("FAILED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PAID", func(t *testing.T) { + t.Parallel() + val, err := NewPayoutStatusFromString("PAID") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, PayoutStatus("PAID"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewPayoutStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewPayoutStatusFromString("SENT") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumPayoutType(t *testing.T) { + t.Run("NewFromString_BATCH", func(t *testing.T) { + t.Parallel() + val, err := NewPayoutTypeFromString("BATCH") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, PayoutType("BATCH"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SIMPLE", func(t *testing.T) { + t.Parallel() + val, err := NewPayoutTypeFromString("SIMPLE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, PayoutType("SIMPLE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewPayoutTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewPayoutTypeFromString("BATCH") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestExtraPropertiesDestination(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Destination{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Destination + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetPayoutResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetPayoutResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetPayoutResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListPayoutEntriesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListPayoutEntriesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListPayoutEntriesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListPayoutsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListPayoutsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListPayoutsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentBalanceActivityAppFeeRefundDetail(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityAppFeeRefundDetail{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityAppFeeRefundDetail + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentBalanceActivityAppFeeRevenueDetail(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityAppFeeRevenueDetail{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityAppFeeRevenueDetail + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentBalanceActivityAutomaticSavingsDetail(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityAutomaticSavingsDetail{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityAutomaticSavingsDetail + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentBalanceActivityAutomaticSavingsReversedDetail(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityAutomaticSavingsReversedDetail{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityAutomaticSavingsReversedDetail + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentBalanceActivityChargeDetail(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityChargeDetail{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityChargeDetail + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentBalanceActivityDepositFeeDetail(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityDepositFeeDetail{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityDepositFeeDetail + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentBalanceActivityDepositFeeReversedDetail(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityDepositFeeReversedDetail{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityDepositFeeReversedDetail + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentBalanceActivityDisputeDetail(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityDisputeDetail{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityDisputeDetail + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentBalanceActivityFeeDetail(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityFeeDetail{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityFeeDetail + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentBalanceActivityFreeProcessingDetail(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityFreeProcessingDetail{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityFreeProcessingDetail + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentBalanceActivityHoldAdjustmentDetail(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityHoldAdjustmentDetail{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityHoldAdjustmentDetail + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentBalanceActivityOpenDisputeDetail(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityOpenDisputeDetail{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityOpenDisputeDetail + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentBalanceActivityOtherAdjustmentDetail(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityOtherAdjustmentDetail{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityOtherAdjustmentDetail + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentBalanceActivityOtherDetail(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityOtherDetail{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityOtherDetail + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentBalanceActivityRefundDetail(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityRefundDetail{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityRefundDetail + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentBalanceActivityReleaseAdjustmentDetail(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityReleaseAdjustmentDetail{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityReleaseAdjustmentDetail + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentBalanceActivityReserveHoldDetail(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityReserveHoldDetail{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityReserveHoldDetail + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentBalanceActivityReserveReleaseDetail(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityReserveReleaseDetail{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityReserveReleaseDetail + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentBalanceActivitySquareCapitalPaymentDetail(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivitySquareCapitalPaymentDetail{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivitySquareCapitalPaymentDetail + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentBalanceActivitySquareCapitalReversedPaymentDetail(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivitySquareCapitalReversedPaymentDetail{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivitySquareCapitalReversedPaymentDetail + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentBalanceActivitySquarePayrollTransferDetail(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivitySquarePayrollTransferDetail{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivitySquarePayrollTransferDetail + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentBalanceActivitySquarePayrollTransferReversedDetail(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivitySquarePayrollTransferReversedDetail{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivitySquarePayrollTransferReversedDetail + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentBalanceActivityTaxOnFeeDetail(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityTaxOnFeeDetail{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityTaxOnFeeDetail + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentBalanceActivityThirdPartyFeeDetail(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityThirdPartyFeeDetail{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityThirdPartyFeeDetail + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentBalanceActivityThirdPartyFeeRefundDetail(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentBalanceActivityThirdPartyFeeRefundDetail{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentBalanceActivityThirdPartyFeeRefundDetail + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPayout(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Payout{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Payout + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPayoutEntry(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PayoutEntry{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutEntry + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPayoutFee(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PayoutFee{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutFee + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/pointer.go b/pointer.go index 131fbe3..bc392a5 100644 --- a/pointer.go +++ b/pointer.go @@ -16,6 +16,11 @@ func Byte(b byte) *byte { return &b } +// Bytes returns a pointer to the given []byte value. +func Bytes(b []byte) *[]byte { + return &b +} + // Complex64 returns a pointer to the given complex64 value. func Complex64(c complex64) *complex64 { return &c diff --git a/pointer_test.go b/pointer_test.go new file mode 100644 index 0000000..1fd9124 --- /dev/null +++ b/pointer_test.go @@ -0,0 +1,211 @@ +package square + +import ( + "testing" + "time" + + "github.com/google/uuid" + "github.com/stretchr/testify/assert" +) + +func TestBool(t *testing.T) { + value := true + ptr := Bool(value) + assert.NotNil(t, ptr) + assert.Equal(t, value, *ptr) +} + +func TestByte(t *testing.T) { + value := byte(42) + ptr := Byte(value) + assert.NotNil(t, ptr) + assert.Equal(t, value, *ptr) +} + +func TestComplex64(t *testing.T) { + value := complex64(1 + 2i) + ptr := Complex64(value) + assert.NotNil(t, ptr) + assert.Equal(t, value, *ptr) +} + +func TestComplex128(t *testing.T) { + value := complex128(1 + 2i) + ptr := Complex128(value) + assert.NotNil(t, ptr) + assert.Equal(t, value, *ptr) +} + +func TestFloat32(t *testing.T) { + value := float32(3.14) + ptr := Float32(value) + assert.NotNil(t, ptr) + assert.Equal(t, value, *ptr) +} + +func TestFloat64(t *testing.T) { + value := 3.14159 + ptr := Float64(value) + assert.NotNil(t, ptr) + assert.Equal(t, value, *ptr) +} + +func TestInt(t *testing.T) { + value := 42 + ptr := Int(value) + assert.NotNil(t, ptr) + assert.Equal(t, value, *ptr) +} + +func TestInt8(t *testing.T) { + value := int8(42) + ptr := Int8(value) + assert.NotNil(t, ptr) + assert.Equal(t, value, *ptr) +} + +func TestInt16(t *testing.T) { + value := int16(42) + ptr := Int16(value) + assert.NotNil(t, ptr) + assert.Equal(t, value, *ptr) +} + +func TestInt32(t *testing.T) { + value := int32(42) + ptr := Int32(value) + assert.NotNil(t, ptr) + assert.Equal(t, value, *ptr) +} + +func TestInt64(t *testing.T) { + value := int64(42) + ptr := Int64(value) + assert.NotNil(t, ptr) + assert.Equal(t, value, *ptr) +} + +func TestRune(t *testing.T) { + value := 'A' + ptr := Rune(value) + assert.NotNil(t, ptr) + assert.Equal(t, value, *ptr) +} + +func TestString(t *testing.T) { + value := "hello" + ptr := String(value) + assert.NotNil(t, ptr) + assert.Equal(t, value, *ptr) +} + +func TestUint(t *testing.T) { + value := uint(42) + ptr := Uint(value) + assert.NotNil(t, ptr) + assert.Equal(t, value, *ptr) +} + +func TestUint8(t *testing.T) { + value := uint8(42) + ptr := Uint8(value) + assert.NotNil(t, ptr) + assert.Equal(t, value, *ptr) +} + +func TestUint16(t *testing.T) { + value := uint16(42) + ptr := Uint16(value) + assert.NotNil(t, ptr) + assert.Equal(t, value, *ptr) +} + +func TestUint32(t *testing.T) { + value := uint32(42) + ptr := Uint32(value) + assert.NotNil(t, ptr) + assert.Equal(t, value, *ptr) +} + +func TestUint64(t *testing.T) { + value := uint64(42) + ptr := Uint64(value) + assert.NotNil(t, ptr) + assert.Equal(t, value, *ptr) +} + +func TestUintptr(t *testing.T) { + value := uintptr(42) + ptr := Uintptr(value) + assert.NotNil(t, ptr) + assert.Equal(t, value, *ptr) +} + +func TestUUID(t *testing.T) { + value := uuid.New() + ptr := UUID(value) + assert.NotNil(t, ptr) + assert.Equal(t, value, *ptr) +} + +func TestTime(t *testing.T) { + value := time.Now() + ptr := Time(value) + assert.NotNil(t, ptr) + assert.Equal(t, value, *ptr) +} + +func TestMustParseDate(t *testing.T) { + t.Run("valid date", func(t *testing.T) { + result := MustParseDate("2024-01-15") + expected, _ := time.Parse("2006-01-02", "2024-01-15") + assert.Equal(t, expected, result) + }) + + t.Run("invalid date panics", func(t *testing.T) { + assert.Panics(t, func() { + MustParseDate("invalid-date") + }) + }) +} + +func TestMustParseDateTime(t *testing.T) { + t.Run("valid datetime", func(t *testing.T) { + result := MustParseDateTime("2024-01-15T10:30:00Z") + expected, _ := time.Parse(time.RFC3339, "2024-01-15T10:30:00Z") + assert.Equal(t, expected, result) + }) + + t.Run("invalid datetime panics", func(t *testing.T) { + assert.Panics(t, func() { + MustParseDateTime("invalid-datetime") + }) + }) +} + +func TestPointerHelpersWithZeroValues(t *testing.T) { + t.Run("zero bool", func(t *testing.T) { + ptr := Bool(false) + assert.NotNil(t, ptr) + assert.Equal(t, false, *ptr) + }) + + t.Run("zero int", func(t *testing.T) { + ptr := Int(0) + assert.NotNil(t, ptr) + assert.Equal(t, 0, *ptr) + }) + + t.Run("empty string", func(t *testing.T) { + ptr := String("") + assert.NotNil(t, ptr) + assert.Equal(t, "", *ptr) + }) + + t.Run("zero time", func(t *testing.T) { + zeroTime := time.Time{} + ptr := Time(zeroTime) + assert.NotNil(t, ptr) + assert.Equal(t, zeroTime, *ptr) + }) +} diff --git a/reference.md b/reference.md index 7ef4c47..8862c41 100644 --- a/reference.md +++ b/reference.md @@ -2723,7 +2723,7 @@ request := &square.ListCatalogRequest{ "types", ), CatalogVersion: square.Int64( - 1000000, + int64(1000000), ), } client.Catalog.List( @@ -4307,7 +4307,7 @@ request := &square.BulkUpdateCustomersRequest{ "updated customer note", ), Version: square.Int64( - 2, + int64(2), ), }, "N18CPRVXR5214XPBBA6BZQWF3C": &square.BulkUpdateCustomerData{ @@ -4318,7 +4318,7 @@ request := &square.BulkUpdateCustomersRequest{ "Curie", ), Version: square.Int64( - 0, + int64(0), ), }, }, @@ -4400,7 +4400,7 @@ profiles can take closer to one minute or longer, especially during network inci ```go request := &square.SearchCustomersRequest{ Limit: square.Int64( - 2, + int64(2), ), Query: &square.CustomerQuery{ Filter: &square.CustomerFilter{ @@ -4607,7 +4607,7 @@ request := &square.UpdateCustomerRequest{ "updated customer note", ), Version: square.Int64( - 2, + int64(2), ), } client.Customers.Update( @@ -4815,7 +4815,7 @@ To delete a customer profile that was created by merging existing profiles, you request := &square.DeleteCustomersRequest{ CustomerID: "customer_id", Version: square.Int64( - 1000000, + int64(1000000), ), } client.Customers.Delete( @@ -5273,6 +5273,9 @@ multipart/form-data file uploads in HEIC, HEIF, JPEG, PDF, PNG, and TIFF formats ```go request := &square.CreateEvidenceFileDisputesRequest{ DisputeID: "dispute_id", + ImageFile: strings.NewReader( + "", + ), } client.Disputes.CreateEvidenceFile( context.TODO(), @@ -8099,6 +8102,9 @@ __NOTE:__ When testing in the Sandbox environment, the total file size is limite ```go request := &square.CreateInvoiceAttachmentRequest{ InvoiceID: "invoice_id", + ImageFile: strings.NewReader( + "", + ), } client.Invoices.CreateInvoiceAttachment( context.TODO(), @@ -9026,7 +9032,7 @@ request := &square.CreateTimecardRequest{ ), HourlyRate: &square.Money{ Amount: square.Int64( - 1100, + int64(1100), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -9049,7 +9055,7 @@ request := &square.CreateTimecardRequest{ TeamMemberID: "ormj0jJJZ5OZIzxrZYJI", DeclaredCashTipMoney: &square.Money{ Amount: square.Int64( - 500, + int64(500), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -9312,7 +9318,7 @@ request := &square.UpdateTimecardRequest{ ), HourlyRate: &square.Money{ Amount: square.Int64( - 1500, + int64(1500), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -9342,7 +9348,7 @@ request := &square.UpdateTimecardRequest{ TeamMemberID: "ormj0jJJZ5OZIzxrZYJI", DeclaredCashTipMoney: &square.Money{ Amount: square.Int64( - 500, + int64(500), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -9817,7 +9823,7 @@ request := &square.CreateCheckoutRequest{ }, BasePriceMoney: &square.Money{ Amount: square.Int64( - 1500, + int64(1500), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -9829,7 +9835,7 @@ request := &square.CreateCheckoutRequest{ Quantity: "1", BasePriceMoney: &square.Money{ Amount: square.Int64( - 2500, + int64(2500), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -9841,7 +9847,7 @@ request := &square.CreateCheckoutRequest{ Quantity: "3", BasePriceMoney: &square.Money{ Amount: square.Int64( - 3500, + int64(3500), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -9867,7 +9873,7 @@ request := &square.CreateCheckoutRequest{ Type: square.OrderLineItemDiscountTypeFixedAmount.Ptr(), AmountMoney: &square.Money{ Amount: square.Int64( - 100, + int64(100), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -9921,7 +9927,7 @@ request := &square.CreateCheckoutRequest{ Description: "Application fees", AmountMoney: &square.Money{ Amount: square.Int64( - 60, + int64(60), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -10622,7 +10628,7 @@ request := &square.CreateOrderRequest{ Quantity: "1", BasePriceMoney: &square.Money{ Amount: square.Int64( - 1599, + int64(1599), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -10691,7 +10697,7 @@ request := &square.CreateOrderRequest{ ), AmountMoney: &square.Money{ Amount: square.Int64( - 100, + int64(100), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -10852,7 +10858,7 @@ request := &square.CalculateOrderRequest{ Quantity: "1", BasePriceMoney: &square.Money{ Amount: square.Int64( - 500, + int64(500), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -10864,7 +10870,7 @@ request := &square.CalculateOrderRequest{ Quantity: "2", BasePriceMoney: &square.Money{ Amount: square.Int64( - 300, + int64(300), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -11307,7 +11313,7 @@ request := &square.UpdateOrderRequest{ Quantity: "2", BasePriceMoney: &square.Money{ Amount: square.Int64( - 200, + int64(200), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -11558,7 +11564,7 @@ request := &square.ListPaymentsRequest{ "location_id", ), Total: square.Int64( - 1000000, + int64(1000000), ), Last4: square.String( "last_4", @@ -11817,13 +11823,13 @@ request := &square.CreatePaymentRequest{ IdempotencyKey: "7b0f3ec5-086a-4871-8f13-3c81b3875218", AmountMoney: &square.Money{ Amount: square.Int64( - 1000, + int64(1000), ), Currency: square.CurrencyUsd.Ptr(), }, AppFeeMoney: &square.Money{ Amount: square.Int64( - 10, + int64(10), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -12364,13 +12370,13 @@ request := &square.UpdatePaymentRequest{ Payment: &square.Payment{ AmountMoney: &square.Money{ Amount: square.Int64( - 1000, + int64(1000), ), Currency: square.CurrencyUsd.Ptr(), }, TipMoney: &square.Money{ Amount: square.Int64( - 100, + int64(100), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -13147,13 +13153,13 @@ request := &square.RefundPaymentRequest{ IdempotencyKey: "9b7f2dcf-49da-4411-b23e-a2d6af21333a", AmountMoney: &square.Money{ Amount: square.Int64( - 1000, + int64(1000), ), Currency: square.CurrencyUsd.Ptr(), }, AppFeeMoney: &square.Money{ Amount: square.Int64( - 10, + int64(10), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -13734,7 +13740,7 @@ request := &square.CreateSubscriptionRequest{ Phases: []*square.Phase{ &square.Phase{ Ordinal: square.Int64( - 0, + int64(0), ), OrderTemplateID: square.String( "U2NaowWxzXwpsZU697x7ZHOAnCNZY", @@ -14826,7 +14832,7 @@ request := &square.SwapPlanRequest{ ), Phases: []*square.PhaseInput{ &square.PhaseInput{ - Ordinal: 0, + Ordinal: int64(0), OrderTemplateID: square.String( "uhhnjH9osVv3shUADwaC0b3hNxQZY", ), @@ -14951,7 +14957,7 @@ request := &square.CreateTeamMemberRequest{ PayType: square.JobAssignmentPayTypeSalary, AnnualRate: &square.Money{ Amount: square.Int64( - 3000000, + int64(3000000), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -14966,7 +14972,7 @@ request := &square.CreateTeamMemberRequest{ PayType: square.JobAssignmentPayTypeHourly, HourlyRate: &square.Money{ Amount: square.Int64( - 2000, + int64(2000), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -15477,7 +15483,7 @@ request := &square.UpdateTeamMembersRequest{ PayType: square.JobAssignmentPayTypeSalary, AnnualRate: &square.Money{ Amount: square.Int64( - 3000000, + int64(3000000), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -15492,7 +15498,7 @@ request := &square.UpdateTeamMembersRequest{ PayType: square.JobAssignmentPayTypeHourly, HourlyRate: &square.Money{ Amount: square.Int64( - 1200, + int64(1200), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -16394,7 +16400,7 @@ request := &square.UpdateTransferOrderRequest{ }, }, Version: square.Int64( - 1753109537351, + int64(1753109537351), ), } client.TransferOrders.Update( @@ -16486,7 +16492,7 @@ Creates a [transfer_order.deleted](webhook:transfer_order.deleted) webhook event request := &square.DeleteTransferOrdersRequest{ TransferOrderID: "transfer_order_id", Version: square.Int64( - 1000000, + int64(1000000), ), } client.TransferOrders.Delete( @@ -16568,7 +16574,7 @@ request := &square.CancelTransferOrderRequest{ TransferOrderID: "transfer_order_id", IdempotencyKey: "65cc0586-3e82-4d08-b524-3885cffd52", Version: square.Int64( - 1753117449752, + int64(1753117449752), ), } client.TransferOrders.Cancel( @@ -16692,7 +16698,7 @@ request := &square.ReceiveTransferOrderRequest{ }, }, Version: square.Int64( - 1753118664873, + int64(1753118664873), ), } client.TransferOrders.Receive( @@ -16788,7 +16794,7 @@ request := &square.StartTransferOrderRequest{ TransferOrderID: "transfer_order_id", IdempotencyKey: "EXAMPLE_IDEMPOTENCY_KEY_789", Version: square.Int64( - 1753109537351, + int64(1753109537351), ), } client.TransferOrders.Start( @@ -18969,7 +18975,11 @@ JPEG, PJPEG, PNG, or GIF format. The maximum file size is 15MB.
```go -request := &catalog.CreateImagesRequest{} +request := &catalog.CreateImagesRequest{ + ImageFile: strings.NewReader( + "", + ), + } client.Catalog.Images.Create( context.TODO(), request, @@ -19018,6 +19028,9 @@ JPEG, PJPEG, PNG, or GIF format. The maximum file size is 15MB. ```go request := &catalog.UpdateImagesRequest{ ImageID: "image_id", + ImageFile: strings.NewReader( + "", + ), } client.Catalog.Images.Update( context.TODO(), @@ -19184,7 +19197,7 @@ request := &catalog.GetObjectRequest{ true, ), CatalogVersion: square.Int64( - 1000000, + int64(1000000), ), IncludeCategoryPathToRoot: square.Bool( true, @@ -19465,7 +19478,7 @@ request := &checkout.CreatePaymentLinkRequest{ Name: "Auto Detailing", PriceMoney: &square.Money{ Amount: square.Int64( - 10000, + int64(10000), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -19910,7 +19923,7 @@ request := &customers.CreateCustomerCustomAttributeDefinitionRequest{ "favoritemovie", ), Schema: map[string]any{ - "\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String", + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String", }, Name: square.String( "Favorite Movie", @@ -21657,7 +21670,7 @@ request := &devices.ListCodesRequest{ LocationID: square.String( "location_id", ), - ProductType: &square.ProductType( + ProductType: square.String( "TERMINAL_API", ), Status: square.DeviceCodeStatusUnknown.Ptr(), @@ -22954,7 +22967,7 @@ request := &labor.CreateShiftRequest{ ), HourlyRate: &square.Money{ Amount: square.Int64( - 1100, + int64(1100), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -22979,7 +22992,7 @@ request := &labor.CreateShiftRequest{ ), DeclaredCashTipMoney: &square.Money{ Amount: square.Int64( - 500, + int64(500), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -23242,7 +23255,7 @@ request := &labor.UpdateShiftRequest{ ), HourlyRate: &square.Money{ Amount: square.Int64( - 1500, + int64(1500), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -23273,7 +23286,7 @@ request := &labor.UpdateShiftRequest{ ), DeclaredCashTipMoney: &square.Money{ Amount: square.Int64( - 500, + int64(500), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -23817,7 +23830,7 @@ request := &locations.CreateLocationCustomAttributeDefinitionRequest{ "bestseller", ), Schema: map[string]any{ - "\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String", + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String", }, Name: square.String( "Bestseller", @@ -26340,7 +26353,7 @@ request := &programs.CreateLoyaltyPromotionRequest{ }, MinimumSpendAmountMoney: &square.Money{ Amount: square.Int64( - 2000, + int64(2000), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -26689,7 +26702,7 @@ request := &merchants.CreateMerchantCustomAttributeDefinitionRequest{ "alternative_seller_name", ), Schema: map[string]any{ - "\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String", + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String", }, Name: square.String( "Alternative Merchant Name", @@ -27716,7 +27729,7 @@ request := &orders.CreateOrderCustomAttributeDefinitionRequest{ "cover-count", ), Schema: map[string]any{ - "\$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number", + "$ref": "https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number", }, Name: square.String( "Cover count", @@ -28746,7 +28759,7 @@ request := &teammembers.UpdateWageSettingRequest{ PayType: square.JobAssignmentPayTypeSalary, AnnualRate: &square.Money{ Amount: square.Int64( - 3000000, + int64(3000000), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -28761,7 +28774,7 @@ request := &teammembers.UpdateWageSettingRequest{ PayType: square.JobAssignmentPayTypeHourly, HourlyRate: &square.Money{ Amount: square.Int64( - 2000, + int64(2000), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -29163,7 +29176,7 @@ request := &terminal.CreateTerminalCheckoutRequest{ Checkout: &square.TerminalCheckout{ AmountMoney: &square.Money{ Amount: square.Int64( - 2610, + int64(2610), ), Currency: square.CurrencyUsd.Ptr(), }, @@ -29471,7 +29484,7 @@ request := &terminal.CreateTerminalRefundRequest{ PaymentID: "5O5OvgkcNUhl7JBuINflcjKqUzXZY", AmountMoney: &square.Money{ Amount: square.Int64( - 111, + int64(111), ), Currency: square.CurrencyCad.Ptr(), }, @@ -30345,3 +30358,4 @@ contained in the list of event types in the [Subscription](entity:WebhookSubscri
+ diff --git a/refunds.go b/refunds.go index 890cfbe..8250eda 100644 --- a/refunds.go +++ b/refunds.go @@ -46,7 +46,7 @@ type RefundPaymentRequest struct { // // The currency code must match the currency associated with the business // that is charging the card. - AmountMoney *Money `json:"amount_money,omitempty" url:"-"` + AmountMoney *Money `json:"amount_money" url:"-"` // The amount of money the developer contributes to help cover the refunded amount. // This amount is specified in the smallest denomination of the applicable currency (for example, // US dollar amounts are specified in cents). @@ -201,6 +201,27 @@ func (r *RefundPaymentRequest) SetExternalDetails(externalDetails *DestinationDe r.require(refundPaymentRequestFieldExternalDetails) } +func (r *RefundPaymentRequest) UnmarshalJSON(data []byte) error { + type unmarshaler RefundPaymentRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *r = RefundPaymentRequest(body) + return nil +} + +func (r *RefundPaymentRequest) MarshalJSON() ([]byte, error) { + type embed RefundPaymentRequest + var marshaler = struct { + embed + }{ + embed: embed(*r), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, r.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( getRefundsRequestFieldRefundID = big.NewInt(1 << 0) ) @@ -429,6 +450,9 @@ func (d *DestinationDetails) GetExternalDetails() *DestinationDetailsExternalRef } func (d *DestinationDetails) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -488,6 +512,9 @@ func (d *DestinationDetails) MarshalJSON() ([]byte, error) { } func (d *DestinationDetails) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -543,6 +570,9 @@ func (d *DestinationDetailsCardRefundDetails) GetAuthResultCode() *string { } func (d *DestinationDetailsCardRefundDetails) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -602,6 +632,9 @@ func (d *DestinationDetailsCardRefundDetails) MarshalJSON() ([]byte, error) { } func (d *DestinationDetailsCardRefundDetails) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -649,6 +682,9 @@ func (d *DestinationDetailsCashRefundDetails) GetChangeBackMoney() *Money { } func (d *DestinationDetailsCashRefundDetails) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -701,6 +737,9 @@ func (d *DestinationDetailsCashRefundDetails) MarshalJSON() ([]byte, error) { } func (d *DestinationDetailsCashRefundDetails) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -770,6 +809,9 @@ func (d *DestinationDetailsExternalRefundDetails) GetSourceID() *string { } func (d *DestinationDetailsExternalRefundDetails) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -829,6 +871,9 @@ func (d *DestinationDetailsExternalRefundDetails) MarshalJSON() ([]byte, error) } func (d *DestinationDetailsExternalRefundDetails) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -877,6 +922,9 @@ func (g *GetPaymentRefundResponse) GetRefund() *PaymentRefund { } func (g *GetPaymentRefundResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -929,6 +977,9 @@ func (g *GetPaymentRefundResponse) MarshalJSON() ([]byte, error) { } func (g *GetPaymentRefundResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -1011,6 +1062,9 @@ func (l *ListPaymentRefundsResponse) GetCursor() *string { } func (l *ListPaymentRefundsResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -1070,6 +1124,9 @@ func (l *ListPaymentRefundsResponse) MarshalJSON() ([]byte, error) { } func (l *ListPaymentRefundsResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -1268,6 +1325,9 @@ func (p *PaymentRefund) GetTerminalRefundID() *string { } func (p *PaymentRefund) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -1418,6 +1478,9 @@ func (p *PaymentRefund) MarshalJSON() ([]byte, error) { } func (p *PaymentRefund) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -1467,6 +1530,9 @@ func (r *RefundPaymentResponse) GetRefund() *PaymentRefund { } func (r *RefundPaymentResponse) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -1519,6 +1585,9 @@ func (r *RefundPaymentResponse) MarshalJSON() ([]byte, error) { } func (r *RefundPaymentResponse) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value diff --git a/refunds/refunds_test/refunds_test.go b/refunds/refunds_test/refunds_test.go new file mode 100644 index 0000000..fff5b76 --- /dev/null +++ b/refunds/refunds_test/refunds_test.go @@ -0,0 +1,186 @@ +// Code generated by Fern. DO NOT EDIT. + +package refunds_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestRefundsListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.ListRefundsRequest{ + BeginTime: square.String( + "begin_time", + ), + EndTime: square.String( + "end_time", + ), + SortOrder: square.String( + "sort_order", + ), + Cursor: square.String( + "cursor", + ), + LocationID: square.String( + "location_id", + ), + Status: square.String( + "status", + ), + SourceType: square.String( + "source_type", + ), + Limit: square.Int( + 1, + ), + UpdatedAtBeginTime: square.String( + "updated_at_begin_time", + ), + UpdatedAtEndTime: square.String( + "updated_at_end_time", + ), + SortField: square.ListPaymentRefundsRequestSortFieldCreatedAt.Ptr(), + } + _, invocationErr := client.Refunds.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestRefundsListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestRefundsListWithWireMock", "GET", "/v2/refunds", map[string]string{"begin_time": "begin_time", "end_time": "end_time", "sort_order": "sort_order", "cursor": "cursor", "location_id": "location_id", "status": "status", "source_type": "source_type", "limit": "1", "updated_at_begin_time": "updated_at_begin_time", "updated_at_end_time": "updated_at_end_time", "sort_field": "CREATED_AT"}, 1) +} + +func TestRefundsRefundPaymentWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.RefundPaymentRequest{ + IdempotencyKey: "9b7f2dcf-49da-4411-b23e-a2d6af21333a", + AmountMoney: &square.Money{ + Amount: square.Int64( + int64(1000), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + AppFeeMoney: &square.Money{ + Amount: square.Int64( + int64(10), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + PaymentID: square.String( + "R2B3Z8WMVt3EAmzYWLZvz7Y69EbZY", + ), + Reason: square.String( + "Example", + ), + } + _, invocationErr := client.Refunds.RefundPayment( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestRefundsRefundPaymentWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestRefundsRefundPaymentWithWireMock", "POST", "/v2/refunds", nil, 1) +} + +func TestRefundsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.GetRefundsRequest{ + RefundID: "refund_id", + } + _, invocationErr := client.Refunds.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestRefundsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestRefundsGetWithWireMock", "GET", "/v2/refunds/refund_id", nil, 1) +} diff --git a/refunds_test.go b/refunds_test.go new file mode 100644 index 0000000..15ef439 --- /dev/null +++ b/refunds_test.go @@ -0,0 +1,4098 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersRefundPaymentRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &RefundPaymentRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &RefundPaymentRequest{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppFeeMoney", func(t *testing.T) { + obj := &RefundPaymentRequest{} + var fernTestValueAppFeeMoney *Money + obj.SetAppFeeMoney(fernTestValueAppFeeMoney) + assert.Equal(t, fernTestValueAppFeeMoney, obj.AppFeeMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPaymentID", func(t *testing.T) { + obj := &RefundPaymentRequest{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDestinationID", func(t *testing.T) { + obj := &RefundPaymentRequest{} + var fernTestValueDestinationID *string + obj.SetDestinationID(fernTestValueDestinationID) + assert.Equal(t, fernTestValueDestinationID, obj.DestinationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUnlinked", func(t *testing.T) { + obj := &RefundPaymentRequest{} + var fernTestValueUnlinked *bool + obj.SetUnlinked(fernTestValueUnlinked) + assert.Equal(t, fernTestValueUnlinked, obj.Unlinked) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &RefundPaymentRequest{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerID", func(t *testing.T) { + obj := &RefundPaymentRequest{} + var fernTestValueCustomerID *string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReason", func(t *testing.T) { + obj := &RefundPaymentRequest{} + var fernTestValueReason *string + obj.SetReason(fernTestValueReason) + assert.Equal(t, fernTestValueReason, obj.Reason) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPaymentVersionToken", func(t *testing.T) { + obj := &RefundPaymentRequest{} + var fernTestValuePaymentVersionToken *string + obj.SetPaymentVersionToken(fernTestValuePaymentVersionToken) + assert.Equal(t, fernTestValuePaymentVersionToken, obj.PaymentVersionToken) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTeamMemberID", func(t *testing.T) { + obj := &RefundPaymentRequest{} + var fernTestValueTeamMemberID *string + obj.SetTeamMemberID(fernTestValueTeamMemberID) + assert.Equal(t, fernTestValueTeamMemberID, obj.TeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCashDetails", func(t *testing.T) { + obj := &RefundPaymentRequest{} + var fernTestValueCashDetails *DestinationDetailsCashRefundDetails + obj.SetCashDetails(fernTestValueCashDetails) + assert.Equal(t, fernTestValueCashDetails, obj.CashDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExternalDetails", func(t *testing.T) { + obj := &RefundPaymentRequest{} + var fernTestValueExternalDetails *DestinationDetailsExternalRefundDetails + obj.SetExternalDetails(fernTestValueExternalDetails) + assert.Equal(t, fernTestValueExternalDetails, obj.ExternalDetails) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitRefundPaymentRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundPaymentRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundPaymentRequest{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppFeeMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundPaymentRequest{} + var fernTestValueAppFeeMoney *Money + + // Act + obj.SetAppFeeMoney(fernTestValueAppFeeMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundPaymentRequest{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDestinationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundPaymentRequest{} + var fernTestValueDestinationID *string + + // Act + obj.SetDestinationID(fernTestValueDestinationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUnlinked_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundPaymentRequest{} + var fernTestValueUnlinked *bool + + // Act + obj.SetUnlinked(fernTestValueUnlinked) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundPaymentRequest{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundPaymentRequest{} + var fernTestValueCustomerID *string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReason_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundPaymentRequest{} + var fernTestValueReason *string + + // Act + obj.SetReason(fernTestValueReason) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPaymentVersionToken_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundPaymentRequest{} + var fernTestValuePaymentVersionToken *string + + // Act + obj.SetPaymentVersionToken(fernTestValuePaymentVersionToken) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundPaymentRequest{} + var fernTestValueTeamMemberID *string + + // Act + obj.SetTeamMemberID(fernTestValueTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCashDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundPaymentRequest{} + var fernTestValueCashDetails *DestinationDetailsCashRefundDetails + + // Act + obj.SetCashDetails(fernTestValueCashDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExternalDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundPaymentRequest{} + var fernTestValueExternalDetails *DestinationDetailsExternalRefundDetails + + // Act + obj.SetExternalDetails(fernTestValueExternalDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetRefundsRequest(t *testing.T) { + t.Run("SetRefundID", func(t *testing.T) { + obj := &GetRefundsRequest{} + var fernTestValueRefundID string + obj.SetRefundID(fernTestValueRefundID) + assert.Equal(t, fernTestValueRefundID, obj.RefundID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetRefundsRequest(t *testing.T) { + t.Run("SetRefundID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetRefundsRequest{} + var fernTestValueRefundID string + + // Act + obj.SetRefundID(fernTestValueRefundID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListRefundsRequest(t *testing.T) { + t.Run("SetBeginTime", func(t *testing.T) { + obj := &ListRefundsRequest{} + var fernTestValueBeginTime *string + obj.SetBeginTime(fernTestValueBeginTime) + assert.Equal(t, fernTestValueBeginTime, obj.BeginTime) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEndTime", func(t *testing.T) { + obj := &ListRefundsRequest{} + var fernTestValueEndTime *string + obj.SetEndTime(fernTestValueEndTime) + assert.Equal(t, fernTestValueEndTime, obj.EndTime) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSortOrder", func(t *testing.T) { + obj := &ListRefundsRequest{} + var fernTestValueSortOrder *string + obj.SetSortOrder(fernTestValueSortOrder) + assert.Equal(t, fernTestValueSortOrder, obj.SortOrder) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListRefundsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &ListRefundsRequest{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &ListRefundsRequest{} + var fernTestValueStatus *string + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSourceType", func(t *testing.T) { + obj := &ListRefundsRequest{} + var fernTestValueSourceType *string + obj.SetSourceType(fernTestValueSourceType) + assert.Equal(t, fernTestValueSourceType, obj.SourceType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListRefundsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAtBeginTime", func(t *testing.T) { + obj := &ListRefundsRequest{} + var fernTestValueUpdatedAtBeginTime *string + obj.SetUpdatedAtBeginTime(fernTestValueUpdatedAtBeginTime) + assert.Equal(t, fernTestValueUpdatedAtBeginTime, obj.UpdatedAtBeginTime) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAtEndTime", func(t *testing.T) { + obj := &ListRefundsRequest{} + var fernTestValueUpdatedAtEndTime *string + obj.SetUpdatedAtEndTime(fernTestValueUpdatedAtEndTime) + assert.Equal(t, fernTestValueUpdatedAtEndTime, obj.UpdatedAtEndTime) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSortField", func(t *testing.T) { + obj := &ListRefundsRequest{} + var fernTestValueSortField *ListPaymentRefundsRequestSortField + obj.SetSortField(fernTestValueSortField) + assert.Equal(t, fernTestValueSortField, obj.SortField) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListRefundsRequest(t *testing.T) { + t.Run("SetBeginTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListRefundsRequest{} + var fernTestValueBeginTime *string + + // Act + obj.SetBeginTime(fernTestValueBeginTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEndTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListRefundsRequest{} + var fernTestValueEndTime *string + + // Act + obj.SetEndTime(fernTestValueEndTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSortOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListRefundsRequest{} + var fernTestValueSortOrder *string + + // Act + obj.SetSortOrder(fernTestValueSortOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListRefundsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListRefundsRequest{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListRefundsRequest{} + var fernTestValueStatus *string + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSourceType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListRefundsRequest{} + var fernTestValueSourceType *string + + // Act + obj.SetSourceType(fernTestValueSourceType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListRefundsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAtBeginTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListRefundsRequest{} + var fernTestValueUpdatedAtBeginTime *string + + // Act + obj.SetUpdatedAtBeginTime(fernTestValueUpdatedAtBeginTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAtEndTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListRefundsRequest{} + var fernTestValueUpdatedAtEndTime *string + + // Act + obj.SetUpdatedAtEndTime(fernTestValueUpdatedAtEndTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSortField_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListRefundsRequest{} + var fernTestValueSortField *ListPaymentRefundsRequestSortField + + // Act + obj.SetSortField(fernTestValueSortField) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDestinationDetails(t *testing.T) { + t.Run("SetCardDetails", func(t *testing.T) { + obj := &DestinationDetails{} + var fernTestValueCardDetails *DestinationDetailsCardRefundDetails + obj.SetCardDetails(fernTestValueCardDetails) + assert.Equal(t, fernTestValueCardDetails, obj.CardDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCashDetails", func(t *testing.T) { + obj := &DestinationDetails{} + var fernTestValueCashDetails *DestinationDetailsCashRefundDetails + obj.SetCashDetails(fernTestValueCashDetails) + assert.Equal(t, fernTestValueCashDetails, obj.CashDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExternalDetails", func(t *testing.T) { + obj := &DestinationDetails{} + var fernTestValueExternalDetails *DestinationDetailsExternalRefundDetails + obj.SetExternalDetails(fernTestValueExternalDetails) + assert.Equal(t, fernTestValueExternalDetails, obj.ExternalDetails) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDestinationDetails(t *testing.T) { + t.Run("GetCardDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetails{} + var expected *DestinationDetailsCardRefundDetails + obj.CardDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCardDetails(), "getter should return the property value") + }) + + t.Run("GetCardDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetails{} + obj.CardDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetCardDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetCardDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DestinationDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCardDetails() // Should return zero value + }) + + t.Run("GetCashDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetails{} + var expected *DestinationDetailsCashRefundDetails + obj.CashDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCashDetails(), "getter should return the property value") + }) + + t.Run("GetCashDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetails{} + obj.CashDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetCashDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetCashDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DestinationDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCashDetails() // Should return zero value + }) + + t.Run("GetExternalDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetails{} + var expected *DestinationDetailsExternalRefundDetails + obj.ExternalDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExternalDetails(), "getter should return the property value") + }) + + t.Run("GetExternalDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetails{} + obj.ExternalDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetExternalDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetExternalDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DestinationDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExternalDetails() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDestinationDetails(t *testing.T) { + t.Run("SetCardDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetails{} + var fernTestValueCardDetails *DestinationDetailsCardRefundDetails + + // Act + obj.SetCardDetails(fernTestValueCardDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCashDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetails{} + var fernTestValueCashDetails *DestinationDetailsCashRefundDetails + + // Act + obj.SetCashDetails(fernTestValueCashDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExternalDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetails{} + var fernTestValueExternalDetails *DestinationDetailsExternalRefundDetails + + // Act + obj.SetExternalDetails(fernTestValueExternalDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDestinationDetailsCardRefundDetails(t *testing.T) { + t.Run("SetCard", func(t *testing.T) { + obj := &DestinationDetailsCardRefundDetails{} + var fernTestValueCard *Card + obj.SetCard(fernTestValueCard) + assert.Equal(t, fernTestValueCard, obj.Card) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEntryMethod", func(t *testing.T) { + obj := &DestinationDetailsCardRefundDetails{} + var fernTestValueEntryMethod *string + obj.SetEntryMethod(fernTestValueEntryMethod) + assert.Equal(t, fernTestValueEntryMethod, obj.EntryMethod) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAuthResultCode", func(t *testing.T) { + obj := &DestinationDetailsCardRefundDetails{} + var fernTestValueAuthResultCode *string + obj.SetAuthResultCode(fernTestValueAuthResultCode) + assert.Equal(t, fernTestValueAuthResultCode, obj.AuthResultCode) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDestinationDetailsCardRefundDetails(t *testing.T) { + t.Run("GetCard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetailsCardRefundDetails{} + var expected *Card + obj.Card = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCard(), "getter should return the property value") + }) + + t.Run("GetCard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetailsCardRefundDetails{} + obj.Card = nil + + // Act & Assert + assert.Nil(t, obj.GetCard(), "getter should return nil when property is nil") + }) + + t.Run("GetCard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DestinationDetailsCardRefundDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCard() // Should return zero value + }) + + t.Run("GetEntryMethod", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetailsCardRefundDetails{} + var expected *string + obj.EntryMethod = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEntryMethod(), "getter should return the property value") + }) + + t.Run("GetEntryMethod_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetailsCardRefundDetails{} + obj.EntryMethod = nil + + // Act & Assert + assert.Nil(t, obj.GetEntryMethod(), "getter should return nil when property is nil") + }) + + t.Run("GetEntryMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DestinationDetailsCardRefundDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEntryMethod() // Should return zero value + }) + + t.Run("GetAuthResultCode", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetailsCardRefundDetails{} + var expected *string + obj.AuthResultCode = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAuthResultCode(), "getter should return the property value") + }) + + t.Run("GetAuthResultCode_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetailsCardRefundDetails{} + obj.AuthResultCode = nil + + // Act & Assert + assert.Nil(t, obj.GetAuthResultCode(), "getter should return nil when property is nil") + }) + + t.Run("GetAuthResultCode_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DestinationDetailsCardRefundDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAuthResultCode() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDestinationDetailsCardRefundDetails(t *testing.T) { + t.Run("SetCard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetailsCardRefundDetails{} + var fernTestValueCard *Card + + // Act + obj.SetCard(fernTestValueCard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEntryMethod_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetailsCardRefundDetails{} + var fernTestValueEntryMethod *string + + // Act + obj.SetEntryMethod(fernTestValueEntryMethod) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAuthResultCode_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetailsCardRefundDetails{} + var fernTestValueAuthResultCode *string + + // Act + obj.SetAuthResultCode(fernTestValueAuthResultCode) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDestinationDetailsCashRefundDetails(t *testing.T) { + t.Run("SetSellerSuppliedMoney", func(t *testing.T) { + obj := &DestinationDetailsCashRefundDetails{} + var fernTestValueSellerSuppliedMoney *Money + obj.SetSellerSuppliedMoney(fernTestValueSellerSuppliedMoney) + assert.Equal(t, fernTestValueSellerSuppliedMoney, obj.SellerSuppliedMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetChangeBackMoney", func(t *testing.T) { + obj := &DestinationDetailsCashRefundDetails{} + var fernTestValueChangeBackMoney *Money + obj.SetChangeBackMoney(fernTestValueChangeBackMoney) + assert.Equal(t, fernTestValueChangeBackMoney, obj.ChangeBackMoney) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDestinationDetailsCashRefundDetails(t *testing.T) { + t.Run("GetSellerSuppliedMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetailsCashRefundDetails{} + var expected *Money + obj.SellerSuppliedMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSellerSuppliedMoney(), "getter should return the property value") + }) + + t.Run("GetSellerSuppliedMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetailsCashRefundDetails{} + obj.SellerSuppliedMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetSellerSuppliedMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetSellerSuppliedMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DestinationDetailsCashRefundDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSellerSuppliedMoney() // Should return zero value + }) + + t.Run("GetChangeBackMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetailsCashRefundDetails{} + var expected *Money + obj.ChangeBackMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetChangeBackMoney(), "getter should return the property value") + }) + + t.Run("GetChangeBackMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetailsCashRefundDetails{} + obj.ChangeBackMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetChangeBackMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetChangeBackMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DestinationDetailsCashRefundDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetChangeBackMoney() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDestinationDetailsCashRefundDetails(t *testing.T) { + t.Run("SetSellerSuppliedMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetailsCashRefundDetails{} + var fernTestValueSellerSuppliedMoney *Money + + // Act + obj.SetSellerSuppliedMoney(fernTestValueSellerSuppliedMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetChangeBackMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetailsCashRefundDetails{} + var fernTestValueChangeBackMoney *Money + + // Act + obj.SetChangeBackMoney(fernTestValueChangeBackMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDestinationDetailsExternalRefundDetails(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &DestinationDetailsExternalRefundDetails{} + var fernTestValueType string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSource", func(t *testing.T) { + obj := &DestinationDetailsExternalRefundDetails{} + var fernTestValueSource string + obj.SetSource(fernTestValueSource) + assert.Equal(t, fernTestValueSource, obj.Source) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSourceID", func(t *testing.T) { + obj := &DestinationDetailsExternalRefundDetails{} + var fernTestValueSourceID *string + obj.SetSourceID(fernTestValueSourceID) + assert.Equal(t, fernTestValueSourceID, obj.SourceID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDestinationDetailsExternalRefundDetails(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetailsExternalRefundDetails{} + var expected string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DestinationDetailsExternalRefundDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetSource", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetailsExternalRefundDetails{} + var expected string + obj.Source = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSource(), "getter should return the property value") + }) + + t.Run("GetSource_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DestinationDetailsExternalRefundDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSource() // Should return zero value + }) + + t.Run("GetSourceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetailsExternalRefundDetails{} + var expected *string + obj.SourceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSourceID(), "getter should return the property value") + }) + + t.Run("GetSourceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetailsExternalRefundDetails{} + obj.SourceID = nil + + // Act & Assert + assert.Nil(t, obj.GetSourceID(), "getter should return nil when property is nil") + }) + + t.Run("GetSourceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DestinationDetailsExternalRefundDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSourceID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDestinationDetailsExternalRefundDetails(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetailsExternalRefundDetails{} + var fernTestValueType string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSource_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetailsExternalRefundDetails{} + var fernTestValueSource string + + // Act + obj.SetSource(fernTestValueSource) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSourceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetailsExternalRefundDetails{} + var fernTestValueSourceID *string + + // Act + obj.SetSourceID(fernTestValueSourceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetPaymentRefundResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetPaymentRefundResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRefund", func(t *testing.T) { + obj := &GetPaymentRefundResponse{} + var fernTestValueRefund *PaymentRefund + obj.SetRefund(fernTestValueRefund) + assert.Equal(t, fernTestValueRefund, obj.Refund) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetPaymentRefundResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPaymentRefundResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPaymentRefundResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetPaymentRefundResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetRefund", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPaymentRefundResponse{} + var expected *PaymentRefund + obj.Refund = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRefund(), "getter should return the property value") + }) + + t.Run("GetRefund_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPaymentRefundResponse{} + obj.Refund = nil + + // Act & Assert + assert.Nil(t, obj.GetRefund(), "getter should return nil when property is nil") + }) + + t.Run("GetRefund_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetPaymentRefundResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRefund() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetPaymentRefundResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPaymentRefundResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRefund_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPaymentRefundResponse{} + var fernTestValueRefund *PaymentRefund + + // Act + obj.SetRefund(fernTestValueRefund) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListPaymentRefundsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &ListPaymentRefundsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRefunds", func(t *testing.T) { + obj := &ListPaymentRefundsResponse{} + var fernTestValueRefunds []*PaymentRefund + obj.SetRefunds(fernTestValueRefunds) + assert.Equal(t, fernTestValueRefunds, obj.Refunds) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListPaymentRefundsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListPaymentRefundsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentRefundsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentRefundsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListPaymentRefundsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetRefunds", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentRefundsResponse{} + var expected []*PaymentRefund + obj.Refunds = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRefunds(), "getter should return the property value") + }) + + t.Run("GetRefunds_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentRefundsResponse{} + obj.Refunds = nil + + // Act & Assert + assert.Nil(t, obj.GetRefunds(), "getter should return nil when property is nil") + }) + + t.Run("GetRefunds_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListPaymentRefundsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRefunds() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentRefundsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentRefundsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListPaymentRefundsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListPaymentRefundsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentRefundsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRefunds_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentRefundsResponse{} + var fernTestValueRefunds []*PaymentRefund + + // Act + obj.SetRefunds(fernTestValueRefunds) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentRefundsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentRefund(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &PaymentRefund{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &PaymentRefund{} + var fernTestValueStatus *string + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &PaymentRefund{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUnlinked", func(t *testing.T) { + obj := &PaymentRefund{} + var fernTestValueUnlinked *bool + obj.SetUnlinked(fernTestValueUnlinked) + assert.Equal(t, fernTestValueUnlinked, obj.Unlinked) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDestinationType", func(t *testing.T) { + obj := &PaymentRefund{} + var fernTestValueDestinationType *string + obj.SetDestinationType(fernTestValueDestinationType) + assert.Equal(t, fernTestValueDestinationType, obj.DestinationType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDestinationDetails", func(t *testing.T) { + obj := &PaymentRefund{} + var fernTestValueDestinationDetails *DestinationDetails + obj.SetDestinationDetails(fernTestValueDestinationDetails) + assert.Equal(t, fernTestValueDestinationDetails, obj.DestinationDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &PaymentRefund{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppFeeMoney", func(t *testing.T) { + obj := &PaymentRefund{} + var fernTestValueAppFeeMoney *Money + obj.SetAppFeeMoney(fernTestValueAppFeeMoney) + assert.Equal(t, fernTestValueAppFeeMoney, obj.AppFeeMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetProcessingFee", func(t *testing.T) { + obj := &PaymentRefund{} + var fernTestValueProcessingFee []*ProcessingFee + obj.SetProcessingFee(fernTestValueProcessingFee) + assert.Equal(t, fernTestValueProcessingFee, obj.ProcessingFee) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPaymentID", func(t *testing.T) { + obj := &PaymentRefund{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrderID", func(t *testing.T) { + obj := &PaymentRefund{} + var fernTestValueOrderID *string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReason", func(t *testing.T) { + obj := &PaymentRefund{} + var fernTestValueReason *string + obj.SetReason(fernTestValueReason) + assert.Equal(t, fernTestValueReason, obj.Reason) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &PaymentRefund{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &PaymentRefund{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTeamMemberID", func(t *testing.T) { + obj := &PaymentRefund{} + var fernTestValueTeamMemberID *string + obj.SetTeamMemberID(fernTestValueTeamMemberID) + assert.Equal(t, fernTestValueTeamMemberID, obj.TeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTerminalRefundID", func(t *testing.T) { + obj := &PaymentRefund{} + var fernTestValueTerminalRefundID *string + obj.SetTerminalRefundID(fernTestValueTerminalRefundID) + assert.Equal(t, fernTestValueTerminalRefundID, obj.TerminalRefundID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentRefund(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var expected string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var expected *string + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetUnlinked", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var expected *bool + obj.Unlinked = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUnlinked(), "getter should return the property value") + }) + + t.Run("GetUnlinked_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + obj.Unlinked = nil + + // Act & Assert + assert.Nil(t, obj.GetUnlinked(), "getter should return nil when property is nil") + }) + + t.Run("GetUnlinked_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUnlinked() // Should return zero value + }) + + t.Run("GetDestinationType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var expected *string + obj.DestinationType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDestinationType(), "getter should return the property value") + }) + + t.Run("GetDestinationType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + obj.DestinationType = nil + + // Act & Assert + assert.Nil(t, obj.GetDestinationType(), "getter should return nil when property is nil") + }) + + t.Run("GetDestinationType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDestinationType() // Should return zero value + }) + + t.Run("GetDestinationDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var expected *DestinationDetails + obj.DestinationDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDestinationDetails(), "getter should return the property value") + }) + + t.Run("GetDestinationDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + obj.DestinationDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetDestinationDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetDestinationDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDestinationDetails() // Should return zero value + }) + + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + + t.Run("GetAppFeeMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var expected *Money + obj.AppFeeMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppFeeMoney(), "getter should return the property value") + }) + + t.Run("GetAppFeeMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + obj.AppFeeMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAppFeeMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAppFeeMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppFeeMoney() // Should return zero value + }) + + t.Run("GetProcessingFee", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var expected []*ProcessingFee + obj.ProcessingFee = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetProcessingFee(), "getter should return the property value") + }) + + t.Run("GetProcessingFee_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + obj.ProcessingFee = nil + + // Act & Assert + assert.Nil(t, obj.GetProcessingFee(), "getter should return nil when property is nil") + }) + + t.Run("GetProcessingFee_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetProcessingFee() // Should return zero value + }) + + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + + t.Run("GetOrderID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var expected *string + obj.OrderID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderID(), "getter should return the property value") + }) + + t.Run("GetOrderID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + obj.OrderID = nil + + // Act & Assert + assert.Nil(t, obj.GetOrderID(), "getter should return nil when property is nil") + }) + + t.Run("GetOrderID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderID() // Should return zero value + }) + + t.Run("GetReason", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var expected *string + obj.Reason = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReason(), "getter should return the property value") + }) + + t.Run("GetReason_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + obj.Reason = nil + + // Act & Assert + assert.Nil(t, obj.GetReason(), "getter should return nil when property is nil") + }) + + t.Run("GetReason_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReason() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetTeamMemberID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var expected *string + obj.TeamMemberID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMemberID(), "getter should return the property value") + }) + + t.Run("GetTeamMemberID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + obj.TeamMemberID = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMemberID(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMemberID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMemberID() // Should return zero value + }) + + t.Run("GetTerminalRefundID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var expected *string + obj.TerminalRefundID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTerminalRefundID(), "getter should return the property value") + }) + + t.Run("GetTerminalRefundID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + obj.TerminalRefundID = nil + + // Act & Assert + assert.Nil(t, obj.GetTerminalRefundID(), "getter should return nil when property is nil") + }) + + t.Run("GetTerminalRefundID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTerminalRefundID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentRefund(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var fernTestValueStatus *string + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUnlinked_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var fernTestValueUnlinked *bool + + // Act + obj.SetUnlinked(fernTestValueUnlinked) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDestinationType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var fernTestValueDestinationType *string + + // Act + obj.SetDestinationType(fernTestValueDestinationType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDestinationDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var fernTestValueDestinationDetails *DestinationDetails + + // Act + obj.SetDestinationDetails(fernTestValueDestinationDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppFeeMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var fernTestValueAppFeeMoney *Money + + // Act + obj.SetAppFeeMoney(fernTestValueAppFeeMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetProcessingFee_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var fernTestValueProcessingFee []*ProcessingFee + + // Act + obj.SetProcessingFee(fernTestValueProcessingFee) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var fernTestValueOrderID *string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReason_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var fernTestValueReason *string + + // Act + obj.SetReason(fernTestValueReason) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var fernTestValueTeamMemberID *string + + // Act + obj.SetTeamMemberID(fernTestValueTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTerminalRefundID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + var fernTestValueTerminalRefundID *string + + // Act + obj.SetTerminalRefundID(fernTestValueTerminalRefundID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRefundPaymentResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &RefundPaymentResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRefund", func(t *testing.T) { + obj := &RefundPaymentResponse{} + var fernTestValueRefund *PaymentRefund + obj.SetRefund(fernTestValueRefund) + assert.Equal(t, fernTestValueRefund, obj.Refund) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRefundPaymentResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundPaymentResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundPaymentResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundPaymentResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetRefund", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundPaymentResponse{} + var expected *PaymentRefund + obj.Refund = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRefund(), "getter should return the property value") + }) + + t.Run("GetRefund_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundPaymentResponse{} + obj.Refund = nil + + // Act & Assert + assert.Nil(t, obj.GetRefund(), "getter should return nil when property is nil") + }) + + t.Run("GetRefund_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundPaymentResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRefund() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRefundPaymentResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundPaymentResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRefund_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundPaymentResponse{} + var fernTestValueRefund *PaymentRefund + + // Act + obj.SetRefund(fernTestValueRefund) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingDestinationDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DestinationDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DestinationDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DestinationDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDestinationDetailsCardRefundDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetailsCardRefundDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DestinationDetailsCardRefundDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DestinationDetailsCardRefundDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DestinationDetailsCardRefundDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDestinationDetailsCashRefundDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetailsCashRefundDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DestinationDetailsCashRefundDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DestinationDetailsCashRefundDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DestinationDetailsCashRefundDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDestinationDetailsExternalRefundDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DestinationDetailsExternalRefundDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DestinationDetailsExternalRefundDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DestinationDetailsExternalRefundDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DestinationDetailsExternalRefundDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetPaymentRefundResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPaymentRefundResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetPaymentRefundResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetPaymentRefundResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetPaymentRefundResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListPaymentRefundsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentRefundsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListPaymentRefundsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListPaymentRefundsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListPaymentRefundsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentRefund(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentRefund{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentRefund + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentRefund + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentRefund + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRefundPaymentResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundPaymentResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RefundPaymentResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RefundPaymentResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RefundPaymentResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringDestinationDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DestinationDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DestinationDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDestinationDetailsCardRefundDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DestinationDetailsCardRefundDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DestinationDetailsCardRefundDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDestinationDetailsCashRefundDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DestinationDetailsCashRefundDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DestinationDetailsCashRefundDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDestinationDetailsExternalRefundDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DestinationDetailsExternalRefundDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DestinationDetailsExternalRefundDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetPaymentRefundResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetPaymentRefundResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetPaymentRefundResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListPaymentRefundsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListPaymentRefundsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListPaymentRefundsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentRefund(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentRefund{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentRefund + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRefundPaymentResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RefundPaymentResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundPaymentResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestEnumListPaymentRefundsRequestSortField(t *testing.T) { + t.Run("NewFromString_CREATED_AT", func(t *testing.T) { + t.Parallel() + val, err := NewListPaymentRefundsRequestSortFieldFromString("CREATED_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ListPaymentRefundsRequestSortField("CREATED_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UPDATED_AT", func(t *testing.T) { + t.Parallel() + val, err := NewListPaymentRefundsRequestSortFieldFromString("UPDATED_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ListPaymentRefundsRequestSortField("UPDATED_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewListPaymentRefundsRequestSortFieldFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewListPaymentRefundsRequestSortFieldFromString("CREATED_AT") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestExtraPropertiesDestinationDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DestinationDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DestinationDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDestinationDetailsCardRefundDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DestinationDetailsCardRefundDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DestinationDetailsCardRefundDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDestinationDetailsCashRefundDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DestinationDetailsCashRefundDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DestinationDetailsCashRefundDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDestinationDetailsExternalRefundDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DestinationDetailsExternalRefundDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DestinationDetailsExternalRefundDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetPaymentRefundResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetPaymentRefundResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetPaymentRefundResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListPaymentRefundsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListPaymentRefundsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListPaymentRefundsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentRefund(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentRefund{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentRefund + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRefundPaymentResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RefundPaymentResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundPaymentResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/sites.go b/sites.go index 52070c0..3c4262b 100644 --- a/sites.go +++ b/sites.go @@ -43,6 +43,9 @@ func (l *ListSitesResponse) GetSites() []*Site { } func (l *ListSitesResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -95,6 +98,9 @@ func (l *ListSitesResponse) MarshalJSON() ([]byte, error) { } func (l *ListSitesResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -180,6 +186,9 @@ func (s *Site) GetUpdatedAt() *string { } func (s *Site) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -260,6 +269,9 @@ func (s *Site) MarshalJSON() ([]byte, error) { } func (s *Site) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value diff --git a/sites/sites_test/sites_test.go b/sites/sites_test/sites_test.go new file mode 100644 index 0000000..bf75577 --- /dev/null +++ b/sites/sites_test/sites_test.go @@ -0,0 +1,83 @@ +// Code generated by Fern. DO NOT EDIT. + +package sites_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestSitesListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + _, invocationErr := client.Sites.List( + context.TODO(), + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestSitesListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestSitesListWithWireMock", "GET", "/v2/sites", nil, 1) +} diff --git a/sites_test.go b/sites_test.go new file mode 100644 index 0000000..bdb6b6d --- /dev/null +++ b/sites_test.go @@ -0,0 +1,748 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersListSitesResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &ListSitesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSites", func(t *testing.T) { + obj := &ListSitesResponse{} + var fernTestValueSites []*Site + obj.SetSites(fernTestValueSites) + assert.Equal(t, fernTestValueSites, obj.Sites) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListSitesResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListSitesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListSitesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListSitesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetSites", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListSitesResponse{} + var expected []*Site + obj.Sites = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSites(), "getter should return the property value") + }) + + t.Run("GetSites_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListSitesResponse{} + obj.Sites = nil + + // Act & Assert + assert.Nil(t, obj.GetSites(), "getter should return nil when property is nil") + }) + + t.Run("GetSites_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListSitesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSites() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListSitesResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListSitesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSites_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListSitesResponse{} + var fernTestValueSites []*Site + + // Act + obj.SetSites(fernTestValueSites) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSite(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &Site{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSiteTitle", func(t *testing.T) { + obj := &Site{} + var fernTestValueSiteTitle *string + obj.SetSiteTitle(fernTestValueSiteTitle) + assert.Equal(t, fernTestValueSiteTitle, obj.SiteTitle) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDomain", func(t *testing.T) { + obj := &Site{} + var fernTestValueDomain *string + obj.SetDomain(fernTestValueDomain) + assert.Equal(t, fernTestValueDomain, obj.Domain) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsPublished", func(t *testing.T) { + obj := &Site{} + var fernTestValueIsPublished *bool + obj.SetIsPublished(fernTestValueIsPublished) + assert.Equal(t, fernTestValueIsPublished, obj.IsPublished) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &Site{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &Site{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSite(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Site{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Site{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Site + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetSiteTitle", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Site{} + var expected *string + obj.SiteTitle = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSiteTitle(), "getter should return the property value") + }) + + t.Run("GetSiteTitle_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Site{} + obj.SiteTitle = nil + + // Act & Assert + assert.Nil(t, obj.GetSiteTitle(), "getter should return nil when property is nil") + }) + + t.Run("GetSiteTitle_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Site + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSiteTitle() // Should return zero value + }) + + t.Run("GetDomain", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Site{} + var expected *string + obj.Domain = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDomain(), "getter should return the property value") + }) + + t.Run("GetDomain_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Site{} + obj.Domain = nil + + // Act & Assert + assert.Nil(t, obj.GetDomain(), "getter should return nil when property is nil") + }) + + t.Run("GetDomain_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Site + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDomain() // Should return zero value + }) + + t.Run("GetIsPublished", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Site{} + var expected *bool + obj.IsPublished = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsPublished(), "getter should return the property value") + }) + + t.Run("GetIsPublished_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Site{} + obj.IsPublished = nil + + // Act & Assert + assert.Nil(t, obj.GetIsPublished(), "getter should return nil when property is nil") + }) + + t.Run("GetIsPublished_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Site + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsPublished() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Site{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Site{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Site + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Site{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Site{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Site + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSite(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Site{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSiteTitle_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Site{} + var fernTestValueSiteTitle *string + + // Act + obj.SetSiteTitle(fernTestValueSiteTitle) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDomain_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Site{} + var fernTestValueDomain *string + + // Act + obj.SetDomain(fernTestValueDomain) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsPublished_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Site{} + var fernTestValueIsPublished *bool + + // Act + obj.SetIsPublished(fernTestValueIsPublished) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Site{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Site{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingListSitesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListSitesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListSitesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListSitesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListSitesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSite(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Site{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Site + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Site + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Site + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringListSitesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListSitesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListSitesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSite(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Site{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Site + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestExtraPropertiesListSitesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListSitesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListSitesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSite(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Site{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Site + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/snippets.go b/snippets.go index 9f75b43..1c7a2f5 100644 --- a/snippets.go +++ b/snippets.go @@ -85,6 +85,9 @@ func (d *DeleteSnippetResponse) GetErrors() []*Error { } func (d *DeleteSnippetResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -130,6 +133,9 @@ func (d *DeleteSnippetResponse) MarshalJSON() ([]byte, error) { } func (d *DeleteSnippetResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -175,6 +181,9 @@ func (g *GetSnippetResponse) GetSnippet() *Snippet { } func (g *GetSnippetResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -227,6 +236,9 @@ func (g *GetSnippetResponse) MarshalJSON() ([]byte, error) { } func (g *GetSnippetResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -302,6 +314,9 @@ func (s *Snippet) GetUpdatedAt() *string { } func (s *Snippet) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -375,6 +390,9 @@ func (s *Snippet) MarshalJSON() ([]byte, error) { } func (s *Snippet) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -420,6 +438,9 @@ func (u *UpsertSnippetResponse) GetSnippet() *Snippet { } func (u *UpsertSnippetResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -472,6 +493,9 @@ func (u *UpsertSnippetResponse) MarshalJSON() ([]byte, error) { } func (u *UpsertSnippetResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -492,7 +516,7 @@ type UpsertSnippetRequest struct { // The ID of the site where you want to add or update the snippet. SiteID string `json:"-" url:"-"` // The snippet for the site. - Snippet *Snippet `json:"snippet,omitempty" url:"-"` + Snippet *Snippet `json:"snippet" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -518,3 +542,24 @@ func (u *UpsertSnippetRequest) SetSnippet(snippet *Snippet) { u.Snippet = snippet u.require(upsertSnippetRequestFieldSnippet) } + +func (u *UpsertSnippetRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpsertSnippetRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpsertSnippetRequest(body) + return nil +} + +func (u *UpsertSnippetRequest) MarshalJSON() ([]byte, error) { + type embed UpsertSnippetRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/snippets/snippets_test/snippets_test.go b/snippets/snippets_test/snippets_test.go new file mode 100644 index 0000000..5876ba8 --- /dev/null +++ b/snippets/snippets_test/snippets_test.go @@ -0,0 +1,141 @@ +// Code generated by Fern. DO NOT EDIT. + +package snippets_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestSnippetsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.GetSnippetsRequest{ + SiteID: "site_id", + } + _, invocationErr := client.Snippets.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestSnippetsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestSnippetsGetWithWireMock", "GET", "/v2/sites/site_id/snippet", nil, 1) +} + +func TestSnippetsUpsertWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.UpsertSnippetRequest{ + SiteID: "site_id", + Snippet: &square.Snippet{ + Content: "", + }, + } + _, invocationErr := client.Snippets.Upsert( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestSnippetsUpsertWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestSnippetsUpsertWithWireMock", "POST", "/v2/sites/site_id/snippet", nil, 1) +} + +func TestSnippetsDeleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.DeleteSnippetsRequest{ + SiteID: "site_id", + } + _, invocationErr := client.Snippets.Delete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestSnippetsDeleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestSnippetsDeleteWithWireMock", "DELETE", "/v2/sites/site_id/snippet", nil, 1) +} diff --git a/snippets_test.go b/snippets_test.go new file mode 100644 index 0000000..a357571 --- /dev/null +++ b/snippets_test.go @@ -0,0 +1,1218 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersDeleteSnippetsRequest(t *testing.T) { + t.Run("SetSiteID", func(t *testing.T) { + obj := &DeleteSnippetsRequest{} + var fernTestValueSiteID string + obj.SetSiteID(fernTestValueSiteID) + assert.Equal(t, fernTestValueSiteID, obj.SiteID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDeleteSnippetsRequest(t *testing.T) { + t.Run("SetSiteID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteSnippetsRequest{} + var fernTestValueSiteID string + + // Act + obj.SetSiteID(fernTestValueSiteID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetSnippetsRequest(t *testing.T) { + t.Run("SetSiteID", func(t *testing.T) { + obj := &GetSnippetsRequest{} + var fernTestValueSiteID string + obj.SetSiteID(fernTestValueSiteID) + assert.Equal(t, fernTestValueSiteID, obj.SiteID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetSnippetsRequest(t *testing.T) { + t.Run("SetSiteID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetSnippetsRequest{} + var fernTestValueSiteID string + + // Act + obj.SetSiteID(fernTestValueSiteID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteSnippetResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DeleteSnippetResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeleteSnippetResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteSnippetResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteSnippetResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteSnippetResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeleteSnippetResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteSnippetResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetSnippetResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetSnippetResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSnippet", func(t *testing.T) { + obj := &GetSnippetResponse{} + var fernTestValueSnippet *Snippet + obj.SetSnippet(fernTestValueSnippet) + assert.Equal(t, fernTestValueSnippet, obj.Snippet) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetSnippetResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetSnippetResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetSnippetResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetSnippetResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetSnippet", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetSnippetResponse{} + var expected *Snippet + obj.Snippet = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSnippet(), "getter should return the property value") + }) + + t.Run("GetSnippet_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetSnippetResponse{} + obj.Snippet = nil + + // Act & Assert + assert.Nil(t, obj.GetSnippet(), "getter should return nil when property is nil") + }) + + t.Run("GetSnippet_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetSnippetResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSnippet() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetSnippetResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetSnippetResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSnippet_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetSnippetResponse{} + var fernTestValueSnippet *Snippet + + // Act + obj.SetSnippet(fernTestValueSnippet) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSnippet(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &Snippet{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSiteID", func(t *testing.T) { + obj := &Snippet{} + var fernTestValueSiteID *string + obj.SetSiteID(fernTestValueSiteID) + assert.Equal(t, fernTestValueSiteID, obj.SiteID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetContent", func(t *testing.T) { + obj := &Snippet{} + var fernTestValueContent string + obj.SetContent(fernTestValueContent) + assert.Equal(t, fernTestValueContent, obj.Content) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &Snippet{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &Snippet{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSnippet(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Snippet{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Snippet{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Snippet + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetSiteID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Snippet{} + var expected *string + obj.SiteID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSiteID(), "getter should return the property value") + }) + + t.Run("GetSiteID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Snippet{} + obj.SiteID = nil + + // Act & Assert + assert.Nil(t, obj.GetSiteID(), "getter should return nil when property is nil") + }) + + t.Run("GetSiteID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Snippet + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSiteID() // Should return zero value + }) + + t.Run("GetContent", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Snippet{} + var expected string + obj.Content = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetContent(), "getter should return the property value") + }) + + t.Run("GetContent_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Snippet + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetContent() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Snippet{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Snippet{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Snippet + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Snippet{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Snippet{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Snippet + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSnippet(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Snippet{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSiteID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Snippet{} + var fernTestValueSiteID *string + + // Act + obj.SetSiteID(fernTestValueSiteID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetContent_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Snippet{} + var fernTestValueContent string + + // Act + obj.SetContent(fernTestValueContent) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Snippet{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Snippet{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpsertSnippetResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &UpsertSnippetResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSnippet", func(t *testing.T) { + obj := &UpsertSnippetResponse{} + var fernTestValueSnippet *Snippet + obj.SetSnippet(fernTestValueSnippet) + assert.Equal(t, fernTestValueSnippet, obj.Snippet) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpsertSnippetResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertSnippetResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertSnippetResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertSnippetResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetSnippet", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertSnippetResponse{} + var expected *Snippet + obj.Snippet = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSnippet(), "getter should return the property value") + }) + + t.Run("GetSnippet_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertSnippetResponse{} + obj.Snippet = nil + + // Act & Assert + assert.Nil(t, obj.GetSnippet(), "getter should return nil when property is nil") + }) + + t.Run("GetSnippet_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertSnippetResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSnippet() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpsertSnippetResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertSnippetResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSnippet_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertSnippetResponse{} + var fernTestValueSnippet *Snippet + + // Act + obj.SetSnippet(fernTestValueSnippet) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpsertSnippetRequest(t *testing.T) { + t.Run("SetSiteID", func(t *testing.T) { + obj := &UpsertSnippetRequest{} + var fernTestValueSiteID string + obj.SetSiteID(fernTestValueSiteID) + assert.Equal(t, fernTestValueSiteID, obj.SiteID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSnippet", func(t *testing.T) { + obj := &UpsertSnippetRequest{} + var fernTestValueSnippet *Snippet + obj.SetSnippet(fernTestValueSnippet) + assert.Equal(t, fernTestValueSnippet, obj.Snippet) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpsertSnippetRequest(t *testing.T) { + t.Run("SetSiteID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertSnippetRequest{} + var fernTestValueSiteID string + + // Act + obj.SetSiteID(fernTestValueSiteID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSnippet_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertSnippetRequest{} + var fernTestValueSnippet *Snippet + + // Act + obj.SetSnippet(fernTestValueSnippet) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingDeleteSnippetResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteSnippetResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeleteSnippetResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeleteSnippetResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeleteSnippetResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetSnippetResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetSnippetResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetSnippetResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetSnippetResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetSnippetResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSnippet(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Snippet{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Snippet + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Snippet + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Snippet + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpsertSnippetResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertSnippetResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpsertSnippetResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpsertSnippetResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpsertSnippetResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringDeleteSnippetResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeleteSnippetResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteSnippetResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetSnippetResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetSnippetResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetSnippetResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSnippet(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Snippet{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Snippet + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpsertSnippetResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpsertSnippetResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertSnippetResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestExtraPropertiesDeleteSnippetResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeleteSnippetResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteSnippetResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetSnippetResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetSnippetResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetSnippetResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSnippet(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Snippet{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Snippet + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpsertSnippetResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpsertSnippetResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertSnippetResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/subscriptions.go b/subscriptions.go index 5c6d925..f3d6f6d 100644 --- a/subscriptions.go +++ b/subscriptions.go @@ -59,6 +59,27 @@ func (b *BulkSwapPlanRequest) SetLocationID(locationID string) { b.require(bulkSwapPlanRequestFieldLocationID) } +func (b *BulkSwapPlanRequest) UnmarshalJSON(data []byte) error { + type unmarshaler BulkSwapPlanRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *b = BulkSwapPlanRequest(body) + return nil +} + +func (b *BulkSwapPlanRequest) MarshalJSON() ([]byte, error) { + type embed BulkSwapPlanRequest + var marshaler = struct { + embed + }{ + embed: embed(*b), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, b.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( changeBillingAnchorDateRequestFieldSubscriptionID = big.NewInt(1 << 0) changeBillingAnchorDateRequestFieldMonthlyBillingAnchorDate = big.NewInt(1 << 1) @@ -109,6 +130,27 @@ func (c *ChangeBillingAnchorDateRequest) SetEffectiveDate(effectiveDate *string) c.require(changeBillingAnchorDateRequestFieldEffectiveDate) } +func (c *ChangeBillingAnchorDateRequest) UnmarshalJSON(data []byte) error { + type unmarshaler ChangeBillingAnchorDateRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = ChangeBillingAnchorDateRequest(body) + return nil +} + +func (c *ChangeBillingAnchorDateRequest) MarshalJSON() ([]byte, error) { + type embed ChangeBillingAnchorDateRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( deleteActionSubscriptionsRequestFieldSubscriptionID = big.NewInt(1 << 0) deleteActionSubscriptionsRequestFieldActionID = big.NewInt(1 << 1) @@ -193,6 +235,27 @@ func (s *SwapPlanRequest) SetPhases(phases []*PhaseInput) { s.require(swapPlanRequestFieldPhases) } +func (s *SwapPlanRequest) UnmarshalJSON(data []byte) error { + type unmarshaler SwapPlanRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *s = SwapPlanRequest(body) + return nil +} + +func (s *SwapPlanRequest) MarshalJSON() ([]byte, error) { + type embed SwapPlanRequest + var marshaler = struct { + embed + }{ + embed: embed(*s), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, s.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( cancelSubscriptionsRequestFieldSubscriptionID = big.NewInt(1 << 0) ) @@ -387,6 +450,27 @@ func (c *CreateSubscriptionRequest) SetPhases(phases []*Phase) { c.require(createSubscriptionRequestFieldPhases) } +func (c *CreateSubscriptionRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateSubscriptionRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateSubscriptionRequest(body) + return nil +} + +func (c *CreateSubscriptionRequest) MarshalJSON() ([]byte, error) { + type embed CreateSubscriptionRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( getSubscriptionsRequestFieldSubscriptionID = big.NewInt(1 << 0) getSubscriptionsRequestFieldInclude = big.NewInt(1 << 1) @@ -564,6 +648,27 @@ func (p *PauseSubscriptionRequest) SetPauseReason(pauseReason *string) { p.require(pauseSubscriptionRequestFieldPauseReason) } +func (p *PauseSubscriptionRequest) UnmarshalJSON(data []byte) error { + type unmarshaler PauseSubscriptionRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *p = PauseSubscriptionRequest(body) + return nil +} + +func (p *PauseSubscriptionRequest) MarshalJSON() ([]byte, error) { + type embed PauseSubscriptionRequest + var marshaler = struct { + embed + }{ + embed: embed(*p), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, p.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( resumeSubscriptionRequestFieldSubscriptionID = big.NewInt(1 << 0) resumeSubscriptionRequestFieldResumeEffectiveDate = big.NewInt(1 << 1) @@ -612,6 +717,27 @@ func (r *ResumeSubscriptionRequest) SetResumeChangeTiming(resumeChangeTiming *Ch r.require(resumeSubscriptionRequestFieldResumeChangeTiming) } +func (r *ResumeSubscriptionRequest) UnmarshalJSON(data []byte) error { + type unmarshaler ResumeSubscriptionRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *r = ResumeSubscriptionRequest(body) + return nil +} + +func (r *ResumeSubscriptionRequest) MarshalJSON() ([]byte, error) { + type embed ResumeSubscriptionRequest + var marshaler = struct { + embed + }{ + embed: embed(*r), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, r.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( searchSubscriptionsRequestFieldCursor = big.NewInt(1 << 0) searchSubscriptionsRequestFieldLimit = big.NewInt(1 << 1) @@ -679,6 +805,27 @@ func (s *SearchSubscriptionsRequest) SetInclude(include []string) { s.require(searchSubscriptionsRequestFieldInclude) } +func (s *SearchSubscriptionsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler SearchSubscriptionsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *s = SearchSubscriptionsRequest(body) + return nil +} + +func (s *SearchSubscriptionsRequest) MarshalJSON() ([]byte, error) { + type embed SearchSubscriptionsRequest + var marshaler = struct { + embed + }{ + embed: embed(*s), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, s.explicitFields) + return json.Marshal(explicitMarshaler) +} + // Defines output parameters in a response of the // [BulkSwapPlan](api-endpoint:Subscriptions-BulkSwapPlan) endpoint. var ( @@ -714,6 +861,9 @@ func (b *BulkSwapPlanResponse) GetAffectedSubscriptions() *int { } func (b *BulkSwapPlanResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -766,6 +916,9 @@ func (b *BulkSwapPlanResponse) MarshalJSON() ([]byte, error) { } func (b *BulkSwapPlanResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -822,6 +975,9 @@ func (c *CancelSubscriptionResponse) GetActions() []*SubscriptionAction { } func (c *CancelSubscriptionResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -881,6 +1037,9 @@ func (c *CancelSubscriptionResponse) MarshalJSON() ([]byte, error) { } func (c *CancelSubscriptionResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -937,6 +1096,9 @@ func (c *ChangeBillingAnchorDateResponse) GetActions() []*SubscriptionAction { } func (c *ChangeBillingAnchorDateResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -996,6 +1158,9 @@ func (c *ChangeBillingAnchorDateResponse) MarshalJSON() ([]byte, error) { } func (c *ChangeBillingAnchorDateResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -1068,6 +1233,9 @@ func (c *CreateSubscriptionResponse) GetSubscription() *Subscription { } func (c *CreateSubscriptionResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -1120,6 +1288,9 @@ func (c *CreateSubscriptionResponse) MarshalJSON() ([]byte, error) { } func (c *CreateSubscriptionResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -1166,6 +1337,9 @@ func (d *DeleteSubscriptionActionResponse) GetSubscription() *Subscription { } func (d *DeleteSubscriptionActionResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -1218,6 +1392,9 @@ func (d *DeleteSubscriptionActionResponse) MarshalJSON() ([]byte, error) { } func (d *DeleteSubscriptionActionResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -1264,6 +1441,9 @@ func (g *GetSubscriptionResponse) GetSubscription() *Subscription { } func (g *GetSubscriptionResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -1316,6 +1496,9 @@ func (g *GetSubscriptionResponse) MarshalJSON() ([]byte, error) { } func (g *GetSubscriptionResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -1376,6 +1559,9 @@ func (l *ListSubscriptionEventsResponse) GetCursor() *string { } func (l *ListSubscriptionEventsResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -1435,6 +1621,9 @@ func (l *ListSubscriptionEventsResponse) MarshalJSON() ([]byte, error) { } func (l *ListSubscriptionEventsResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -1491,6 +1680,9 @@ func (p *PauseSubscriptionResponse) GetActions() []*SubscriptionAction { } func (p *PauseSubscriptionResponse) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -1550,6 +1742,9 @@ func (p *PauseSubscriptionResponse) MarshalJSON() ([]byte, error) { } func (p *PauseSubscriptionResponse) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -1615,6 +1810,9 @@ func (p *Phase) GetPlanPhaseUID() *string { } func (p *Phase) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -1681,6 +1879,9 @@ func (p *Phase) MarshalJSON() ([]byte, error) { } func (p *Phase) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -1726,6 +1927,9 @@ func (p *PhaseInput) GetOrderTemplateID() *string { } func (p *PhaseInput) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -1778,6 +1982,9 @@ func (p *PhaseInput) MarshalJSON() ([]byte, error) { } func (p *PhaseInput) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -1834,6 +2041,9 @@ func (r *ResumeSubscriptionResponse) GetActions() []*SubscriptionAction { } func (r *ResumeSubscriptionResponse) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -1893,6 +2103,9 @@ func (r *ResumeSubscriptionResponse) MarshalJSON() ([]byte, error) { } func (r *ResumeSubscriptionResponse) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -1949,6 +2162,9 @@ func (s *SearchSubscriptionsFilter) GetSourceNames() []string { } func (s *SearchSubscriptionsFilter) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -2008,6 +2224,9 @@ func (s *SearchSubscriptionsFilter) MarshalJSON() ([]byte, error) { } func (s *SearchSubscriptionsFilter) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -2043,6 +2262,9 @@ func (s *SearchSubscriptionsQuery) GetFilter() *SearchSubscriptionsFilter { } func (s *SearchSubscriptionsQuery) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -2088,6 +2310,9 @@ func (s *SearchSubscriptionsQuery) MarshalJSON() ([]byte, error) { } func (s *SearchSubscriptionsQuery) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -2148,6 +2373,9 @@ func (s *SearchSubscriptionsResponse) GetCursor() *string { } func (s *SearchSubscriptionsResponse) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -2207,6 +2435,9 @@ func (s *SearchSubscriptionsResponse) MarshalJSON() ([]byte, error) { } func (s *SearchSubscriptionsResponse) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -2465,6 +2696,9 @@ func (s *Subscription) GetCompletedDate() *string { } func (s *Subscription) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -2643,6 +2877,9 @@ func (s *Subscription) MarshalJSON() ([]byte, error) { } func (s *Subscription) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -2729,6 +2966,9 @@ func (s *SubscriptionAction) GetNewPlanVariationID() *string { } func (s *SubscriptionAction) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -2809,6 +3049,9 @@ func (s *SubscriptionAction) MarshalJSON() ([]byte, error) { } func (s *SubscriptionAction) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -2940,6 +3183,9 @@ func (s *SubscriptionEvent) GetPlanVariationID() string { } func (s *SubscriptionEvent) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -3027,6 +3273,9 @@ func (s *SubscriptionEvent) MarshalJSON() ([]byte, error) { } func (s *SubscriptionEvent) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -3073,6 +3322,9 @@ func (s *SubscriptionEventInfo) GetCode() *SubscriptionEventInfoCode { } func (s *SubscriptionEventInfo) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -3125,6 +3377,9 @@ func (s *SubscriptionEventInfo) MarshalJSON() ([]byte, error) { } func (s *SubscriptionEventInfo) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -3235,6 +3490,9 @@ func (s *SubscriptionSource) GetName() *string { } func (s *SubscriptionSource) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -3280,6 +3538,9 @@ func (s *SubscriptionSource) MarshalJSON() ([]byte, error) { } func (s *SubscriptionSource) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -3371,6 +3632,9 @@ func (s *SwapPlanResponse) GetActions() []*SubscriptionAction { } func (s *SwapPlanResponse) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -3430,6 +3694,9 @@ func (s *SwapPlanResponse) MarshalJSON() ([]byte, error) { } func (s *SwapPlanResponse) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -3476,6 +3743,9 @@ func (u *UpdateSubscriptionResponse) GetSubscription() *Subscription { } func (u *UpdateSubscriptionResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -3528,6 +3798,9 @@ func (u *UpdateSubscriptionResponse) MarshalJSON() ([]byte, error) { } func (u *UpdateSubscriptionResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -3576,3 +3849,24 @@ func (u *UpdateSubscriptionRequest) SetSubscription(subscription *Subscription) u.Subscription = subscription u.require(updateSubscriptionRequestFieldSubscription) } + +func (u *UpdateSubscriptionRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdateSubscriptionRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdateSubscriptionRequest(body) + return nil +} + +func (u *UpdateSubscriptionRequest) MarshalJSON() ([]byte, error) { + type embed UpdateSubscriptionRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/subscriptions/subscriptions_test/subscriptions_test.go b/subscriptions/subscriptions_test/subscriptions_test.go new file mode 100644 index 0000000..3a2408d --- /dev/null +++ b/subscriptions/subscriptions_test/subscriptions_test.go @@ -0,0 +1,437 @@ +// Code generated by Fern. DO NOT EDIT. + +package subscriptions_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestSubscriptionsCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CreateSubscriptionRequest{ + IdempotencyKey: square.String( + "8193148c-9586-11e6-99f9-28cfe92138cf", + ), + LocationID: "S8GWD5R9QB376", + PlanVariationID: square.String( + "6JHXF3B2CW3YKHDV4XEM674H", + ), + CustomerID: "CHFGVKYY8RSV93M5KCYTG4PN0G", + StartDate: square.String( + "2023-06-20", + ), + CardID: square.String( + "ccof:qy5x8hHGYsgLrp4Q4GB", + ), + Timezone: square.String( + "America/Los_Angeles", + ), + Source: &square.SubscriptionSource{ + Name: square.String( + "My Application", + ), + }, + Phases: []*square.Phase{ + &square.Phase{ + Ordinal: square.Int64( + int64(0), + ), + OrderTemplateID: square.String( + "U2NaowWxzXwpsZU697x7ZHOAnCNZY", + ), + }, + }, + } + _, invocationErr := client.Subscriptions.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestSubscriptionsCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestSubscriptionsCreateWithWireMock", "POST", "/v2/subscriptions", nil, 1) +} + +func TestSubscriptionsBulkSwapPlanWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.BulkSwapPlanRequest{ + NewPlanVariationID: "FQ7CDXXWSLUJRPM3GFJSJGZ7", + OldPlanVariationID: "6JHXF3B2CW3YKHDV4XEM674H", + LocationID: "S8GWD5R9QB376", + } + _, invocationErr := client.Subscriptions.BulkSwapPlan( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestSubscriptionsBulkSwapPlanWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestSubscriptionsBulkSwapPlanWithWireMock", "POST", "/v2/subscriptions/bulk-swap-plan", nil, 1) +} + +func TestSubscriptionsSearchWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.SearchSubscriptionsRequest{ + Query: &square.SearchSubscriptionsQuery{ + Filter: &square.SearchSubscriptionsFilter{ + CustomerIDs: []string{ + "CHFGVKYY8RSV93M5KCYTG4PN0G", + }, + LocationIDs: []string{ + "S8GWD5R9QB376", + }, + SourceNames: []string{ + "My App", + }, + }, + }, + } + _, invocationErr := client.Subscriptions.Search( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestSubscriptionsSearchWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestSubscriptionsSearchWithWireMock", "POST", "/v2/subscriptions/search", nil, 1) +} + +func TestSubscriptionsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.GetSubscriptionsRequest{ + SubscriptionID: "subscription_id", + Include: square.String( + "include", + ), + } + _, invocationErr := client.Subscriptions.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestSubscriptionsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestSubscriptionsGetWithWireMock", "GET", "/v2/subscriptions/subscription_id", map[string]string{"include": "include"}, 1) +} + +func TestSubscriptionsUpdateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.UpdateSubscriptionRequest{ + SubscriptionID: "subscription_id", + Subscription: &square.Subscription{ + CardID: square.String( + "{NEW CARD ID}", + ), + }, + } + _, invocationErr := client.Subscriptions.Update( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestSubscriptionsUpdateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestSubscriptionsUpdateWithWireMock", "PUT", "/v2/subscriptions/subscription_id", nil, 1) +} + +func TestSubscriptionsDeleteActionWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.DeleteActionSubscriptionsRequest{ + SubscriptionID: "subscription_id", + ActionID: "action_id", + } + _, invocationErr := client.Subscriptions.DeleteAction( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestSubscriptionsDeleteActionWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestSubscriptionsDeleteActionWithWireMock", "DELETE", "/v2/subscriptions/subscription_id/actions/action_id", nil, 1) +} + +func TestSubscriptionsChangeBillingAnchorDateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.ChangeBillingAnchorDateRequest{ + SubscriptionID: "subscription_id", + MonthlyBillingAnchorDate: square.Int( + 1, + ), + } + _, invocationErr := client.Subscriptions.ChangeBillingAnchorDate( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestSubscriptionsChangeBillingAnchorDateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestSubscriptionsChangeBillingAnchorDateWithWireMock", "POST", "/v2/subscriptions/subscription_id/billing-anchor", nil, 1) +} + +func TestSubscriptionsCancelWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CancelSubscriptionsRequest{ + SubscriptionID: "subscription_id", + } + _, invocationErr := client.Subscriptions.Cancel( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestSubscriptionsCancelWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestSubscriptionsCancelWithWireMock", "POST", "/v2/subscriptions/subscription_id/cancel", nil, 1) +} + +func TestSubscriptionsListEventsWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.ListEventsSubscriptionsRequest{ + SubscriptionID: "subscription_id", + Cursor: square.String( + "cursor", + ), + Limit: square.Int( + 1, + ), + } + _, invocationErr := client.Subscriptions.ListEvents( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestSubscriptionsListEventsWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestSubscriptionsListEventsWithWireMock", "GET", "/v2/subscriptions/subscription_id/events", map[string]string{"cursor": "cursor", "limit": "1"}, 1) +} + +func TestSubscriptionsPauseWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.PauseSubscriptionRequest{ + SubscriptionID: "subscription_id", + } + _, invocationErr := client.Subscriptions.Pause( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestSubscriptionsPauseWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestSubscriptionsPauseWithWireMock", "POST", "/v2/subscriptions/subscription_id/pause", nil, 1) +} + +func TestSubscriptionsResumeWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.ResumeSubscriptionRequest{ + SubscriptionID: "subscription_id", + } + _, invocationErr := client.Subscriptions.Resume( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestSubscriptionsResumeWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestSubscriptionsResumeWithWireMock", "POST", "/v2/subscriptions/subscription_id/resume", nil, 1) +} + +func TestSubscriptionsSwapPlanWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.SwapPlanRequest{ + SubscriptionID: "subscription_id", + NewPlanVariationID: square.String( + "FQ7CDXXWSLUJRPM3GFJSJGZ7", + ), + Phases: []*square.PhaseInput{ + &square.PhaseInput{ + Ordinal: int64(0), + OrderTemplateID: square.String( + "uhhnjH9osVv3shUADwaC0b3hNxQZY", + ), + }, + }, + } + _, invocationErr := client.Subscriptions.SwapPlan( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestSubscriptionsSwapPlanWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestSubscriptionsSwapPlanWithWireMock", "POST", "/v2/subscriptions/subscription_id/swap-plan", nil, 1) +} diff --git a/subscriptions_test.go b/subscriptions_test.go new file mode 100644 index 0000000..3d0b948 --- /dev/null +++ b/subscriptions_test.go @@ -0,0 +1,9296 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersBulkSwapPlanRequest(t *testing.T) { + t.Run("SetNewPlanVariationID", func(t *testing.T) { + obj := &BulkSwapPlanRequest{} + var fernTestValueNewPlanVariationID string + obj.SetNewPlanVariationID(fernTestValueNewPlanVariationID) + assert.Equal(t, fernTestValueNewPlanVariationID, obj.NewPlanVariationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOldPlanVariationID", func(t *testing.T) { + obj := &BulkSwapPlanRequest{} + var fernTestValueOldPlanVariationID string + obj.SetOldPlanVariationID(fernTestValueOldPlanVariationID) + assert.Equal(t, fernTestValueOldPlanVariationID, obj.OldPlanVariationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &BulkSwapPlanRequest{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitBulkSwapPlanRequest(t *testing.T) { + t.Run("SetNewPlanVariationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkSwapPlanRequest{} + var fernTestValueNewPlanVariationID string + + // Act + obj.SetNewPlanVariationID(fernTestValueNewPlanVariationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOldPlanVariationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkSwapPlanRequest{} + var fernTestValueOldPlanVariationID string + + // Act + obj.SetOldPlanVariationID(fernTestValueOldPlanVariationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkSwapPlanRequest{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersChangeBillingAnchorDateRequest(t *testing.T) { + t.Run("SetSubscriptionID", func(t *testing.T) { + obj := &ChangeBillingAnchorDateRequest{} + var fernTestValueSubscriptionID string + obj.SetSubscriptionID(fernTestValueSubscriptionID) + assert.Equal(t, fernTestValueSubscriptionID, obj.SubscriptionID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMonthlyBillingAnchorDate", func(t *testing.T) { + obj := &ChangeBillingAnchorDateRequest{} + var fernTestValueMonthlyBillingAnchorDate *int + obj.SetMonthlyBillingAnchorDate(fernTestValueMonthlyBillingAnchorDate) + assert.Equal(t, fernTestValueMonthlyBillingAnchorDate, obj.MonthlyBillingAnchorDate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEffectiveDate", func(t *testing.T) { + obj := &ChangeBillingAnchorDateRequest{} + var fernTestValueEffectiveDate *string + obj.SetEffectiveDate(fernTestValueEffectiveDate) + assert.Equal(t, fernTestValueEffectiveDate, obj.EffectiveDate) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitChangeBillingAnchorDateRequest(t *testing.T) { + t.Run("SetSubscriptionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ChangeBillingAnchorDateRequest{} + var fernTestValueSubscriptionID string + + // Act + obj.SetSubscriptionID(fernTestValueSubscriptionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMonthlyBillingAnchorDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ChangeBillingAnchorDateRequest{} + var fernTestValueMonthlyBillingAnchorDate *int + + // Act + obj.SetMonthlyBillingAnchorDate(fernTestValueMonthlyBillingAnchorDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEffectiveDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ChangeBillingAnchorDateRequest{} + var fernTestValueEffectiveDate *string + + // Act + obj.SetEffectiveDate(fernTestValueEffectiveDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteActionSubscriptionsRequest(t *testing.T) { + t.Run("SetSubscriptionID", func(t *testing.T) { + obj := &DeleteActionSubscriptionsRequest{} + var fernTestValueSubscriptionID string + obj.SetSubscriptionID(fernTestValueSubscriptionID) + assert.Equal(t, fernTestValueSubscriptionID, obj.SubscriptionID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetActionID", func(t *testing.T) { + obj := &DeleteActionSubscriptionsRequest{} + var fernTestValueActionID string + obj.SetActionID(fernTestValueActionID) + assert.Equal(t, fernTestValueActionID, obj.ActionID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDeleteActionSubscriptionsRequest(t *testing.T) { + t.Run("SetSubscriptionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteActionSubscriptionsRequest{} + var fernTestValueSubscriptionID string + + // Act + obj.SetSubscriptionID(fernTestValueSubscriptionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetActionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteActionSubscriptionsRequest{} + var fernTestValueActionID string + + // Act + obj.SetActionID(fernTestValueActionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSwapPlanRequest(t *testing.T) { + t.Run("SetSubscriptionID", func(t *testing.T) { + obj := &SwapPlanRequest{} + var fernTestValueSubscriptionID string + obj.SetSubscriptionID(fernTestValueSubscriptionID) + assert.Equal(t, fernTestValueSubscriptionID, obj.SubscriptionID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNewPlanVariationID", func(t *testing.T) { + obj := &SwapPlanRequest{} + var fernTestValueNewPlanVariationID *string + obj.SetNewPlanVariationID(fernTestValueNewPlanVariationID) + assert.Equal(t, fernTestValueNewPlanVariationID, obj.NewPlanVariationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPhases", func(t *testing.T) { + obj := &SwapPlanRequest{} + var fernTestValuePhases []*PhaseInput + obj.SetPhases(fernTestValuePhases) + assert.Equal(t, fernTestValuePhases, obj.Phases) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitSwapPlanRequest(t *testing.T) { + t.Run("SetSubscriptionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SwapPlanRequest{} + var fernTestValueSubscriptionID string + + // Act + obj.SetSubscriptionID(fernTestValueSubscriptionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNewPlanVariationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SwapPlanRequest{} + var fernTestValueNewPlanVariationID *string + + // Act + obj.SetNewPlanVariationID(fernTestValueNewPlanVariationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPhases_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SwapPlanRequest{} + var fernTestValuePhases []*PhaseInput + + // Act + obj.SetPhases(fernTestValuePhases) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCancelSubscriptionsRequest(t *testing.T) { + t.Run("SetSubscriptionID", func(t *testing.T) { + obj := &CancelSubscriptionsRequest{} + var fernTestValueSubscriptionID string + obj.SetSubscriptionID(fernTestValueSubscriptionID) + assert.Equal(t, fernTestValueSubscriptionID, obj.SubscriptionID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCancelSubscriptionsRequest(t *testing.T) { + t.Run("SetSubscriptionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelSubscriptionsRequest{} + var fernTestValueSubscriptionID string + + // Act + obj.SetSubscriptionID(fernTestValueSubscriptionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateSubscriptionRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateSubscriptionRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &CreateSubscriptionRequest{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPlanVariationID", func(t *testing.T) { + obj := &CreateSubscriptionRequest{} + var fernTestValuePlanVariationID *string + obj.SetPlanVariationID(fernTestValuePlanVariationID) + assert.Equal(t, fernTestValuePlanVariationID, obj.PlanVariationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerID", func(t *testing.T) { + obj := &CreateSubscriptionRequest{} + var fernTestValueCustomerID string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStartDate", func(t *testing.T) { + obj := &CreateSubscriptionRequest{} + var fernTestValueStartDate *string + obj.SetStartDate(fernTestValueStartDate) + assert.Equal(t, fernTestValueStartDate, obj.StartDate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCanceledDate", func(t *testing.T) { + obj := &CreateSubscriptionRequest{} + var fernTestValueCanceledDate *string + obj.SetCanceledDate(fernTestValueCanceledDate) + assert.Equal(t, fernTestValueCanceledDate, obj.CanceledDate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTaxPercentage", func(t *testing.T) { + obj := &CreateSubscriptionRequest{} + var fernTestValueTaxPercentage *string + obj.SetTaxPercentage(fernTestValueTaxPercentage) + assert.Equal(t, fernTestValueTaxPercentage, obj.TaxPercentage) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPriceOverrideMoney", func(t *testing.T) { + obj := &CreateSubscriptionRequest{} + var fernTestValuePriceOverrideMoney *Money + obj.SetPriceOverrideMoney(fernTestValuePriceOverrideMoney) + assert.Equal(t, fernTestValuePriceOverrideMoney, obj.PriceOverrideMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCardID", func(t *testing.T) { + obj := &CreateSubscriptionRequest{} + var fernTestValueCardID *string + obj.SetCardID(fernTestValueCardID) + assert.Equal(t, fernTestValueCardID, obj.CardID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTimezone", func(t *testing.T) { + obj := &CreateSubscriptionRequest{} + var fernTestValueTimezone *string + obj.SetTimezone(fernTestValueTimezone) + assert.Equal(t, fernTestValueTimezone, obj.Timezone) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSource", func(t *testing.T) { + obj := &CreateSubscriptionRequest{} + var fernTestValueSource *SubscriptionSource + obj.SetSource(fernTestValueSource) + assert.Equal(t, fernTestValueSource, obj.Source) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMonthlyBillingAnchorDate", func(t *testing.T) { + obj := &CreateSubscriptionRequest{} + var fernTestValueMonthlyBillingAnchorDate *int + obj.SetMonthlyBillingAnchorDate(fernTestValueMonthlyBillingAnchorDate) + assert.Equal(t, fernTestValueMonthlyBillingAnchorDate, obj.MonthlyBillingAnchorDate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPhases", func(t *testing.T) { + obj := &CreateSubscriptionRequest{} + var fernTestValuePhases []*Phase + obj.SetPhases(fernTestValuePhases) + assert.Equal(t, fernTestValuePhases, obj.Phases) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateSubscriptionRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateSubscriptionRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateSubscriptionRequest{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPlanVariationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateSubscriptionRequest{} + var fernTestValuePlanVariationID *string + + // Act + obj.SetPlanVariationID(fernTestValuePlanVariationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateSubscriptionRequest{} + var fernTestValueCustomerID string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStartDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateSubscriptionRequest{} + var fernTestValueStartDate *string + + // Act + obj.SetStartDate(fernTestValueStartDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCanceledDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateSubscriptionRequest{} + var fernTestValueCanceledDate *string + + // Act + obj.SetCanceledDate(fernTestValueCanceledDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTaxPercentage_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateSubscriptionRequest{} + var fernTestValueTaxPercentage *string + + // Act + obj.SetTaxPercentage(fernTestValueTaxPercentage) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPriceOverrideMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateSubscriptionRequest{} + var fernTestValuePriceOverrideMoney *Money + + // Act + obj.SetPriceOverrideMoney(fernTestValuePriceOverrideMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCardID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateSubscriptionRequest{} + var fernTestValueCardID *string + + // Act + obj.SetCardID(fernTestValueCardID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTimezone_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateSubscriptionRequest{} + var fernTestValueTimezone *string + + // Act + obj.SetTimezone(fernTestValueTimezone) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSource_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateSubscriptionRequest{} + var fernTestValueSource *SubscriptionSource + + // Act + obj.SetSource(fernTestValueSource) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMonthlyBillingAnchorDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateSubscriptionRequest{} + var fernTestValueMonthlyBillingAnchorDate *int + + // Act + obj.SetMonthlyBillingAnchorDate(fernTestValueMonthlyBillingAnchorDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPhases_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateSubscriptionRequest{} + var fernTestValuePhases []*Phase + + // Act + obj.SetPhases(fernTestValuePhases) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetSubscriptionsRequest(t *testing.T) { + t.Run("SetSubscriptionID", func(t *testing.T) { + obj := &GetSubscriptionsRequest{} + var fernTestValueSubscriptionID string + obj.SetSubscriptionID(fernTestValueSubscriptionID) + assert.Equal(t, fernTestValueSubscriptionID, obj.SubscriptionID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetInclude", func(t *testing.T) { + obj := &GetSubscriptionsRequest{} + var fernTestValueInclude *string + obj.SetInclude(fernTestValueInclude) + assert.Equal(t, fernTestValueInclude, obj.Include) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetSubscriptionsRequest(t *testing.T) { + t.Run("SetSubscriptionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetSubscriptionsRequest{} + var fernTestValueSubscriptionID string + + // Act + obj.SetSubscriptionID(fernTestValueSubscriptionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetInclude_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetSubscriptionsRequest{} + var fernTestValueInclude *string + + // Act + obj.SetInclude(fernTestValueInclude) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListEventsSubscriptionsRequest(t *testing.T) { + t.Run("SetSubscriptionID", func(t *testing.T) { + obj := &ListEventsSubscriptionsRequest{} + var fernTestValueSubscriptionID string + obj.SetSubscriptionID(fernTestValueSubscriptionID) + assert.Equal(t, fernTestValueSubscriptionID, obj.SubscriptionID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListEventsSubscriptionsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListEventsSubscriptionsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListEventsSubscriptionsRequest(t *testing.T) { + t.Run("SetSubscriptionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEventsSubscriptionsRequest{} + var fernTestValueSubscriptionID string + + // Act + obj.SetSubscriptionID(fernTestValueSubscriptionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEventsSubscriptionsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEventsSubscriptionsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPauseSubscriptionRequest(t *testing.T) { + t.Run("SetSubscriptionID", func(t *testing.T) { + obj := &PauseSubscriptionRequest{} + var fernTestValueSubscriptionID string + obj.SetSubscriptionID(fernTestValueSubscriptionID) + assert.Equal(t, fernTestValueSubscriptionID, obj.SubscriptionID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPauseEffectiveDate", func(t *testing.T) { + obj := &PauseSubscriptionRequest{} + var fernTestValuePauseEffectiveDate *string + obj.SetPauseEffectiveDate(fernTestValuePauseEffectiveDate) + assert.Equal(t, fernTestValuePauseEffectiveDate, obj.PauseEffectiveDate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPauseCycleDuration", func(t *testing.T) { + obj := &PauseSubscriptionRequest{} + var fernTestValuePauseCycleDuration *int64 + obj.SetPauseCycleDuration(fernTestValuePauseCycleDuration) + assert.Equal(t, fernTestValuePauseCycleDuration, obj.PauseCycleDuration) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetResumeEffectiveDate", func(t *testing.T) { + obj := &PauseSubscriptionRequest{} + var fernTestValueResumeEffectiveDate *string + obj.SetResumeEffectiveDate(fernTestValueResumeEffectiveDate) + assert.Equal(t, fernTestValueResumeEffectiveDate, obj.ResumeEffectiveDate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetResumeChangeTiming", func(t *testing.T) { + obj := &PauseSubscriptionRequest{} + var fernTestValueResumeChangeTiming *ChangeTiming + obj.SetResumeChangeTiming(fernTestValueResumeChangeTiming) + assert.Equal(t, fernTestValueResumeChangeTiming, obj.ResumeChangeTiming) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPauseReason", func(t *testing.T) { + obj := &PauseSubscriptionRequest{} + var fernTestValuePauseReason *string + obj.SetPauseReason(fernTestValuePauseReason) + assert.Equal(t, fernTestValuePauseReason, obj.PauseReason) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitPauseSubscriptionRequest(t *testing.T) { + t.Run("SetSubscriptionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PauseSubscriptionRequest{} + var fernTestValueSubscriptionID string + + // Act + obj.SetSubscriptionID(fernTestValueSubscriptionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPauseEffectiveDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PauseSubscriptionRequest{} + var fernTestValuePauseEffectiveDate *string + + // Act + obj.SetPauseEffectiveDate(fernTestValuePauseEffectiveDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPauseCycleDuration_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PauseSubscriptionRequest{} + var fernTestValuePauseCycleDuration *int64 + + // Act + obj.SetPauseCycleDuration(fernTestValuePauseCycleDuration) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetResumeEffectiveDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PauseSubscriptionRequest{} + var fernTestValueResumeEffectiveDate *string + + // Act + obj.SetResumeEffectiveDate(fernTestValueResumeEffectiveDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetResumeChangeTiming_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PauseSubscriptionRequest{} + var fernTestValueResumeChangeTiming *ChangeTiming + + // Act + obj.SetResumeChangeTiming(fernTestValueResumeChangeTiming) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPauseReason_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PauseSubscriptionRequest{} + var fernTestValuePauseReason *string + + // Act + obj.SetPauseReason(fernTestValuePauseReason) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersResumeSubscriptionRequest(t *testing.T) { + t.Run("SetSubscriptionID", func(t *testing.T) { + obj := &ResumeSubscriptionRequest{} + var fernTestValueSubscriptionID string + obj.SetSubscriptionID(fernTestValueSubscriptionID) + assert.Equal(t, fernTestValueSubscriptionID, obj.SubscriptionID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetResumeEffectiveDate", func(t *testing.T) { + obj := &ResumeSubscriptionRequest{} + var fernTestValueResumeEffectiveDate *string + obj.SetResumeEffectiveDate(fernTestValueResumeEffectiveDate) + assert.Equal(t, fernTestValueResumeEffectiveDate, obj.ResumeEffectiveDate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetResumeChangeTiming", func(t *testing.T) { + obj := &ResumeSubscriptionRequest{} + var fernTestValueResumeChangeTiming *ChangeTiming + obj.SetResumeChangeTiming(fernTestValueResumeChangeTiming) + assert.Equal(t, fernTestValueResumeChangeTiming, obj.ResumeChangeTiming) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitResumeSubscriptionRequest(t *testing.T) { + t.Run("SetSubscriptionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ResumeSubscriptionRequest{} + var fernTestValueSubscriptionID string + + // Act + obj.SetSubscriptionID(fernTestValueSubscriptionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetResumeEffectiveDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ResumeSubscriptionRequest{} + var fernTestValueResumeEffectiveDate *string + + // Act + obj.SetResumeEffectiveDate(fernTestValueResumeEffectiveDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetResumeChangeTiming_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ResumeSubscriptionRequest{} + var fernTestValueResumeChangeTiming *ChangeTiming + + // Act + obj.SetResumeChangeTiming(fernTestValueResumeChangeTiming) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchSubscriptionsRequest(t *testing.T) { + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchSubscriptionsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &SearchSubscriptionsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuery", func(t *testing.T) { + obj := &SearchSubscriptionsRequest{} + var fernTestValueQuery *SearchSubscriptionsQuery + obj.SetQuery(fernTestValueQuery) + assert.Equal(t, fernTestValueQuery, obj.Query) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetInclude", func(t *testing.T) { + obj := &SearchSubscriptionsRequest{} + var fernTestValueInclude []string + obj.SetInclude(fernTestValueInclude) + assert.Equal(t, fernTestValueInclude, obj.Include) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitSearchSubscriptionsRequest(t *testing.T) { + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchSubscriptionsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchSubscriptionsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuery_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchSubscriptionsRequest{} + var fernTestValueQuery *SearchSubscriptionsQuery + + // Act + obj.SetQuery(fernTestValueQuery) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetInclude_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchSubscriptionsRequest{} + var fernTestValueInclude []string + + // Act + obj.SetInclude(fernTestValueInclude) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkSwapPlanResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &BulkSwapPlanResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAffectedSubscriptions", func(t *testing.T) { + obj := &BulkSwapPlanResponse{} + var fernTestValueAffectedSubscriptions *int + obj.SetAffectedSubscriptions(fernTestValueAffectedSubscriptions) + assert.Equal(t, fernTestValueAffectedSubscriptions, obj.AffectedSubscriptions) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkSwapPlanResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkSwapPlanResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkSwapPlanResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkSwapPlanResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetAffectedSubscriptions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkSwapPlanResponse{} + var expected *int + obj.AffectedSubscriptions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAffectedSubscriptions(), "getter should return the property value") + }) + + t.Run("GetAffectedSubscriptions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkSwapPlanResponse{} + obj.AffectedSubscriptions = nil + + // Act & Assert + assert.Nil(t, obj.GetAffectedSubscriptions(), "getter should return nil when property is nil") + }) + + t.Run("GetAffectedSubscriptions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkSwapPlanResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAffectedSubscriptions() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkSwapPlanResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkSwapPlanResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAffectedSubscriptions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkSwapPlanResponse{} + var fernTestValueAffectedSubscriptions *int + + // Act + obj.SetAffectedSubscriptions(fernTestValueAffectedSubscriptions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCancelSubscriptionResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CancelSubscriptionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSubscription", func(t *testing.T) { + obj := &CancelSubscriptionResponse{} + var fernTestValueSubscription *Subscription + obj.SetSubscription(fernTestValueSubscription) + assert.Equal(t, fernTestValueSubscription, obj.Subscription) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetActions", func(t *testing.T) { + obj := &CancelSubscriptionResponse{} + var fernTestValueActions []*SubscriptionAction + obj.SetActions(fernTestValueActions) + assert.Equal(t, fernTestValueActions, obj.Actions) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCancelSubscriptionResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelSubscriptionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelSubscriptionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelSubscriptionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetSubscription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelSubscriptionResponse{} + var expected *Subscription + obj.Subscription = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscription(), "getter should return the property value") + }) + + t.Run("GetSubscription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelSubscriptionResponse{} + obj.Subscription = nil + + // Act & Assert + assert.Nil(t, obj.GetSubscription(), "getter should return nil when property is nil") + }) + + t.Run("GetSubscription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelSubscriptionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscription() // Should return zero value + }) + + t.Run("GetActions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelSubscriptionResponse{} + var expected []*SubscriptionAction + obj.Actions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetActions(), "getter should return the property value") + }) + + t.Run("GetActions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelSubscriptionResponse{} + obj.Actions = nil + + // Act & Assert + assert.Nil(t, obj.GetActions(), "getter should return nil when property is nil") + }) + + t.Run("GetActions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelSubscriptionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetActions() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCancelSubscriptionResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelSubscriptionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSubscription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelSubscriptionResponse{} + var fernTestValueSubscription *Subscription + + // Act + obj.SetSubscription(fernTestValueSubscription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetActions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelSubscriptionResponse{} + var fernTestValueActions []*SubscriptionAction + + // Act + obj.SetActions(fernTestValueActions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersChangeBillingAnchorDateResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &ChangeBillingAnchorDateResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSubscription", func(t *testing.T) { + obj := &ChangeBillingAnchorDateResponse{} + var fernTestValueSubscription *Subscription + obj.SetSubscription(fernTestValueSubscription) + assert.Equal(t, fernTestValueSubscription, obj.Subscription) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetActions", func(t *testing.T) { + obj := &ChangeBillingAnchorDateResponse{} + var fernTestValueActions []*SubscriptionAction + obj.SetActions(fernTestValueActions) + assert.Equal(t, fernTestValueActions, obj.Actions) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersChangeBillingAnchorDateResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ChangeBillingAnchorDateResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ChangeBillingAnchorDateResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ChangeBillingAnchorDateResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetSubscription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ChangeBillingAnchorDateResponse{} + var expected *Subscription + obj.Subscription = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscription(), "getter should return the property value") + }) + + t.Run("GetSubscription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ChangeBillingAnchorDateResponse{} + obj.Subscription = nil + + // Act & Assert + assert.Nil(t, obj.GetSubscription(), "getter should return nil when property is nil") + }) + + t.Run("GetSubscription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ChangeBillingAnchorDateResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscription() // Should return zero value + }) + + t.Run("GetActions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ChangeBillingAnchorDateResponse{} + var expected []*SubscriptionAction + obj.Actions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetActions(), "getter should return the property value") + }) + + t.Run("GetActions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ChangeBillingAnchorDateResponse{} + obj.Actions = nil + + // Act & Assert + assert.Nil(t, obj.GetActions(), "getter should return nil when property is nil") + }) + + t.Run("GetActions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ChangeBillingAnchorDateResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetActions() // Should return zero value + }) + +} + +func TestSettersMarkExplicitChangeBillingAnchorDateResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ChangeBillingAnchorDateResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSubscription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ChangeBillingAnchorDateResponse{} + var fernTestValueSubscription *Subscription + + // Act + obj.SetSubscription(fernTestValueSubscription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetActions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ChangeBillingAnchorDateResponse{} + var fernTestValueActions []*SubscriptionAction + + // Act + obj.SetActions(fernTestValueActions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateSubscriptionResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateSubscriptionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSubscription", func(t *testing.T) { + obj := &CreateSubscriptionResponse{} + var fernTestValueSubscription *Subscription + obj.SetSubscription(fernTestValueSubscription) + assert.Equal(t, fernTestValueSubscription, obj.Subscription) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateSubscriptionResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateSubscriptionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateSubscriptionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateSubscriptionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetSubscription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateSubscriptionResponse{} + var expected *Subscription + obj.Subscription = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscription(), "getter should return the property value") + }) + + t.Run("GetSubscription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateSubscriptionResponse{} + obj.Subscription = nil + + // Act & Assert + assert.Nil(t, obj.GetSubscription(), "getter should return nil when property is nil") + }) + + t.Run("GetSubscription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateSubscriptionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscription() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateSubscriptionResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateSubscriptionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSubscription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateSubscriptionResponse{} + var fernTestValueSubscription *Subscription + + // Act + obj.SetSubscription(fernTestValueSubscription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteSubscriptionActionResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DeleteSubscriptionActionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSubscription", func(t *testing.T) { + obj := &DeleteSubscriptionActionResponse{} + var fernTestValueSubscription *Subscription + obj.SetSubscription(fernTestValueSubscription) + assert.Equal(t, fernTestValueSubscription, obj.Subscription) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeleteSubscriptionActionResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteSubscriptionActionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteSubscriptionActionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteSubscriptionActionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetSubscription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteSubscriptionActionResponse{} + var expected *Subscription + obj.Subscription = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscription(), "getter should return the property value") + }) + + t.Run("GetSubscription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteSubscriptionActionResponse{} + obj.Subscription = nil + + // Act & Assert + assert.Nil(t, obj.GetSubscription(), "getter should return nil when property is nil") + }) + + t.Run("GetSubscription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteSubscriptionActionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscription() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeleteSubscriptionActionResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteSubscriptionActionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSubscription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteSubscriptionActionResponse{} + var fernTestValueSubscription *Subscription + + // Act + obj.SetSubscription(fernTestValueSubscription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetSubscriptionResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetSubscriptionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSubscription", func(t *testing.T) { + obj := &GetSubscriptionResponse{} + var fernTestValueSubscription *Subscription + obj.SetSubscription(fernTestValueSubscription) + assert.Equal(t, fernTestValueSubscription, obj.Subscription) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetSubscriptionResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetSubscriptionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetSubscriptionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetSubscriptionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetSubscription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetSubscriptionResponse{} + var expected *Subscription + obj.Subscription = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscription(), "getter should return the property value") + }) + + t.Run("GetSubscription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetSubscriptionResponse{} + obj.Subscription = nil + + // Act & Assert + assert.Nil(t, obj.GetSubscription(), "getter should return nil when property is nil") + }) + + t.Run("GetSubscription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetSubscriptionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscription() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetSubscriptionResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetSubscriptionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSubscription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetSubscriptionResponse{} + var fernTestValueSubscription *Subscription + + // Act + obj.SetSubscription(fernTestValueSubscription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListSubscriptionEventsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &ListSubscriptionEventsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSubscriptionEvents", func(t *testing.T) { + obj := &ListSubscriptionEventsResponse{} + var fernTestValueSubscriptionEvents []*SubscriptionEvent + obj.SetSubscriptionEvents(fernTestValueSubscriptionEvents) + assert.Equal(t, fernTestValueSubscriptionEvents, obj.SubscriptionEvents) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListSubscriptionEventsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListSubscriptionEventsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListSubscriptionEventsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListSubscriptionEventsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListSubscriptionEventsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetSubscriptionEvents", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListSubscriptionEventsResponse{} + var expected []*SubscriptionEvent + obj.SubscriptionEvents = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscriptionEvents(), "getter should return the property value") + }) + + t.Run("GetSubscriptionEvents_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListSubscriptionEventsResponse{} + obj.SubscriptionEvents = nil + + // Act & Assert + assert.Nil(t, obj.GetSubscriptionEvents(), "getter should return nil when property is nil") + }) + + t.Run("GetSubscriptionEvents_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListSubscriptionEventsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscriptionEvents() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListSubscriptionEventsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListSubscriptionEventsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListSubscriptionEventsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListSubscriptionEventsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListSubscriptionEventsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSubscriptionEvents_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListSubscriptionEventsResponse{} + var fernTestValueSubscriptionEvents []*SubscriptionEvent + + // Act + obj.SetSubscriptionEvents(fernTestValueSubscriptionEvents) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListSubscriptionEventsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPauseSubscriptionResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &PauseSubscriptionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSubscription", func(t *testing.T) { + obj := &PauseSubscriptionResponse{} + var fernTestValueSubscription *Subscription + obj.SetSubscription(fernTestValueSubscription) + assert.Equal(t, fernTestValueSubscription, obj.Subscription) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetActions", func(t *testing.T) { + obj := &PauseSubscriptionResponse{} + var fernTestValueActions []*SubscriptionAction + obj.SetActions(fernTestValueActions) + assert.Equal(t, fernTestValueActions, obj.Actions) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPauseSubscriptionResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PauseSubscriptionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PauseSubscriptionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PauseSubscriptionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetSubscription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PauseSubscriptionResponse{} + var expected *Subscription + obj.Subscription = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscription(), "getter should return the property value") + }) + + t.Run("GetSubscription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PauseSubscriptionResponse{} + obj.Subscription = nil + + // Act & Assert + assert.Nil(t, obj.GetSubscription(), "getter should return nil when property is nil") + }) + + t.Run("GetSubscription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PauseSubscriptionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscription() // Should return zero value + }) + + t.Run("GetActions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PauseSubscriptionResponse{} + var expected []*SubscriptionAction + obj.Actions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetActions(), "getter should return the property value") + }) + + t.Run("GetActions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PauseSubscriptionResponse{} + obj.Actions = nil + + // Act & Assert + assert.Nil(t, obj.GetActions(), "getter should return nil when property is nil") + }) + + t.Run("GetActions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PauseSubscriptionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetActions() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPauseSubscriptionResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PauseSubscriptionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSubscription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PauseSubscriptionResponse{} + var fernTestValueSubscription *Subscription + + // Act + obj.SetSubscription(fernTestValueSubscription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetActions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PauseSubscriptionResponse{} + var fernTestValueActions []*SubscriptionAction + + // Act + obj.SetActions(fernTestValueActions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPhase(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &Phase{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrdinal", func(t *testing.T) { + obj := &Phase{} + var fernTestValueOrdinal *int64 + obj.SetOrdinal(fernTestValueOrdinal) + assert.Equal(t, fernTestValueOrdinal, obj.Ordinal) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrderTemplateID", func(t *testing.T) { + obj := &Phase{} + var fernTestValueOrderTemplateID *string + obj.SetOrderTemplateID(fernTestValueOrderTemplateID) + assert.Equal(t, fernTestValueOrderTemplateID, obj.OrderTemplateID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPlanPhaseUID", func(t *testing.T) { + obj := &Phase{} + var fernTestValuePlanPhaseUID *string + obj.SetPlanPhaseUID(fernTestValuePlanPhaseUID) + assert.Equal(t, fernTestValuePlanPhaseUID, obj.PlanPhaseUID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPhase(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Phase{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Phase{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Phase + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetOrdinal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Phase{} + var expected *int64 + obj.Ordinal = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrdinal(), "getter should return the property value") + }) + + t.Run("GetOrdinal_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Phase{} + obj.Ordinal = nil + + // Act & Assert + assert.Nil(t, obj.GetOrdinal(), "getter should return nil when property is nil") + }) + + t.Run("GetOrdinal_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Phase + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrdinal() // Should return zero value + }) + + t.Run("GetOrderTemplateID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Phase{} + var expected *string + obj.OrderTemplateID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderTemplateID(), "getter should return the property value") + }) + + t.Run("GetOrderTemplateID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Phase{} + obj.OrderTemplateID = nil + + // Act & Assert + assert.Nil(t, obj.GetOrderTemplateID(), "getter should return nil when property is nil") + }) + + t.Run("GetOrderTemplateID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Phase + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderTemplateID() // Should return zero value + }) + + t.Run("GetPlanPhaseUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Phase{} + var expected *string + obj.PlanPhaseUID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPlanPhaseUID(), "getter should return the property value") + }) + + t.Run("GetPlanPhaseUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Phase{} + obj.PlanPhaseUID = nil + + // Act & Assert + assert.Nil(t, obj.GetPlanPhaseUID(), "getter should return nil when property is nil") + }) + + t.Run("GetPlanPhaseUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Phase + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPlanPhaseUID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPhase(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Phase{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrdinal_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Phase{} + var fernTestValueOrdinal *int64 + + // Act + obj.SetOrdinal(fernTestValueOrdinal) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrderTemplateID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Phase{} + var fernTestValueOrderTemplateID *string + + // Act + obj.SetOrderTemplateID(fernTestValueOrderTemplateID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPlanPhaseUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Phase{} + var fernTestValuePlanPhaseUID *string + + // Act + obj.SetPlanPhaseUID(fernTestValuePlanPhaseUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPhaseInput(t *testing.T) { + t.Run("SetOrdinal", func(t *testing.T) { + obj := &PhaseInput{} + var fernTestValueOrdinal int64 + obj.SetOrdinal(fernTestValueOrdinal) + assert.Equal(t, fernTestValueOrdinal, obj.Ordinal) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrderTemplateID", func(t *testing.T) { + obj := &PhaseInput{} + var fernTestValueOrderTemplateID *string + obj.SetOrderTemplateID(fernTestValueOrderTemplateID) + assert.Equal(t, fernTestValueOrderTemplateID, obj.OrderTemplateID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPhaseInput(t *testing.T) { + t.Run("GetOrdinal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PhaseInput{} + var expected int64 + obj.Ordinal = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrdinal(), "getter should return the property value") + }) + + t.Run("GetOrdinal_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PhaseInput + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrdinal() // Should return zero value + }) + + t.Run("GetOrderTemplateID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PhaseInput{} + var expected *string + obj.OrderTemplateID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderTemplateID(), "getter should return the property value") + }) + + t.Run("GetOrderTemplateID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PhaseInput{} + obj.OrderTemplateID = nil + + // Act & Assert + assert.Nil(t, obj.GetOrderTemplateID(), "getter should return nil when property is nil") + }) + + t.Run("GetOrderTemplateID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PhaseInput + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderTemplateID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPhaseInput(t *testing.T) { + t.Run("SetOrdinal_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PhaseInput{} + var fernTestValueOrdinal int64 + + // Act + obj.SetOrdinal(fernTestValueOrdinal) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrderTemplateID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PhaseInput{} + var fernTestValueOrderTemplateID *string + + // Act + obj.SetOrderTemplateID(fernTestValueOrderTemplateID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersResumeSubscriptionResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &ResumeSubscriptionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSubscription", func(t *testing.T) { + obj := &ResumeSubscriptionResponse{} + var fernTestValueSubscription *Subscription + obj.SetSubscription(fernTestValueSubscription) + assert.Equal(t, fernTestValueSubscription, obj.Subscription) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetActions", func(t *testing.T) { + obj := &ResumeSubscriptionResponse{} + var fernTestValueActions []*SubscriptionAction + obj.SetActions(fernTestValueActions) + assert.Equal(t, fernTestValueActions, obj.Actions) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersResumeSubscriptionResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ResumeSubscriptionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ResumeSubscriptionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ResumeSubscriptionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetSubscription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ResumeSubscriptionResponse{} + var expected *Subscription + obj.Subscription = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscription(), "getter should return the property value") + }) + + t.Run("GetSubscription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ResumeSubscriptionResponse{} + obj.Subscription = nil + + // Act & Assert + assert.Nil(t, obj.GetSubscription(), "getter should return nil when property is nil") + }) + + t.Run("GetSubscription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ResumeSubscriptionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscription() // Should return zero value + }) + + t.Run("GetActions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ResumeSubscriptionResponse{} + var expected []*SubscriptionAction + obj.Actions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetActions(), "getter should return the property value") + }) + + t.Run("GetActions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ResumeSubscriptionResponse{} + obj.Actions = nil + + // Act & Assert + assert.Nil(t, obj.GetActions(), "getter should return nil when property is nil") + }) + + t.Run("GetActions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ResumeSubscriptionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetActions() // Should return zero value + }) + +} + +func TestSettersMarkExplicitResumeSubscriptionResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ResumeSubscriptionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSubscription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ResumeSubscriptionResponse{} + var fernTestValueSubscription *Subscription + + // Act + obj.SetSubscription(fernTestValueSubscription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetActions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ResumeSubscriptionResponse{} + var fernTestValueActions []*SubscriptionAction + + // Act + obj.SetActions(fernTestValueActions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchSubscriptionsFilter(t *testing.T) { + t.Run("SetCustomerIDs", func(t *testing.T) { + obj := &SearchSubscriptionsFilter{} + var fernTestValueCustomerIDs []string + obj.SetCustomerIDs(fernTestValueCustomerIDs) + assert.Equal(t, fernTestValueCustomerIDs, obj.CustomerIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationIDs", func(t *testing.T) { + obj := &SearchSubscriptionsFilter{} + var fernTestValueLocationIDs []string + obj.SetLocationIDs(fernTestValueLocationIDs) + assert.Equal(t, fernTestValueLocationIDs, obj.LocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSourceNames", func(t *testing.T) { + obj := &SearchSubscriptionsFilter{} + var fernTestValueSourceNames []string + obj.SetSourceNames(fernTestValueSourceNames) + assert.Equal(t, fernTestValueSourceNames, obj.SourceNames) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchSubscriptionsFilter(t *testing.T) { + t.Run("GetCustomerIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchSubscriptionsFilter{} + var expected []string + obj.CustomerIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomerIDs(), "getter should return the property value") + }) + + t.Run("GetCustomerIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchSubscriptionsFilter{} + obj.CustomerIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomerIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomerIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchSubscriptionsFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomerIDs() // Should return zero value + }) + + t.Run("GetLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchSubscriptionsFilter{} + var expected []string + obj.LocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationIDs(), "getter should return the property value") + }) + + t.Run("GetLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchSubscriptionsFilter{} + obj.LocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchSubscriptionsFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationIDs() // Should return zero value + }) + + t.Run("GetSourceNames", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchSubscriptionsFilter{} + var expected []string + obj.SourceNames = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSourceNames(), "getter should return the property value") + }) + + t.Run("GetSourceNames_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchSubscriptionsFilter{} + obj.SourceNames = nil + + // Act & Assert + assert.Nil(t, obj.GetSourceNames(), "getter should return nil when property is nil") + }) + + t.Run("GetSourceNames_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchSubscriptionsFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSourceNames() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchSubscriptionsFilter(t *testing.T) { + t.Run("SetCustomerIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchSubscriptionsFilter{} + var fernTestValueCustomerIDs []string + + // Act + obj.SetCustomerIDs(fernTestValueCustomerIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchSubscriptionsFilter{} + var fernTestValueLocationIDs []string + + // Act + obj.SetLocationIDs(fernTestValueLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSourceNames_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchSubscriptionsFilter{} + var fernTestValueSourceNames []string + + // Act + obj.SetSourceNames(fernTestValueSourceNames) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchSubscriptionsQuery(t *testing.T) { + t.Run("SetFilter", func(t *testing.T) { + obj := &SearchSubscriptionsQuery{} + var fernTestValueFilter *SearchSubscriptionsFilter + obj.SetFilter(fernTestValueFilter) + assert.Equal(t, fernTestValueFilter, obj.Filter) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchSubscriptionsQuery(t *testing.T) { + t.Run("GetFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchSubscriptionsQuery{} + var expected *SearchSubscriptionsFilter + obj.Filter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFilter(), "getter should return the property value") + }) + + t.Run("GetFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchSubscriptionsQuery{} + obj.Filter = nil + + // Act & Assert + assert.Nil(t, obj.GetFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchSubscriptionsQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFilter() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchSubscriptionsQuery(t *testing.T) { + t.Run("SetFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchSubscriptionsQuery{} + var fernTestValueFilter *SearchSubscriptionsFilter + + // Act + obj.SetFilter(fernTestValueFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchSubscriptionsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &SearchSubscriptionsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSubscriptions", func(t *testing.T) { + obj := &SearchSubscriptionsResponse{} + var fernTestValueSubscriptions []*Subscription + obj.SetSubscriptions(fernTestValueSubscriptions) + assert.Equal(t, fernTestValueSubscriptions, obj.Subscriptions) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchSubscriptionsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchSubscriptionsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchSubscriptionsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchSubscriptionsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchSubscriptionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetSubscriptions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchSubscriptionsResponse{} + var expected []*Subscription + obj.Subscriptions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscriptions(), "getter should return the property value") + }) + + t.Run("GetSubscriptions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchSubscriptionsResponse{} + obj.Subscriptions = nil + + // Act & Assert + assert.Nil(t, obj.GetSubscriptions(), "getter should return nil when property is nil") + }) + + t.Run("GetSubscriptions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchSubscriptionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscriptions() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchSubscriptionsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchSubscriptionsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchSubscriptionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchSubscriptionsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchSubscriptionsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSubscriptions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchSubscriptionsResponse{} + var fernTestValueSubscriptions []*Subscription + + // Act + obj.SetSubscriptions(fernTestValueSubscriptions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchSubscriptionsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSubscription(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &Subscription{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &Subscription{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPlanVariationID", func(t *testing.T) { + obj := &Subscription{} + var fernTestValuePlanVariationID *string + obj.SetPlanVariationID(fernTestValuePlanVariationID) + assert.Equal(t, fernTestValuePlanVariationID, obj.PlanVariationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerID", func(t *testing.T) { + obj := &Subscription{} + var fernTestValueCustomerID *string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStartDate", func(t *testing.T) { + obj := &Subscription{} + var fernTestValueStartDate *string + obj.SetStartDate(fernTestValueStartDate) + assert.Equal(t, fernTestValueStartDate, obj.StartDate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCanceledDate", func(t *testing.T) { + obj := &Subscription{} + var fernTestValueCanceledDate *string + obj.SetCanceledDate(fernTestValueCanceledDate) + assert.Equal(t, fernTestValueCanceledDate, obj.CanceledDate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetChargedThroughDate", func(t *testing.T) { + obj := &Subscription{} + var fernTestValueChargedThroughDate *string + obj.SetChargedThroughDate(fernTestValueChargedThroughDate) + assert.Equal(t, fernTestValueChargedThroughDate, obj.ChargedThroughDate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &Subscription{} + var fernTestValueStatus *SubscriptionStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTaxPercentage", func(t *testing.T) { + obj := &Subscription{} + var fernTestValueTaxPercentage *string + obj.SetTaxPercentage(fernTestValueTaxPercentage) + assert.Equal(t, fernTestValueTaxPercentage, obj.TaxPercentage) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetInvoiceIDs", func(t *testing.T) { + obj := &Subscription{} + var fernTestValueInvoiceIDs []string + obj.SetInvoiceIDs(fernTestValueInvoiceIDs) + assert.Equal(t, fernTestValueInvoiceIDs, obj.InvoiceIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPriceOverrideMoney", func(t *testing.T) { + obj := &Subscription{} + var fernTestValuePriceOverrideMoney *Money + obj.SetPriceOverrideMoney(fernTestValuePriceOverrideMoney) + assert.Equal(t, fernTestValuePriceOverrideMoney, obj.PriceOverrideMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &Subscription{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &Subscription{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCardID", func(t *testing.T) { + obj := &Subscription{} + var fernTestValueCardID *string + obj.SetCardID(fernTestValueCardID) + assert.Equal(t, fernTestValueCardID, obj.CardID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTimezone", func(t *testing.T) { + obj := &Subscription{} + var fernTestValueTimezone *string + obj.SetTimezone(fernTestValueTimezone) + assert.Equal(t, fernTestValueTimezone, obj.Timezone) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSource", func(t *testing.T) { + obj := &Subscription{} + var fernTestValueSource *SubscriptionSource + obj.SetSource(fernTestValueSource) + assert.Equal(t, fernTestValueSource, obj.Source) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetActions", func(t *testing.T) { + obj := &Subscription{} + var fernTestValueActions []*SubscriptionAction + obj.SetActions(fernTestValueActions) + assert.Equal(t, fernTestValueActions, obj.Actions) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMonthlyBillingAnchorDate", func(t *testing.T) { + obj := &Subscription{} + var fernTestValueMonthlyBillingAnchorDate *int + obj.SetMonthlyBillingAnchorDate(fernTestValueMonthlyBillingAnchorDate) + assert.Equal(t, fernTestValueMonthlyBillingAnchorDate, obj.MonthlyBillingAnchorDate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPhases", func(t *testing.T) { + obj := &Subscription{} + var fernTestValuePhases []*Phase + obj.SetPhases(fernTestValuePhases) + assert.Equal(t, fernTestValuePhases, obj.Phases) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCompletedDate", func(t *testing.T) { + obj := &Subscription{} + var fernTestValueCompletedDate *string + obj.SetCompletedDate(fernTestValueCompletedDate) + assert.Equal(t, fernTestValueCompletedDate, obj.CompletedDate) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSubscription(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Subscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Subscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetPlanVariationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var expected *string + obj.PlanVariationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPlanVariationID(), "getter should return the property value") + }) + + t.Run("GetPlanVariationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + obj.PlanVariationID = nil + + // Act & Assert + assert.Nil(t, obj.GetPlanVariationID(), "getter should return nil when property is nil") + }) + + t.Run("GetPlanVariationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Subscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPlanVariationID() // Should return zero value + }) + + t.Run("GetCustomerID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var expected *string + obj.CustomerID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomerID(), "getter should return the property value") + }) + + t.Run("GetCustomerID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + obj.CustomerID = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomerID(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomerID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Subscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomerID() // Should return zero value + }) + + t.Run("GetStartDate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var expected *string + obj.StartDate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStartDate(), "getter should return the property value") + }) + + t.Run("GetStartDate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + obj.StartDate = nil + + // Act & Assert + assert.Nil(t, obj.GetStartDate(), "getter should return nil when property is nil") + }) + + t.Run("GetStartDate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Subscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStartDate() // Should return zero value + }) + + t.Run("GetCanceledDate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var expected *string + obj.CanceledDate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCanceledDate(), "getter should return the property value") + }) + + t.Run("GetCanceledDate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + obj.CanceledDate = nil + + // Act & Assert + assert.Nil(t, obj.GetCanceledDate(), "getter should return nil when property is nil") + }) + + t.Run("GetCanceledDate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Subscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCanceledDate() // Should return zero value + }) + + t.Run("GetChargedThroughDate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var expected *string + obj.ChargedThroughDate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetChargedThroughDate(), "getter should return the property value") + }) + + t.Run("GetChargedThroughDate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + obj.ChargedThroughDate = nil + + // Act & Assert + assert.Nil(t, obj.GetChargedThroughDate(), "getter should return nil when property is nil") + }) + + t.Run("GetChargedThroughDate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Subscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetChargedThroughDate() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var expected *SubscriptionStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Subscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetTaxPercentage", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var expected *string + obj.TaxPercentage = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTaxPercentage(), "getter should return the property value") + }) + + t.Run("GetTaxPercentage_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + obj.TaxPercentage = nil + + // Act & Assert + assert.Nil(t, obj.GetTaxPercentage(), "getter should return nil when property is nil") + }) + + t.Run("GetTaxPercentage_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Subscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTaxPercentage() // Should return zero value + }) + + t.Run("GetInvoiceIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var expected []string + obj.InvoiceIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInvoiceIDs(), "getter should return the property value") + }) + + t.Run("GetInvoiceIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + obj.InvoiceIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetInvoiceIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetInvoiceIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Subscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInvoiceIDs() // Should return zero value + }) + + t.Run("GetPriceOverrideMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var expected *Money + obj.PriceOverrideMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPriceOverrideMoney(), "getter should return the property value") + }) + + t.Run("GetPriceOverrideMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + obj.PriceOverrideMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetPriceOverrideMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetPriceOverrideMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Subscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPriceOverrideMoney() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var expected *int64 + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Subscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Subscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetCardID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var expected *string + obj.CardID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCardID(), "getter should return the property value") + }) + + t.Run("GetCardID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + obj.CardID = nil + + // Act & Assert + assert.Nil(t, obj.GetCardID(), "getter should return nil when property is nil") + }) + + t.Run("GetCardID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Subscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCardID() // Should return zero value + }) + + t.Run("GetTimezone", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var expected *string + obj.Timezone = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTimezone(), "getter should return the property value") + }) + + t.Run("GetTimezone_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + obj.Timezone = nil + + // Act & Assert + assert.Nil(t, obj.GetTimezone(), "getter should return nil when property is nil") + }) + + t.Run("GetTimezone_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Subscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTimezone() // Should return zero value + }) + + t.Run("GetSource", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var expected *SubscriptionSource + obj.Source = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSource(), "getter should return the property value") + }) + + t.Run("GetSource_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + obj.Source = nil + + // Act & Assert + assert.Nil(t, obj.GetSource(), "getter should return nil when property is nil") + }) + + t.Run("GetSource_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Subscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSource() // Should return zero value + }) + + t.Run("GetActions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var expected []*SubscriptionAction + obj.Actions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetActions(), "getter should return the property value") + }) + + t.Run("GetActions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + obj.Actions = nil + + // Act & Assert + assert.Nil(t, obj.GetActions(), "getter should return nil when property is nil") + }) + + t.Run("GetActions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Subscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetActions() // Should return zero value + }) + + t.Run("GetMonthlyBillingAnchorDate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var expected *int + obj.MonthlyBillingAnchorDate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMonthlyBillingAnchorDate(), "getter should return the property value") + }) + + t.Run("GetMonthlyBillingAnchorDate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + obj.MonthlyBillingAnchorDate = nil + + // Act & Assert + assert.Nil(t, obj.GetMonthlyBillingAnchorDate(), "getter should return nil when property is nil") + }) + + t.Run("GetMonthlyBillingAnchorDate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Subscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMonthlyBillingAnchorDate() // Should return zero value + }) + + t.Run("GetPhases", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var expected []*Phase + obj.Phases = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPhases(), "getter should return the property value") + }) + + t.Run("GetPhases_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + obj.Phases = nil + + // Act & Assert + assert.Nil(t, obj.GetPhases(), "getter should return nil when property is nil") + }) + + t.Run("GetPhases_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Subscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPhases() // Should return zero value + }) + + t.Run("GetCompletedDate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var expected *string + obj.CompletedDate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCompletedDate(), "getter should return the property value") + }) + + t.Run("GetCompletedDate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + obj.CompletedDate = nil + + // Act & Assert + assert.Nil(t, obj.GetCompletedDate(), "getter should return nil when property is nil") + }) + + t.Run("GetCompletedDate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Subscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCompletedDate() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSubscription(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPlanVariationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var fernTestValuePlanVariationID *string + + // Act + obj.SetPlanVariationID(fernTestValuePlanVariationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var fernTestValueCustomerID *string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStartDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var fernTestValueStartDate *string + + // Act + obj.SetStartDate(fernTestValueStartDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCanceledDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var fernTestValueCanceledDate *string + + // Act + obj.SetCanceledDate(fernTestValueCanceledDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetChargedThroughDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var fernTestValueChargedThroughDate *string + + // Act + obj.SetChargedThroughDate(fernTestValueChargedThroughDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var fernTestValueStatus *SubscriptionStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTaxPercentage_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var fernTestValueTaxPercentage *string + + // Act + obj.SetTaxPercentage(fernTestValueTaxPercentage) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetInvoiceIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var fernTestValueInvoiceIDs []string + + // Act + obj.SetInvoiceIDs(fernTestValueInvoiceIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPriceOverrideMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var fernTestValuePriceOverrideMoney *Money + + // Act + obj.SetPriceOverrideMoney(fernTestValuePriceOverrideMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCardID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var fernTestValueCardID *string + + // Act + obj.SetCardID(fernTestValueCardID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTimezone_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var fernTestValueTimezone *string + + // Act + obj.SetTimezone(fernTestValueTimezone) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSource_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var fernTestValueSource *SubscriptionSource + + // Act + obj.SetSource(fernTestValueSource) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetActions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var fernTestValueActions []*SubscriptionAction + + // Act + obj.SetActions(fernTestValueActions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMonthlyBillingAnchorDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var fernTestValueMonthlyBillingAnchorDate *int + + // Act + obj.SetMonthlyBillingAnchorDate(fernTestValueMonthlyBillingAnchorDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPhases_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var fernTestValuePhases []*Phase + + // Act + obj.SetPhases(fernTestValuePhases) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCompletedDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + var fernTestValueCompletedDate *string + + // Act + obj.SetCompletedDate(fernTestValueCompletedDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSubscriptionAction(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &SubscriptionAction{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &SubscriptionAction{} + var fernTestValueType *SubscriptionActionType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEffectiveDate", func(t *testing.T) { + obj := &SubscriptionAction{} + var fernTestValueEffectiveDate *string + obj.SetEffectiveDate(fernTestValueEffectiveDate) + assert.Equal(t, fernTestValueEffectiveDate, obj.EffectiveDate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMonthlyBillingAnchorDate", func(t *testing.T) { + obj := &SubscriptionAction{} + var fernTestValueMonthlyBillingAnchorDate *int + obj.SetMonthlyBillingAnchorDate(fernTestValueMonthlyBillingAnchorDate) + assert.Equal(t, fernTestValueMonthlyBillingAnchorDate, obj.MonthlyBillingAnchorDate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPhases", func(t *testing.T) { + obj := &SubscriptionAction{} + var fernTestValuePhases []*Phase + obj.SetPhases(fernTestValuePhases) + assert.Equal(t, fernTestValuePhases, obj.Phases) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNewPlanVariationID", func(t *testing.T) { + obj := &SubscriptionAction{} + var fernTestValueNewPlanVariationID *string + obj.SetNewPlanVariationID(fernTestValueNewPlanVariationID) + assert.Equal(t, fernTestValueNewPlanVariationID, obj.NewPlanVariationID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSubscriptionAction(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionAction{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionAction{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionAction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionAction{} + var expected *SubscriptionActionType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionAction{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionAction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEffectiveDate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionAction{} + var expected *string + obj.EffectiveDate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEffectiveDate(), "getter should return the property value") + }) + + t.Run("GetEffectiveDate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionAction{} + obj.EffectiveDate = nil + + // Act & Assert + assert.Nil(t, obj.GetEffectiveDate(), "getter should return nil when property is nil") + }) + + t.Run("GetEffectiveDate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionAction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEffectiveDate() // Should return zero value + }) + + t.Run("GetMonthlyBillingAnchorDate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionAction{} + var expected *int + obj.MonthlyBillingAnchorDate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMonthlyBillingAnchorDate(), "getter should return the property value") + }) + + t.Run("GetMonthlyBillingAnchorDate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionAction{} + obj.MonthlyBillingAnchorDate = nil + + // Act & Assert + assert.Nil(t, obj.GetMonthlyBillingAnchorDate(), "getter should return nil when property is nil") + }) + + t.Run("GetMonthlyBillingAnchorDate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionAction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMonthlyBillingAnchorDate() // Should return zero value + }) + + t.Run("GetPhases", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionAction{} + var expected []*Phase + obj.Phases = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPhases(), "getter should return the property value") + }) + + t.Run("GetPhases_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionAction{} + obj.Phases = nil + + // Act & Assert + assert.Nil(t, obj.GetPhases(), "getter should return nil when property is nil") + }) + + t.Run("GetPhases_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionAction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPhases() // Should return zero value + }) + + t.Run("GetNewPlanVariationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionAction{} + var expected *string + obj.NewPlanVariationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNewPlanVariationID(), "getter should return the property value") + }) + + t.Run("GetNewPlanVariationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionAction{} + obj.NewPlanVariationID = nil + + // Act & Assert + assert.Nil(t, obj.GetNewPlanVariationID(), "getter should return nil when property is nil") + }) + + t.Run("GetNewPlanVariationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionAction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNewPlanVariationID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSubscriptionAction(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionAction{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionAction{} + var fernTestValueType *SubscriptionActionType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEffectiveDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionAction{} + var fernTestValueEffectiveDate *string + + // Act + obj.SetEffectiveDate(fernTestValueEffectiveDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMonthlyBillingAnchorDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionAction{} + var fernTestValueMonthlyBillingAnchorDate *int + + // Act + obj.SetMonthlyBillingAnchorDate(fernTestValueMonthlyBillingAnchorDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPhases_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionAction{} + var fernTestValuePhases []*Phase + + // Act + obj.SetPhases(fernTestValuePhases) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNewPlanVariationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionAction{} + var fernTestValueNewPlanVariationID *string + + // Act + obj.SetNewPlanVariationID(fernTestValueNewPlanVariationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSubscriptionEvent(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &SubscriptionEvent{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSubscriptionEventType", func(t *testing.T) { + obj := &SubscriptionEvent{} + var fernTestValueSubscriptionEventType SubscriptionEventSubscriptionEventType + obj.SetSubscriptionEventType(fernTestValueSubscriptionEventType) + assert.Equal(t, fernTestValueSubscriptionEventType, obj.SubscriptionEventType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEffectiveDate", func(t *testing.T) { + obj := &SubscriptionEvent{} + var fernTestValueEffectiveDate string + obj.SetEffectiveDate(fernTestValueEffectiveDate) + assert.Equal(t, fernTestValueEffectiveDate, obj.EffectiveDate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMonthlyBillingAnchorDate", func(t *testing.T) { + obj := &SubscriptionEvent{} + var fernTestValueMonthlyBillingAnchorDate *int + obj.SetMonthlyBillingAnchorDate(fernTestValueMonthlyBillingAnchorDate) + assert.Equal(t, fernTestValueMonthlyBillingAnchorDate, obj.MonthlyBillingAnchorDate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetInfo", func(t *testing.T) { + obj := &SubscriptionEvent{} + var fernTestValueInfo *SubscriptionEventInfo + obj.SetInfo(fernTestValueInfo) + assert.Equal(t, fernTestValueInfo, obj.Info) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPhases", func(t *testing.T) { + obj := &SubscriptionEvent{} + var fernTestValuePhases []*Phase + obj.SetPhases(fernTestValuePhases) + assert.Equal(t, fernTestValuePhases, obj.Phases) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPlanVariationID", func(t *testing.T) { + obj := &SubscriptionEvent{} + var fernTestValuePlanVariationID string + obj.SetPlanVariationID(fernTestValuePlanVariationID) + assert.Equal(t, fernTestValuePlanVariationID, obj.PlanVariationID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSubscriptionEvent(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionEvent{} + var expected string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetSubscriptionEventType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionEvent{} + var expected SubscriptionEventSubscriptionEventType + obj.SubscriptionEventType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscriptionEventType(), "getter should return the property value") + }) + + t.Run("GetSubscriptionEventType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscriptionEventType() // Should return zero value + }) + + t.Run("GetEffectiveDate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionEvent{} + var expected string + obj.EffectiveDate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEffectiveDate(), "getter should return the property value") + }) + + t.Run("GetEffectiveDate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEffectiveDate() // Should return zero value + }) + + t.Run("GetMonthlyBillingAnchorDate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionEvent{} + var expected *int + obj.MonthlyBillingAnchorDate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMonthlyBillingAnchorDate(), "getter should return the property value") + }) + + t.Run("GetMonthlyBillingAnchorDate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionEvent{} + obj.MonthlyBillingAnchorDate = nil + + // Act & Assert + assert.Nil(t, obj.GetMonthlyBillingAnchorDate(), "getter should return nil when property is nil") + }) + + t.Run("GetMonthlyBillingAnchorDate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMonthlyBillingAnchorDate() // Should return zero value + }) + + t.Run("GetInfo", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionEvent{} + var expected *SubscriptionEventInfo + obj.Info = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInfo(), "getter should return the property value") + }) + + t.Run("GetInfo_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionEvent{} + obj.Info = nil + + // Act & Assert + assert.Nil(t, obj.GetInfo(), "getter should return nil when property is nil") + }) + + t.Run("GetInfo_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInfo() // Should return zero value + }) + + t.Run("GetPhases", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionEvent{} + var expected []*Phase + obj.Phases = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPhases(), "getter should return the property value") + }) + + t.Run("GetPhases_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionEvent{} + obj.Phases = nil + + // Act & Assert + assert.Nil(t, obj.GetPhases(), "getter should return nil when property is nil") + }) + + t.Run("GetPhases_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPhases() // Should return zero value + }) + + t.Run("GetPlanVariationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionEvent{} + var expected string + obj.PlanVariationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPlanVariationID(), "getter should return the property value") + }) + + t.Run("GetPlanVariationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPlanVariationID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSubscriptionEvent(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionEvent{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSubscriptionEventType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionEvent{} + var fernTestValueSubscriptionEventType SubscriptionEventSubscriptionEventType + + // Act + obj.SetSubscriptionEventType(fernTestValueSubscriptionEventType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEffectiveDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionEvent{} + var fernTestValueEffectiveDate string + + // Act + obj.SetEffectiveDate(fernTestValueEffectiveDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMonthlyBillingAnchorDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionEvent{} + var fernTestValueMonthlyBillingAnchorDate *int + + // Act + obj.SetMonthlyBillingAnchorDate(fernTestValueMonthlyBillingAnchorDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetInfo_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionEvent{} + var fernTestValueInfo *SubscriptionEventInfo + + // Act + obj.SetInfo(fernTestValueInfo) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPhases_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionEvent{} + var fernTestValuePhases []*Phase + + // Act + obj.SetPhases(fernTestValuePhases) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPlanVariationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionEvent{} + var fernTestValuePlanVariationID string + + // Act + obj.SetPlanVariationID(fernTestValuePlanVariationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSubscriptionEventInfo(t *testing.T) { + t.Run("SetDetail", func(t *testing.T) { + obj := &SubscriptionEventInfo{} + var fernTestValueDetail *string + obj.SetDetail(fernTestValueDetail) + assert.Equal(t, fernTestValueDetail, obj.Detail) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCode", func(t *testing.T) { + obj := &SubscriptionEventInfo{} + var fernTestValueCode *SubscriptionEventInfoCode + obj.SetCode(fernTestValueCode) + assert.Equal(t, fernTestValueCode, obj.Code) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSubscriptionEventInfo(t *testing.T) { + t.Run("GetDetail", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionEventInfo{} + var expected *string + obj.Detail = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDetail(), "getter should return the property value") + }) + + t.Run("GetDetail_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionEventInfo{} + obj.Detail = nil + + // Act & Assert + assert.Nil(t, obj.GetDetail(), "getter should return nil when property is nil") + }) + + t.Run("GetDetail_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionEventInfo + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDetail() // Should return zero value + }) + + t.Run("GetCode", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionEventInfo{} + var expected *SubscriptionEventInfoCode + obj.Code = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCode(), "getter should return the property value") + }) + + t.Run("GetCode_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionEventInfo{} + obj.Code = nil + + // Act & Assert + assert.Nil(t, obj.GetCode(), "getter should return nil when property is nil") + }) + + t.Run("GetCode_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionEventInfo + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCode() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSubscriptionEventInfo(t *testing.T) { + t.Run("SetDetail_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionEventInfo{} + var fernTestValueDetail *string + + // Act + obj.SetDetail(fernTestValueDetail) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCode_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionEventInfo{} + var fernTestValueCode *SubscriptionEventInfoCode + + // Act + obj.SetCode(fernTestValueCode) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSubscriptionSource(t *testing.T) { + t.Run("SetName", func(t *testing.T) { + obj := &SubscriptionSource{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSubscriptionSource(t *testing.T) { + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionSource{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionSource{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionSource + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSubscriptionSource(t *testing.T) { + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionSource{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSwapPlanResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &SwapPlanResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSubscription", func(t *testing.T) { + obj := &SwapPlanResponse{} + var fernTestValueSubscription *Subscription + obj.SetSubscription(fernTestValueSubscription) + assert.Equal(t, fernTestValueSubscription, obj.Subscription) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetActions", func(t *testing.T) { + obj := &SwapPlanResponse{} + var fernTestValueActions []*SubscriptionAction + obj.SetActions(fernTestValueActions) + assert.Equal(t, fernTestValueActions, obj.Actions) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSwapPlanResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SwapPlanResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SwapPlanResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SwapPlanResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetSubscription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SwapPlanResponse{} + var expected *Subscription + obj.Subscription = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscription(), "getter should return the property value") + }) + + t.Run("GetSubscription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SwapPlanResponse{} + obj.Subscription = nil + + // Act & Assert + assert.Nil(t, obj.GetSubscription(), "getter should return nil when property is nil") + }) + + t.Run("GetSubscription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SwapPlanResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscription() // Should return zero value + }) + + t.Run("GetActions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SwapPlanResponse{} + var expected []*SubscriptionAction + obj.Actions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetActions(), "getter should return the property value") + }) + + t.Run("GetActions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SwapPlanResponse{} + obj.Actions = nil + + // Act & Assert + assert.Nil(t, obj.GetActions(), "getter should return nil when property is nil") + }) + + t.Run("GetActions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SwapPlanResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetActions() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSwapPlanResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SwapPlanResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSubscription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SwapPlanResponse{} + var fernTestValueSubscription *Subscription + + // Act + obj.SetSubscription(fernTestValueSubscription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetActions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SwapPlanResponse{} + var fernTestValueActions []*SubscriptionAction + + // Act + obj.SetActions(fernTestValueActions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateSubscriptionResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateSubscriptionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSubscription", func(t *testing.T) { + obj := &UpdateSubscriptionResponse{} + var fernTestValueSubscription *Subscription + obj.SetSubscription(fernTestValueSubscription) + assert.Equal(t, fernTestValueSubscription, obj.Subscription) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateSubscriptionResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateSubscriptionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateSubscriptionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateSubscriptionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetSubscription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateSubscriptionResponse{} + var expected *Subscription + obj.Subscription = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscription(), "getter should return the property value") + }) + + t.Run("GetSubscription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateSubscriptionResponse{} + obj.Subscription = nil + + // Act & Assert + assert.Nil(t, obj.GetSubscription(), "getter should return nil when property is nil") + }) + + t.Run("GetSubscription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateSubscriptionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscription() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateSubscriptionResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateSubscriptionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSubscription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateSubscriptionResponse{} + var fernTestValueSubscription *Subscription + + // Act + obj.SetSubscription(fernTestValueSubscription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateSubscriptionRequest(t *testing.T) { + t.Run("SetSubscriptionID", func(t *testing.T) { + obj := &UpdateSubscriptionRequest{} + var fernTestValueSubscriptionID string + obj.SetSubscriptionID(fernTestValueSubscriptionID) + assert.Equal(t, fernTestValueSubscriptionID, obj.SubscriptionID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSubscription", func(t *testing.T) { + obj := &UpdateSubscriptionRequest{} + var fernTestValueSubscription *Subscription + obj.SetSubscription(fernTestValueSubscription) + assert.Equal(t, fernTestValueSubscription, obj.Subscription) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateSubscriptionRequest(t *testing.T) { + t.Run("SetSubscriptionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateSubscriptionRequest{} + var fernTestValueSubscriptionID string + + // Act + obj.SetSubscriptionID(fernTestValueSubscriptionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSubscription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateSubscriptionRequest{} + var fernTestValueSubscription *Subscription + + // Act + obj.SetSubscription(fernTestValueSubscription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingBulkSwapPlanResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkSwapPlanResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkSwapPlanResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkSwapPlanResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkSwapPlanResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCancelSubscriptionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelSubscriptionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CancelSubscriptionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CancelSubscriptionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CancelSubscriptionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingChangeBillingAnchorDateResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ChangeBillingAnchorDateResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ChangeBillingAnchorDateResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ChangeBillingAnchorDateResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ChangeBillingAnchorDateResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateSubscriptionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateSubscriptionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateSubscriptionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateSubscriptionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateSubscriptionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeleteSubscriptionActionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteSubscriptionActionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeleteSubscriptionActionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeleteSubscriptionActionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeleteSubscriptionActionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetSubscriptionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetSubscriptionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetSubscriptionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetSubscriptionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetSubscriptionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListSubscriptionEventsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListSubscriptionEventsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListSubscriptionEventsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListSubscriptionEventsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListSubscriptionEventsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPauseSubscriptionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PauseSubscriptionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PauseSubscriptionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PauseSubscriptionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PauseSubscriptionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPhase(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Phase{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Phase + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Phase + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Phase + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPhaseInput(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PhaseInput{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PhaseInput + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PhaseInput + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PhaseInput + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingResumeSubscriptionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ResumeSubscriptionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ResumeSubscriptionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ResumeSubscriptionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ResumeSubscriptionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchSubscriptionsFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchSubscriptionsFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchSubscriptionsFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchSubscriptionsFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchSubscriptionsFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchSubscriptionsQuery(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchSubscriptionsQuery{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchSubscriptionsQuery + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchSubscriptionsQuery + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchSubscriptionsQuery + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchSubscriptionsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchSubscriptionsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchSubscriptionsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchSubscriptionsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchSubscriptionsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSubscription(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Subscription{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Subscription + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Subscription + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Subscription + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSubscriptionAction(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionAction{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SubscriptionAction + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SubscriptionAction + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SubscriptionAction + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSubscriptionEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SubscriptionEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SubscriptionEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SubscriptionEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSubscriptionEventInfo(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionEventInfo{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SubscriptionEventInfo + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SubscriptionEventInfo + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SubscriptionEventInfo + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSubscriptionSource(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionSource{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SubscriptionSource + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SubscriptionSource + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SubscriptionSource + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSwapPlanResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SwapPlanResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SwapPlanResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SwapPlanResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SwapPlanResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateSubscriptionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateSubscriptionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateSubscriptionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateSubscriptionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateSubscriptionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringBulkSwapPlanResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkSwapPlanResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkSwapPlanResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCancelSubscriptionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CancelSubscriptionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelSubscriptionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringChangeBillingAnchorDateResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ChangeBillingAnchorDateResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ChangeBillingAnchorDateResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateSubscriptionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateSubscriptionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateSubscriptionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeleteSubscriptionActionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeleteSubscriptionActionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteSubscriptionActionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetSubscriptionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetSubscriptionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetSubscriptionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListSubscriptionEventsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListSubscriptionEventsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListSubscriptionEventsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPauseSubscriptionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PauseSubscriptionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PauseSubscriptionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPhase(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Phase{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Phase + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPhaseInput(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PhaseInput{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PhaseInput + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringResumeSubscriptionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ResumeSubscriptionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ResumeSubscriptionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchSubscriptionsFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchSubscriptionsFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchSubscriptionsFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchSubscriptionsQuery(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchSubscriptionsQuery{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchSubscriptionsQuery + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchSubscriptionsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchSubscriptionsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchSubscriptionsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSubscription(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Subscription{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Subscription + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSubscriptionAction(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SubscriptionAction{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionAction + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSubscriptionEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SubscriptionEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSubscriptionEventInfo(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SubscriptionEventInfo{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionEventInfo + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSubscriptionSource(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SubscriptionSource{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionSource + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSwapPlanResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SwapPlanResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SwapPlanResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateSubscriptionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateSubscriptionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateSubscriptionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestEnumChangeTiming(t *testing.T) { + t.Run("NewFromString_IMMEDIATE", func(t *testing.T) { + t.Parallel() + val, err := NewChangeTimingFromString("IMMEDIATE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ChangeTiming("IMMEDIATE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_END_OF_BILLING_CYCLE", func(t *testing.T) { + t.Parallel() + val, err := NewChangeTimingFromString("END_OF_BILLING_CYCLE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ChangeTiming("END_OF_BILLING_CYCLE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewChangeTimingFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewChangeTimingFromString("IMMEDIATE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumSubscriptionActionType(t *testing.T) { + t.Run("NewFromString_CANCEL", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionActionTypeFromString("CANCEL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionActionType("CANCEL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PAUSE", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionActionTypeFromString("PAUSE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionActionType("PAUSE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RESUME", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionActionTypeFromString("RESUME") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionActionType("RESUME"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SWAP_PLAN", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionActionTypeFromString("SWAP_PLAN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionActionType("SWAP_PLAN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CHANGE_BILLING_ANCHOR_DATE", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionActionTypeFromString("CHANGE_BILLING_ANCHOR_DATE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionActionType("CHANGE_BILLING_ANCHOR_DATE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_COMPLETE", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionActionTypeFromString("COMPLETE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionActionType("COMPLETE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewSubscriptionActionTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewSubscriptionActionTypeFromString("CANCEL") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumSubscriptionEventInfoCode(t *testing.T) { + t.Run("NewFromString_LOCATION_NOT_ACTIVE", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionEventInfoCodeFromString("LOCATION_NOT_ACTIVE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionEventInfoCode("LOCATION_NOT_ACTIVE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LOCATION_CANNOT_ACCEPT_PAYMENT", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionEventInfoCodeFromString("LOCATION_CANNOT_ACCEPT_PAYMENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionEventInfoCode("LOCATION_CANNOT_ACCEPT_PAYMENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CUSTOMER_DELETED", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionEventInfoCodeFromString("CUSTOMER_DELETED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionEventInfoCode("CUSTOMER_DELETED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CUSTOMER_NO_EMAIL", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionEventInfoCodeFromString("CUSTOMER_NO_EMAIL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionEventInfoCode("CUSTOMER_NO_EMAIL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CUSTOMER_NO_NAME", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionEventInfoCodeFromString("CUSTOMER_NO_NAME") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionEventInfoCode("CUSTOMER_NO_NAME"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_USER_PROVIDED", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionEventInfoCodeFromString("USER_PROVIDED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionEventInfoCode("USER_PROVIDED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewSubscriptionEventInfoCodeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewSubscriptionEventInfoCodeFromString("LOCATION_NOT_ACTIVE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumSubscriptionEventSubscriptionEventType(t *testing.T) { + t.Run("NewFromString_START_SUBSCRIPTION", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionEventSubscriptionEventTypeFromString("START_SUBSCRIPTION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionEventSubscriptionEventType("START_SUBSCRIPTION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PLAN_CHANGE", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionEventSubscriptionEventTypeFromString("PLAN_CHANGE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionEventSubscriptionEventType("PLAN_CHANGE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_STOP_SUBSCRIPTION", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionEventSubscriptionEventTypeFromString("STOP_SUBSCRIPTION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionEventSubscriptionEventType("STOP_SUBSCRIPTION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DEACTIVATE_SUBSCRIPTION", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionEventSubscriptionEventTypeFromString("DEACTIVATE_SUBSCRIPTION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionEventSubscriptionEventType("DEACTIVATE_SUBSCRIPTION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RESUME_SUBSCRIPTION", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionEventSubscriptionEventTypeFromString("RESUME_SUBSCRIPTION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionEventSubscriptionEventType("RESUME_SUBSCRIPTION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PAUSE_SUBSCRIPTION", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionEventSubscriptionEventTypeFromString("PAUSE_SUBSCRIPTION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionEventSubscriptionEventType("PAUSE_SUBSCRIPTION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BILLING_ANCHOR_DATE_CHANGED", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionEventSubscriptionEventTypeFromString("BILLING_ANCHOR_DATE_CHANGED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionEventSubscriptionEventType("BILLING_ANCHOR_DATE_CHANGED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewSubscriptionEventSubscriptionEventTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewSubscriptionEventSubscriptionEventTypeFromString("START_SUBSCRIPTION") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumSubscriptionStatus(t *testing.T) { + t.Run("NewFromString_PENDING", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionStatusFromString("PENDING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionStatus("PENDING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ACTIVE", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionStatusFromString("ACTIVE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionStatus("ACTIVE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CANCELED", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionStatusFromString("CANCELED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionStatus("CANCELED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DEACTIVATED", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionStatusFromString("DEACTIVATED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionStatus("DEACTIVATED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PAUSED", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionStatusFromString("PAUSED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionStatus("PAUSED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_COMPLETED", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionStatusFromString("COMPLETED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionStatus("COMPLETED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewSubscriptionStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewSubscriptionStatusFromString("PENDING") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestExtraPropertiesBulkSwapPlanResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkSwapPlanResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkSwapPlanResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCancelSubscriptionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CancelSubscriptionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelSubscriptionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesChangeBillingAnchorDateResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ChangeBillingAnchorDateResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ChangeBillingAnchorDateResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateSubscriptionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateSubscriptionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateSubscriptionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeleteSubscriptionActionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeleteSubscriptionActionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteSubscriptionActionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetSubscriptionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetSubscriptionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetSubscriptionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListSubscriptionEventsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListSubscriptionEventsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListSubscriptionEventsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPauseSubscriptionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PauseSubscriptionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PauseSubscriptionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPhase(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Phase{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Phase + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPhaseInput(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PhaseInput{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PhaseInput + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesResumeSubscriptionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ResumeSubscriptionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ResumeSubscriptionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchSubscriptionsFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchSubscriptionsFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchSubscriptionsFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchSubscriptionsQuery(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchSubscriptionsQuery{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchSubscriptionsQuery + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchSubscriptionsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchSubscriptionsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchSubscriptionsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSubscription(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Subscription{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Subscription + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSubscriptionAction(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SubscriptionAction{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionAction + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSubscriptionEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SubscriptionEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSubscriptionEventInfo(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SubscriptionEventInfo{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionEventInfo + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSubscriptionSource(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SubscriptionSource{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionSource + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSwapPlanResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SwapPlanResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SwapPlanResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateSubscriptionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateSubscriptionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateSubscriptionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/team.go b/team.go index a52a0d2..f7aedcf 100644 --- a/team.go +++ b/team.go @@ -16,7 +16,7 @@ var ( type CreateJobRequest struct { // The job to create. The `title` field is required and `is_tip_eligible` defaults to true. - Job *Job `json:"job,omitempty" url:"-"` + Job *Job `json:"job" url:"-"` // A unique identifier for the `CreateJob` request. Keys can be any valid string, // but must be unique for each request. For more information, see // [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency). @@ -47,6 +47,27 @@ func (c *CreateJobRequest) SetIdempotencyKey(idempotencyKey string) { c.require(createJobRequestFieldIdempotencyKey) } +func (c *CreateJobRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateJobRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateJobRequest(body) + return nil +} + +func (c *CreateJobRequest) MarshalJSON() ([]byte, error) { + type embed CreateJobRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( listJobsRequestFieldCursor = big.NewInt(1 << 0) ) @@ -111,7 +132,7 @@ type UpdateJobRequest struct { JobID string `json:"-" url:"-"` // The job with the updated fields, either `title`, `is_tip_eligible`, or both. Only changed fields need // to be included in the request. Optionally include `version` to enable optimistic concurrency control. - Job *Job `json:"job,omitempty" url:"-"` + Job *Job `json:"job" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -138,6 +159,27 @@ func (u *UpdateJobRequest) SetJob(job *Job) { u.require(updateJobRequestFieldJob) } +func (u *UpdateJobRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdateJobRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdateJobRequest(body) + return nil +} + +func (u *UpdateJobRequest) MarshalJSON() ([]byte, error) { + type embed UpdateJobRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} + // Represents a [CreateJob](api-endpoint:Team-CreateJob) response. Either `job` or `errors` // is present in the response. var ( @@ -173,6 +215,9 @@ func (c *CreateJobResponse) GetErrors() []*Error { } func (c *CreateJobResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -225,6 +270,9 @@ func (c *CreateJobResponse) MarshalJSON() ([]byte, error) { } func (c *CreateJobResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -317,6 +365,9 @@ func (j *Job) GetVersion() *int { } func (j *Job) GetExtraProperties() map[string]interface{} { + if j == nil { + return nil + } return j.extraProperties } @@ -397,6 +448,9 @@ func (j *Job) MarshalJSON() ([]byte, error) { } func (j *Job) String() string { + if j == nil { + return "" + } if len(j.rawJSON) > 0 { if value, err := internal.StringifyJSON(j.rawJSON); err == nil { return value @@ -455,6 +509,9 @@ func (l *ListJobsResponse) GetErrors() []*Error { } func (l *ListJobsResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -514,6 +571,9 @@ func (l *ListJobsResponse) MarshalJSON() ([]byte, error) { } func (l *ListJobsResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -560,6 +620,9 @@ func (r *RetrieveJobResponse) GetErrors() []*Error { } func (r *RetrieveJobResponse) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -612,6 +675,9 @@ func (r *RetrieveJobResponse) MarshalJSON() ([]byte, error) { } func (r *RetrieveJobResponse) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -658,6 +724,9 @@ func (u *UpdateJobResponse) GetErrors() []*Error { } func (u *UpdateJobResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -710,6 +779,9 @@ func (u *UpdateJobResponse) MarshalJSON() ([]byte, error) { } func (u *UpdateJobResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value diff --git a/team/team_test/team_test.go b/team/team_test/team_test.go new file mode 100644 index 0000000..7507b7a --- /dev/null +++ b/team/team_test/team_test.go @@ -0,0 +1,181 @@ +// Code generated by Fern. DO NOT EDIT. + +package team_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestTeamListJobsWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.ListJobsRequest{ + Cursor: square.String( + "cursor", + ), + } + _, invocationErr := client.Team.ListJobs( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTeamListJobsWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTeamListJobsWithWireMock", "GET", "/v2/team-members/jobs", map[string]string{"cursor": "cursor"}, 1) +} + +func TestTeamCreateJobWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CreateJobRequest{ + Job: &square.Job{ + Title: square.String( + "Cashier", + ), + IsTipEligible: square.Bool( + true, + ), + }, + IdempotencyKey: "idempotency-key-0", + } + _, invocationErr := client.Team.CreateJob( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTeamCreateJobWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTeamCreateJobWithWireMock", "POST", "/v2/team-members/jobs", nil, 1) +} + +func TestTeamRetrieveJobWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.RetrieveJobRequest{ + JobID: "job_id", + } + _, invocationErr := client.Team.RetrieveJob( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTeamRetrieveJobWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTeamRetrieveJobWithWireMock", "GET", "/v2/team-members/jobs/job_id", nil, 1) +} + +func TestTeamUpdateJobWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.UpdateJobRequest{ + JobID: "job_id", + Job: &square.Job{ + Title: square.String( + "Cashier 1", + ), + IsTipEligible: square.Bool( + true, + ), + }, + } + _, invocationErr := client.Team.UpdateJob( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTeamUpdateJobWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTeamUpdateJobWithWireMock", "PUT", "/v2/team-members/jobs/job_id", nil, 1) +} diff --git a/team_members.go b/team_members.go index 6000af2..8b952be 100644 --- a/team_members.go +++ b/team_members.go @@ -19,7 +19,7 @@ type BatchCreateTeamMembersRequest struct { // // If you include a team member's `wage_setting`, you must provide `job_id` for each job assignment. To get job IDs, // call [ListJobs](api-endpoint:Team-ListJobs). - TeamMembers map[string]*CreateTeamMemberRequest `json:"team_members,omitempty" url:"-"` + TeamMembers map[string]*CreateTeamMemberRequest `json:"team_members" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -39,6 +39,27 @@ func (b *BatchCreateTeamMembersRequest) SetTeamMembers(teamMembers map[string]*C b.require(batchCreateTeamMembersRequestFieldTeamMembers) } +func (b *BatchCreateTeamMembersRequest) UnmarshalJSON(data []byte) error { + type unmarshaler BatchCreateTeamMembersRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *b = BatchCreateTeamMembersRequest(body) + return nil +} + +func (b *BatchCreateTeamMembersRequest) MarshalJSON() ([]byte, error) { + type embed BatchCreateTeamMembersRequest + var marshaler = struct { + embed + }{ + embed: embed(*b), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, b.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( batchUpdateTeamMembersRequestFieldTeamMembers = big.NewInt(1 << 0) ) @@ -50,7 +71,7 @@ type BatchUpdateTeamMembersRequest struct { // For each team member, include the fields to add, change, or clear. Fields can be cleared using a null value. // To update `wage_setting.job_assignments`, you must provide the complete list of job assignments. If needed, // call [ListJobs](api-endpoint:Team-ListJobs) to get the required `job_id` values. - TeamMembers map[string]*UpdateTeamMemberRequest `json:"team_members,omitempty" url:"-"` + TeamMembers map[string]*UpdateTeamMemberRequest `json:"team_members" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -70,6 +91,27 @@ func (b *BatchUpdateTeamMembersRequest) SetTeamMembers(teamMembers map[string]*U b.require(batchUpdateTeamMembersRequestFieldTeamMembers) } +func (b *BatchUpdateTeamMembersRequest) UnmarshalJSON(data []byte) error { + type unmarshaler BatchUpdateTeamMembersRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *b = BatchUpdateTeamMembersRequest(body) + return nil +} + +func (b *BatchUpdateTeamMembersRequest) MarshalJSON() ([]byte, error) { + type embed BatchUpdateTeamMembersRequest + var marshaler = struct { + embed + }{ + embed: embed(*b), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, b.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( getTeamMembersRequestFieldTeamMemberID = big.NewInt(1 << 0) ) @@ -143,6 +185,27 @@ func (s *SearchTeamMembersRequest) SetCursor(cursor *string) { s.require(searchTeamMembersRequestFieldCursor) } +func (s *SearchTeamMembersRequest) UnmarshalJSON(data []byte) error { + type unmarshaler SearchTeamMembersRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *s = SearchTeamMembersRequest(body) + return nil +} + +func (s *SearchTeamMembersRequest) MarshalJSON() ([]byte, error) { + type embed SearchTeamMembersRequest + var marshaler = struct { + embed + }{ + embed: embed(*s), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, s.explicitFields) + return json.Marshal(explicitMarshaler) +} + // Represents a response from a bulk create request containing the created `TeamMember` objects or error messages. var ( batchCreateTeamMembersResponseFieldTeamMembers = big.NewInt(1 << 0) @@ -177,6 +240,9 @@ func (b *BatchCreateTeamMembersResponse) GetErrors() []*Error { } func (b *BatchCreateTeamMembersResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -229,6 +295,9 @@ func (b *BatchCreateTeamMembersResponse) MarshalJSON() ([]byte, error) { } func (b *BatchCreateTeamMembersResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -274,6 +343,9 @@ func (b *BatchUpdateTeamMembersResponse) GetErrors() []*Error { } func (b *BatchUpdateTeamMembersResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -326,6 +398,9 @@ func (b *BatchUpdateTeamMembersResponse) MarshalJSON() ([]byte, error) { } func (b *BatchUpdateTeamMembersResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -376,6 +451,9 @@ func (c *CreateTeamMemberRequest) GetTeamMember() *TeamMember { } func (c *CreateTeamMemberRequest) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -428,6 +506,9 @@ func (c *CreateTeamMemberRequest) MarshalJSON() ([]byte, error) { } func (c *CreateTeamMemberRequest) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -473,6 +554,9 @@ func (c *CreateTeamMemberResponse) GetErrors() []*Error { } func (c *CreateTeamMemberResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -525,6 +609,9 @@ func (c *CreateTeamMemberResponse) MarshalJSON() ([]byte, error) { } func (c *CreateTeamMemberResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -570,6 +657,9 @@ func (g *GetTeamMemberResponse) GetErrors() []*Error { } func (g *GetTeamMemberResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -622,6 +712,9 @@ func (g *GetTeamMemberResponse) MarshalJSON() ([]byte, error) { } func (g *GetTeamMemberResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -686,6 +779,9 @@ func (s *SearchTeamMembersFilter) GetIsOwner() *bool { } func (s *SearchTeamMembersFilter) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -745,6 +841,9 @@ func (s *SearchTeamMembersFilter) MarshalJSON() ([]byte, error) { } func (s *SearchTeamMembersFilter) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -780,6 +879,9 @@ func (s *SearchTeamMembersQuery) GetFilter() *SearchTeamMembersFilter { } func (s *SearchTeamMembersQuery) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -825,6 +927,9 @@ func (s *SearchTeamMembersQuery) MarshalJSON() ([]byte, error) { } func (s *SearchTeamMembersQuery) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -881,6 +986,9 @@ func (s *SearchTeamMembersResponse) GetErrors() []*Error { } func (s *SearchTeamMembersResponse) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -940,6 +1048,9 @@ func (s *SearchTeamMembersResponse) MarshalJSON() ([]byte, error) { } func (s *SearchTeamMembersResponse) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -1089,6 +1200,9 @@ func (t *TeamMember) GetWageSetting() *WageSetting { } func (t *TeamMember) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -1211,6 +1325,9 @@ func (t *TeamMember) MarshalJSON() ([]byte, error) { } func (t *TeamMember) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -1257,6 +1374,9 @@ func (t *TeamMemberAssignedLocations) GetLocationIDs() []string { } func (t *TeamMemberAssignedLocations) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -1309,6 +1429,9 @@ func (t *TeamMemberAssignedLocations) MarshalJSON() ([]byte, error) { } func (t *TeamMemberAssignedLocations) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -1392,6 +1515,9 @@ func (u *UpdateTeamMemberRequest) GetTeamMember() *TeamMember { } func (u *UpdateTeamMemberRequest) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -1437,6 +1563,9 @@ func (u *UpdateTeamMemberRequest) MarshalJSON() ([]byte, error) { } func (u *UpdateTeamMemberRequest) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -1482,6 +1611,9 @@ func (u *UpdateTeamMemberResponse) GetErrors() []*Error { } func (u *UpdateTeamMemberResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -1534,6 +1666,9 @@ func (u *UpdateTeamMemberResponse) MarshalJSON() ([]byte, error) { } func (u *UpdateTeamMemberResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value diff --git a/team_members_test.go b/team_members_test.go new file mode 100644 index 0000000..ea655a4 --- /dev/null +++ b/team_members_test.go @@ -0,0 +1,3791 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersBatchCreateTeamMembersRequest(t *testing.T) { + t.Run("SetTeamMembers", func(t *testing.T) { + obj := &BatchCreateTeamMembersRequest{} + var fernTestValueTeamMembers map[string]*CreateTeamMemberRequest + obj.SetTeamMembers(fernTestValueTeamMembers) + assert.Equal(t, fernTestValueTeamMembers, obj.TeamMembers) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitBatchCreateTeamMembersRequest(t *testing.T) { + t.Run("SetTeamMembers_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchCreateTeamMembersRequest{} + var fernTestValueTeamMembers map[string]*CreateTeamMemberRequest + + // Act + obj.SetTeamMembers(fernTestValueTeamMembers) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBatchUpdateTeamMembersRequest(t *testing.T) { + t.Run("SetTeamMembers", func(t *testing.T) { + obj := &BatchUpdateTeamMembersRequest{} + var fernTestValueTeamMembers map[string]*UpdateTeamMemberRequest + obj.SetTeamMembers(fernTestValueTeamMembers) + assert.Equal(t, fernTestValueTeamMembers, obj.TeamMembers) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitBatchUpdateTeamMembersRequest(t *testing.T) { + t.Run("SetTeamMembers_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpdateTeamMembersRequest{} + var fernTestValueTeamMembers map[string]*UpdateTeamMemberRequest + + // Act + obj.SetTeamMembers(fernTestValueTeamMembers) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetTeamMembersRequest(t *testing.T) { + t.Run("SetTeamMemberID", func(t *testing.T) { + obj := &GetTeamMembersRequest{} + var fernTestValueTeamMemberID string + obj.SetTeamMemberID(fernTestValueTeamMemberID) + assert.Equal(t, fernTestValueTeamMemberID, obj.TeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetTeamMembersRequest(t *testing.T) { + t.Run("SetTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTeamMembersRequest{} + var fernTestValueTeamMemberID string + + // Act + obj.SetTeamMemberID(fernTestValueTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchTeamMembersRequest(t *testing.T) { + t.Run("SetQuery", func(t *testing.T) { + obj := &SearchTeamMembersRequest{} + var fernTestValueQuery *SearchTeamMembersQuery + obj.SetQuery(fernTestValueQuery) + assert.Equal(t, fernTestValueQuery, obj.Query) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &SearchTeamMembersRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchTeamMembersRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitSearchTeamMembersRequest(t *testing.T) { + t.Run("SetQuery_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTeamMembersRequest{} + var fernTestValueQuery *SearchTeamMembersQuery + + // Act + obj.SetQuery(fernTestValueQuery) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTeamMembersRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTeamMembersRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBatchCreateTeamMembersResponse(t *testing.T) { + t.Run("SetTeamMembers", func(t *testing.T) { + obj := &BatchCreateTeamMembersResponse{} + var fernTestValueTeamMembers map[string]*CreateTeamMemberResponse + obj.SetTeamMembers(fernTestValueTeamMembers) + assert.Equal(t, fernTestValueTeamMembers, obj.TeamMembers) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &BatchCreateTeamMembersResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBatchCreateTeamMembersResponse(t *testing.T) { + t.Run("GetTeamMembers", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchCreateTeamMembersResponse{} + var expected map[string]*CreateTeamMemberResponse + obj.TeamMembers = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMembers(), "getter should return the property value") + }) + + t.Run("GetTeamMembers_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchCreateTeamMembersResponse{} + obj.TeamMembers = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMembers(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMembers_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchCreateTeamMembersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMembers() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchCreateTeamMembersResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchCreateTeamMembersResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchCreateTeamMembersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBatchCreateTeamMembersResponse(t *testing.T) { + t.Run("SetTeamMembers_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchCreateTeamMembersResponse{} + var fernTestValueTeamMembers map[string]*CreateTeamMemberResponse + + // Act + obj.SetTeamMembers(fernTestValueTeamMembers) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchCreateTeamMembersResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBatchUpdateTeamMembersResponse(t *testing.T) { + t.Run("SetTeamMembers", func(t *testing.T) { + obj := &BatchUpdateTeamMembersResponse{} + var fernTestValueTeamMembers map[string]*UpdateTeamMemberResponse + obj.SetTeamMembers(fernTestValueTeamMembers) + assert.Equal(t, fernTestValueTeamMembers, obj.TeamMembers) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &BatchUpdateTeamMembersResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBatchUpdateTeamMembersResponse(t *testing.T) { + t.Run("GetTeamMembers", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpdateTeamMembersResponse{} + var expected map[string]*UpdateTeamMemberResponse + obj.TeamMembers = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMembers(), "getter should return the property value") + }) + + t.Run("GetTeamMembers_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpdateTeamMembersResponse{} + obj.TeamMembers = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMembers(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMembers_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchUpdateTeamMembersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMembers() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpdateTeamMembersResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpdateTeamMembersResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchUpdateTeamMembersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBatchUpdateTeamMembersResponse(t *testing.T) { + t.Run("SetTeamMembers_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpdateTeamMembersResponse{} + var fernTestValueTeamMembers map[string]*UpdateTeamMemberResponse + + // Act + obj.SetTeamMembers(fernTestValueTeamMembers) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpdateTeamMembersResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateTeamMemberRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateTeamMemberRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTeamMember", func(t *testing.T) { + obj := &CreateTeamMemberRequest{} + var fernTestValueTeamMember *TeamMember + obj.SetTeamMember(fernTestValueTeamMember) + assert.Equal(t, fernTestValueTeamMember, obj.TeamMember) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateTeamMemberRequest(t *testing.T) { + t.Run("GetIdempotencyKey", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTeamMemberRequest{} + var expected *string + obj.IdempotencyKey = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIdempotencyKey(), "getter should return the property value") + }) + + t.Run("GetIdempotencyKey_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTeamMemberRequest{} + obj.IdempotencyKey = nil + + // Act & Assert + assert.Nil(t, obj.GetIdempotencyKey(), "getter should return nil when property is nil") + }) + + t.Run("GetIdempotencyKey_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTeamMemberRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIdempotencyKey() // Should return zero value + }) + + t.Run("GetTeamMember", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTeamMemberRequest{} + var expected *TeamMember + obj.TeamMember = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMember(), "getter should return the property value") + }) + + t.Run("GetTeamMember_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTeamMemberRequest{} + obj.TeamMember = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMember(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMember_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTeamMemberRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMember() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateTeamMemberRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTeamMemberRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTeamMember_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTeamMemberRequest{} + var fernTestValueTeamMember *TeamMember + + // Act + obj.SetTeamMember(fernTestValueTeamMember) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateTeamMemberResponse(t *testing.T) { + t.Run("SetTeamMember", func(t *testing.T) { + obj := &CreateTeamMemberResponse{} + var fernTestValueTeamMember *TeamMember + obj.SetTeamMember(fernTestValueTeamMember) + assert.Equal(t, fernTestValueTeamMember, obj.TeamMember) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateTeamMemberResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateTeamMemberResponse(t *testing.T) { + t.Run("GetTeamMember", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTeamMemberResponse{} + var expected *TeamMember + obj.TeamMember = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMember(), "getter should return the property value") + }) + + t.Run("GetTeamMember_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTeamMemberResponse{} + obj.TeamMember = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMember(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMember_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTeamMemberResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMember() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTeamMemberResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTeamMemberResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTeamMemberResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateTeamMemberResponse(t *testing.T) { + t.Run("SetTeamMember_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTeamMemberResponse{} + var fernTestValueTeamMember *TeamMember + + // Act + obj.SetTeamMember(fernTestValueTeamMember) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTeamMemberResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetTeamMemberResponse(t *testing.T) { + t.Run("SetTeamMember", func(t *testing.T) { + obj := &GetTeamMemberResponse{} + var fernTestValueTeamMember *TeamMember + obj.SetTeamMember(fernTestValueTeamMember) + assert.Equal(t, fernTestValueTeamMember, obj.TeamMember) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &GetTeamMemberResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetTeamMemberResponse(t *testing.T) { + t.Run("GetTeamMember", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTeamMemberResponse{} + var expected *TeamMember + obj.TeamMember = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMember(), "getter should return the property value") + }) + + t.Run("GetTeamMember_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTeamMemberResponse{} + obj.TeamMember = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMember(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMember_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetTeamMemberResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMember() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTeamMemberResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTeamMemberResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetTeamMemberResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetTeamMemberResponse(t *testing.T) { + t.Run("SetTeamMember_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTeamMemberResponse{} + var fernTestValueTeamMember *TeamMember + + // Act + obj.SetTeamMember(fernTestValueTeamMember) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTeamMemberResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchTeamMembersFilter(t *testing.T) { + t.Run("SetLocationIDs", func(t *testing.T) { + obj := &SearchTeamMembersFilter{} + var fernTestValueLocationIDs []string + obj.SetLocationIDs(fernTestValueLocationIDs) + assert.Equal(t, fernTestValueLocationIDs, obj.LocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &SearchTeamMembersFilter{} + var fernTestValueStatus *TeamMemberStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsOwner", func(t *testing.T) { + obj := &SearchTeamMembersFilter{} + var fernTestValueIsOwner *bool + obj.SetIsOwner(fernTestValueIsOwner) + assert.Equal(t, fernTestValueIsOwner, obj.IsOwner) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchTeamMembersFilter(t *testing.T) { + t.Run("GetLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTeamMembersFilter{} + var expected []string + obj.LocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationIDs(), "getter should return the property value") + }) + + t.Run("GetLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTeamMembersFilter{} + obj.LocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTeamMembersFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationIDs() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTeamMembersFilter{} + var expected *TeamMemberStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTeamMembersFilter{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTeamMembersFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetIsOwner", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTeamMembersFilter{} + var expected *bool + obj.IsOwner = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsOwner(), "getter should return the property value") + }) + + t.Run("GetIsOwner_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTeamMembersFilter{} + obj.IsOwner = nil + + // Act & Assert + assert.Nil(t, obj.GetIsOwner(), "getter should return nil when property is nil") + }) + + t.Run("GetIsOwner_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTeamMembersFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsOwner() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchTeamMembersFilter(t *testing.T) { + t.Run("SetLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTeamMembersFilter{} + var fernTestValueLocationIDs []string + + // Act + obj.SetLocationIDs(fernTestValueLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTeamMembersFilter{} + var fernTestValueStatus *TeamMemberStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsOwner_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTeamMembersFilter{} + var fernTestValueIsOwner *bool + + // Act + obj.SetIsOwner(fernTestValueIsOwner) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchTeamMembersQuery(t *testing.T) { + t.Run("SetFilter", func(t *testing.T) { + obj := &SearchTeamMembersQuery{} + var fernTestValueFilter *SearchTeamMembersFilter + obj.SetFilter(fernTestValueFilter) + assert.Equal(t, fernTestValueFilter, obj.Filter) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchTeamMembersQuery(t *testing.T) { + t.Run("GetFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTeamMembersQuery{} + var expected *SearchTeamMembersFilter + obj.Filter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFilter(), "getter should return the property value") + }) + + t.Run("GetFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTeamMembersQuery{} + obj.Filter = nil + + // Act & Assert + assert.Nil(t, obj.GetFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTeamMembersQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFilter() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchTeamMembersQuery(t *testing.T) { + t.Run("SetFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTeamMembersQuery{} + var fernTestValueFilter *SearchTeamMembersFilter + + // Act + obj.SetFilter(fernTestValueFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchTeamMembersResponse(t *testing.T) { + t.Run("SetTeamMembers", func(t *testing.T) { + obj := &SearchTeamMembersResponse{} + var fernTestValueTeamMembers []*TeamMember + obj.SetTeamMembers(fernTestValueTeamMembers) + assert.Equal(t, fernTestValueTeamMembers, obj.TeamMembers) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchTeamMembersResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &SearchTeamMembersResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchTeamMembersResponse(t *testing.T) { + t.Run("GetTeamMembers", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTeamMembersResponse{} + var expected []*TeamMember + obj.TeamMembers = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMembers(), "getter should return the property value") + }) + + t.Run("GetTeamMembers_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTeamMembersResponse{} + obj.TeamMembers = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMembers(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMembers_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTeamMembersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMembers() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTeamMembersResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTeamMembersResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTeamMembersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTeamMembersResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTeamMembersResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTeamMembersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchTeamMembersResponse(t *testing.T) { + t.Run("SetTeamMembers_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTeamMembersResponse{} + var fernTestValueTeamMembers []*TeamMember + + // Act + obj.SetTeamMembers(fernTestValueTeamMembers) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTeamMembersResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTeamMembersResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTeamMember(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &TeamMember{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReferenceID", func(t *testing.T) { + obj := &TeamMember{} + var fernTestValueReferenceID *string + obj.SetReferenceID(fernTestValueReferenceID) + assert.Equal(t, fernTestValueReferenceID, obj.ReferenceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsOwner", func(t *testing.T) { + obj := &TeamMember{} + var fernTestValueIsOwner *bool + obj.SetIsOwner(fernTestValueIsOwner) + assert.Equal(t, fernTestValueIsOwner, obj.IsOwner) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &TeamMember{} + var fernTestValueStatus *TeamMemberStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGivenName", func(t *testing.T) { + obj := &TeamMember{} + var fernTestValueGivenName *string + obj.SetGivenName(fernTestValueGivenName) + assert.Equal(t, fernTestValueGivenName, obj.GivenName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFamilyName", func(t *testing.T) { + obj := &TeamMember{} + var fernTestValueFamilyName *string + obj.SetFamilyName(fernTestValueFamilyName) + assert.Equal(t, fernTestValueFamilyName, obj.FamilyName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEmailAddress", func(t *testing.T) { + obj := &TeamMember{} + var fernTestValueEmailAddress *string + obj.SetEmailAddress(fernTestValueEmailAddress) + assert.Equal(t, fernTestValueEmailAddress, obj.EmailAddress) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPhoneNumber", func(t *testing.T) { + obj := &TeamMember{} + var fernTestValuePhoneNumber *string + obj.SetPhoneNumber(fernTestValuePhoneNumber) + assert.Equal(t, fernTestValuePhoneNumber, obj.PhoneNumber) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &TeamMember{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &TeamMember{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAssignedLocations", func(t *testing.T) { + obj := &TeamMember{} + var fernTestValueAssignedLocations *TeamMemberAssignedLocations + obj.SetAssignedLocations(fernTestValueAssignedLocations) + assert.Equal(t, fernTestValueAssignedLocations, obj.AssignedLocations) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetWageSetting", func(t *testing.T) { + obj := &TeamMember{} + var fernTestValueWageSetting *WageSetting + obj.SetWageSetting(fernTestValueWageSetting) + assert.Equal(t, fernTestValueWageSetting, obj.WageSetting) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTeamMember(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMember + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetReferenceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + var expected *string + obj.ReferenceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReferenceID(), "getter should return the property value") + }) + + t.Run("GetReferenceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + obj.ReferenceID = nil + + // Act & Assert + assert.Nil(t, obj.GetReferenceID(), "getter should return nil when property is nil") + }) + + t.Run("GetReferenceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMember + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReferenceID() // Should return zero value + }) + + t.Run("GetIsOwner", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + var expected *bool + obj.IsOwner = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsOwner(), "getter should return the property value") + }) + + t.Run("GetIsOwner_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + obj.IsOwner = nil + + // Act & Assert + assert.Nil(t, obj.GetIsOwner(), "getter should return nil when property is nil") + }) + + t.Run("GetIsOwner_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMember + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsOwner() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + var expected *TeamMemberStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMember + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetGivenName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + var expected *string + obj.GivenName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGivenName(), "getter should return the property value") + }) + + t.Run("GetGivenName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + obj.GivenName = nil + + // Act & Assert + assert.Nil(t, obj.GetGivenName(), "getter should return nil when property is nil") + }) + + t.Run("GetGivenName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMember + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGivenName() // Should return zero value + }) + + t.Run("GetFamilyName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + var expected *string + obj.FamilyName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFamilyName(), "getter should return the property value") + }) + + t.Run("GetFamilyName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + obj.FamilyName = nil + + // Act & Assert + assert.Nil(t, obj.GetFamilyName(), "getter should return nil when property is nil") + }) + + t.Run("GetFamilyName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMember + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFamilyName() // Should return zero value + }) + + t.Run("GetEmailAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + var expected *string + obj.EmailAddress = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEmailAddress(), "getter should return the property value") + }) + + t.Run("GetEmailAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + obj.EmailAddress = nil + + // Act & Assert + assert.Nil(t, obj.GetEmailAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetEmailAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMember + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEmailAddress() // Should return zero value + }) + + t.Run("GetPhoneNumber", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + var expected *string + obj.PhoneNumber = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPhoneNumber(), "getter should return the property value") + }) + + t.Run("GetPhoneNumber_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + obj.PhoneNumber = nil + + // Act & Assert + assert.Nil(t, obj.GetPhoneNumber(), "getter should return nil when property is nil") + }) + + t.Run("GetPhoneNumber_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMember + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPhoneNumber() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMember + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMember + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetAssignedLocations", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + var expected *TeamMemberAssignedLocations + obj.AssignedLocations = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAssignedLocations(), "getter should return the property value") + }) + + t.Run("GetAssignedLocations_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + obj.AssignedLocations = nil + + // Act & Assert + assert.Nil(t, obj.GetAssignedLocations(), "getter should return nil when property is nil") + }) + + t.Run("GetAssignedLocations_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMember + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAssignedLocations() // Should return zero value + }) + + t.Run("GetWageSetting", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + var expected *WageSetting + obj.WageSetting = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetWageSetting(), "getter should return the property value") + }) + + t.Run("GetWageSetting_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + obj.WageSetting = nil + + // Act & Assert + assert.Nil(t, obj.GetWageSetting(), "getter should return nil when property is nil") + }) + + t.Run("GetWageSetting_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMember + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetWageSetting() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTeamMember(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReferenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + var fernTestValueReferenceID *string + + // Act + obj.SetReferenceID(fernTestValueReferenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsOwner_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + var fernTestValueIsOwner *bool + + // Act + obj.SetIsOwner(fernTestValueIsOwner) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + var fernTestValueStatus *TeamMemberStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGivenName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + var fernTestValueGivenName *string + + // Act + obj.SetGivenName(fernTestValueGivenName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFamilyName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + var fernTestValueFamilyName *string + + // Act + obj.SetFamilyName(fernTestValueFamilyName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEmailAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + var fernTestValueEmailAddress *string + + // Act + obj.SetEmailAddress(fernTestValueEmailAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPhoneNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + var fernTestValuePhoneNumber *string + + // Act + obj.SetPhoneNumber(fernTestValuePhoneNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAssignedLocations_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + var fernTestValueAssignedLocations *TeamMemberAssignedLocations + + // Act + obj.SetAssignedLocations(fernTestValueAssignedLocations) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetWageSetting_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + var fernTestValueWageSetting *WageSetting + + // Act + obj.SetWageSetting(fernTestValueWageSetting) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTeamMemberAssignedLocations(t *testing.T) { + t.Run("SetAssignmentType", func(t *testing.T) { + obj := &TeamMemberAssignedLocations{} + var fernTestValueAssignmentType *TeamMemberAssignedLocationsAssignmentType + obj.SetAssignmentType(fernTestValueAssignmentType) + assert.Equal(t, fernTestValueAssignmentType, obj.AssignmentType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationIDs", func(t *testing.T) { + obj := &TeamMemberAssignedLocations{} + var fernTestValueLocationIDs []string + obj.SetLocationIDs(fernTestValueLocationIDs) + assert.Equal(t, fernTestValueLocationIDs, obj.LocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTeamMemberAssignedLocations(t *testing.T) { + t.Run("GetAssignmentType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberAssignedLocations{} + var expected *TeamMemberAssignedLocationsAssignmentType + obj.AssignmentType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAssignmentType(), "getter should return the property value") + }) + + t.Run("GetAssignmentType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberAssignedLocations{} + obj.AssignmentType = nil + + // Act & Assert + assert.Nil(t, obj.GetAssignmentType(), "getter should return nil when property is nil") + }) + + t.Run("GetAssignmentType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberAssignedLocations + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAssignmentType() // Should return zero value + }) + + t.Run("GetLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberAssignedLocations{} + var expected []string + obj.LocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationIDs(), "getter should return the property value") + }) + + t.Run("GetLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberAssignedLocations{} + obj.LocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberAssignedLocations + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationIDs() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTeamMemberAssignedLocations(t *testing.T) { + t.Run("SetAssignmentType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberAssignedLocations{} + var fernTestValueAssignmentType *TeamMemberAssignedLocationsAssignmentType + + // Act + obj.SetAssignmentType(fernTestValueAssignmentType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberAssignedLocations{} + var fernTestValueLocationIDs []string + + // Act + obj.SetLocationIDs(fernTestValueLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateTeamMemberRequest(t *testing.T) { + t.Run("SetTeamMember", func(t *testing.T) { + obj := &UpdateTeamMemberRequest{} + var fernTestValueTeamMember *TeamMember + obj.SetTeamMember(fernTestValueTeamMember) + assert.Equal(t, fernTestValueTeamMember, obj.TeamMember) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateTeamMemberRequest(t *testing.T) { + t.Run("GetTeamMember", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTeamMemberRequest{} + var expected *TeamMember + obj.TeamMember = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMember(), "getter should return the property value") + }) + + t.Run("GetTeamMember_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTeamMemberRequest{} + obj.TeamMember = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMember(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMember_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTeamMemberRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMember() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateTeamMemberRequest(t *testing.T) { + t.Run("SetTeamMember_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTeamMemberRequest{} + var fernTestValueTeamMember *TeamMember + + // Act + obj.SetTeamMember(fernTestValueTeamMember) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateTeamMemberResponse(t *testing.T) { + t.Run("SetTeamMember", func(t *testing.T) { + obj := &UpdateTeamMemberResponse{} + var fernTestValueTeamMember *TeamMember + obj.SetTeamMember(fernTestValueTeamMember) + assert.Equal(t, fernTestValueTeamMember, obj.TeamMember) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateTeamMemberResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateTeamMemberResponse(t *testing.T) { + t.Run("GetTeamMember", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTeamMemberResponse{} + var expected *TeamMember + obj.TeamMember = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMember(), "getter should return the property value") + }) + + t.Run("GetTeamMember_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTeamMemberResponse{} + obj.TeamMember = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMember(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMember_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTeamMemberResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMember() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTeamMemberResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTeamMemberResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTeamMemberResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateTeamMemberResponse(t *testing.T) { + t.Run("SetTeamMember_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTeamMemberResponse{} + var fernTestValueTeamMember *TeamMember + + // Act + obj.SetTeamMember(fernTestValueTeamMember) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTeamMemberResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateTeamMembersRequest(t *testing.T) { + t.Run("SetTeamMemberID", func(t *testing.T) { + obj := &UpdateTeamMembersRequest{} + var fernTestValueTeamMemberID string + obj.SetTeamMemberID(fernTestValueTeamMemberID) + assert.Equal(t, fernTestValueTeamMemberID, obj.TeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateTeamMembersRequest(t *testing.T) { + t.Run("SetTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTeamMembersRequest{} + var fernTestValueTeamMemberID string + + // Act + obj.SetTeamMemberID(fernTestValueTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingBatchCreateTeamMembersResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchCreateTeamMembersResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BatchCreateTeamMembersResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BatchCreateTeamMembersResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BatchCreateTeamMembersResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBatchUpdateTeamMembersResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpdateTeamMembersResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BatchUpdateTeamMembersResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BatchUpdateTeamMembersResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BatchUpdateTeamMembersResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateTeamMemberRequest(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTeamMemberRequest{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateTeamMemberRequest + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateTeamMemberRequest + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateTeamMemberRequest + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateTeamMemberResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTeamMemberResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateTeamMemberResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateTeamMemberResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateTeamMemberResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetTeamMemberResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTeamMemberResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetTeamMemberResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetTeamMemberResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetTeamMemberResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchTeamMembersFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTeamMembersFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchTeamMembersFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchTeamMembersFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchTeamMembersFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchTeamMembersQuery(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTeamMembersQuery{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchTeamMembersQuery + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchTeamMembersQuery + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchTeamMembersQuery + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchTeamMembersResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTeamMembersResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchTeamMembersResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchTeamMembersResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchTeamMembersResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTeamMember(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMember{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TeamMember + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TeamMember + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TeamMember + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTeamMemberAssignedLocations(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberAssignedLocations{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TeamMemberAssignedLocations + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TeamMemberAssignedLocations + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TeamMemberAssignedLocations + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateTeamMemberRequest(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTeamMemberRequest{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateTeamMemberRequest + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateTeamMemberRequest + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateTeamMemberRequest + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateTeamMemberResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTeamMemberResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateTeamMemberResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateTeamMemberResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateTeamMemberResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringBatchCreateTeamMembersResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BatchCreateTeamMembersResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchCreateTeamMembersResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBatchUpdateTeamMembersResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BatchUpdateTeamMembersResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchUpdateTeamMembersResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateTeamMemberRequest(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateTeamMemberRequest{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTeamMemberRequest + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateTeamMemberResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateTeamMemberResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTeamMemberResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetTeamMemberResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetTeamMemberResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetTeamMemberResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchTeamMembersFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchTeamMembersFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTeamMembersFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchTeamMembersQuery(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchTeamMembersQuery{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTeamMembersQuery + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchTeamMembersResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchTeamMembersResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTeamMembersResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTeamMember(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TeamMember{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMember + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTeamMemberAssignedLocations(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TeamMemberAssignedLocations{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberAssignedLocations + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateTeamMemberRequest(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateTeamMemberRequest{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTeamMemberRequest + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateTeamMemberResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateTeamMemberResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTeamMemberResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestEnumTeamMemberAssignedLocationsAssignmentType(t *testing.T) { + t.Run("NewFromString_ALL_CURRENT_AND_FUTURE_LOCATIONS", func(t *testing.T) { + t.Parallel() + val, err := NewTeamMemberAssignedLocationsAssignmentTypeFromString("ALL_CURRENT_AND_FUTURE_LOCATIONS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TeamMemberAssignedLocationsAssignmentType("ALL_CURRENT_AND_FUTURE_LOCATIONS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EXPLICIT_LOCATIONS", func(t *testing.T) { + t.Parallel() + val, err := NewTeamMemberAssignedLocationsAssignmentTypeFromString("EXPLICIT_LOCATIONS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TeamMemberAssignedLocationsAssignmentType("EXPLICIT_LOCATIONS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewTeamMemberAssignedLocationsAssignmentTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewTeamMemberAssignedLocationsAssignmentTypeFromString("ALL_CURRENT_AND_FUTURE_LOCATIONS") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumTeamMemberStatus(t *testing.T) { + t.Run("NewFromString_ACTIVE", func(t *testing.T) { + t.Parallel() + val, err := NewTeamMemberStatusFromString("ACTIVE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TeamMemberStatus("ACTIVE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INACTIVE", func(t *testing.T) { + t.Parallel() + val, err := NewTeamMemberStatusFromString("INACTIVE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TeamMemberStatus("INACTIVE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewTeamMemberStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewTeamMemberStatusFromString("ACTIVE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestExtraPropertiesBatchCreateTeamMembersResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BatchCreateTeamMembersResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchCreateTeamMembersResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBatchUpdateTeamMembersResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BatchUpdateTeamMembersResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchUpdateTeamMembersResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateTeamMemberRequest(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateTeamMemberRequest{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTeamMemberRequest + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateTeamMemberResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateTeamMemberResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTeamMemberResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetTeamMemberResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetTeamMemberResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetTeamMemberResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchTeamMembersFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchTeamMembersFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTeamMembersFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchTeamMembersQuery(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchTeamMembersQuery{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTeamMembersQuery + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchTeamMembersResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchTeamMembersResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTeamMembersResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTeamMember(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TeamMember{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMember + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTeamMemberAssignedLocations(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TeamMemberAssignedLocations{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberAssignedLocations + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateTeamMemberRequest(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateTeamMemberRequest{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTeamMemberRequest + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateTeamMemberResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateTeamMemberResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTeamMemberResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/team_test.go b/team_test.go new file mode 100644 index 0000000..d4778ab --- /dev/null +++ b/team_test.go @@ -0,0 +1,1753 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersCreateJobRequest(t *testing.T) { + t.Run("SetJob", func(t *testing.T) { + obj := &CreateJobRequest{} + var fernTestValueJob *Job + obj.SetJob(fernTestValueJob) + assert.Equal(t, fernTestValueJob, obj.Job) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateJobRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateJobRequest(t *testing.T) { + t.Run("SetJob_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateJobRequest{} + var fernTestValueJob *Job + + // Act + obj.SetJob(fernTestValueJob) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateJobRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListJobsRequest(t *testing.T) { + t.Run("SetCursor", func(t *testing.T) { + obj := &ListJobsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListJobsRequest(t *testing.T) { + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListJobsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRetrieveJobRequest(t *testing.T) { + t.Run("SetJobID", func(t *testing.T) { + obj := &RetrieveJobRequest{} + var fernTestValueJobID string + obj.SetJobID(fernTestValueJobID) + assert.Equal(t, fernTestValueJobID, obj.JobID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitRetrieveJobRequest(t *testing.T) { + t.Run("SetJobID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveJobRequest{} + var fernTestValueJobID string + + // Act + obj.SetJobID(fernTestValueJobID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateJobRequest(t *testing.T) { + t.Run("SetJobID", func(t *testing.T) { + obj := &UpdateJobRequest{} + var fernTestValueJobID string + obj.SetJobID(fernTestValueJobID) + assert.Equal(t, fernTestValueJobID, obj.JobID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetJob", func(t *testing.T) { + obj := &UpdateJobRequest{} + var fernTestValueJob *Job + obj.SetJob(fernTestValueJob) + assert.Equal(t, fernTestValueJob, obj.Job) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateJobRequest(t *testing.T) { + t.Run("SetJobID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateJobRequest{} + var fernTestValueJobID string + + // Act + obj.SetJobID(fernTestValueJobID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetJob_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateJobRequest{} + var fernTestValueJob *Job + + // Act + obj.SetJob(fernTestValueJob) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateJobResponse(t *testing.T) { + t.Run("SetJob", func(t *testing.T) { + obj := &CreateJobResponse{} + var fernTestValueJob *Job + obj.SetJob(fernTestValueJob) + assert.Equal(t, fernTestValueJob, obj.Job) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateJobResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateJobResponse(t *testing.T) { + t.Run("GetJob", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateJobResponse{} + var expected *Job + obj.Job = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetJob(), "getter should return the property value") + }) + + t.Run("GetJob_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateJobResponse{} + obj.Job = nil + + // Act & Assert + assert.Nil(t, obj.GetJob(), "getter should return nil when property is nil") + }) + + t.Run("GetJob_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateJobResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetJob() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateJobResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateJobResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateJobResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateJobResponse(t *testing.T) { + t.Run("SetJob_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateJobResponse{} + var fernTestValueJob *Job + + // Act + obj.SetJob(fernTestValueJob) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateJobResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersJob(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &Job{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTitle", func(t *testing.T) { + obj := &Job{} + var fernTestValueTitle *string + obj.SetTitle(fernTestValueTitle) + assert.Equal(t, fernTestValueTitle, obj.Title) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsTipEligible", func(t *testing.T) { + obj := &Job{} + var fernTestValueIsTipEligible *bool + obj.SetIsTipEligible(fernTestValueIsTipEligible) + assert.Equal(t, fernTestValueIsTipEligible, obj.IsTipEligible) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &Job{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &Job{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &Job{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersJob(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Job{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Job{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Job + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetTitle", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Job{} + var expected *string + obj.Title = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTitle(), "getter should return the property value") + }) + + t.Run("GetTitle_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Job{} + obj.Title = nil + + // Act & Assert + assert.Nil(t, obj.GetTitle(), "getter should return nil when property is nil") + }) + + t.Run("GetTitle_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Job + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTitle() // Should return zero value + }) + + t.Run("GetIsTipEligible", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Job{} + var expected *bool + obj.IsTipEligible = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsTipEligible(), "getter should return the property value") + }) + + t.Run("GetIsTipEligible_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Job{} + obj.IsTipEligible = nil + + // Act & Assert + assert.Nil(t, obj.GetIsTipEligible(), "getter should return nil when property is nil") + }) + + t.Run("GetIsTipEligible_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Job + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsTipEligible() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Job{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Job{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Job + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Job{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Job{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Job + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Job{} + var expected *int + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Job{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Job + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + +} + +func TestSettersMarkExplicitJob(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Job{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTitle_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Job{} + var fernTestValueTitle *string + + // Act + obj.SetTitle(fernTestValueTitle) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsTipEligible_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Job{} + var fernTestValueIsTipEligible *bool + + // Act + obj.SetIsTipEligible(fernTestValueIsTipEligible) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Job{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Job{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Job{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListJobsResponse(t *testing.T) { + t.Run("SetJobs", func(t *testing.T) { + obj := &ListJobsResponse{} + var fernTestValueJobs []*Job + obj.SetJobs(fernTestValueJobs) + assert.Equal(t, fernTestValueJobs, obj.Jobs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListJobsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &ListJobsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListJobsResponse(t *testing.T) { + t.Run("GetJobs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListJobsResponse{} + var expected []*Job + obj.Jobs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetJobs(), "getter should return the property value") + }) + + t.Run("GetJobs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListJobsResponse{} + obj.Jobs = nil + + // Act & Assert + assert.Nil(t, obj.GetJobs(), "getter should return nil when property is nil") + }) + + t.Run("GetJobs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListJobsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetJobs() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListJobsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListJobsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListJobsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListJobsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListJobsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListJobsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListJobsResponse(t *testing.T) { + t.Run("SetJobs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListJobsResponse{} + var fernTestValueJobs []*Job + + // Act + obj.SetJobs(fernTestValueJobs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListJobsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListJobsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRetrieveJobResponse(t *testing.T) { + t.Run("SetJob", func(t *testing.T) { + obj := &RetrieveJobResponse{} + var fernTestValueJob *Job + obj.SetJob(fernTestValueJob) + assert.Equal(t, fernTestValueJob, obj.Job) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &RetrieveJobResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRetrieveJobResponse(t *testing.T) { + t.Run("GetJob", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveJobResponse{} + var expected *Job + obj.Job = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetJob(), "getter should return the property value") + }) + + t.Run("GetJob_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveJobResponse{} + obj.Job = nil + + // Act & Assert + assert.Nil(t, obj.GetJob(), "getter should return nil when property is nil") + }) + + t.Run("GetJob_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveJobResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetJob() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveJobResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveJobResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveJobResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRetrieveJobResponse(t *testing.T) { + t.Run("SetJob_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveJobResponse{} + var fernTestValueJob *Job + + // Act + obj.SetJob(fernTestValueJob) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveJobResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateJobResponse(t *testing.T) { + t.Run("SetJob", func(t *testing.T) { + obj := &UpdateJobResponse{} + var fernTestValueJob *Job + obj.SetJob(fernTestValueJob) + assert.Equal(t, fernTestValueJob, obj.Job) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateJobResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateJobResponse(t *testing.T) { + t.Run("GetJob", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateJobResponse{} + var expected *Job + obj.Job = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetJob(), "getter should return the property value") + }) + + t.Run("GetJob_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateJobResponse{} + obj.Job = nil + + // Act & Assert + assert.Nil(t, obj.GetJob(), "getter should return nil when property is nil") + }) + + t.Run("GetJob_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateJobResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetJob() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateJobResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateJobResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateJobResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateJobResponse(t *testing.T) { + t.Run("SetJob_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateJobResponse{} + var fernTestValueJob *Job + + // Act + obj.SetJob(fernTestValueJob) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateJobResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingCreateJobResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateJobResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateJobResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateJobResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateJobResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingJob(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Job{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Job + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Job + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Job + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListJobsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListJobsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListJobsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListJobsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListJobsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRetrieveJobResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveJobResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RetrieveJobResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RetrieveJobResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RetrieveJobResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateJobResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateJobResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateJobResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateJobResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateJobResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringCreateJobResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateJobResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateJobResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringJob(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Job{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Job + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListJobsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListJobsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListJobsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRetrieveJobResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RetrieveJobResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveJobResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateJobResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateJobResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateJobResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestExtraPropertiesCreateJobResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateJobResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateJobResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesJob(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Job{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Job + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListJobsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListJobsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListJobsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRetrieveJobResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RetrieveJobResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveJobResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateJobResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateJobResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateJobResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/teammembers/team_members_test/team_members_test.go b/teammembers/team_members_test/team_members_test.go new file mode 100644 index 0000000..8529648 --- /dev/null +++ b/teammembers/team_members_test/team_members_test.go @@ -0,0 +1,451 @@ +// Code generated by Fern. DO NOT EDIT. + +package team_members_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestTeamMembersCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CreateTeamMemberRequest{ + IdempotencyKey: square.String( + "idempotency-key-0", + ), + TeamMember: &square.TeamMember{ + ReferenceID: square.String( + "reference_id_1", + ), + Status: square.TeamMemberStatusActive.Ptr(), + GivenName: square.String( + "Joe", + ), + FamilyName: square.String( + "Doe", + ), + EmailAddress: square.String( + "joe_doe@gmail.com", + ), + PhoneNumber: square.String( + "+14159283333", + ), + AssignedLocations: &square.TeamMemberAssignedLocations{ + AssignmentType: square.TeamMemberAssignedLocationsAssignmentTypeExplicitLocations.Ptr(), + LocationIDs: []string{ + "YSGH2WBKG94QZ", + "GA2Y9HSJ8KRYT", + }, + }, + WageSetting: &square.WageSetting{ + JobAssignments: []*square.JobAssignment{ + &square.JobAssignment{ + PayType: square.JobAssignmentPayTypeSalary, + AnnualRate: &square.Money{ + Amount: square.Int64( + int64(3000000), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + WeeklyHours: square.Int( + 40, + ), + JobID: square.String( + "FjS8x95cqHiMenw4f1NAUH4P", + ), + }, + &square.JobAssignment{ + PayType: square.JobAssignmentPayTypeHourly, + HourlyRate: &square.Money{ + Amount: square.Int64( + int64(2000), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + JobID: square.String( + "VDNpRv8da51NU8qZFC5zDWpF", + ), + }, + }, + IsOvertimeExempt: square.Bool( + true, + ), + }, + }, + } + _, invocationErr := client.TeamMembers.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTeamMembersCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTeamMembersCreateWithWireMock", "POST", "/v2/team-members", nil, 1) +} + +func TestTeamMembersBatchCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.BatchCreateTeamMembersRequest{ + TeamMembers: map[string]*square.CreateTeamMemberRequest{ + "idempotency-key-1": &square.CreateTeamMemberRequest{ + TeamMember: &square.TeamMember{ + ReferenceID: square.String( + "reference_id_1", + ), + GivenName: square.String( + "Joe", + ), + FamilyName: square.String( + "Doe", + ), + EmailAddress: square.String( + "joe_doe@gmail.com", + ), + PhoneNumber: square.String( + "+14159283333", + ), + AssignedLocations: &square.TeamMemberAssignedLocations{ + AssignmentType: square.TeamMemberAssignedLocationsAssignmentTypeExplicitLocations.Ptr(), + LocationIDs: []string{ + "YSGH2WBKG94QZ", + "GA2Y9HSJ8KRYT", + }, + }, + }, + }, + "idempotency-key-2": &square.CreateTeamMemberRequest{ + TeamMember: &square.TeamMember{ + ReferenceID: square.String( + "reference_id_2", + ), + GivenName: square.String( + "Jane", + ), + FamilyName: square.String( + "Smith", + ), + EmailAddress: square.String( + "jane_smith@gmail.com", + ), + PhoneNumber: square.String( + "+14159223334", + ), + AssignedLocations: &square.TeamMemberAssignedLocations{ + AssignmentType: square.TeamMemberAssignedLocationsAssignmentTypeAllCurrentAndFutureLocations.Ptr(), + }, + }, + }, + }, + } + _, invocationErr := client.TeamMembers.BatchCreate( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTeamMembersBatchCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTeamMembersBatchCreateWithWireMock", "POST", "/v2/team-members/bulk-create", nil, 1) +} + +func TestTeamMembersBatchUpdateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.BatchUpdateTeamMembersRequest{ + TeamMembers: map[string]*square.UpdateTeamMemberRequest{ + "AFMwA08kR-MIF-3Vs0OE": &square.UpdateTeamMemberRequest{ + TeamMember: &square.TeamMember{ + ReferenceID: square.String( + "reference_id_2", + ), + IsOwner: square.Bool( + false, + ), + Status: square.TeamMemberStatusActive.Ptr(), + GivenName: square.String( + "Jane", + ), + FamilyName: square.String( + "Smith", + ), + EmailAddress: square.String( + "jane_smith@gmail.com", + ), + PhoneNumber: square.String( + "+14159223334", + ), + AssignedLocations: &square.TeamMemberAssignedLocations{ + AssignmentType: square.TeamMemberAssignedLocationsAssignmentTypeAllCurrentAndFutureLocations.Ptr(), + }, + }, + }, + "fpgteZNMaf0qOK-a4t6P": &square.UpdateTeamMemberRequest{ + TeamMember: &square.TeamMember{ + ReferenceID: square.String( + "reference_id_1", + ), + IsOwner: square.Bool( + false, + ), + Status: square.TeamMemberStatusActive.Ptr(), + GivenName: square.String( + "Joe", + ), + FamilyName: square.String( + "Doe", + ), + EmailAddress: square.String( + "joe_doe@gmail.com", + ), + PhoneNumber: square.String( + "+14159283333", + ), + AssignedLocations: &square.TeamMemberAssignedLocations{ + AssignmentType: square.TeamMemberAssignedLocationsAssignmentTypeExplicitLocations.Ptr(), + LocationIDs: []string{ + "YSGH2WBKG94QZ", + "GA2Y9HSJ8KRYT", + }, + }, + }, + }, + }, + } + _, invocationErr := client.TeamMembers.BatchUpdate( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTeamMembersBatchUpdateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTeamMembersBatchUpdateWithWireMock", "POST", "/v2/team-members/bulk-update", nil, 1) +} + +func TestTeamMembersSearchWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.SearchTeamMembersRequest{ + Query: &square.SearchTeamMembersQuery{ + Filter: &square.SearchTeamMembersFilter{ + LocationIDs: []string{ + "0G5P3VGACMMQZ", + }, + Status: square.TeamMemberStatusActive.Ptr(), + }, + }, + Limit: square.Int( + 10, + ), + } + _, invocationErr := client.TeamMembers.Search( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTeamMembersSearchWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTeamMembersSearchWithWireMock", "POST", "/v2/team-members/search", nil, 1) +} + +func TestTeamMembersGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.GetTeamMembersRequest{ + TeamMemberID: "team_member_id", + } + _, invocationErr := client.TeamMembers.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTeamMembersGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTeamMembersGetWithWireMock", "GET", "/v2/team-members/team_member_id", nil, 1) +} + +func TestTeamMembersUpdateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.UpdateTeamMembersRequest{ + TeamMemberID: "team_member_id", + Body: &square.UpdateTeamMemberRequest{ + TeamMember: &square.TeamMember{ + ReferenceID: square.String( + "reference_id_1", + ), + Status: square.TeamMemberStatusActive.Ptr(), + GivenName: square.String( + "Joe", + ), + FamilyName: square.String( + "Doe", + ), + EmailAddress: square.String( + "joe_doe@gmail.com", + ), + PhoneNumber: square.String( + "+14159283333", + ), + AssignedLocations: &square.TeamMemberAssignedLocations{ + AssignmentType: square.TeamMemberAssignedLocationsAssignmentTypeExplicitLocations.Ptr(), + LocationIDs: []string{ + "YSGH2WBKG94QZ", + "GA2Y9HSJ8KRYT", + }, + }, + WageSetting: &square.WageSetting{ + JobAssignments: []*square.JobAssignment{ + &square.JobAssignment{ + PayType: square.JobAssignmentPayTypeSalary, + AnnualRate: &square.Money{ + Amount: square.Int64( + int64(3000000), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + WeeklyHours: square.Int( + 40, + ), + JobID: square.String( + "FjS8x95cqHiMenw4f1NAUH4P", + ), + }, + &square.JobAssignment{ + PayType: square.JobAssignmentPayTypeHourly, + HourlyRate: &square.Money{ + Amount: square.Int64( + int64(1200), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + JobID: square.String( + "VDNpRv8da51NU8qZFC5zDWpF", + ), + }, + }, + IsOvertimeExempt: square.Bool( + true, + ), + }, + }, + }, + } + _, invocationErr := client.TeamMembers.Update( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTeamMembersUpdateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTeamMembersUpdateWithWireMock", "PUT", "/v2/team-members/team_member_id", nil, 1) +} diff --git a/teammembers/wage_setting.go b/teammembers/wage_setting.go index c39f7ca..66c0336 100644 --- a/teammembers/wage_setting.go +++ b/teammembers/wage_setting.go @@ -3,7 +3,9 @@ package teammembers import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" big "math/big" ) @@ -46,7 +48,7 @@ type UpdateWageSettingRequest struct { // Requires Square API version 2024-12-18 or later. // - `job_title` - Use the exact, case-sensitive spelling of an existing title unless you want to create a new job. // This value is ignored if `job_id` is also provided. - WageSetting *v3.WageSetting `json:"wage_setting,omitempty" url:"-"` + WageSetting *v3.WageSetting `json:"wage_setting" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -72,3 +74,24 @@ func (u *UpdateWageSettingRequest) SetWageSetting(wageSetting *v3.WageSetting) { u.WageSetting = wageSetting u.require(updateWageSettingRequestFieldWageSetting) } + +func (u *UpdateWageSettingRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdateWageSettingRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdateWageSettingRequest(body) + return nil +} + +func (u *UpdateWageSettingRequest) MarshalJSON() ([]byte, error) { + type embed UpdateWageSettingRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/teammembers/wage_setting_test.go b/teammembers/wage_setting_test.go new file mode 100644 index 0000000..af36d23 --- /dev/null +++ b/teammembers/wage_setting_test.go @@ -0,0 +1,100 @@ +// Code generated by Fern. DO NOT EDIT. + +package teammembers + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersGetWageSettingRequest(t *testing.T) { + t.Run("SetTeamMemberID", func(t *testing.T) { + obj := &GetWageSettingRequest{} + var fernTestValueTeamMemberID string + obj.SetTeamMemberID(fernTestValueTeamMemberID) + assert.Equal(t, fernTestValueTeamMemberID, obj.TeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetWageSettingRequest(t *testing.T) { + t.Run("SetTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetWageSettingRequest{} + var fernTestValueTeamMemberID string + + // Act + obj.SetTeamMemberID(fernTestValueTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateWageSettingRequest(t *testing.T) { + t.Run("SetTeamMemberID", func(t *testing.T) { + obj := &UpdateWageSettingRequest{} + var fernTestValueTeamMemberID string + obj.SetTeamMemberID(fernTestValueTeamMemberID) + assert.Equal(t, fernTestValueTeamMemberID, obj.TeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateWageSettingRequest(t *testing.T) { + t.Run("SetTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWageSettingRequest{} + var fernTestValueTeamMemberID string + + // Act + obj.SetTeamMemberID(fernTestValueTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/teammembers/wagesetting/team_members_wage_setting_test/team_members_wage_setting_test.go b/teammembers/wagesetting/team_members_wage_setting_test/team_members_wage_setting_test.go new file mode 100644 index 0000000..58ccb56 --- /dev/null +++ b/teammembers/wagesetting/team_members_wage_setting_test/team_members_wage_setting_test.go @@ -0,0 +1,148 @@ +// Code generated by Fern. DO NOT EDIT. + +package team_members_wage_setting_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + teammembers "github.com/square/square-go-sdk/v3/teammembers" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestTeamMembersWageSettingGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &teammembers.GetWageSettingRequest{ + TeamMemberID: "team_member_id", + } + _, invocationErr := client.TeamMembers.WageSetting.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTeamMembersWageSettingGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTeamMembersWageSettingGetWithWireMock", "GET", "/v2/team-members/team_member_id/wage-setting", nil, 1) +} + +func TestTeamMembersWageSettingUpdateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &teammembers.UpdateWageSettingRequest{ + TeamMemberID: "team_member_id", + WageSetting: &square.WageSetting{ + JobAssignments: []*square.JobAssignment{ + &square.JobAssignment{ + JobTitle: square.String( + "Manager", + ), + PayType: square.JobAssignmentPayTypeSalary, + AnnualRate: &square.Money{ + Amount: square.Int64( + int64(3000000), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + WeeklyHours: square.Int( + 40, + ), + }, + &square.JobAssignment{ + JobTitle: square.String( + "Cashier", + ), + PayType: square.JobAssignmentPayTypeHourly, + HourlyRate: &square.Money{ + Amount: square.Int64( + int64(2000), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + }, + }, + IsOvertimeExempt: square.Bool( + true, + ), + }, + } + _, invocationErr := client.TeamMembers.WageSetting.Update( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTeamMembersWageSettingUpdateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTeamMembersWageSettingUpdateWithWireMock", "PUT", "/v2/team-members/team_member_id/wage-setting", nil, 1) +} diff --git a/terminal.go b/terminal.go index 0d4c02c..2524fd9 100644 --- a/terminal.go +++ b/terminal.go @@ -120,6 +120,9 @@ func (d *DismissTerminalActionResponse) GetAction() *TerminalAction { } func (d *DismissTerminalActionResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -172,6 +175,9 @@ func (d *DismissTerminalActionResponse) MarshalJSON() ([]byte, error) { } func (d *DismissTerminalActionResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -216,6 +222,9 @@ func (d *DismissTerminalCheckoutResponse) GetCheckout() *TerminalCheckout { } func (d *DismissTerminalCheckoutResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -268,6 +277,9 @@ func (d *DismissTerminalCheckoutResponse) MarshalJSON() ([]byte, error) { } func (d *DismissTerminalCheckoutResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -312,6 +324,9 @@ func (d *DismissTerminalRefundResponse) GetRefund() *TerminalRefund { } func (d *DismissTerminalRefundResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -364,6 +379,9 @@ func (d *DismissTerminalRefundResponse) MarshalJSON() ([]byte, error) { } func (d *DismissTerminalRefundResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value diff --git a/terminal/actions.go b/terminal/actions.go index 88eb010..6e0d01b 100644 --- a/terminal/actions.go +++ b/terminal/actions.go @@ -3,7 +3,9 @@ package terminal import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" big "math/big" ) @@ -46,7 +48,7 @@ type CreateTerminalActionRequest struct { // information. IdempotencyKey string `json:"idempotency_key" url:"-"` // The Action to create. - Action *v3.TerminalAction `json:"action,omitempty" url:"-"` + Action *v3.TerminalAction `json:"action" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -73,6 +75,27 @@ func (c *CreateTerminalActionRequest) SetAction(action *v3.TerminalAction) { c.require(createTerminalActionRequestFieldAction) } +func (c *CreateTerminalActionRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateTerminalActionRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateTerminalActionRequest(body) + return nil +} + +func (c *CreateTerminalActionRequest) MarshalJSON() ([]byte, error) { + type embed CreateTerminalActionRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( getActionsRequestFieldActionID = big.NewInt(1 << 0) ) @@ -148,3 +171,24 @@ func (s *SearchTerminalActionsRequest) SetLimit(limit *int) { s.Limit = limit s.require(searchTerminalActionsRequestFieldLimit) } + +func (s *SearchTerminalActionsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler SearchTerminalActionsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *s = SearchTerminalActionsRequest(body) + return nil +} + +func (s *SearchTerminalActionsRequest) MarshalJSON() ([]byte, error) { + type embed SearchTerminalActionsRequest + var marshaler = struct { + embed + }{ + embed: embed(*s), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, s.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/terminal/actions/terminal_actions_test/terminal_actions_test.go b/terminal/actions/terminal_actions_test/terminal_actions_test.go new file mode 100644 index 0000000..52a10ed --- /dev/null +++ b/terminal/actions/terminal_actions_test/terminal_actions_test.go @@ -0,0 +1,193 @@ +// Code generated by Fern. DO NOT EDIT. + +package terminal_actions_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + terminal "github.com/square/square-go-sdk/v3/terminal" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestTerminalActionsCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &terminal.CreateTerminalActionRequest{ + IdempotencyKey: "thahn-70e75c10-47f7-4ab6-88cc-aaa4076d065e", + Action: &square.TerminalAction{ + DeviceID: square.String( + "{{DEVICE_ID}}", + ), + DeadlineDuration: square.String( + "PT5M", + ), + Type: square.TerminalActionActionTypeSaveCard.Ptr(), + SaveCardOptions: &square.SaveCardOptions{ + CustomerID: "{{CUSTOMER_ID}}", + ReferenceID: square.String( + "user-id-1", + ), + }, + }, + } + _, invocationErr := client.Terminal.Actions.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTerminalActionsCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTerminalActionsCreateWithWireMock", "POST", "/v2/terminals/actions", nil, 1) +} + +func TestTerminalActionsSearchWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &terminal.SearchTerminalActionsRequest{ + Query: &square.TerminalActionQuery{ + Filter: &square.TerminalActionQueryFilter{ + CreatedAt: &square.TimeRange{ + StartAt: square.String( + "2022-04-01T00:00:00.000Z", + ), + }, + }, + Sort: &square.TerminalActionQuerySort{ + SortOrder: square.SortOrderDesc.Ptr(), + }, + }, + Limit: square.Int( + 2, + ), + } + _, invocationErr := client.Terminal.Actions.Search( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTerminalActionsSearchWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTerminalActionsSearchWithWireMock", "POST", "/v2/terminals/actions/search", nil, 1) +} + +func TestTerminalActionsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &terminal.GetActionsRequest{ + ActionID: "action_id", + } + _, invocationErr := client.Terminal.Actions.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTerminalActionsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTerminalActionsGetWithWireMock", "GET", "/v2/terminals/actions/action_id", nil, 1) +} + +func TestTerminalActionsCancelWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &terminal.CancelActionsRequest{ + ActionID: "action_id", + } + _, invocationErr := client.Terminal.Actions.Cancel( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTerminalActionsCancelWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTerminalActionsCancelWithWireMock", "POST", "/v2/terminals/actions/action_id/cancel", nil, 1) +} diff --git a/terminal/actions_test.go b/terminal/actions_test.go new file mode 100644 index 0000000..2e5a934 --- /dev/null +++ b/terminal/actions_test.go @@ -0,0 +1,229 @@ +// Code generated by Fern. DO NOT EDIT. + +package terminal + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersCancelActionsRequest(t *testing.T) { + t.Run("SetActionID", func(t *testing.T) { + obj := &CancelActionsRequest{} + var fernTestValueActionID string + obj.SetActionID(fernTestValueActionID) + assert.Equal(t, fernTestValueActionID, obj.ActionID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCancelActionsRequest(t *testing.T) { + t.Run("SetActionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelActionsRequest{} + var fernTestValueActionID string + + // Act + obj.SetActionID(fernTestValueActionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateTerminalActionRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateTerminalActionRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateTerminalActionRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTerminalActionRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetActionsRequest(t *testing.T) { + t.Run("SetActionID", func(t *testing.T) { + obj := &GetActionsRequest{} + var fernTestValueActionID string + obj.SetActionID(fernTestValueActionID) + assert.Equal(t, fernTestValueActionID, obj.ActionID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetActionsRequest(t *testing.T) { + t.Run("SetActionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetActionsRequest{} + var fernTestValueActionID string + + // Act + obj.SetActionID(fernTestValueActionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchTerminalActionsRequest(t *testing.T) { + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchTerminalActionsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &SearchTerminalActionsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitSearchTerminalActionsRequest(t *testing.T) { + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalActionsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalActionsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/terminal/checkouts.go b/terminal/checkouts.go index 54ac255..802e5b1 100644 --- a/terminal/checkouts.go +++ b/terminal/checkouts.go @@ -3,7 +3,9 @@ package terminal import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" big "math/big" ) @@ -45,7 +47,7 @@ type CreateTerminalCheckoutRequest struct { // See [Idempotency keys](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) for more information. IdempotencyKey string `json:"idempotency_key" url:"-"` // The checkout to create. - Checkout *v3.TerminalCheckout `json:"checkout,omitempty" url:"-"` + Checkout *v3.TerminalCheckout `json:"checkout" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -72,6 +74,27 @@ func (c *CreateTerminalCheckoutRequest) SetCheckout(checkout *v3.TerminalCheckou c.require(createTerminalCheckoutRequestFieldCheckout) } +func (c *CreateTerminalCheckoutRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateTerminalCheckoutRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateTerminalCheckoutRequest(body) + return nil +} + +func (c *CreateTerminalCheckoutRequest) MarshalJSON() ([]byte, error) { + type embed CreateTerminalCheckoutRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( getCheckoutsRequestFieldCheckoutID = big.NewInt(1 << 0) ) @@ -146,3 +169,24 @@ func (s *SearchTerminalCheckoutsRequest) SetLimit(limit *int) { s.Limit = limit s.require(searchTerminalCheckoutsRequestFieldLimit) } + +func (s *SearchTerminalCheckoutsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler SearchTerminalCheckoutsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *s = SearchTerminalCheckoutsRequest(body) + return nil +} + +func (s *SearchTerminalCheckoutsRequest) MarshalJSON() ([]byte, error) { + type embed SearchTerminalCheckoutsRequest + var marshaler = struct { + embed + }{ + embed: embed(*s), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, s.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/terminal/checkouts/terminal_checkouts_test/terminal_checkouts_test.go b/terminal/checkouts/terminal_checkouts_test/terminal_checkouts_test.go new file mode 100644 index 0000000..911aced --- /dev/null +++ b/terminal/checkouts/terminal_checkouts_test/terminal_checkouts_test.go @@ -0,0 +1,190 @@ +// Code generated by Fern. DO NOT EDIT. + +package terminal_checkouts_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + terminal "github.com/square/square-go-sdk/v3/terminal" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestTerminalCheckoutsCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &terminal.CreateTerminalCheckoutRequest{ + IdempotencyKey: "28a0c3bc-7839-11ea-bc55-0242ac130003", + Checkout: &square.TerminalCheckout{ + AmountMoney: &square.Money{ + Amount: square.Int64( + int64(2610), + ), + Currency: square.CurrencyUsd.Ptr(), + }, + ReferenceID: square.String( + "id11572", + ), + Note: square.String( + "A brief note", + ), + DeviceOptions: &square.DeviceCheckoutOptions{ + DeviceID: "dbb5d83a-7838-11ea-bc55-0242ac130003", + }, + }, + } + _, invocationErr := client.Terminal.Checkouts.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTerminalCheckoutsCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTerminalCheckoutsCreateWithWireMock", "POST", "/v2/terminals/checkouts", nil, 1) +} + +func TestTerminalCheckoutsSearchWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &terminal.SearchTerminalCheckoutsRequest{ + Query: &square.TerminalCheckoutQuery{ + Filter: &square.TerminalCheckoutQueryFilter{ + Status: square.String( + "COMPLETED", + ), + }, + }, + Limit: square.Int( + 2, + ), + } + _, invocationErr := client.Terminal.Checkouts.Search( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTerminalCheckoutsSearchWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTerminalCheckoutsSearchWithWireMock", "POST", "/v2/terminals/checkouts/search", nil, 1) +} + +func TestTerminalCheckoutsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &terminal.GetCheckoutsRequest{ + CheckoutID: "checkout_id", + } + _, invocationErr := client.Terminal.Checkouts.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTerminalCheckoutsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTerminalCheckoutsGetWithWireMock", "GET", "/v2/terminals/checkouts/checkout_id", nil, 1) +} + +func TestTerminalCheckoutsCancelWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &terminal.CancelCheckoutsRequest{ + CheckoutID: "checkout_id", + } + _, invocationErr := client.Terminal.Checkouts.Cancel( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTerminalCheckoutsCancelWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTerminalCheckoutsCancelWithWireMock", "POST", "/v2/terminals/checkouts/checkout_id/cancel", nil, 1) +} diff --git a/terminal/checkouts_test.go b/terminal/checkouts_test.go new file mode 100644 index 0000000..face027 --- /dev/null +++ b/terminal/checkouts_test.go @@ -0,0 +1,229 @@ +// Code generated by Fern. DO NOT EDIT. + +package terminal + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersCancelCheckoutsRequest(t *testing.T) { + t.Run("SetCheckoutID", func(t *testing.T) { + obj := &CancelCheckoutsRequest{} + var fernTestValueCheckoutID string + obj.SetCheckoutID(fernTestValueCheckoutID) + assert.Equal(t, fernTestValueCheckoutID, obj.CheckoutID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCancelCheckoutsRequest(t *testing.T) { + t.Run("SetCheckoutID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelCheckoutsRequest{} + var fernTestValueCheckoutID string + + // Act + obj.SetCheckoutID(fernTestValueCheckoutID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateTerminalCheckoutRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateTerminalCheckoutRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateTerminalCheckoutRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTerminalCheckoutRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetCheckoutsRequest(t *testing.T) { + t.Run("SetCheckoutID", func(t *testing.T) { + obj := &GetCheckoutsRequest{} + var fernTestValueCheckoutID string + obj.SetCheckoutID(fernTestValueCheckoutID) + assert.Equal(t, fernTestValueCheckoutID, obj.CheckoutID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetCheckoutsRequest(t *testing.T) { + t.Run("SetCheckoutID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCheckoutsRequest{} + var fernTestValueCheckoutID string + + // Act + obj.SetCheckoutID(fernTestValueCheckoutID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchTerminalCheckoutsRequest(t *testing.T) { + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchTerminalCheckoutsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &SearchTerminalCheckoutsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitSearchTerminalCheckoutsRequest(t *testing.T) { + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalCheckoutsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalCheckoutsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/terminal/refunds.go b/terminal/refunds.go index 46de5b9..a255a39 100644 --- a/terminal/refunds.go +++ b/terminal/refunds.go @@ -3,7 +3,9 @@ package terminal import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" big "math/big" ) @@ -72,6 +74,27 @@ func (c *CreateTerminalRefundRequest) SetRefund(refund *v3.TerminalRefund) { c.require(createTerminalRefundRequestFieldRefund) } +func (c *CreateTerminalRefundRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateTerminalRefundRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateTerminalRefundRequest(body) + return nil +} + +func (c *CreateTerminalRefundRequest) MarshalJSON() ([]byte, error) { + type embed CreateTerminalRefundRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( getRefundsRequestFieldTerminalRefundID = big.NewInt(1 << 0) ) @@ -146,3 +169,24 @@ func (s *SearchTerminalRefundsRequest) SetLimit(limit *int) { s.Limit = limit s.require(searchTerminalRefundsRequestFieldLimit) } + +func (s *SearchTerminalRefundsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler SearchTerminalRefundsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *s = SearchTerminalRefundsRequest(body) + return nil +} + +func (s *SearchTerminalRefundsRequest) MarshalJSON() ([]byte, error) { + type embed SearchTerminalRefundsRequest + var marshaler = struct { + embed + }{ + embed: embed(*s), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, s.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/terminal/refunds/terminal_refunds_test/terminal_refunds_test.go b/terminal/refunds/terminal_refunds_test/terminal_refunds_test.go new file mode 100644 index 0000000..4c25bfb --- /dev/null +++ b/terminal/refunds/terminal_refunds_test/terminal_refunds_test.go @@ -0,0 +1,184 @@ +// Code generated by Fern. DO NOT EDIT. + +package terminal_refunds_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + terminal "github.com/square/square-go-sdk/v3/terminal" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestTerminalRefundsCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &terminal.CreateTerminalRefundRequest{ + IdempotencyKey: "402a640b-b26f-401f-b406-46f839590c04", + Refund: &square.TerminalRefund{ + PaymentID: "5O5OvgkcNUhl7JBuINflcjKqUzXZY", + AmountMoney: &square.Money{ + Amount: square.Int64( + int64(111), + ), + Currency: square.CurrencyCad.Ptr(), + }, + Reason: "Returning items", + DeviceID: "f72dfb8e-4d65-4e56-aade-ec3fb8d33291", + }, + } + _, invocationErr := client.Terminal.Refunds.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTerminalRefundsCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTerminalRefundsCreateWithWireMock", "POST", "/v2/terminals/refunds", nil, 1) +} + +func TestTerminalRefundsSearchWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &terminal.SearchTerminalRefundsRequest{ + Query: &square.TerminalRefundQuery{ + Filter: &square.TerminalRefundQueryFilter{ + Status: square.String( + "COMPLETED", + ), + }, + }, + Limit: square.Int( + 1, + ), + } + _, invocationErr := client.Terminal.Refunds.Search( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTerminalRefundsSearchWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTerminalRefundsSearchWithWireMock", "POST", "/v2/terminals/refunds/search", nil, 1) +} + +func TestTerminalRefundsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &terminal.GetRefundsRequest{ + TerminalRefundID: "terminal_refund_id", + } + _, invocationErr := client.Terminal.Refunds.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTerminalRefundsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTerminalRefundsGetWithWireMock", "GET", "/v2/terminals/refunds/terminal_refund_id", nil, 1) +} + +func TestTerminalRefundsCancelWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &terminal.CancelRefundsRequest{ + TerminalRefundID: "terminal_refund_id", + } + _, invocationErr := client.Terminal.Refunds.Cancel( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTerminalRefundsCancelWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTerminalRefundsCancelWithWireMock", "POST", "/v2/terminals/refunds/terminal_refund_id/cancel", nil, 1) +} diff --git a/terminal/refunds_test.go b/terminal/refunds_test.go new file mode 100644 index 0000000..7d00d70 --- /dev/null +++ b/terminal/refunds_test.go @@ -0,0 +1,229 @@ +// Code generated by Fern. DO NOT EDIT. + +package terminal + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersCancelRefundsRequest(t *testing.T) { + t.Run("SetTerminalRefundID", func(t *testing.T) { + obj := &CancelRefundsRequest{} + var fernTestValueTerminalRefundID string + obj.SetTerminalRefundID(fernTestValueTerminalRefundID) + assert.Equal(t, fernTestValueTerminalRefundID, obj.TerminalRefundID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCancelRefundsRequest(t *testing.T) { + t.Run("SetTerminalRefundID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelRefundsRequest{} + var fernTestValueTerminalRefundID string + + // Act + obj.SetTerminalRefundID(fernTestValueTerminalRefundID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateTerminalRefundRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateTerminalRefundRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateTerminalRefundRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTerminalRefundRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetRefundsRequest(t *testing.T) { + t.Run("SetTerminalRefundID", func(t *testing.T) { + obj := &GetRefundsRequest{} + var fernTestValueTerminalRefundID string + obj.SetTerminalRefundID(fernTestValueTerminalRefundID) + assert.Equal(t, fernTestValueTerminalRefundID, obj.TerminalRefundID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetRefundsRequest(t *testing.T) { + t.Run("SetTerminalRefundID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetRefundsRequest{} + var fernTestValueTerminalRefundID string + + // Act + obj.SetTerminalRefundID(fernTestValueTerminalRefundID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchTerminalRefundsRequest(t *testing.T) { + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchTerminalRefundsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &SearchTerminalRefundsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitSearchTerminalRefundsRequest(t *testing.T) { + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalRefundsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalRefundsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/terminal/terminal_test/terminal_test.go b/terminal/terminal_test/terminal_test.go new file mode 100644 index 0000000..6a9282b --- /dev/null +++ b/terminal/terminal_test/terminal_test.go @@ -0,0 +1,138 @@ +// Code generated by Fern. DO NOT EDIT. + +package terminal_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestTerminalDismissTerminalActionWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.DismissTerminalActionRequest{ + ActionID: "action_id", + } + _, invocationErr := client.Terminal.DismissTerminalAction( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTerminalDismissTerminalActionWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTerminalDismissTerminalActionWithWireMock", "POST", "/v2/terminals/actions/action_id/dismiss", nil, 1) +} + +func TestTerminalDismissTerminalCheckoutWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.DismissTerminalCheckoutRequest{ + CheckoutID: "checkout_id", + } + _, invocationErr := client.Terminal.DismissTerminalCheckout( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTerminalDismissTerminalCheckoutWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTerminalDismissTerminalCheckoutWithWireMock", "POST", "/v2/terminals/checkouts/checkout_id/dismiss", nil, 1) +} + +func TestTerminalDismissTerminalRefundWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.DismissTerminalRefundRequest{ + TerminalRefundID: "terminal_refund_id", + } + _, invocationErr := client.Terminal.DismissTerminalRefund( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTerminalDismissTerminalRefundWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTerminalDismissTerminalRefundWithWireMock", "POST", "/v2/terminals/refunds/terminal_refund_id/dismiss", nil, 1) +} diff --git a/terminal_test.go b/terminal_test.go new file mode 100644 index 0000000..c57a83b --- /dev/null +++ b/terminal_test.go @@ -0,0 +1,820 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersDismissTerminalActionRequest(t *testing.T) { + t.Run("SetActionID", func(t *testing.T) { + obj := &DismissTerminalActionRequest{} + var fernTestValueActionID string + obj.SetActionID(fernTestValueActionID) + assert.Equal(t, fernTestValueActionID, obj.ActionID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDismissTerminalActionRequest(t *testing.T) { + t.Run("SetActionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DismissTerminalActionRequest{} + var fernTestValueActionID string + + // Act + obj.SetActionID(fernTestValueActionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDismissTerminalCheckoutRequest(t *testing.T) { + t.Run("SetCheckoutID", func(t *testing.T) { + obj := &DismissTerminalCheckoutRequest{} + var fernTestValueCheckoutID string + obj.SetCheckoutID(fernTestValueCheckoutID) + assert.Equal(t, fernTestValueCheckoutID, obj.CheckoutID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDismissTerminalCheckoutRequest(t *testing.T) { + t.Run("SetCheckoutID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DismissTerminalCheckoutRequest{} + var fernTestValueCheckoutID string + + // Act + obj.SetCheckoutID(fernTestValueCheckoutID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDismissTerminalRefundRequest(t *testing.T) { + t.Run("SetTerminalRefundID", func(t *testing.T) { + obj := &DismissTerminalRefundRequest{} + var fernTestValueTerminalRefundID string + obj.SetTerminalRefundID(fernTestValueTerminalRefundID) + assert.Equal(t, fernTestValueTerminalRefundID, obj.TerminalRefundID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDismissTerminalRefundRequest(t *testing.T) { + t.Run("SetTerminalRefundID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DismissTerminalRefundRequest{} + var fernTestValueTerminalRefundID string + + // Act + obj.SetTerminalRefundID(fernTestValueTerminalRefundID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDismissTerminalActionResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DismissTerminalActionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAction", func(t *testing.T) { + obj := &DismissTerminalActionResponse{} + var fernTestValueAction *TerminalAction + obj.SetAction(fernTestValueAction) + assert.Equal(t, fernTestValueAction, obj.Action) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDismissTerminalActionResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DismissTerminalActionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DismissTerminalActionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DismissTerminalActionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetAction", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DismissTerminalActionResponse{} + var expected *TerminalAction + obj.Action = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAction(), "getter should return the property value") + }) + + t.Run("GetAction_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DismissTerminalActionResponse{} + obj.Action = nil + + // Act & Assert + assert.Nil(t, obj.GetAction(), "getter should return nil when property is nil") + }) + + t.Run("GetAction_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DismissTerminalActionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAction() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDismissTerminalActionResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DismissTerminalActionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAction_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DismissTerminalActionResponse{} + var fernTestValueAction *TerminalAction + + // Act + obj.SetAction(fernTestValueAction) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDismissTerminalCheckoutResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DismissTerminalCheckoutResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCheckout", func(t *testing.T) { + obj := &DismissTerminalCheckoutResponse{} + var fernTestValueCheckout *TerminalCheckout + obj.SetCheckout(fernTestValueCheckout) + assert.Equal(t, fernTestValueCheckout, obj.Checkout) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDismissTerminalCheckoutResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DismissTerminalCheckoutResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DismissTerminalCheckoutResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DismissTerminalCheckoutResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetCheckout", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DismissTerminalCheckoutResponse{} + var expected *TerminalCheckout + obj.Checkout = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCheckout(), "getter should return the property value") + }) + + t.Run("GetCheckout_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DismissTerminalCheckoutResponse{} + obj.Checkout = nil + + // Act & Assert + assert.Nil(t, obj.GetCheckout(), "getter should return nil when property is nil") + }) + + t.Run("GetCheckout_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DismissTerminalCheckoutResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCheckout() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDismissTerminalCheckoutResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DismissTerminalCheckoutResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCheckout_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DismissTerminalCheckoutResponse{} + var fernTestValueCheckout *TerminalCheckout + + // Act + obj.SetCheckout(fernTestValueCheckout) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDismissTerminalRefundResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DismissTerminalRefundResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRefund", func(t *testing.T) { + obj := &DismissTerminalRefundResponse{} + var fernTestValueRefund *TerminalRefund + obj.SetRefund(fernTestValueRefund) + assert.Equal(t, fernTestValueRefund, obj.Refund) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDismissTerminalRefundResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DismissTerminalRefundResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DismissTerminalRefundResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DismissTerminalRefundResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetRefund", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DismissTerminalRefundResponse{} + var expected *TerminalRefund + obj.Refund = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRefund(), "getter should return the property value") + }) + + t.Run("GetRefund_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DismissTerminalRefundResponse{} + obj.Refund = nil + + // Act & Assert + assert.Nil(t, obj.GetRefund(), "getter should return nil when property is nil") + }) + + t.Run("GetRefund_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DismissTerminalRefundResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRefund() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDismissTerminalRefundResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DismissTerminalRefundResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRefund_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DismissTerminalRefundResponse{} + var fernTestValueRefund *TerminalRefund + + // Act + obj.SetRefund(fernTestValueRefund) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingDismissTerminalActionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DismissTerminalActionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DismissTerminalActionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DismissTerminalActionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DismissTerminalActionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDismissTerminalCheckoutResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DismissTerminalCheckoutResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DismissTerminalCheckoutResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DismissTerminalCheckoutResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DismissTerminalCheckoutResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDismissTerminalRefundResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DismissTerminalRefundResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DismissTerminalRefundResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DismissTerminalRefundResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DismissTerminalRefundResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringDismissTerminalActionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DismissTerminalActionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DismissTerminalActionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDismissTerminalCheckoutResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DismissTerminalCheckoutResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DismissTerminalCheckoutResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDismissTerminalRefundResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DismissTerminalRefundResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DismissTerminalRefundResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestExtraPropertiesDismissTerminalActionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DismissTerminalActionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DismissTerminalActionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDismissTerminalCheckoutResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DismissTerminalCheckoutResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DismissTerminalCheckoutResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDismissTerminalRefundResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DismissTerminalRefundResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DismissTerminalRefundResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/transfer_orders.go b/transfer_orders.go index 8df1696..424fa80 100644 --- a/transfer_orders.go +++ b/transfer_orders.go @@ -56,6 +56,27 @@ func (c *CancelTransferOrderRequest) SetVersion(version *int64) { c.require(cancelTransferOrderRequestFieldVersion) } +func (c *CancelTransferOrderRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CancelTransferOrderRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CancelTransferOrderRequest(body) + return nil +} + +func (c *CancelTransferOrderRequest) MarshalJSON() ([]byte, error) { + type embed CancelTransferOrderRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( createTransferOrderRequestFieldIdempotencyKey = big.NewInt(1 << 0) createTransferOrderRequestFieldTransferOrder = big.NewInt(1 << 1) @@ -66,7 +87,7 @@ type CreateTransferOrderRequest struct { // any valid string but must be unique for every CreateTransferOrder request. IdempotencyKey string `json:"idempotency_key" url:"-"` // The transfer order to create - TransferOrder *CreateTransferOrderData `json:"transfer_order,omitempty" url:"-"` + TransferOrder *CreateTransferOrderData `json:"transfer_order" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -93,6 +114,27 @@ func (c *CreateTransferOrderRequest) SetTransferOrder(transferOrder *CreateTrans c.require(createTransferOrderRequestFieldTransferOrder) } +func (c *CreateTransferOrderRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateTransferOrderRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateTransferOrderRequest(body) + return nil +} + +func (c *CreateTransferOrderRequest) MarshalJSON() ([]byte, error) { + type embed CreateTransferOrderRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( deleteTransferOrdersRequestFieldTransferOrderID = big.NewInt(1 << 0) deleteTransferOrdersRequestFieldVersion = big.NewInt(1 << 1) @@ -168,7 +210,7 @@ type ReceiveTransferOrderRequest struct { // A unique key to make this request idempotent IdempotencyKey string `json:"idempotency_key" url:"-"` // The receipt details - Receipt *TransferOrderGoodsReceipt `json:"receipt,omitempty" url:"-"` + Receipt *TransferOrderGoodsReceipt `json:"receipt" url:"-"` // Version for optimistic concurrency Version *int64 `json:"version,omitempty" url:"-"` @@ -211,6 +253,27 @@ func (r *ReceiveTransferOrderRequest) SetVersion(version *int64) { r.require(receiveTransferOrderRequestFieldVersion) } +func (r *ReceiveTransferOrderRequest) UnmarshalJSON(data []byte) error { + type unmarshaler ReceiveTransferOrderRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *r = ReceiveTransferOrderRequest(body) + return nil +} + +func (r *ReceiveTransferOrderRequest) MarshalJSON() ([]byte, error) { + type embed ReceiveTransferOrderRequest + var marshaler = struct { + embed + }{ + embed: embed(*r), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, r.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( searchTransferOrdersRequestFieldQuery = big.NewInt(1 << 0) searchTransferOrdersRequestFieldCursor = big.NewInt(1 << 1) @@ -257,6 +320,27 @@ func (s *SearchTransferOrdersRequest) SetLimit(limit *int) { s.require(searchTransferOrdersRequestFieldLimit) } +func (s *SearchTransferOrdersRequest) UnmarshalJSON(data []byte) error { + type unmarshaler SearchTransferOrdersRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *s = SearchTransferOrdersRequest(body) + return nil +} + +func (s *SearchTransferOrdersRequest) MarshalJSON() ([]byte, error) { + type embed SearchTransferOrdersRequest + var marshaler = struct { + embed + }{ + embed: embed(*s), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, s.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( startTransferOrderRequestFieldTransferOrderID = big.NewInt(1 << 0) startTransferOrderRequestFieldIdempotencyKey = big.NewInt(1 << 1) @@ -304,6 +388,27 @@ func (s *StartTransferOrderRequest) SetVersion(version *int64) { s.require(startTransferOrderRequestFieldVersion) } +func (s *StartTransferOrderRequest) UnmarshalJSON(data []byte) error { + type unmarshaler StartTransferOrderRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *s = StartTransferOrderRequest(body) + return nil +} + +func (s *StartTransferOrderRequest) MarshalJSON() ([]byte, error) { + type embed StartTransferOrderRequest + var marshaler = struct { + embed + }{ + embed: embed(*s), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, s.explicitFields) + return json.Marshal(explicitMarshaler) +} + // Response for canceling a transfer order var ( cancelTransferOrderResponseFieldTransferOrder = big.NewInt(1 << 0) @@ -338,6 +443,9 @@ func (c *CancelTransferOrderResponse) GetErrors() []*Error { } func (c *CancelTransferOrderResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -390,6 +498,9 @@ func (c *CancelTransferOrderResponse) MarshalJSON() ([]byte, error) { } func (c *CancelTransferOrderResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -490,6 +601,9 @@ func (c *CreateTransferOrderData) GetLineItems() []*CreateTransferOrderLineData } func (c *CreateTransferOrderData) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -577,6 +691,9 @@ func (c *CreateTransferOrderData) MarshalJSON() ([]byte, error) { } func (c *CreateTransferOrderData) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -627,6 +744,9 @@ func (c *CreateTransferOrderLineData) GetQuantityOrdered() string { } func (c *CreateTransferOrderLineData) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -679,6 +799,9 @@ func (c *CreateTransferOrderLineData) MarshalJSON() ([]byte, error) { } func (c *CreateTransferOrderLineData) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -724,6 +847,9 @@ func (c *CreateTransferOrderResponse) GetErrors() []*Error { } func (c *CreateTransferOrderResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -776,6 +902,9 @@ func (c *CreateTransferOrderResponse) MarshalJSON() ([]byte, error) { } func (c *CreateTransferOrderResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -811,6 +940,9 @@ func (d *DeleteTransferOrderResponse) GetErrors() []*Error { } func (d *DeleteTransferOrderResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -856,6 +988,9 @@ func (d *DeleteTransferOrderResponse) MarshalJSON() ([]byte, error) { } func (d *DeleteTransferOrderResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -901,6 +1036,9 @@ func (r *ReceiveTransferOrderResponse) GetErrors() []*Error { } func (r *ReceiveTransferOrderResponse) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -953,6 +1091,9 @@ func (r *ReceiveTransferOrderResponse) MarshalJSON() ([]byte, error) { } func (r *ReceiveTransferOrderResponse) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -998,6 +1139,9 @@ func (r *RetrieveTransferOrderResponse) GetErrors() []*Error { } func (r *RetrieveTransferOrderResponse) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -1050,6 +1194,9 @@ func (r *RetrieveTransferOrderResponse) MarshalJSON() ([]byte, error) { } func (r *RetrieveTransferOrderResponse) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -1105,6 +1252,9 @@ func (s *SearchTransferOrdersResponse) GetErrors() []*Error { } func (s *SearchTransferOrdersResponse) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -1164,6 +1314,9 @@ func (s *SearchTransferOrdersResponse) MarshalJSON() ([]byte, error) { } func (s *SearchTransferOrdersResponse) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -1209,6 +1362,9 @@ func (s *StartTransferOrderResponse) GetErrors() []*Error { } func (s *StartTransferOrderResponse) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -1261,6 +1417,9 @@ func (s *StartTransferOrderResponse) MarshalJSON() ([]byte, error) { } func (s *StartTransferOrderResponse) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -1469,6 +1628,9 @@ func (t *TransferOrder) GetVersion() *int64 { } func (t *TransferOrder) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -1598,6 +1760,9 @@ func (t *TransferOrder) MarshalJSON() ([]byte, error) { } func (t *TransferOrder) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -1654,6 +1819,9 @@ func (t *TransferOrderFilter) GetStatuses() []TransferOrderStatus { } func (t *TransferOrderFilter) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -1713,6 +1881,9 @@ func (t *TransferOrderFilter) MarshalJSON() ([]byte, error) { } func (t *TransferOrderFilter) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -1775,6 +1946,9 @@ func (t *TransferOrderGoodsReceipt) GetLineItems() []*TransferOrderGoodsReceiptL } func (t *TransferOrderGoodsReceipt) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -1820,6 +1994,9 @@ func (t *TransferOrderGoodsReceipt) MarshalJSON() ([]byte, error) { } func (t *TransferOrderGoodsReceipt) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -1887,6 +2064,9 @@ func (t *TransferOrderGoodsReceiptLineItem) GetQuantityCanceled() *string { } func (t *TransferOrderGoodsReceiptLineItem) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -1953,6 +2133,9 @@ func (t *TransferOrderGoodsReceiptLineItem) MarshalJSON() ([]byte, error) { } func (t *TransferOrderGoodsReceiptLineItem) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -2061,6 +2244,9 @@ func (t *TransferOrderLine) GetQuantityCanceled() *string { } func (t *TransferOrderLine) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -2148,6 +2334,9 @@ func (t *TransferOrderLine) MarshalJSON() ([]byte, error) { } func (t *TransferOrderLine) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -2193,6 +2382,9 @@ func (t *TransferOrderQuery) GetSort() *TransferOrderSort { } func (t *TransferOrderQuery) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -2245,6 +2437,9 @@ func (t *TransferOrderQuery) MarshalJSON() ([]byte, error) { } func (t *TransferOrderQuery) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -2292,6 +2487,9 @@ func (t *TransferOrderSort) GetOrder() *SortOrder { } func (t *TransferOrderSort) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -2344,6 +2542,9 @@ func (t *TransferOrderSort) MarshalJSON() ([]byte, error) { } func (t *TransferOrderSort) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -2490,6 +2691,9 @@ func (u *UpdateTransferOrderData) GetLineItems() []*UpdateTransferOrderLineData } func (u *UpdateTransferOrderData) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -2570,6 +2774,9 @@ func (u *UpdateTransferOrderData) MarshalJSON() ([]byte, error) { } func (u *UpdateTransferOrderData) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -2637,6 +2844,9 @@ func (u *UpdateTransferOrderLineData) GetRemove() *bool { } func (u *UpdateTransferOrderLineData) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -2703,6 +2913,9 @@ func (u *UpdateTransferOrderLineData) MarshalJSON() ([]byte, error) { } func (u *UpdateTransferOrderLineData) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -2748,6 +2961,9 @@ func (u *UpdateTransferOrderResponse) GetErrors() []*Error { } func (u *UpdateTransferOrderResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -2800,6 +3016,9 @@ func (u *UpdateTransferOrderResponse) MarshalJSON() ([]byte, error) { } func (u *UpdateTransferOrderResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -2824,7 +3043,7 @@ type UpdateTransferOrderRequest struct { // A unique string that identifies this UpdateTransferOrder request. Keys must contain only alphanumeric characters, dashes and underscores IdempotencyKey string `json:"idempotency_key" url:"-"` // The transfer order updates to apply - TransferOrder *UpdateTransferOrderData `json:"transfer_order,omitempty" url:"-"` + TransferOrder *UpdateTransferOrderData `json:"transfer_order" url:"-"` // Version for optimistic concurrency Version *int64 `json:"version,omitempty" url:"-"` @@ -2866,3 +3085,24 @@ func (u *UpdateTransferOrderRequest) SetVersion(version *int64) { u.Version = version u.require(updateTransferOrderRequestFieldVersion) } + +func (u *UpdateTransferOrderRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdateTransferOrderRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdateTransferOrderRequest(body) + return nil +} + +func (u *UpdateTransferOrderRequest) MarshalJSON() ([]byte, error) { + type embed UpdateTransferOrderRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/transfer_orders_test.go b/transfer_orders_test.go new file mode 100644 index 0000000..8ea84aa --- /dev/null +++ b/transfer_orders_test.go @@ -0,0 +1,7288 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersCancelTransferOrderRequest(t *testing.T) { + t.Run("SetTransferOrderID", func(t *testing.T) { + obj := &CancelTransferOrderRequest{} + var fernTestValueTransferOrderID string + obj.SetTransferOrderID(fernTestValueTransferOrderID) + assert.Equal(t, fernTestValueTransferOrderID, obj.TransferOrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CancelTransferOrderRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &CancelTransferOrderRequest{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCancelTransferOrderRequest(t *testing.T) { + t.Run("SetTransferOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTransferOrderRequest{} + var fernTestValueTransferOrderID string + + // Act + obj.SetTransferOrderID(fernTestValueTransferOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTransferOrderRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTransferOrderRequest{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateTransferOrderRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateTransferOrderRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTransferOrder", func(t *testing.T) { + obj := &CreateTransferOrderRequest{} + var fernTestValueTransferOrder *CreateTransferOrderData + obj.SetTransferOrder(fernTestValueTransferOrder) + assert.Equal(t, fernTestValueTransferOrder, obj.TransferOrder) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateTransferOrderRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTransferOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderRequest{} + var fernTestValueTransferOrder *CreateTransferOrderData + + // Act + obj.SetTransferOrder(fernTestValueTransferOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteTransferOrdersRequest(t *testing.T) { + t.Run("SetTransferOrderID", func(t *testing.T) { + obj := &DeleteTransferOrdersRequest{} + var fernTestValueTransferOrderID string + obj.SetTransferOrderID(fernTestValueTransferOrderID) + assert.Equal(t, fernTestValueTransferOrderID, obj.TransferOrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &DeleteTransferOrdersRequest{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDeleteTransferOrdersRequest(t *testing.T) { + t.Run("SetTransferOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteTransferOrdersRequest{} + var fernTestValueTransferOrderID string + + // Act + obj.SetTransferOrderID(fernTestValueTransferOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteTransferOrdersRequest{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetTransferOrdersRequest(t *testing.T) { + t.Run("SetTransferOrderID", func(t *testing.T) { + obj := &GetTransferOrdersRequest{} + var fernTestValueTransferOrderID string + obj.SetTransferOrderID(fernTestValueTransferOrderID) + assert.Equal(t, fernTestValueTransferOrderID, obj.TransferOrderID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetTransferOrdersRequest(t *testing.T) { + t.Run("SetTransferOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTransferOrdersRequest{} + var fernTestValueTransferOrderID string + + // Act + obj.SetTransferOrderID(fernTestValueTransferOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersReceiveTransferOrderRequest(t *testing.T) { + t.Run("SetTransferOrderID", func(t *testing.T) { + obj := &ReceiveTransferOrderRequest{} + var fernTestValueTransferOrderID string + obj.SetTransferOrderID(fernTestValueTransferOrderID) + assert.Equal(t, fernTestValueTransferOrderID, obj.TransferOrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &ReceiveTransferOrderRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReceipt", func(t *testing.T) { + obj := &ReceiveTransferOrderRequest{} + var fernTestValueReceipt *TransferOrderGoodsReceipt + obj.SetReceipt(fernTestValueReceipt) + assert.Equal(t, fernTestValueReceipt, obj.Receipt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &ReceiveTransferOrderRequest{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitReceiveTransferOrderRequest(t *testing.T) { + t.Run("SetTransferOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ReceiveTransferOrderRequest{} + var fernTestValueTransferOrderID string + + // Act + obj.SetTransferOrderID(fernTestValueTransferOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ReceiveTransferOrderRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReceipt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ReceiveTransferOrderRequest{} + var fernTestValueReceipt *TransferOrderGoodsReceipt + + // Act + obj.SetReceipt(fernTestValueReceipt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ReceiveTransferOrderRequest{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchTransferOrdersRequest(t *testing.T) { + t.Run("SetQuery", func(t *testing.T) { + obj := &SearchTransferOrdersRequest{} + var fernTestValueQuery *TransferOrderQuery + obj.SetQuery(fernTestValueQuery) + assert.Equal(t, fernTestValueQuery, obj.Query) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchTransferOrdersRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &SearchTransferOrdersRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitSearchTransferOrdersRequest(t *testing.T) { + t.Run("SetQuery_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTransferOrdersRequest{} + var fernTestValueQuery *TransferOrderQuery + + // Act + obj.SetQuery(fernTestValueQuery) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTransferOrdersRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTransferOrdersRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersStartTransferOrderRequest(t *testing.T) { + t.Run("SetTransferOrderID", func(t *testing.T) { + obj := &StartTransferOrderRequest{} + var fernTestValueTransferOrderID string + obj.SetTransferOrderID(fernTestValueTransferOrderID) + assert.Equal(t, fernTestValueTransferOrderID, obj.TransferOrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &StartTransferOrderRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &StartTransferOrderRequest{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitStartTransferOrderRequest(t *testing.T) { + t.Run("SetTransferOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &StartTransferOrderRequest{} + var fernTestValueTransferOrderID string + + // Act + obj.SetTransferOrderID(fernTestValueTransferOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &StartTransferOrderRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &StartTransferOrderRequest{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCancelTransferOrderResponse(t *testing.T) { + t.Run("SetTransferOrder", func(t *testing.T) { + obj := &CancelTransferOrderResponse{} + var fernTestValueTransferOrder *TransferOrder + obj.SetTransferOrder(fernTestValueTransferOrder) + assert.Equal(t, fernTestValueTransferOrder, obj.TransferOrder) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &CancelTransferOrderResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCancelTransferOrderResponse(t *testing.T) { + t.Run("GetTransferOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTransferOrderResponse{} + var expected *TransferOrder + obj.TransferOrder = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTransferOrder(), "getter should return the property value") + }) + + t.Run("GetTransferOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTransferOrderResponse{} + obj.TransferOrder = nil + + // Act & Assert + assert.Nil(t, obj.GetTransferOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetTransferOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelTransferOrderResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTransferOrder() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTransferOrderResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTransferOrderResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelTransferOrderResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCancelTransferOrderResponse(t *testing.T) { + t.Run("SetTransferOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTransferOrderResponse{} + var fernTestValueTransferOrder *TransferOrder + + // Act + obj.SetTransferOrder(fernTestValueTransferOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTransferOrderResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateTransferOrderData(t *testing.T) { + t.Run("SetSourceLocationID", func(t *testing.T) { + obj := &CreateTransferOrderData{} + var fernTestValueSourceLocationID string + obj.SetSourceLocationID(fernTestValueSourceLocationID) + assert.Equal(t, fernTestValueSourceLocationID, obj.SourceLocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDestinationLocationID", func(t *testing.T) { + obj := &CreateTransferOrderData{} + var fernTestValueDestinationLocationID string + obj.SetDestinationLocationID(fernTestValueDestinationLocationID) + assert.Equal(t, fernTestValueDestinationLocationID, obj.DestinationLocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExpectedAt", func(t *testing.T) { + obj := &CreateTransferOrderData{} + var fernTestValueExpectedAt *string + obj.SetExpectedAt(fernTestValueExpectedAt) + assert.Equal(t, fernTestValueExpectedAt, obj.ExpectedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNotes", func(t *testing.T) { + obj := &CreateTransferOrderData{} + var fernTestValueNotes *string + obj.SetNotes(fernTestValueNotes) + assert.Equal(t, fernTestValueNotes, obj.Notes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTrackingNumber", func(t *testing.T) { + obj := &CreateTransferOrderData{} + var fernTestValueTrackingNumber *string + obj.SetTrackingNumber(fernTestValueTrackingNumber) + assert.Equal(t, fernTestValueTrackingNumber, obj.TrackingNumber) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedByTeamMemberID", func(t *testing.T) { + obj := &CreateTransferOrderData{} + var fernTestValueCreatedByTeamMemberID *string + obj.SetCreatedByTeamMemberID(fernTestValueCreatedByTeamMemberID) + assert.Equal(t, fernTestValueCreatedByTeamMemberID, obj.CreatedByTeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLineItems", func(t *testing.T) { + obj := &CreateTransferOrderData{} + var fernTestValueLineItems []*CreateTransferOrderLineData + obj.SetLineItems(fernTestValueLineItems) + assert.Equal(t, fernTestValueLineItems, obj.LineItems) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateTransferOrderData(t *testing.T) { + t.Run("GetSourceLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderData{} + var expected string + obj.SourceLocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSourceLocationID(), "getter should return the property value") + }) + + t.Run("GetSourceLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTransferOrderData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSourceLocationID() // Should return zero value + }) + + t.Run("GetDestinationLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderData{} + var expected string + obj.DestinationLocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDestinationLocationID(), "getter should return the property value") + }) + + t.Run("GetDestinationLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTransferOrderData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDestinationLocationID() // Should return zero value + }) + + t.Run("GetExpectedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderData{} + var expected *string + obj.ExpectedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExpectedAt(), "getter should return the property value") + }) + + t.Run("GetExpectedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderData{} + obj.ExpectedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetExpectedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetExpectedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTransferOrderData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExpectedAt() // Should return zero value + }) + + t.Run("GetNotes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderData{} + var expected *string + obj.Notes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNotes(), "getter should return the property value") + }) + + t.Run("GetNotes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderData{} + obj.Notes = nil + + // Act & Assert + assert.Nil(t, obj.GetNotes(), "getter should return nil when property is nil") + }) + + t.Run("GetNotes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTransferOrderData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNotes() // Should return zero value + }) + + t.Run("GetTrackingNumber", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderData{} + var expected *string + obj.TrackingNumber = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTrackingNumber(), "getter should return the property value") + }) + + t.Run("GetTrackingNumber_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderData{} + obj.TrackingNumber = nil + + // Act & Assert + assert.Nil(t, obj.GetTrackingNumber(), "getter should return nil when property is nil") + }) + + t.Run("GetTrackingNumber_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTransferOrderData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTrackingNumber() // Should return zero value + }) + + t.Run("GetCreatedByTeamMemberID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderData{} + var expected *string + obj.CreatedByTeamMemberID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedByTeamMemberID(), "getter should return the property value") + }) + + t.Run("GetCreatedByTeamMemberID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderData{} + obj.CreatedByTeamMemberID = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedByTeamMemberID(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedByTeamMemberID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTransferOrderData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedByTeamMemberID() // Should return zero value + }) + + t.Run("GetLineItems", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderData{} + var expected []*CreateTransferOrderLineData + obj.LineItems = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLineItems(), "getter should return the property value") + }) + + t.Run("GetLineItems_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderData{} + obj.LineItems = nil + + // Act & Assert + assert.Nil(t, obj.GetLineItems(), "getter should return nil when property is nil") + }) + + t.Run("GetLineItems_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTransferOrderData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLineItems() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateTransferOrderData(t *testing.T) { + t.Run("SetSourceLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderData{} + var fernTestValueSourceLocationID string + + // Act + obj.SetSourceLocationID(fernTestValueSourceLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDestinationLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderData{} + var fernTestValueDestinationLocationID string + + // Act + obj.SetDestinationLocationID(fernTestValueDestinationLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExpectedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderData{} + var fernTestValueExpectedAt *string + + // Act + obj.SetExpectedAt(fernTestValueExpectedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNotes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderData{} + var fernTestValueNotes *string + + // Act + obj.SetNotes(fernTestValueNotes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTrackingNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderData{} + var fernTestValueTrackingNumber *string + + // Act + obj.SetTrackingNumber(fernTestValueTrackingNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedByTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderData{} + var fernTestValueCreatedByTeamMemberID *string + + // Act + obj.SetCreatedByTeamMemberID(fernTestValueCreatedByTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLineItems_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderData{} + var fernTestValueLineItems []*CreateTransferOrderLineData + + // Act + obj.SetLineItems(fernTestValueLineItems) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateTransferOrderLineData(t *testing.T) { + t.Run("SetItemVariationID", func(t *testing.T) { + obj := &CreateTransferOrderLineData{} + var fernTestValueItemVariationID string + obj.SetItemVariationID(fernTestValueItemVariationID) + assert.Equal(t, fernTestValueItemVariationID, obj.ItemVariationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuantityOrdered", func(t *testing.T) { + obj := &CreateTransferOrderLineData{} + var fernTestValueQuantityOrdered string + obj.SetQuantityOrdered(fernTestValueQuantityOrdered) + assert.Equal(t, fernTestValueQuantityOrdered, obj.QuantityOrdered) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateTransferOrderLineData(t *testing.T) { + t.Run("GetItemVariationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderLineData{} + var expected string + obj.ItemVariationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItemVariationID(), "getter should return the property value") + }) + + t.Run("GetItemVariationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTransferOrderLineData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItemVariationID() // Should return zero value + }) + + t.Run("GetQuantityOrdered", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderLineData{} + var expected string + obj.QuantityOrdered = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQuantityOrdered(), "getter should return the property value") + }) + + t.Run("GetQuantityOrdered_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTransferOrderLineData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQuantityOrdered() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateTransferOrderLineData(t *testing.T) { + t.Run("SetItemVariationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderLineData{} + var fernTestValueItemVariationID string + + // Act + obj.SetItemVariationID(fernTestValueItemVariationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuantityOrdered_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderLineData{} + var fernTestValueQuantityOrdered string + + // Act + obj.SetQuantityOrdered(fernTestValueQuantityOrdered) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateTransferOrderResponse(t *testing.T) { + t.Run("SetTransferOrder", func(t *testing.T) { + obj := &CreateTransferOrderResponse{} + var fernTestValueTransferOrder *TransferOrder + obj.SetTransferOrder(fernTestValueTransferOrder) + assert.Equal(t, fernTestValueTransferOrder, obj.TransferOrder) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateTransferOrderResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateTransferOrderResponse(t *testing.T) { + t.Run("GetTransferOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderResponse{} + var expected *TransferOrder + obj.TransferOrder = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTransferOrder(), "getter should return the property value") + }) + + t.Run("GetTransferOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderResponse{} + obj.TransferOrder = nil + + // Act & Assert + assert.Nil(t, obj.GetTransferOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetTransferOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTransferOrderResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTransferOrder() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTransferOrderResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateTransferOrderResponse(t *testing.T) { + t.Run("SetTransferOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderResponse{} + var fernTestValueTransferOrder *TransferOrder + + // Act + obj.SetTransferOrder(fernTestValueTransferOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteTransferOrderResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DeleteTransferOrderResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeleteTransferOrderResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteTransferOrderResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteTransferOrderResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteTransferOrderResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeleteTransferOrderResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteTransferOrderResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersReceiveTransferOrderResponse(t *testing.T) { + t.Run("SetTransferOrder", func(t *testing.T) { + obj := &ReceiveTransferOrderResponse{} + var fernTestValueTransferOrder *TransferOrder + obj.SetTransferOrder(fernTestValueTransferOrder) + assert.Equal(t, fernTestValueTransferOrder, obj.TransferOrder) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &ReceiveTransferOrderResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersReceiveTransferOrderResponse(t *testing.T) { + t.Run("GetTransferOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ReceiveTransferOrderResponse{} + var expected *TransferOrder + obj.TransferOrder = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTransferOrder(), "getter should return the property value") + }) + + t.Run("GetTransferOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ReceiveTransferOrderResponse{} + obj.TransferOrder = nil + + // Act & Assert + assert.Nil(t, obj.GetTransferOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetTransferOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ReceiveTransferOrderResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTransferOrder() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ReceiveTransferOrderResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ReceiveTransferOrderResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ReceiveTransferOrderResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitReceiveTransferOrderResponse(t *testing.T) { + t.Run("SetTransferOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ReceiveTransferOrderResponse{} + var fernTestValueTransferOrder *TransferOrder + + // Act + obj.SetTransferOrder(fernTestValueTransferOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ReceiveTransferOrderResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRetrieveTransferOrderResponse(t *testing.T) { + t.Run("SetTransferOrder", func(t *testing.T) { + obj := &RetrieveTransferOrderResponse{} + var fernTestValueTransferOrder *TransferOrder + obj.SetTransferOrder(fernTestValueTransferOrder) + assert.Equal(t, fernTestValueTransferOrder, obj.TransferOrder) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &RetrieveTransferOrderResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRetrieveTransferOrderResponse(t *testing.T) { + t.Run("GetTransferOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTransferOrderResponse{} + var expected *TransferOrder + obj.TransferOrder = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTransferOrder(), "getter should return the property value") + }) + + t.Run("GetTransferOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTransferOrderResponse{} + obj.TransferOrder = nil + + // Act & Assert + assert.Nil(t, obj.GetTransferOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetTransferOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveTransferOrderResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTransferOrder() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTransferOrderResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTransferOrderResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveTransferOrderResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRetrieveTransferOrderResponse(t *testing.T) { + t.Run("SetTransferOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTransferOrderResponse{} + var fernTestValueTransferOrder *TransferOrder + + // Act + obj.SetTransferOrder(fernTestValueTransferOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTransferOrderResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchTransferOrdersResponse(t *testing.T) { + t.Run("SetTransferOrders", func(t *testing.T) { + obj := &SearchTransferOrdersResponse{} + var fernTestValueTransferOrders []*TransferOrder + obj.SetTransferOrders(fernTestValueTransferOrders) + assert.Equal(t, fernTestValueTransferOrders, obj.TransferOrders) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchTransferOrdersResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &SearchTransferOrdersResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchTransferOrdersResponse(t *testing.T) { + t.Run("GetTransferOrders", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTransferOrdersResponse{} + var expected []*TransferOrder + obj.TransferOrders = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTransferOrders(), "getter should return the property value") + }) + + t.Run("GetTransferOrders_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTransferOrdersResponse{} + obj.TransferOrders = nil + + // Act & Assert + assert.Nil(t, obj.GetTransferOrders(), "getter should return nil when property is nil") + }) + + t.Run("GetTransferOrders_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTransferOrdersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTransferOrders() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTransferOrdersResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTransferOrdersResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTransferOrdersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTransferOrdersResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTransferOrdersResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTransferOrdersResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchTransferOrdersResponse(t *testing.T) { + t.Run("SetTransferOrders_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTransferOrdersResponse{} + var fernTestValueTransferOrders []*TransferOrder + + // Act + obj.SetTransferOrders(fernTestValueTransferOrders) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTransferOrdersResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTransferOrdersResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersStartTransferOrderResponse(t *testing.T) { + t.Run("SetTransferOrder", func(t *testing.T) { + obj := &StartTransferOrderResponse{} + var fernTestValueTransferOrder *TransferOrder + obj.SetTransferOrder(fernTestValueTransferOrder) + assert.Equal(t, fernTestValueTransferOrder, obj.TransferOrder) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &StartTransferOrderResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersStartTransferOrderResponse(t *testing.T) { + t.Run("GetTransferOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &StartTransferOrderResponse{} + var expected *TransferOrder + obj.TransferOrder = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTransferOrder(), "getter should return the property value") + }) + + t.Run("GetTransferOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &StartTransferOrderResponse{} + obj.TransferOrder = nil + + // Act & Assert + assert.Nil(t, obj.GetTransferOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetTransferOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *StartTransferOrderResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTransferOrder() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &StartTransferOrderResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &StartTransferOrderResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *StartTransferOrderResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitStartTransferOrderResponse(t *testing.T) { + t.Run("SetTransferOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &StartTransferOrderResponse{} + var fernTestValueTransferOrder *TransferOrder + + // Act + obj.SetTransferOrder(fernTestValueTransferOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &StartTransferOrderResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTransferOrder(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &TransferOrder{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSourceLocationID", func(t *testing.T) { + obj := &TransferOrder{} + var fernTestValueSourceLocationID *string + obj.SetSourceLocationID(fernTestValueSourceLocationID) + assert.Equal(t, fernTestValueSourceLocationID, obj.SourceLocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDestinationLocationID", func(t *testing.T) { + obj := &TransferOrder{} + var fernTestValueDestinationLocationID *string + obj.SetDestinationLocationID(fernTestValueDestinationLocationID) + assert.Equal(t, fernTestValueDestinationLocationID, obj.DestinationLocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &TransferOrder{} + var fernTestValueStatus *TransferOrderStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &TransferOrder{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &TransferOrder{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExpectedAt", func(t *testing.T) { + obj := &TransferOrder{} + var fernTestValueExpectedAt *string + obj.SetExpectedAt(fernTestValueExpectedAt) + assert.Equal(t, fernTestValueExpectedAt, obj.ExpectedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCompletedAt", func(t *testing.T) { + obj := &TransferOrder{} + var fernTestValueCompletedAt *string + obj.SetCompletedAt(fernTestValueCompletedAt) + assert.Equal(t, fernTestValueCompletedAt, obj.CompletedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNotes", func(t *testing.T) { + obj := &TransferOrder{} + var fernTestValueNotes *string + obj.SetNotes(fernTestValueNotes) + assert.Equal(t, fernTestValueNotes, obj.Notes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTrackingNumber", func(t *testing.T) { + obj := &TransferOrder{} + var fernTestValueTrackingNumber *string + obj.SetTrackingNumber(fernTestValueTrackingNumber) + assert.Equal(t, fernTestValueTrackingNumber, obj.TrackingNumber) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedByTeamMemberID", func(t *testing.T) { + obj := &TransferOrder{} + var fernTestValueCreatedByTeamMemberID *string + obj.SetCreatedByTeamMemberID(fernTestValueCreatedByTeamMemberID) + assert.Equal(t, fernTestValueCreatedByTeamMemberID, obj.CreatedByTeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLineItems", func(t *testing.T) { + obj := &TransferOrder{} + var fernTestValueLineItems []*TransferOrderLine + obj.SetLineItems(fernTestValueLineItems) + assert.Equal(t, fernTestValueLineItems, obj.LineItems) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &TransferOrder{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTransferOrder(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrder + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetSourceLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + var expected *string + obj.SourceLocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSourceLocationID(), "getter should return the property value") + }) + + t.Run("GetSourceLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + obj.SourceLocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetSourceLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetSourceLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrder + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSourceLocationID() // Should return zero value + }) + + t.Run("GetDestinationLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + var expected *string + obj.DestinationLocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDestinationLocationID(), "getter should return the property value") + }) + + t.Run("GetDestinationLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + obj.DestinationLocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetDestinationLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetDestinationLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrder + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDestinationLocationID() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + var expected *TransferOrderStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrder + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrder + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrder + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetExpectedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + var expected *string + obj.ExpectedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExpectedAt(), "getter should return the property value") + }) + + t.Run("GetExpectedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + obj.ExpectedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetExpectedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetExpectedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrder + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExpectedAt() // Should return zero value + }) + + t.Run("GetCompletedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + var expected *string + obj.CompletedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCompletedAt(), "getter should return the property value") + }) + + t.Run("GetCompletedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + obj.CompletedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCompletedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCompletedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrder + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCompletedAt() // Should return zero value + }) + + t.Run("GetNotes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + var expected *string + obj.Notes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNotes(), "getter should return the property value") + }) + + t.Run("GetNotes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + obj.Notes = nil + + // Act & Assert + assert.Nil(t, obj.GetNotes(), "getter should return nil when property is nil") + }) + + t.Run("GetNotes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrder + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNotes() // Should return zero value + }) + + t.Run("GetTrackingNumber", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + var expected *string + obj.TrackingNumber = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTrackingNumber(), "getter should return the property value") + }) + + t.Run("GetTrackingNumber_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + obj.TrackingNumber = nil + + // Act & Assert + assert.Nil(t, obj.GetTrackingNumber(), "getter should return nil when property is nil") + }) + + t.Run("GetTrackingNumber_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrder + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTrackingNumber() // Should return zero value + }) + + t.Run("GetCreatedByTeamMemberID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + var expected *string + obj.CreatedByTeamMemberID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedByTeamMemberID(), "getter should return the property value") + }) + + t.Run("GetCreatedByTeamMemberID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + obj.CreatedByTeamMemberID = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedByTeamMemberID(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedByTeamMemberID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrder + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedByTeamMemberID() // Should return zero value + }) + + t.Run("GetLineItems", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + var expected []*TransferOrderLine + obj.LineItems = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLineItems(), "getter should return the property value") + }) + + t.Run("GetLineItems_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + obj.LineItems = nil + + // Act & Assert + assert.Nil(t, obj.GetLineItems(), "getter should return nil when property is nil") + }) + + t.Run("GetLineItems_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrder + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLineItems() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + var expected *int64 + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrder + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTransferOrder(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSourceLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + var fernTestValueSourceLocationID *string + + // Act + obj.SetSourceLocationID(fernTestValueSourceLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDestinationLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + var fernTestValueDestinationLocationID *string + + // Act + obj.SetDestinationLocationID(fernTestValueDestinationLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + var fernTestValueStatus *TransferOrderStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExpectedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + var fernTestValueExpectedAt *string + + // Act + obj.SetExpectedAt(fernTestValueExpectedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCompletedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + var fernTestValueCompletedAt *string + + // Act + obj.SetCompletedAt(fernTestValueCompletedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNotes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + var fernTestValueNotes *string + + // Act + obj.SetNotes(fernTestValueNotes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTrackingNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + var fernTestValueTrackingNumber *string + + // Act + obj.SetTrackingNumber(fernTestValueTrackingNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedByTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + var fernTestValueCreatedByTeamMemberID *string + + // Act + obj.SetCreatedByTeamMemberID(fernTestValueCreatedByTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLineItems_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + var fernTestValueLineItems []*TransferOrderLine + + // Act + obj.SetLineItems(fernTestValueLineItems) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTransferOrderFilter(t *testing.T) { + t.Run("SetSourceLocationIDs", func(t *testing.T) { + obj := &TransferOrderFilter{} + var fernTestValueSourceLocationIDs []string + obj.SetSourceLocationIDs(fernTestValueSourceLocationIDs) + assert.Equal(t, fernTestValueSourceLocationIDs, obj.SourceLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDestinationLocationIDs", func(t *testing.T) { + obj := &TransferOrderFilter{} + var fernTestValueDestinationLocationIDs []string + obj.SetDestinationLocationIDs(fernTestValueDestinationLocationIDs) + assert.Equal(t, fernTestValueDestinationLocationIDs, obj.DestinationLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatuses", func(t *testing.T) { + obj := &TransferOrderFilter{} + var fernTestValueStatuses []TransferOrderStatus + obj.SetStatuses(fernTestValueStatuses) + assert.Equal(t, fernTestValueStatuses, obj.Statuses) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTransferOrderFilter(t *testing.T) { + t.Run("GetSourceLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderFilter{} + var expected []string + obj.SourceLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSourceLocationIDs(), "getter should return the property value") + }) + + t.Run("GetSourceLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderFilter{} + obj.SourceLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetSourceLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetSourceLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSourceLocationIDs() // Should return zero value + }) + + t.Run("GetDestinationLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderFilter{} + var expected []string + obj.DestinationLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDestinationLocationIDs(), "getter should return the property value") + }) + + t.Run("GetDestinationLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderFilter{} + obj.DestinationLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetDestinationLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetDestinationLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDestinationLocationIDs() // Should return zero value + }) + + t.Run("GetStatuses", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderFilter{} + var expected []TransferOrderStatus + obj.Statuses = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatuses(), "getter should return the property value") + }) + + t.Run("GetStatuses_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderFilter{} + obj.Statuses = nil + + // Act & Assert + assert.Nil(t, obj.GetStatuses(), "getter should return nil when property is nil") + }) + + t.Run("GetStatuses_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatuses() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTransferOrderFilter(t *testing.T) { + t.Run("SetSourceLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderFilter{} + var fernTestValueSourceLocationIDs []string + + // Act + obj.SetSourceLocationIDs(fernTestValueSourceLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDestinationLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderFilter{} + var fernTestValueDestinationLocationIDs []string + + // Act + obj.SetDestinationLocationIDs(fernTestValueDestinationLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatuses_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderFilter{} + var fernTestValueStatuses []TransferOrderStatus + + // Act + obj.SetStatuses(fernTestValueStatuses) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTransferOrderGoodsReceipt(t *testing.T) { + t.Run("SetLineItems", func(t *testing.T) { + obj := &TransferOrderGoodsReceipt{} + var fernTestValueLineItems []*TransferOrderGoodsReceiptLineItem + obj.SetLineItems(fernTestValueLineItems) + assert.Equal(t, fernTestValueLineItems, obj.LineItems) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTransferOrderGoodsReceipt(t *testing.T) { + t.Run("GetLineItems", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderGoodsReceipt{} + var expected []*TransferOrderGoodsReceiptLineItem + obj.LineItems = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLineItems(), "getter should return the property value") + }) + + t.Run("GetLineItems_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderGoodsReceipt{} + obj.LineItems = nil + + // Act & Assert + assert.Nil(t, obj.GetLineItems(), "getter should return nil when property is nil") + }) + + t.Run("GetLineItems_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderGoodsReceipt + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLineItems() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTransferOrderGoodsReceipt(t *testing.T) { + t.Run("SetLineItems_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderGoodsReceipt{} + var fernTestValueLineItems []*TransferOrderGoodsReceiptLineItem + + // Act + obj.SetLineItems(fernTestValueLineItems) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTransferOrderGoodsReceiptLineItem(t *testing.T) { + t.Run("SetTransferOrderLineUID", func(t *testing.T) { + obj := &TransferOrderGoodsReceiptLineItem{} + var fernTestValueTransferOrderLineUID string + obj.SetTransferOrderLineUID(fernTestValueTransferOrderLineUID) + assert.Equal(t, fernTestValueTransferOrderLineUID, obj.TransferOrderLineUID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuantityReceived", func(t *testing.T) { + obj := &TransferOrderGoodsReceiptLineItem{} + var fernTestValueQuantityReceived *string + obj.SetQuantityReceived(fernTestValueQuantityReceived) + assert.Equal(t, fernTestValueQuantityReceived, obj.QuantityReceived) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuantityDamaged", func(t *testing.T) { + obj := &TransferOrderGoodsReceiptLineItem{} + var fernTestValueQuantityDamaged *string + obj.SetQuantityDamaged(fernTestValueQuantityDamaged) + assert.Equal(t, fernTestValueQuantityDamaged, obj.QuantityDamaged) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuantityCanceled", func(t *testing.T) { + obj := &TransferOrderGoodsReceiptLineItem{} + var fernTestValueQuantityCanceled *string + obj.SetQuantityCanceled(fernTestValueQuantityCanceled) + assert.Equal(t, fernTestValueQuantityCanceled, obj.QuantityCanceled) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTransferOrderGoodsReceiptLineItem(t *testing.T) { + t.Run("GetTransferOrderLineUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderGoodsReceiptLineItem{} + var expected string + obj.TransferOrderLineUID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTransferOrderLineUID(), "getter should return the property value") + }) + + t.Run("GetTransferOrderLineUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderGoodsReceiptLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTransferOrderLineUID() // Should return zero value + }) + + t.Run("GetQuantityReceived", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderGoodsReceiptLineItem{} + var expected *string + obj.QuantityReceived = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQuantityReceived(), "getter should return the property value") + }) + + t.Run("GetQuantityReceived_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderGoodsReceiptLineItem{} + obj.QuantityReceived = nil + + // Act & Assert + assert.Nil(t, obj.GetQuantityReceived(), "getter should return nil when property is nil") + }) + + t.Run("GetQuantityReceived_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderGoodsReceiptLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQuantityReceived() // Should return zero value + }) + + t.Run("GetQuantityDamaged", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderGoodsReceiptLineItem{} + var expected *string + obj.QuantityDamaged = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQuantityDamaged(), "getter should return the property value") + }) + + t.Run("GetQuantityDamaged_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderGoodsReceiptLineItem{} + obj.QuantityDamaged = nil + + // Act & Assert + assert.Nil(t, obj.GetQuantityDamaged(), "getter should return nil when property is nil") + }) + + t.Run("GetQuantityDamaged_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderGoodsReceiptLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQuantityDamaged() // Should return zero value + }) + + t.Run("GetQuantityCanceled", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderGoodsReceiptLineItem{} + var expected *string + obj.QuantityCanceled = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQuantityCanceled(), "getter should return the property value") + }) + + t.Run("GetQuantityCanceled_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderGoodsReceiptLineItem{} + obj.QuantityCanceled = nil + + // Act & Assert + assert.Nil(t, obj.GetQuantityCanceled(), "getter should return nil when property is nil") + }) + + t.Run("GetQuantityCanceled_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderGoodsReceiptLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQuantityCanceled() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTransferOrderGoodsReceiptLineItem(t *testing.T) { + t.Run("SetTransferOrderLineUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderGoodsReceiptLineItem{} + var fernTestValueTransferOrderLineUID string + + // Act + obj.SetTransferOrderLineUID(fernTestValueTransferOrderLineUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuantityReceived_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderGoodsReceiptLineItem{} + var fernTestValueQuantityReceived *string + + // Act + obj.SetQuantityReceived(fernTestValueQuantityReceived) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuantityDamaged_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderGoodsReceiptLineItem{} + var fernTestValueQuantityDamaged *string + + // Act + obj.SetQuantityDamaged(fernTestValueQuantityDamaged) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuantityCanceled_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderGoodsReceiptLineItem{} + var fernTestValueQuantityCanceled *string + + // Act + obj.SetQuantityCanceled(fernTestValueQuantityCanceled) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTransferOrderLine(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &TransferOrderLine{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetItemVariationID", func(t *testing.T) { + obj := &TransferOrderLine{} + var fernTestValueItemVariationID string + obj.SetItemVariationID(fernTestValueItemVariationID) + assert.Equal(t, fernTestValueItemVariationID, obj.ItemVariationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuantityOrdered", func(t *testing.T) { + obj := &TransferOrderLine{} + var fernTestValueQuantityOrdered string + obj.SetQuantityOrdered(fernTestValueQuantityOrdered) + assert.Equal(t, fernTestValueQuantityOrdered, obj.QuantityOrdered) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuantityPending", func(t *testing.T) { + obj := &TransferOrderLine{} + var fernTestValueQuantityPending *string + obj.SetQuantityPending(fernTestValueQuantityPending) + assert.Equal(t, fernTestValueQuantityPending, obj.QuantityPending) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuantityReceived", func(t *testing.T) { + obj := &TransferOrderLine{} + var fernTestValueQuantityReceived *string + obj.SetQuantityReceived(fernTestValueQuantityReceived) + assert.Equal(t, fernTestValueQuantityReceived, obj.QuantityReceived) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuantityDamaged", func(t *testing.T) { + obj := &TransferOrderLine{} + var fernTestValueQuantityDamaged *string + obj.SetQuantityDamaged(fernTestValueQuantityDamaged) + assert.Equal(t, fernTestValueQuantityDamaged, obj.QuantityDamaged) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuantityCanceled", func(t *testing.T) { + obj := &TransferOrderLine{} + var fernTestValueQuantityCanceled *string + obj.SetQuantityCanceled(fernTestValueQuantityCanceled) + assert.Equal(t, fernTestValueQuantityCanceled, obj.QuantityCanceled) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTransferOrderLine(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderLine{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderLine{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderLine + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetItemVariationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderLine{} + var expected string + obj.ItemVariationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItemVariationID(), "getter should return the property value") + }) + + t.Run("GetItemVariationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderLine + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItemVariationID() // Should return zero value + }) + + t.Run("GetQuantityOrdered", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderLine{} + var expected string + obj.QuantityOrdered = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQuantityOrdered(), "getter should return the property value") + }) + + t.Run("GetQuantityOrdered_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderLine + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQuantityOrdered() // Should return zero value + }) + + t.Run("GetQuantityPending", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderLine{} + var expected *string + obj.QuantityPending = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQuantityPending(), "getter should return the property value") + }) + + t.Run("GetQuantityPending_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderLine{} + obj.QuantityPending = nil + + // Act & Assert + assert.Nil(t, obj.GetQuantityPending(), "getter should return nil when property is nil") + }) + + t.Run("GetQuantityPending_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderLine + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQuantityPending() // Should return zero value + }) + + t.Run("GetQuantityReceived", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderLine{} + var expected *string + obj.QuantityReceived = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQuantityReceived(), "getter should return the property value") + }) + + t.Run("GetQuantityReceived_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderLine{} + obj.QuantityReceived = nil + + // Act & Assert + assert.Nil(t, obj.GetQuantityReceived(), "getter should return nil when property is nil") + }) + + t.Run("GetQuantityReceived_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderLine + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQuantityReceived() // Should return zero value + }) + + t.Run("GetQuantityDamaged", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderLine{} + var expected *string + obj.QuantityDamaged = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQuantityDamaged(), "getter should return the property value") + }) + + t.Run("GetQuantityDamaged_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderLine{} + obj.QuantityDamaged = nil + + // Act & Assert + assert.Nil(t, obj.GetQuantityDamaged(), "getter should return nil when property is nil") + }) + + t.Run("GetQuantityDamaged_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderLine + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQuantityDamaged() // Should return zero value + }) + + t.Run("GetQuantityCanceled", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderLine{} + var expected *string + obj.QuantityCanceled = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQuantityCanceled(), "getter should return the property value") + }) + + t.Run("GetQuantityCanceled_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderLine{} + obj.QuantityCanceled = nil + + // Act & Assert + assert.Nil(t, obj.GetQuantityCanceled(), "getter should return nil when property is nil") + }) + + t.Run("GetQuantityCanceled_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderLine + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQuantityCanceled() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTransferOrderLine(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderLine{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetItemVariationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderLine{} + var fernTestValueItemVariationID string + + // Act + obj.SetItemVariationID(fernTestValueItemVariationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuantityOrdered_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderLine{} + var fernTestValueQuantityOrdered string + + // Act + obj.SetQuantityOrdered(fernTestValueQuantityOrdered) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuantityPending_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderLine{} + var fernTestValueQuantityPending *string + + // Act + obj.SetQuantityPending(fernTestValueQuantityPending) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuantityReceived_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderLine{} + var fernTestValueQuantityReceived *string + + // Act + obj.SetQuantityReceived(fernTestValueQuantityReceived) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuantityDamaged_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderLine{} + var fernTestValueQuantityDamaged *string + + // Act + obj.SetQuantityDamaged(fernTestValueQuantityDamaged) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuantityCanceled_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderLine{} + var fernTestValueQuantityCanceled *string + + // Act + obj.SetQuantityCanceled(fernTestValueQuantityCanceled) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTransferOrderQuery(t *testing.T) { + t.Run("SetFilter", func(t *testing.T) { + obj := &TransferOrderQuery{} + var fernTestValueFilter *TransferOrderFilter + obj.SetFilter(fernTestValueFilter) + assert.Equal(t, fernTestValueFilter, obj.Filter) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSort", func(t *testing.T) { + obj := &TransferOrderQuery{} + var fernTestValueSort *TransferOrderSort + obj.SetSort(fernTestValueSort) + assert.Equal(t, fernTestValueSort, obj.Sort) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTransferOrderQuery(t *testing.T) { + t.Run("GetFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderQuery{} + var expected *TransferOrderFilter + obj.Filter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFilter(), "getter should return the property value") + }) + + t.Run("GetFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderQuery{} + obj.Filter = nil + + // Act & Assert + assert.Nil(t, obj.GetFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFilter() // Should return zero value + }) + + t.Run("GetSort", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderQuery{} + var expected *TransferOrderSort + obj.Sort = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSort(), "getter should return the property value") + }) + + t.Run("GetSort_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderQuery{} + obj.Sort = nil + + // Act & Assert + assert.Nil(t, obj.GetSort(), "getter should return nil when property is nil") + }) + + t.Run("GetSort_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSort() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTransferOrderQuery(t *testing.T) { + t.Run("SetFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderQuery{} + var fernTestValueFilter *TransferOrderFilter + + // Act + obj.SetFilter(fernTestValueFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSort_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderQuery{} + var fernTestValueSort *TransferOrderSort + + // Act + obj.SetSort(fernTestValueSort) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTransferOrderSort(t *testing.T) { + t.Run("SetField", func(t *testing.T) { + obj := &TransferOrderSort{} + var fernTestValueField *TransferOrderSortField + obj.SetField(fernTestValueField) + assert.Equal(t, fernTestValueField, obj.Field) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrder", func(t *testing.T) { + obj := &TransferOrderSort{} + var fernTestValueOrder *SortOrder + obj.SetOrder(fernTestValueOrder) + assert.Equal(t, fernTestValueOrder, obj.Order) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTransferOrderSort(t *testing.T) { + t.Run("GetField", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderSort{} + var expected *TransferOrderSortField + obj.Field = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetField(), "getter should return the property value") + }) + + t.Run("GetField_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderSort{} + obj.Field = nil + + // Act & Assert + assert.Nil(t, obj.GetField(), "getter should return nil when property is nil") + }) + + t.Run("GetField_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderSort + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetField() // Should return zero value + }) + + t.Run("GetOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderSort{} + var expected *SortOrder + obj.Order = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrder(), "getter should return the property value") + }) + + t.Run("GetOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderSort{} + obj.Order = nil + + // Act & Assert + assert.Nil(t, obj.GetOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderSort + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrder() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTransferOrderSort(t *testing.T) { + t.Run("SetField_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderSort{} + var fernTestValueField *TransferOrderSortField + + // Act + obj.SetField(fernTestValueField) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderSort{} + var fernTestValueOrder *SortOrder + + // Act + obj.SetOrder(fernTestValueOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateTransferOrderData(t *testing.T) { + t.Run("SetSourceLocationID", func(t *testing.T) { + obj := &UpdateTransferOrderData{} + var fernTestValueSourceLocationID *string + obj.SetSourceLocationID(fernTestValueSourceLocationID) + assert.Equal(t, fernTestValueSourceLocationID, obj.SourceLocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDestinationLocationID", func(t *testing.T) { + obj := &UpdateTransferOrderData{} + var fernTestValueDestinationLocationID *string + obj.SetDestinationLocationID(fernTestValueDestinationLocationID) + assert.Equal(t, fernTestValueDestinationLocationID, obj.DestinationLocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExpectedAt", func(t *testing.T) { + obj := &UpdateTransferOrderData{} + var fernTestValueExpectedAt *string + obj.SetExpectedAt(fernTestValueExpectedAt) + assert.Equal(t, fernTestValueExpectedAt, obj.ExpectedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNotes", func(t *testing.T) { + obj := &UpdateTransferOrderData{} + var fernTestValueNotes *string + obj.SetNotes(fernTestValueNotes) + assert.Equal(t, fernTestValueNotes, obj.Notes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTrackingNumber", func(t *testing.T) { + obj := &UpdateTransferOrderData{} + var fernTestValueTrackingNumber *string + obj.SetTrackingNumber(fernTestValueTrackingNumber) + assert.Equal(t, fernTestValueTrackingNumber, obj.TrackingNumber) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLineItems", func(t *testing.T) { + obj := &UpdateTransferOrderData{} + var fernTestValueLineItems []*UpdateTransferOrderLineData + obj.SetLineItems(fernTestValueLineItems) + assert.Equal(t, fernTestValueLineItems, obj.LineItems) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateTransferOrderData(t *testing.T) { + t.Run("GetSourceLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderData{} + var expected *string + obj.SourceLocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSourceLocationID(), "getter should return the property value") + }) + + t.Run("GetSourceLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderData{} + obj.SourceLocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetSourceLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetSourceLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTransferOrderData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSourceLocationID() // Should return zero value + }) + + t.Run("GetDestinationLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderData{} + var expected *string + obj.DestinationLocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDestinationLocationID(), "getter should return the property value") + }) + + t.Run("GetDestinationLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderData{} + obj.DestinationLocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetDestinationLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetDestinationLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTransferOrderData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDestinationLocationID() // Should return zero value + }) + + t.Run("GetExpectedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderData{} + var expected *string + obj.ExpectedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExpectedAt(), "getter should return the property value") + }) + + t.Run("GetExpectedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderData{} + obj.ExpectedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetExpectedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetExpectedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTransferOrderData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExpectedAt() // Should return zero value + }) + + t.Run("GetNotes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderData{} + var expected *string + obj.Notes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNotes(), "getter should return the property value") + }) + + t.Run("GetNotes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderData{} + obj.Notes = nil + + // Act & Assert + assert.Nil(t, obj.GetNotes(), "getter should return nil when property is nil") + }) + + t.Run("GetNotes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTransferOrderData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNotes() // Should return zero value + }) + + t.Run("GetTrackingNumber", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderData{} + var expected *string + obj.TrackingNumber = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTrackingNumber(), "getter should return the property value") + }) + + t.Run("GetTrackingNumber_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderData{} + obj.TrackingNumber = nil + + // Act & Assert + assert.Nil(t, obj.GetTrackingNumber(), "getter should return nil when property is nil") + }) + + t.Run("GetTrackingNumber_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTransferOrderData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTrackingNumber() // Should return zero value + }) + + t.Run("GetLineItems", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderData{} + var expected []*UpdateTransferOrderLineData + obj.LineItems = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLineItems(), "getter should return the property value") + }) + + t.Run("GetLineItems_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderData{} + obj.LineItems = nil + + // Act & Assert + assert.Nil(t, obj.GetLineItems(), "getter should return nil when property is nil") + }) + + t.Run("GetLineItems_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTransferOrderData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLineItems() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateTransferOrderData(t *testing.T) { + t.Run("SetSourceLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderData{} + var fernTestValueSourceLocationID *string + + // Act + obj.SetSourceLocationID(fernTestValueSourceLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDestinationLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderData{} + var fernTestValueDestinationLocationID *string + + // Act + obj.SetDestinationLocationID(fernTestValueDestinationLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExpectedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderData{} + var fernTestValueExpectedAt *string + + // Act + obj.SetExpectedAt(fernTestValueExpectedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNotes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderData{} + var fernTestValueNotes *string + + // Act + obj.SetNotes(fernTestValueNotes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTrackingNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderData{} + var fernTestValueTrackingNumber *string + + // Act + obj.SetTrackingNumber(fernTestValueTrackingNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLineItems_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderData{} + var fernTestValueLineItems []*UpdateTransferOrderLineData + + // Act + obj.SetLineItems(fernTestValueLineItems) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateTransferOrderLineData(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &UpdateTransferOrderLineData{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetItemVariationID", func(t *testing.T) { + obj := &UpdateTransferOrderLineData{} + var fernTestValueItemVariationID *string + obj.SetItemVariationID(fernTestValueItemVariationID) + assert.Equal(t, fernTestValueItemVariationID, obj.ItemVariationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuantityOrdered", func(t *testing.T) { + obj := &UpdateTransferOrderLineData{} + var fernTestValueQuantityOrdered *string + obj.SetQuantityOrdered(fernTestValueQuantityOrdered) + assert.Equal(t, fernTestValueQuantityOrdered, obj.QuantityOrdered) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRemove", func(t *testing.T) { + obj := &UpdateTransferOrderLineData{} + var fernTestValueRemove *bool + obj.SetRemove(fernTestValueRemove) + assert.Equal(t, fernTestValueRemove, obj.Remove) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateTransferOrderLineData(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderLineData{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderLineData{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTransferOrderLineData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetItemVariationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderLineData{} + var expected *string + obj.ItemVariationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItemVariationID(), "getter should return the property value") + }) + + t.Run("GetItemVariationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderLineData{} + obj.ItemVariationID = nil + + // Act & Assert + assert.Nil(t, obj.GetItemVariationID(), "getter should return nil when property is nil") + }) + + t.Run("GetItemVariationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTransferOrderLineData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItemVariationID() // Should return zero value + }) + + t.Run("GetQuantityOrdered", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderLineData{} + var expected *string + obj.QuantityOrdered = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQuantityOrdered(), "getter should return the property value") + }) + + t.Run("GetQuantityOrdered_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderLineData{} + obj.QuantityOrdered = nil + + // Act & Assert + assert.Nil(t, obj.GetQuantityOrdered(), "getter should return nil when property is nil") + }) + + t.Run("GetQuantityOrdered_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTransferOrderLineData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQuantityOrdered() // Should return zero value + }) + + t.Run("GetRemove", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderLineData{} + var expected *bool + obj.Remove = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRemove(), "getter should return the property value") + }) + + t.Run("GetRemove_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderLineData{} + obj.Remove = nil + + // Act & Assert + assert.Nil(t, obj.GetRemove(), "getter should return nil when property is nil") + }) + + t.Run("GetRemove_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTransferOrderLineData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRemove() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateTransferOrderLineData(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderLineData{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetItemVariationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderLineData{} + var fernTestValueItemVariationID *string + + // Act + obj.SetItemVariationID(fernTestValueItemVariationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuantityOrdered_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderLineData{} + var fernTestValueQuantityOrdered *string + + // Act + obj.SetQuantityOrdered(fernTestValueQuantityOrdered) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRemove_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderLineData{} + var fernTestValueRemove *bool + + // Act + obj.SetRemove(fernTestValueRemove) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateTransferOrderResponse(t *testing.T) { + t.Run("SetTransferOrder", func(t *testing.T) { + obj := &UpdateTransferOrderResponse{} + var fernTestValueTransferOrder *TransferOrder + obj.SetTransferOrder(fernTestValueTransferOrder) + assert.Equal(t, fernTestValueTransferOrder, obj.TransferOrder) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateTransferOrderResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateTransferOrderResponse(t *testing.T) { + t.Run("GetTransferOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderResponse{} + var expected *TransferOrder + obj.TransferOrder = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTransferOrder(), "getter should return the property value") + }) + + t.Run("GetTransferOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderResponse{} + obj.TransferOrder = nil + + // Act & Assert + assert.Nil(t, obj.GetTransferOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetTransferOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTransferOrderResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTransferOrder() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTransferOrderResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateTransferOrderResponse(t *testing.T) { + t.Run("SetTransferOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderResponse{} + var fernTestValueTransferOrder *TransferOrder + + // Act + obj.SetTransferOrder(fernTestValueTransferOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateTransferOrderRequest(t *testing.T) { + t.Run("SetTransferOrderID", func(t *testing.T) { + obj := &UpdateTransferOrderRequest{} + var fernTestValueTransferOrderID string + obj.SetTransferOrderID(fernTestValueTransferOrderID) + assert.Equal(t, fernTestValueTransferOrderID, obj.TransferOrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &UpdateTransferOrderRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTransferOrder", func(t *testing.T) { + obj := &UpdateTransferOrderRequest{} + var fernTestValueTransferOrder *UpdateTransferOrderData + obj.SetTransferOrder(fernTestValueTransferOrder) + assert.Equal(t, fernTestValueTransferOrder, obj.TransferOrder) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &UpdateTransferOrderRequest{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateTransferOrderRequest(t *testing.T) { + t.Run("SetTransferOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderRequest{} + var fernTestValueTransferOrderID string + + // Act + obj.SetTransferOrderID(fernTestValueTransferOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTransferOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderRequest{} + var fernTestValueTransferOrder *UpdateTransferOrderData + + // Act + obj.SetTransferOrder(fernTestValueTransferOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderRequest{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingCancelTransferOrderResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTransferOrderResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CancelTransferOrderResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CancelTransferOrderResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CancelTransferOrderResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateTransferOrderData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateTransferOrderData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateTransferOrderData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateTransferOrderData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateTransferOrderLineData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderLineData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateTransferOrderLineData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateTransferOrderLineData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateTransferOrderLineData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateTransferOrderResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTransferOrderResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateTransferOrderResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateTransferOrderResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateTransferOrderResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeleteTransferOrderResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteTransferOrderResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeleteTransferOrderResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeleteTransferOrderResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeleteTransferOrderResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingReceiveTransferOrderResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ReceiveTransferOrderResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ReceiveTransferOrderResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ReceiveTransferOrderResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ReceiveTransferOrderResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRetrieveTransferOrderResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveTransferOrderResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RetrieveTransferOrderResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RetrieveTransferOrderResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RetrieveTransferOrderResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchTransferOrdersResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTransferOrdersResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchTransferOrdersResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchTransferOrdersResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchTransferOrdersResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingStartTransferOrderResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &StartTransferOrderResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled StartTransferOrderResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj StartTransferOrderResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj StartTransferOrderResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTransferOrder(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrder{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TransferOrder + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TransferOrder + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TransferOrder + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTransferOrderFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TransferOrderFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TransferOrderFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TransferOrderFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTransferOrderGoodsReceipt(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderGoodsReceipt{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TransferOrderGoodsReceipt + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TransferOrderGoodsReceipt + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TransferOrderGoodsReceipt + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTransferOrderGoodsReceiptLineItem(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderGoodsReceiptLineItem{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TransferOrderGoodsReceiptLineItem + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TransferOrderGoodsReceiptLineItem + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TransferOrderGoodsReceiptLineItem + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTransferOrderLine(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderLine{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TransferOrderLine + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TransferOrderLine + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TransferOrderLine + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTransferOrderQuery(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderQuery{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TransferOrderQuery + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TransferOrderQuery + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TransferOrderQuery + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTransferOrderSort(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderSort{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TransferOrderSort + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TransferOrderSort + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TransferOrderSort + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateTransferOrderData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateTransferOrderData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateTransferOrderData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateTransferOrderData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateTransferOrderLineData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderLineData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateTransferOrderLineData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateTransferOrderLineData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateTransferOrderLineData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateTransferOrderResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateTransferOrderResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateTransferOrderResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateTransferOrderResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateTransferOrderResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringCancelTransferOrderResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CancelTransferOrderResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelTransferOrderResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateTransferOrderData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateTransferOrderData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTransferOrderData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateTransferOrderLineData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateTransferOrderLineData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTransferOrderLineData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateTransferOrderResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateTransferOrderResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTransferOrderResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeleteTransferOrderResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeleteTransferOrderResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteTransferOrderResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringReceiveTransferOrderResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ReceiveTransferOrderResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ReceiveTransferOrderResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRetrieveTransferOrderResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RetrieveTransferOrderResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveTransferOrderResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchTransferOrdersResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchTransferOrdersResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTransferOrdersResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringStartTransferOrderResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &StartTransferOrderResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *StartTransferOrderResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTransferOrder(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TransferOrder{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrder + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTransferOrderFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TransferOrderFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTransferOrderGoodsReceipt(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TransferOrderGoodsReceipt{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderGoodsReceipt + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTransferOrderGoodsReceiptLineItem(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TransferOrderGoodsReceiptLineItem{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderGoodsReceiptLineItem + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTransferOrderLine(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TransferOrderLine{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderLine + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTransferOrderQuery(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TransferOrderQuery{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderQuery + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTransferOrderSort(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TransferOrderSort{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderSort + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateTransferOrderData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateTransferOrderData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTransferOrderData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateTransferOrderLineData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateTransferOrderLineData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTransferOrderLineData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateTransferOrderResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateTransferOrderResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTransferOrderResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestEnumTransferOrderSortField(t *testing.T) { + t.Run("NewFromString_CREATED_AT", func(t *testing.T) { + t.Parallel() + val, err := NewTransferOrderSortFieldFromString("CREATED_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TransferOrderSortField("CREATED_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UPDATED_AT", func(t *testing.T) { + t.Parallel() + val, err := NewTransferOrderSortFieldFromString("UPDATED_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TransferOrderSortField("UPDATED_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewTransferOrderSortFieldFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewTransferOrderSortFieldFromString("CREATED_AT") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumTransferOrderStatus(t *testing.T) { + t.Run("NewFromString_DRAFT", func(t *testing.T) { + t.Parallel() + val, err := NewTransferOrderStatusFromString("DRAFT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TransferOrderStatus("DRAFT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_STARTED", func(t *testing.T) { + t.Parallel() + val, err := NewTransferOrderStatusFromString("STARTED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TransferOrderStatus("STARTED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PARTIALLY_RECEIVED", func(t *testing.T) { + t.Parallel() + val, err := NewTransferOrderStatusFromString("PARTIALLY_RECEIVED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TransferOrderStatus("PARTIALLY_RECEIVED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_COMPLETED", func(t *testing.T) { + t.Parallel() + val, err := NewTransferOrderStatusFromString("COMPLETED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TransferOrderStatus("COMPLETED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CANCELED", func(t *testing.T) { + t.Parallel() + val, err := NewTransferOrderStatusFromString("CANCELED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TransferOrderStatus("CANCELED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewTransferOrderStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewTransferOrderStatusFromString("DRAFT") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestExtraPropertiesCancelTransferOrderResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CancelTransferOrderResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelTransferOrderResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateTransferOrderData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateTransferOrderData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTransferOrderData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateTransferOrderLineData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateTransferOrderLineData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTransferOrderLineData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateTransferOrderResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateTransferOrderResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTransferOrderResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeleteTransferOrderResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeleteTransferOrderResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteTransferOrderResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesReceiveTransferOrderResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ReceiveTransferOrderResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ReceiveTransferOrderResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRetrieveTransferOrderResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RetrieveTransferOrderResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveTransferOrderResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchTransferOrdersResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchTransferOrdersResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTransferOrdersResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesStartTransferOrderResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &StartTransferOrderResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *StartTransferOrderResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTransferOrder(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TransferOrder{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrder + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTransferOrderFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TransferOrderFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTransferOrderGoodsReceipt(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TransferOrderGoodsReceipt{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderGoodsReceipt + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTransferOrderGoodsReceiptLineItem(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TransferOrderGoodsReceiptLineItem{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderGoodsReceiptLineItem + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTransferOrderLine(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TransferOrderLine{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderLine + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTransferOrderQuery(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TransferOrderQuery{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderQuery + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTransferOrderSort(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TransferOrderSort{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderSort + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateTransferOrderData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateTransferOrderData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTransferOrderData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateTransferOrderLineData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateTransferOrderLineData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTransferOrderLineData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateTransferOrderResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateTransferOrderResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateTransferOrderResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/transferorders/transfer_orders_test/transfer_orders_test.go b/transferorders/transfer_orders_test/transfer_orders_test.go new file mode 100644 index 0000000..2cc0820 --- /dev/null +++ b/transferorders/transfer_orders_test/transfer_orders_test.go @@ -0,0 +1,399 @@ +// Code generated by Fern. DO NOT EDIT. + +package transfer_orders_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestTransferOrdersCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CreateTransferOrderRequest{ + IdempotencyKey: "65cc0586-3e82-384s-b524-3885cffd52", + TransferOrder: &square.CreateTransferOrderData{ + SourceLocationID: "EXAMPLE_SOURCE_LOCATION_ID_123", + DestinationLocationID: "EXAMPLE_DEST_LOCATION_ID_456", + ExpectedAt: square.String( + "2025-11-09T05:00:00Z", + ), + Notes: square.String( + "Example transfer order for inventory redistribution between locations", + ), + TrackingNumber: square.String( + "TRACK123456789", + ), + CreatedByTeamMemberID: square.String( + "EXAMPLE_TEAM_MEMBER_ID_789", + ), + LineItems: []*square.CreateTransferOrderLineData{ + &square.CreateTransferOrderLineData{ + ItemVariationID: "EXAMPLE_ITEM_VARIATION_ID_001", + QuantityOrdered: "5", + }, + &square.CreateTransferOrderLineData{ + ItemVariationID: "EXAMPLE_ITEM_VARIATION_ID_002", + QuantityOrdered: "3", + }, + }, + }, + } + _, invocationErr := client.TransferOrders.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTransferOrdersCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTransferOrdersCreateWithWireMock", "POST", "/v2/transfer-orders", nil, 1) +} + +func TestTransferOrdersSearchWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.SearchTransferOrdersRequest{ + Query: &square.TransferOrderQuery{ + Filter: &square.TransferOrderFilter{ + SourceLocationIDs: []string{ + "EXAMPLE_SOURCE_LOCATION_ID_123", + }, + DestinationLocationIDs: []string{ + "EXAMPLE_DEST_LOCATION_ID_456", + }, + Statuses: []square.TransferOrderStatus{ + square.TransferOrderStatusStarted, + square.TransferOrderStatusPartiallyReceived, + }, + }, + Sort: &square.TransferOrderSort{ + Field: square.TransferOrderSortFieldUpdatedAt.Ptr(), + Order: square.SortOrderDesc.Ptr(), + }, + }, + Cursor: square.String( + "eyJsYXN0X3VwZGF0ZWRfYXQiOjE3NTMxMTg2NjQ4NzN9", + ), + Limit: square.Int( + 10, + ), + } + _, invocationErr := client.TransferOrders.Search( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTransferOrdersSearchWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTransferOrdersSearchWithWireMock", "POST", "/v2/transfer-orders/search", nil, 1) +} + +func TestTransferOrdersGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.GetTransferOrdersRequest{ + TransferOrderID: "transfer_order_id", + } + _, invocationErr := client.TransferOrders.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTransferOrdersGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTransferOrdersGetWithWireMock", "GET", "/v2/transfer-orders/transfer_order_id", nil, 1) +} + +func TestTransferOrdersUpdateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.UpdateTransferOrderRequest{ + TransferOrderID: "transfer_order_id", + IdempotencyKey: "f47ac10b-58cc-4372-a567-0e02b2c3d479", + TransferOrder: &square.UpdateTransferOrderData{ + SourceLocationID: square.String( + "EXAMPLE_SOURCE_LOCATION_ID_789", + ), + DestinationLocationID: square.String( + "EXAMPLE_DEST_LOCATION_ID_101", + ), + ExpectedAt: square.String( + "2025-11-10T08:00:00Z", + ), + Notes: square.String( + "Updated: Priority transfer due to low stock at destination", + ), + TrackingNumber: square.String( + "TRACK987654321", + ), + LineItems: []*square.UpdateTransferOrderLineData{ + &square.UpdateTransferOrderLineData{ + UID: square.String( + "1", + ), + QuantityOrdered: square.String( + "7", + ), + }, + &square.UpdateTransferOrderLineData{ + ItemVariationID: square.String( + "EXAMPLE_NEW_ITEM_VARIATION_ID_003", + ), + QuantityOrdered: square.String( + "2", + ), + }, + &square.UpdateTransferOrderLineData{ + UID: square.String( + "2", + ), + Remove: square.Bool( + true, + ), + }, + }, + }, + Version: square.Int64( + int64(1753109537351), + ), + } + _, invocationErr := client.TransferOrders.Update( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTransferOrdersUpdateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTransferOrdersUpdateWithWireMock", "PUT", "/v2/transfer-orders/transfer_order_id", nil, 1) +} + +func TestTransferOrdersDeleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.DeleteTransferOrdersRequest{ + TransferOrderID: "transfer_order_id", + Version: square.Int64( + int64(1000000), + ), + } + _, invocationErr := client.TransferOrders.Delete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTransferOrdersDeleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTransferOrdersDeleteWithWireMock", "DELETE", "/v2/transfer-orders/transfer_order_id", map[string]string{"version": "1000000"}, 1) +} + +func TestTransferOrdersCancelWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CancelTransferOrderRequest{ + TransferOrderID: "transfer_order_id", + IdempotencyKey: "65cc0586-3e82-4d08-b524-3885cffd52", + Version: square.Int64( + int64(1753117449752), + ), + } + _, invocationErr := client.TransferOrders.Cancel( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTransferOrdersCancelWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTransferOrdersCancelWithWireMock", "POST", "/v2/transfer-orders/transfer_order_id/cancel", nil, 1) +} + +func TestTransferOrdersReceiveWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.ReceiveTransferOrderRequest{ + TransferOrderID: "transfer_order_id", + IdempotencyKey: "EXAMPLE_IDEMPOTENCY_KEY_101", + Receipt: &square.TransferOrderGoodsReceipt{ + LineItems: []*square.TransferOrderGoodsReceiptLineItem{ + &square.TransferOrderGoodsReceiptLineItem{ + TransferOrderLineUID: "1", + QuantityReceived: square.String( + "3", + ), + QuantityDamaged: square.String( + "1", + ), + QuantityCanceled: square.String( + "1", + ), + }, + &square.TransferOrderGoodsReceiptLineItem{ + TransferOrderLineUID: "2", + QuantityReceived: square.String( + "2", + ), + QuantityCanceled: square.String( + "1", + ), + }, + }, + }, + Version: square.Int64( + int64(1753118664873), + ), + } + _, invocationErr := client.TransferOrders.Receive( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTransferOrdersReceiveWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTransferOrdersReceiveWithWireMock", "POST", "/v2/transfer-orders/transfer_order_id/receive", nil, 1) +} + +func TestTransferOrdersStartWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.StartTransferOrderRequest{ + TransferOrderID: "transfer_order_id", + IdempotencyKey: "EXAMPLE_IDEMPOTENCY_KEY_789", + Version: square.Int64( + int64(1753109537351), + ), + } + _, invocationErr := client.TransferOrders.Start( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestTransferOrdersStartWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestTransferOrdersStartWithWireMock", "POST", "/v2/transfer-orders/transfer_order_id/start", nil, 1) +} diff --git a/types.go b/types.go index 9257ca2..90e5f14 100644 --- a/types.go +++ b/types.go @@ -62,6 +62,9 @@ func (a *AcceptedPaymentMethods) GetAfterpayClearpay() *bool { } func (a *AcceptedPaymentMethods) GetExtraProperties() map[string]interface{} { + if a == nil { + return nil + } return a.extraProperties } @@ -128,6 +131,9 @@ func (a *AcceptedPaymentMethods) MarshalJSON() ([]byte, error) { } func (a *AcceptedPaymentMethods) String() string { + if a == nil { + return "" + } if len(a.rawJSON) > 0 { if value, err := internal.StringifyJSON(a.rawJSON); err == nil { return value @@ -185,6 +191,9 @@ func (a *AccumulateLoyaltyPointsResponse) GetEvents() []*LoyaltyEvent { } func (a *AccumulateLoyaltyPointsResponse) GetExtraProperties() map[string]interface{} { + if a == nil { + return nil + } return a.extraProperties } @@ -244,6 +253,9 @@ func (a *AccumulateLoyaltyPointsResponse) MarshalJSON() ([]byte, error) { } func (a *AccumulateLoyaltyPointsResponse) String() string { + if a == nil { + return "" + } if len(a.rawJSON) > 0 { if value, err := internal.StringifyJSON(a.rawJSON); err == nil { return value @@ -305,6 +317,9 @@ func (a *AddGroupToCustomerResponse) GetErrors() []*Error { } func (a *AddGroupToCustomerResponse) GetExtraProperties() map[string]interface{} { + if a == nil { + return nil + } return a.extraProperties } @@ -350,6 +365,9 @@ func (a *AddGroupToCustomerResponse) MarshalJSON() ([]byte, error) { } func (a *AddGroupToCustomerResponse) String() string { + if a == nil { + return "" + } if len(a.rawJSON) > 0 { if value, err := internal.StringifyJSON(a.rawJSON); err == nil { return value @@ -415,6 +433,9 @@ func (a *AdditionalRecipient) GetReceivableID() *string { } func (a *AdditionalRecipient) GetExtraProperties() map[string]interface{} { + if a == nil { + return nil + } return a.extraProperties } @@ -481,6 +502,9 @@ func (a *AdditionalRecipient) MarshalJSON() ([]byte, error) { } func (a *AdditionalRecipient) String() string { + if a == nil { + return "" + } if len(a.rawJSON) > 0 { if value, err := internal.StringifyJSON(a.rawJSON); err == nil { return value @@ -656,6 +680,9 @@ func (a *Address) GetLastName() *string { } func (a *Address) GetExtraProperties() map[string]interface{} { + if a == nil { + return nil + } return a.extraProperties } @@ -792,6 +819,9 @@ func (a *Address) MarshalJSON() ([]byte, error) { } func (a *Address) String() string { + if a == nil { + return "" + } if len(a.rawJSON) > 0 { if value, err := internal.StringifyJSON(a.rawJSON); err == nil { return value @@ -837,6 +867,9 @@ func (a *AdjustLoyaltyPointsResponse) GetEvent() *LoyaltyEvent { } func (a *AdjustLoyaltyPointsResponse) GetExtraProperties() map[string]interface{} { + if a == nil { + return nil + } return a.extraProperties } @@ -889,6 +922,9 @@ func (a *AdjustLoyaltyPointsResponse) MarshalJSON() ([]byte, error) { } func (a *AdjustLoyaltyPointsResponse) String() string { + if a == nil { + return "" + } if len(a.rawJSON) > 0 { if value, err := internal.StringifyJSON(a.rawJSON); err == nil { return value @@ -976,6 +1012,9 @@ func (b *BankAccountCreatedEvent) GetData() *BankAccountCreatedEventData { } func (b *BankAccountCreatedEvent) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -1056,6 +1095,9 @@ func (b *BankAccountCreatedEvent) MarshalJSON() ([]byte, error) { } func (b *BankAccountCreatedEvent) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -1110,6 +1152,9 @@ func (b *BankAccountCreatedEventData) GetObject() *BankAccountCreatedEventObject } func (b *BankAccountCreatedEventData) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -1169,6 +1214,9 @@ func (b *BankAccountCreatedEventData) MarshalJSON() ([]byte, error) { } func (b *BankAccountCreatedEventData) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -1203,6 +1251,9 @@ func (b *BankAccountCreatedEventObject) GetBankAccount() *BankAccount { } func (b *BankAccountCreatedEventObject) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -1248,6 +1299,9 @@ func (b *BankAccountCreatedEventObject) MarshalJSON() ([]byte, error) { } func (b *BankAccountCreatedEventObject) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -1334,6 +1388,9 @@ func (b *BankAccountDisabledEvent) GetData() *BankAccountDisabledEventData { } func (b *BankAccountDisabledEvent) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -1414,6 +1471,9 @@ func (b *BankAccountDisabledEvent) MarshalJSON() ([]byte, error) { } func (b *BankAccountDisabledEvent) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -1468,6 +1528,9 @@ func (b *BankAccountDisabledEventData) GetObject() *BankAccountDisabledEventObje } func (b *BankAccountDisabledEventData) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -1527,6 +1590,9 @@ func (b *BankAccountDisabledEventData) MarshalJSON() ([]byte, error) { } func (b *BankAccountDisabledEventData) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -1561,6 +1627,9 @@ func (b *BankAccountDisabledEventObject) GetBankAccount() *BankAccount { } func (b *BankAccountDisabledEventObject) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -1606,6 +1675,9 @@ func (b *BankAccountDisabledEventObject) MarshalJSON() ([]byte, error) { } func (b *BankAccountDisabledEventObject) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -1692,6 +1764,9 @@ func (b *BankAccountVerifiedEvent) GetData() *BankAccountVerifiedEventData { } func (b *BankAccountVerifiedEvent) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -1772,6 +1847,9 @@ func (b *BankAccountVerifiedEvent) MarshalJSON() ([]byte, error) { } func (b *BankAccountVerifiedEvent) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -1826,6 +1904,9 @@ func (b *BankAccountVerifiedEventData) GetObject() *BankAccountVerifiedEventObje } func (b *BankAccountVerifiedEventData) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -1885,6 +1966,9 @@ func (b *BankAccountVerifiedEventData) MarshalJSON() ([]byte, error) { } func (b *BankAccountVerifiedEventData) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -1919,6 +2003,9 @@ func (b *BankAccountVerifiedEventObject) GetBankAccount() *BankAccount { } func (b *BankAccountVerifiedEventObject) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -1964,6 +2051,9 @@ func (b *BankAccountVerifiedEventObject) MarshalJSON() ([]byte, error) { } func (b *BankAccountVerifiedEventObject) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -2032,6 +2122,9 @@ func (b *BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsert } func (b *BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -2091,6 +2184,9 @@ func (b *BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsert } func (b *BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -2138,6 +2234,9 @@ func (b *BatchUpsertCustomerCustomAttributesResponse) GetErrors() []*Error { } func (b *BatchUpsertCustomerCustomAttributesResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -2190,6 +2289,9 @@ func (b *BatchUpsertCustomerCustomAttributesResponse) MarshalJSON() ([]byte, err } func (b *BatchUpsertCustomerCustomAttributesResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -2245,6 +2347,9 @@ func (b *BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpser } func (b *BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -2304,6 +2409,9 @@ func (b *BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpser } func (b *BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -2382,6 +2490,9 @@ func (b *BookingCreatedEvent) GetData() *BookingCreatedEventData { } func (b *BookingCreatedEvent) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -2455,6 +2566,9 @@ func (b *BookingCreatedEvent) MarshalJSON() ([]byte, error) { } func (b *BookingCreatedEvent) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -2509,6 +2623,9 @@ func (b *BookingCreatedEventData) GetObject() *BookingCreatedEventObject { } func (b *BookingCreatedEventData) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -2568,6 +2685,9 @@ func (b *BookingCreatedEventData) MarshalJSON() ([]byte, error) { } func (b *BookingCreatedEventData) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -2602,6 +2722,9 @@ func (b *BookingCreatedEventObject) GetBooking() *Booking { } func (b *BookingCreatedEventObject) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -2647,6 +2770,9 @@ func (b *BookingCreatedEventObject) MarshalJSON() ([]byte, error) { } func (b *BookingCreatedEventObject) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -2724,6 +2850,9 @@ func (b *BookingCustomAttributeDefinitionOwnedCreatedEvent) GetData() *CustomAtt } func (b *BookingCustomAttributeDefinitionOwnedCreatedEvent) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -2797,6 +2926,9 @@ func (b *BookingCustomAttributeDefinitionOwnedCreatedEvent) MarshalJSON() ([]byt } func (b *BookingCustomAttributeDefinitionOwnedCreatedEvent) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -2874,6 +3006,9 @@ func (b *BookingCustomAttributeDefinitionOwnedDeletedEvent) GetData() *CustomAtt } func (b *BookingCustomAttributeDefinitionOwnedDeletedEvent) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -2947,6 +3082,9 @@ func (b *BookingCustomAttributeDefinitionOwnedDeletedEvent) MarshalJSON() ([]byt } func (b *BookingCustomAttributeDefinitionOwnedDeletedEvent) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -3024,6 +3162,9 @@ func (b *BookingCustomAttributeDefinitionOwnedUpdatedEvent) GetData() *CustomAtt } func (b *BookingCustomAttributeDefinitionOwnedUpdatedEvent) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -3097,6 +3238,9 @@ func (b *BookingCustomAttributeDefinitionOwnedUpdatedEvent) MarshalJSON() ([]byt } func (b *BookingCustomAttributeDefinitionOwnedUpdatedEvent) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -3175,6 +3319,9 @@ func (b *BookingCustomAttributeDefinitionVisibleCreatedEvent) GetData() *CustomA } func (b *BookingCustomAttributeDefinitionVisibleCreatedEvent) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -3248,6 +3395,9 @@ func (b *BookingCustomAttributeDefinitionVisibleCreatedEvent) MarshalJSON() ([]b } func (b *BookingCustomAttributeDefinitionVisibleCreatedEvent) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -3326,6 +3476,9 @@ func (b *BookingCustomAttributeDefinitionVisibleDeletedEvent) GetData() *CustomA } func (b *BookingCustomAttributeDefinitionVisibleDeletedEvent) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -3399,6 +3552,9 @@ func (b *BookingCustomAttributeDefinitionVisibleDeletedEvent) MarshalJSON() ([]b } func (b *BookingCustomAttributeDefinitionVisibleDeletedEvent) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -3477,6 +3633,9 @@ func (b *BookingCustomAttributeDefinitionVisibleUpdatedEvent) GetData() *CustomA } func (b *BookingCustomAttributeDefinitionVisibleUpdatedEvent) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -3550,6 +3709,9 @@ func (b *BookingCustomAttributeDefinitionVisibleUpdatedEvent) MarshalJSON() ([]b } func (b *BookingCustomAttributeDefinitionVisibleUpdatedEvent) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -3598,6 +3760,9 @@ func (b *BookingCustomAttributeDeleteRequest) GetKey() string { } func (b *BookingCustomAttributeDeleteRequest) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -3650,6 +3815,9 @@ func (b *BookingCustomAttributeDeleteRequest) MarshalJSON() ([]byte, error) { } func (b *BookingCustomAttributeDeleteRequest) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -3695,6 +3863,9 @@ func (b *BookingCustomAttributeDeleteResponse) GetErrors() []*Error { } func (b *BookingCustomAttributeDeleteResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -3747,6 +3918,9 @@ func (b *BookingCustomAttributeDeleteResponse) MarshalJSON() ([]byte, error) { } func (b *BookingCustomAttributeDeleteResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -3826,6 +4000,9 @@ func (b *BookingCustomAttributeOwnedDeletedEvent) GetData() *CustomAttributeEven } func (b *BookingCustomAttributeOwnedDeletedEvent) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -3899,6 +4076,9 @@ func (b *BookingCustomAttributeOwnedDeletedEvent) MarshalJSON() ([]byte, error) } func (b *BookingCustomAttributeOwnedDeletedEvent) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -3976,6 +4156,9 @@ func (b *BookingCustomAttributeOwnedUpdatedEvent) GetData() *CustomAttributeEven } func (b *BookingCustomAttributeOwnedUpdatedEvent) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -4049,6 +4232,9 @@ func (b *BookingCustomAttributeOwnedUpdatedEvent) MarshalJSON() ([]byte, error) } func (b *BookingCustomAttributeOwnedUpdatedEvent) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -4117,6 +4303,9 @@ func (b *BookingCustomAttributeUpsertRequest) GetIdempotencyKey() *string { } func (b *BookingCustomAttributeUpsertRequest) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -4176,6 +4365,9 @@ func (b *BookingCustomAttributeUpsertRequest) MarshalJSON() ([]byte, error) { } func (b *BookingCustomAttributeUpsertRequest) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -4231,6 +4423,9 @@ func (b *BookingCustomAttributeUpsertResponse) GetErrors() []*Error { } func (b *BookingCustomAttributeUpsertResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -4290,6 +4485,9 @@ func (b *BookingCustomAttributeUpsertResponse) MarshalJSON() ([]byte, error) { } func (b *BookingCustomAttributeUpsertResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -4368,6 +4566,9 @@ func (b *BookingCustomAttributeVisibleDeletedEvent) GetData() *CustomAttributeEv } func (b *BookingCustomAttributeVisibleDeletedEvent) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -4441,6 +4642,9 @@ func (b *BookingCustomAttributeVisibleDeletedEvent) MarshalJSON() ([]byte, error } func (b *BookingCustomAttributeVisibleDeletedEvent) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -4519,6 +4723,9 @@ func (b *BookingCustomAttributeVisibleUpdatedEvent) GetData() *CustomAttributeEv } func (b *BookingCustomAttributeVisibleUpdatedEvent) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -4592,6 +4799,9 @@ func (b *BookingCustomAttributeVisibleUpdatedEvent) MarshalJSON() ([]byte, error } func (b *BookingCustomAttributeVisibleUpdatedEvent) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -4670,6 +4880,9 @@ func (b *BookingUpdatedEvent) GetData() *BookingUpdatedEventData { } func (b *BookingUpdatedEvent) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -4743,6 +4956,9 @@ func (b *BookingUpdatedEvent) MarshalJSON() ([]byte, error) { } func (b *BookingUpdatedEvent) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -4797,6 +5013,9 @@ func (b *BookingUpdatedEventData) GetObject() *BookingUpdatedEventObject { } func (b *BookingUpdatedEventData) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -4856,6 +5075,9 @@ func (b *BookingUpdatedEventData) MarshalJSON() ([]byte, error) { } func (b *BookingUpdatedEventData) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -4890,6 +5112,9 @@ func (b *BookingUpdatedEventObject) GetBooking() *Booking { } func (b *BookingUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -4935,6 +5160,9 @@ func (b *BookingUpdatedEventObject) MarshalJSON() ([]byte, error) { } func (b *BookingUpdatedEventObject) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -5036,6 +5264,9 @@ func (b *Break) GetIsPaid() bool { } func (b *Break) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -5123,6 +5354,9 @@ func (b *Break) MarshalJSON() ([]byte, error) { } func (b *Break) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -5237,6 +5471,9 @@ func (b *BreakType) GetUpdatedAt() *string { } func (b *BreakType) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -5331,6 +5568,9 @@ func (b *BreakType) MarshalJSON() ([]byte, error) { } func (b *BreakType) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -5378,6 +5618,9 @@ func (b *BulkDeleteBookingCustomAttributesResponse) GetErrors() []*Error { } func (b *BulkDeleteBookingCustomAttributesResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -5430,6 +5673,9 @@ func (b *BulkDeleteBookingCustomAttributesResponse) MarshalJSON() ([]byte, error } func (b *BulkDeleteBookingCustomAttributesResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -5468,6 +5714,9 @@ func (b *BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteR } func (b *BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -5513,6 +5762,9 @@ func (b *BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteR } func (b *BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -5560,6 +5812,9 @@ func (b *BulkDeleteLocationCustomAttributesResponse) GetErrors() []*Error { } func (b *BulkDeleteLocationCustomAttributesResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -5612,6 +5867,9 @@ func (b *BulkDeleteLocationCustomAttributesResponse) MarshalJSON() ([]byte, erro } func (b *BulkDeleteLocationCustomAttributesResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -5658,6 +5916,9 @@ func (b *BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDelete } func (b *BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -5710,6 +5971,9 @@ func (b *BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDelete } func (b *BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -5748,6 +6012,9 @@ func (b *BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteR } func (b *BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -5793,6 +6060,9 @@ func (b *BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteR } func (b *BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -5840,6 +6110,9 @@ func (b *BulkDeleteMerchantCustomAttributesResponse) GetErrors() []*Error { } func (b *BulkDeleteMerchantCustomAttributesResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -5892,6 +6165,9 @@ func (b *BulkDeleteMerchantCustomAttributesResponse) MarshalJSON() ([]byte, erro } func (b *BulkDeleteMerchantCustomAttributesResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -5928,6 +6204,9 @@ func (b *BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDelete } func (b *BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -5973,6 +6252,9 @@ func (b *BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDelete } func (b *BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -6019,6 +6301,9 @@ func (b *BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute) GetOrderID } func (b *BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -6071,6 +6356,9 @@ func (b *BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute) MarshalJSO } func (b *BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -6118,6 +6406,9 @@ func (b *BulkDeleteOrderCustomAttributesResponse) GetValues() map[string]*Delete } func (b *BulkDeleteOrderCustomAttributesResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -6170,6 +6461,9 @@ func (b *BulkDeleteOrderCustomAttributesResponse) MarshalJSON() ([]byte, error) } func (b *BulkDeleteOrderCustomAttributesResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -6219,6 +6513,9 @@ func (b *BulkUpsertBookingCustomAttributesResponse) GetErrors() []*Error { } func (b *BulkUpsertBookingCustomAttributesResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -6271,6 +6568,9 @@ func (b *BulkUpsertBookingCustomAttributesResponse) MarshalJSON() ([]byte, error } func (b *BulkUpsertBookingCustomAttributesResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -6336,6 +6636,9 @@ func (b *BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertR } func (b *BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -6395,6 +6698,9 @@ func (b *BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertR } func (b *BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -6442,6 +6748,9 @@ func (b *BulkUpsertLocationCustomAttributesResponse) GetErrors() []*Error { } func (b *BulkUpsertLocationCustomAttributesResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -6494,6 +6803,9 @@ func (b *BulkUpsertLocationCustomAttributesResponse) MarshalJSON() ([]byte, erro } func (b *BulkUpsertLocationCustomAttributesResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -6549,6 +6861,9 @@ func (b *BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsert } func (b *BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -6608,6 +6923,9 @@ func (b *BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsert } func (b *BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -6673,6 +6991,9 @@ func (b *BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertR } func (b *BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -6732,6 +7053,9 @@ func (b *BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertR } func (b *BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -6779,6 +7103,9 @@ func (b *BulkUpsertMerchantCustomAttributesResponse) GetErrors() []*Error { } func (b *BulkUpsertMerchantCustomAttributesResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -6831,6 +7158,9 @@ func (b *BulkUpsertMerchantCustomAttributesResponse) MarshalJSON() ([]byte, erro } func (b *BulkUpsertMerchantCustomAttributesResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -6886,6 +7216,9 @@ func (b *BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsert } func (b *BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -6945,6 +7278,9 @@ func (b *BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsert } func (b *BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -7007,6 +7343,9 @@ func (b *BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute) GetOrderID } func (b *BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -7066,6 +7405,9 @@ func (b *BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute) MarshalJSO } func (b *BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -7111,6 +7453,9 @@ func (b *BulkUpsertOrderCustomAttributesResponse) GetValues() map[string]*Upsert } func (b *BulkUpsertOrderCustomAttributesResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -7163,6 +7508,9 @@ func (b *BulkUpsertOrderCustomAttributesResponse) MarshalJSON() ([]byte, error) } func (b *BulkUpsertOrderCustomAttributesResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -7220,6 +7568,9 @@ func (c *CalculateLoyaltyPointsResponse) GetPromotionPoints() *int { } func (c *CalculateLoyaltyPointsResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -7279,6 +7630,9 @@ func (c *CalculateLoyaltyPointsResponse) MarshalJSON() ([]byte, error) { } func (c *CalculateLoyaltyPointsResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -7325,6 +7679,9 @@ func (c *CancelLoyaltyPromotionResponse) GetLoyaltyPromotion() *LoyaltyPromotion } func (c *CancelLoyaltyPromotionResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -7377,6 +7734,9 @@ func (c *CancelLoyaltyPromotionResponse) MarshalJSON() ([]byte, error) { } func (c *CancelLoyaltyPromotionResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -7421,6 +7781,9 @@ func (c *CancelTerminalActionResponse) GetAction() *TerminalAction { } func (c *CancelTerminalActionResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -7473,6 +7836,9 @@ func (c *CancelTerminalActionResponse) MarshalJSON() ([]byte, error) { } func (c *CancelTerminalActionResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -7517,6 +7883,9 @@ func (c *CancelTerminalCheckoutResponse) GetCheckout() *TerminalCheckout { } func (c *CancelTerminalCheckoutResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -7569,6 +7938,9 @@ func (c *CancelTerminalCheckoutResponse) MarshalJSON() ([]byte, error) { } func (c *CancelTerminalCheckoutResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -7613,6 +7985,9 @@ func (c *CancelTerminalRefundResponse) GetRefund() *TerminalRefund { } func (c *CancelTerminalRefundResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -7665,6 +8040,9 @@ func (c *CancelTerminalRefundResponse) MarshalJSON() ([]byte, error) { } func (c *CancelTerminalRefundResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -7701,6 +8079,9 @@ func (c *CaptureTransactionResponse) GetErrors() []*Error { } func (c *CaptureTransactionResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -7746,6 +8127,9 @@ func (c *CaptureTransactionResponse) MarshalJSON() ([]byte, error) { } func (c *CaptureTransactionResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -8009,6 +8393,9 @@ func (c *Card) GetHsaFsa() *bool { } func (c *Card) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -8201,6 +8588,9 @@ func (c *Card) MarshalJSON() ([]byte, error) { } func (c *Card) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -8277,6 +8667,9 @@ func (c *CardAutomaticallyUpdatedEvent) GetData() *CardAutomaticallyUpdatedEvent } func (c *CardAutomaticallyUpdatedEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -8350,6 +8743,9 @@ func (c *CardAutomaticallyUpdatedEvent) MarshalJSON() ([]byte, error) { } func (c *CardAutomaticallyUpdatedEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -8404,6 +8800,9 @@ func (c *CardAutomaticallyUpdatedEventData) GetObject() *CardAutomaticallyUpdate } func (c *CardAutomaticallyUpdatedEventData) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -8463,6 +8862,9 @@ func (c *CardAutomaticallyUpdatedEventData) MarshalJSON() ([]byte, error) { } func (c *CardAutomaticallyUpdatedEventData) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -8497,6 +8899,9 @@ func (c *CardAutomaticallyUpdatedEventObject) GetCard() *Card { } func (c *CardAutomaticallyUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -8542,6 +8947,9 @@ func (c *CardAutomaticallyUpdatedEventObject) MarshalJSON() ([]byte, error) { } func (c *CardAutomaticallyUpdatedEventObject) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -8702,6 +9110,9 @@ func (c *CardCreatedEvent) GetData() *CardCreatedEventData { } func (c *CardCreatedEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -8775,6 +9186,9 @@ func (c *CardCreatedEvent) MarshalJSON() ([]byte, error) { } func (c *CardCreatedEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -8829,6 +9243,9 @@ func (c *CardCreatedEventData) GetObject() *CardCreatedEventObject { } func (c *CardCreatedEventData) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -8888,6 +9305,9 @@ func (c *CardCreatedEventData) MarshalJSON() ([]byte, error) { } func (c *CardCreatedEventData) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -8922,6 +9342,9 @@ func (c *CardCreatedEventObject) GetCard() *Card { } func (c *CardCreatedEventObject) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -8967,6 +9390,9 @@ func (c *CardCreatedEventObject) MarshalJSON() ([]byte, error) { } func (c *CardCreatedEventObject) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -9042,6 +9468,9 @@ func (c *CardDisabledEvent) GetData() *CardDisabledEventData { } func (c *CardDisabledEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -9115,6 +9544,9 @@ func (c *CardDisabledEvent) MarshalJSON() ([]byte, error) { } func (c *CardDisabledEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -9169,6 +9601,9 @@ func (c *CardDisabledEventData) GetObject() *CardDisabledEventObject { } func (c *CardDisabledEventData) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -9228,6 +9663,9 @@ func (c *CardDisabledEventData) MarshalJSON() ([]byte, error) { } func (c *CardDisabledEventData) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -9262,6 +9700,9 @@ func (c *CardDisabledEventObject) GetCard() *Card { } func (c *CardDisabledEventObject) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -9307,6 +9748,9 @@ func (c *CardDisabledEventObject) MarshalJSON() ([]byte, error) { } func (c *CardDisabledEventObject) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -9382,6 +9826,9 @@ func (c *CardForgottenEvent) GetData() *CardForgottenEventData { } func (c *CardForgottenEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -9455,6 +9902,9 @@ func (c *CardForgottenEvent) MarshalJSON() ([]byte, error) { } func (c *CardForgottenEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -9543,6 +9993,9 @@ func (c *CardForgottenEventCard) GetMerchantID() *string { } func (c *CardForgottenEventCard) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -9623,6 +10076,9 @@ func (c *CardForgottenEventCard) MarshalJSON() ([]byte, error) { } func (c *CardForgottenEventCard) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -9677,6 +10133,9 @@ func (c *CardForgottenEventData) GetObject() *CardForgottenEventObject { } func (c *CardForgottenEventData) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -9736,6 +10195,9 @@ func (c *CardForgottenEventData) MarshalJSON() ([]byte, error) { } func (c *CardForgottenEventData) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -9770,6 +10232,9 @@ func (c *CardForgottenEventObject) GetCard() *CardForgottenEventCard { } func (c *CardForgottenEventObject) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -9815,6 +10280,9 @@ func (c *CardForgottenEventObject) MarshalJSON() ([]byte, error) { } func (c *CardForgottenEventObject) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -9945,6 +10413,9 @@ func (c *CardUpdatedEvent) GetData() *CardUpdatedEventData { } func (c *CardUpdatedEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -10018,6 +10489,9 @@ func (c *CardUpdatedEvent) MarshalJSON() ([]byte, error) { } func (c *CardUpdatedEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -10072,6 +10546,9 @@ func (c *CardUpdatedEventData) GetObject() *CardUpdatedEventObject { } func (c *CardUpdatedEventData) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -10131,6 +10608,9 @@ func (c *CardUpdatedEventData) MarshalJSON() ([]byte, error) { } func (c *CardUpdatedEventData) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -10165,6 +10645,9 @@ func (c *CardUpdatedEventObject) GetCard() *Card { } func (c *CardUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -10210,6 +10693,9 @@ func (c *CardUpdatedEventObject) MarshalJSON() ([]byte, error) { } func (c *CardUpdatedEventObject) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -10254,6 +10740,9 @@ func (c *CashDrawerDevice) GetName() *string { } func (c *CashDrawerDevice) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -10306,6 +10795,9 @@ func (c *CashDrawerDevice) MarshalJSON() ([]byte, error) { } func (c *CashDrawerDevice) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -10610,6 +11102,9 @@ func (c *CashDrawerShift) GetClosingTeamMemberID() *string { } func (c *CashDrawerShift) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -10795,6 +11290,9 @@ func (c *CashDrawerShift) MarshalJSON() ([]byte, error) { } func (c *CashDrawerShift) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -10884,6 +11382,9 @@ func (c *CashDrawerShiftEvent) GetTeamMemberID() *string { } func (c *CashDrawerShiftEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -10964,6 +11465,9 @@ func (c *CashDrawerShiftEvent) MarshalJSON() ([]byte, error) { } func (c *CashDrawerShiftEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -11145,6 +11649,9 @@ func (c *CashDrawerShiftSummary) GetLocationID() *string { } func (c *CashDrawerShiftSummary) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -11267,6 +11774,9 @@ func (c *CashDrawerShiftSummary) MarshalJSON() ([]byte, error) { } func (c *CashDrawerShiftSummary) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -11327,6 +11837,9 @@ func (c *CatalogAvailabilityPeriod) GetDayOfWeek() *DayOfWeek { } func (c *CatalogAvailabilityPeriod) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -11386,6 +11899,9 @@ func (c *CatalogAvailabilityPeriod) MarshalJSON() ([]byte, error) { } func (c *CatalogAvailabilityPeriod) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -11524,6 +12040,9 @@ func (c *CatalogCategory) GetPathToRoot() []*CategoryPathToRootNode { } func (c *CatalogCategory) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -11639,6 +12158,9 @@ func (c *CatalogCategory) MarshalJSON() ([]byte, error) { } func (c *CatalogCategory) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -11833,6 +12355,9 @@ func (c *CatalogCustomAttributeDefinition) GetKey() *string { } func (c *CatalogCustomAttributeDefinition) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -11955,6 +12480,9 @@ func (c *CatalogCustomAttributeDefinition) MarshalJSON() ([]byte, error) { } func (c *CatalogCustomAttributeDefinition) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -12024,6 +12552,9 @@ func (c *CatalogCustomAttributeDefinitionNumberConfig) GetPrecision() *int { } func (c *CatalogCustomAttributeDefinitionNumberConfig) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -12069,6 +12600,9 @@ func (c *CatalogCustomAttributeDefinitionNumberConfig) MarshalJSON() ([]byte, er } func (c *CatalogCustomAttributeDefinitionNumberConfig) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -12118,6 +12652,9 @@ func (c *CatalogCustomAttributeDefinitionSelectionConfig) GetAllowedSelections() } func (c *CatalogCustomAttributeDefinitionSelectionConfig) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -12170,6 +12707,9 @@ func (c *CatalogCustomAttributeDefinitionSelectionConfig) MarshalJSON() ([]byte, } func (c *CatalogCustomAttributeDefinitionSelectionConfig) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -12215,6 +12755,9 @@ func (c *CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection } func (c *CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -12267,6 +12810,9 @@ func (c *CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection } func (c *CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -12331,6 +12877,9 @@ func (c *CatalogCustomAttributeDefinitionStringConfig) GetEnforceUniqueness() *b } func (c *CatalogCustomAttributeDefinitionStringConfig) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -12376,6 +12925,9 @@ func (c *CatalogCustomAttributeDefinitionStringConfig) MarshalJSON() ([]byte, er } func (c *CatalogCustomAttributeDefinitionStringConfig) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -12516,6 +13068,9 @@ func (c *CatalogCustomAttributeValue) GetKey() *string { } func (c *CatalogCustomAttributeValue) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -12610,6 +13165,9 @@ func (c *CatalogCustomAttributeValue) MarshalJSON() ([]byte, error) { } func (c *CatalogCustomAttributeValue) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -12735,6 +13293,9 @@ func (c *CatalogDiscount) GetMaximumAmountMoney() *Money { } func (c *CatalogDiscount) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -12829,6 +13390,9 @@ func (c *CatalogDiscount) MarshalJSON() ([]byte, error) { } func (c *CatalogDiscount) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -12935,6 +13499,9 @@ func (c *CatalogEcomSeoData) GetPermalink() *string { } func (c *CatalogEcomSeoData) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -12994,6 +13561,9 @@ func (c *CatalogEcomSeoData) MarshalJSON() ([]byte, error) { } func (c *CatalogEcomSeoData) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -13049,6 +13619,9 @@ func (c *CatalogIDMapping) GetObjectID() *string { } func (c *CatalogIDMapping) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -13101,6 +13674,9 @@ func (c *CatalogIDMapping) MarshalJSON() ([]byte, error) { } func (c *CatalogIDMapping) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -13178,6 +13754,9 @@ func (c *CatalogImage) GetPhotoStudioOrderID() *string { } func (c *CatalogImage) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -13244,6 +13823,9 @@ func (c *CatalogImage) MarshalJSON() ([]byte, error) { } func (c *CatalogImage) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -13597,6 +14179,9 @@ func (c *CatalogItem) GetIsAlcoholic() *bool { } func (c *CatalogItem) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -13824,6 +14409,9 @@ func (c *CatalogItem) MarshalJSON() ([]byte, error) { } func (c *CatalogItem) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -13879,6 +14467,9 @@ func (c *CatalogItemFoodAndBeverageDetails) GetIngredients() []*CatalogItemFoodA } func (c *CatalogItemFoodAndBeverageDetails) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -13938,6 +14529,9 @@ func (c *CatalogItemFoodAndBeverageDetails) MarshalJSON() ([]byte, error) { } func (c *CatalogItemFoodAndBeverageDetails) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -13995,6 +14589,9 @@ func (c *CatalogItemFoodAndBeverageDetailsDietaryPreference) GetCustomName() *st } func (c *CatalogItemFoodAndBeverageDetailsDietaryPreference) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -14054,6 +14651,9 @@ func (c *CatalogItemFoodAndBeverageDetailsDietaryPreference) MarshalJSON() ([]by } func (c *CatalogItemFoodAndBeverageDetailsDietaryPreference) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -14172,6 +14772,9 @@ func (c *CatalogItemFoodAndBeverageDetailsIngredient) GetCustomName() *string { } func (c *CatalogItemFoodAndBeverageDetailsIngredient) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -14231,6 +14834,9 @@ func (c *CatalogItemFoodAndBeverageDetailsIngredient) MarshalJSON() ([]byte, err } func (c *CatalogItemFoodAndBeverageDetailsIngredient) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -14436,6 +15042,9 @@ func (c *CatalogItemModifierListInfo) GetHiddenFromCustomerOverride() *CatalogMo } func (c *CatalogItemModifierListInfo) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -14537,6 +15146,9 @@ func (c *CatalogItemModifierListInfo) MarshalJSON() ([]byte, error) { } func (c *CatalogItemModifierListInfo) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -14616,6 +15228,9 @@ func (c *CatalogItemOption) GetValues() []*CatalogObject { } func (c *CatalogItemOption) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -14689,6 +15304,9 @@ func (c *CatalogItemOption) MarshalJSON() ([]byte, error) { } func (c *CatalogItemOption) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -14726,6 +15344,9 @@ func (c *CatalogItemOptionForItem) GetItemOptionID() *string { } func (c *CatalogItemOptionForItem) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -14771,6 +15392,9 @@ func (c *CatalogItemOptionForItem) MarshalJSON() ([]byte, error) { } func (c *CatalogItemOptionForItem) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -14851,6 +15475,9 @@ func (c *CatalogItemOptionValue) GetOrdinal() *int { } func (c *CatalogItemOptionValue) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -14924,6 +15551,9 @@ func (c *CatalogItemOptionValue) MarshalJSON() ([]byte, error) { } func (c *CatalogItemOptionValue) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -14972,6 +15602,9 @@ func (c *CatalogItemOptionValueForItemVariation) GetItemOptionValueID() *string } func (c *CatalogItemOptionValueForItemVariation) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -15024,6 +15657,9 @@ func (c *CatalogItemOptionValueForItemVariation) MarshalJSON() ([]byte, error) { } func (c *CatalogItemOptionValueForItemVariation) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -15360,6 +15996,9 @@ func (c *CatalogItemVariation) GetKitchenName() *string { } func (c *CatalogItemVariation) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -15552,6 +16191,9 @@ func (c *CatalogItemVariation) MarshalJSON() ([]byte, error) { } func (c *CatalogItemVariation) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -15606,6 +16248,9 @@ func (c *CatalogMeasurementUnit) GetPrecision() *int { } func (c *CatalogMeasurementUnit) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -15658,6 +16303,9 @@ func (c *CatalogMeasurementUnit) MarshalJSON() ([]byte, error) { } func (c *CatalogMeasurementUnit) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -15778,6 +16426,9 @@ func (c *CatalogModifier) GetHiddenOnline() *bool { } func (c *CatalogModifier) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -15879,6 +16530,9 @@ func (c *CatalogModifier) MarshalJSON() ([]byte, error) { } func (c *CatalogModifier) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -16089,6 +16743,9 @@ func (c *CatalogModifierList) GetHiddenFromCustomer() *bool { } func (c *CatalogModifierList) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -16225,6 +16882,9 @@ func (c *CatalogModifierList) MarshalJSON() ([]byte, error) { } func (c *CatalogModifierList) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -16345,6 +17005,9 @@ func (c *CatalogModifierOverride) GetOnByDefaultOverride() *CatalogModifierToggl } func (c *CatalogModifierOverride) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -16411,6 +17074,9 @@ func (c *CatalogModifierOverride) MarshalJSON() ([]byte, error) { } func (c *CatalogModifierOverride) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -17136,6 +17802,9 @@ func (c *CatalogObjectAvailabilityPeriod) GetAvailabilityPeriodData() *CatalogAv } func (c *CatalogObjectAvailabilityPeriod) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -17251,6 +17920,9 @@ func (c *CatalogObjectAvailabilityPeriod) MarshalJSON() ([]byte, error) { } func (c *CatalogObjectAvailabilityPeriod) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -17405,6 +18077,9 @@ func (c *CatalogObjectBase) GetImageID() *string { } func (c *CatalogObjectBase) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -17513,6 +18188,9 @@ func (c *CatalogObjectBase) MarshalJSON() ([]byte, error) { } func (c *CatalogObjectBase) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -17686,6 +18364,9 @@ func (c *CatalogObjectCategory) GetImageID() *string { } func (c *CatalogObjectCategory) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -17815,6 +18496,9 @@ func (c *CatalogObjectCategory) MarshalJSON() ([]byte, error) { } func (c *CatalogObjectCategory) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -17979,6 +18663,9 @@ func (c *CatalogObjectCustomAttributeDefinition) GetCustomAttributeDefinitionDat } func (c *CatalogObjectCustomAttributeDefinition) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -18094,6 +18781,9 @@ func (c *CatalogObjectCustomAttributeDefinition) MarshalJSON() ([]byte, error) { } func (c *CatalogObjectCustomAttributeDefinition) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -18258,6 +18948,9 @@ func (c *CatalogObjectDiscount) GetDiscountData() *CatalogDiscount { } func (c *CatalogObjectDiscount) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -18373,6 +19066,9 @@ func (c *CatalogObjectDiscount) MarshalJSON() ([]byte, error) { } func (c *CatalogObjectDiscount) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -18537,6 +19233,9 @@ func (c *CatalogObjectImage) GetImageData() *CatalogImage { } func (c *CatalogObjectImage) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -18652,6 +19351,9 @@ func (c *CatalogObjectImage) MarshalJSON() ([]byte, error) { } func (c *CatalogObjectImage) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -18816,6 +19518,9 @@ func (c *CatalogObjectItem) GetItemData() *CatalogItem { } func (c *CatalogObjectItem) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -18931,6 +19636,9 @@ func (c *CatalogObjectItem) MarshalJSON() ([]byte, error) { } func (c *CatalogObjectItem) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -19095,6 +19803,9 @@ func (c *CatalogObjectItemOption) GetItemOptionData() *CatalogItemOption { } func (c *CatalogObjectItemOption) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -19210,6 +19921,9 @@ func (c *CatalogObjectItemOption) MarshalJSON() ([]byte, error) { } func (c *CatalogObjectItemOption) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -19374,6 +20088,9 @@ func (c *CatalogObjectItemOptionValue) GetItemOptionValueData() *CatalogItemOpti } func (c *CatalogObjectItemOptionValue) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -19489,6 +20206,9 @@ func (c *CatalogObjectItemOptionValue) MarshalJSON() ([]byte, error) { } func (c *CatalogObjectItemOptionValue) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -19653,6 +20373,9 @@ func (c *CatalogObjectItemVariation) GetItemVariationData() *CatalogItemVariatio } func (c *CatalogObjectItemVariation) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -19768,6 +20491,9 @@ func (c *CatalogObjectItemVariation) MarshalJSON() ([]byte, error) { } func (c *CatalogObjectItemVariation) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -19932,6 +20658,9 @@ func (c *CatalogObjectMeasurementUnit) GetMeasurementUnitData() *CatalogMeasurem } func (c *CatalogObjectMeasurementUnit) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -20047,6 +20776,9 @@ func (c *CatalogObjectMeasurementUnit) MarshalJSON() ([]byte, error) { } func (c *CatalogObjectMeasurementUnit) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -20211,6 +20943,9 @@ func (c *CatalogObjectModifier) GetModifierData() *CatalogModifier { } func (c *CatalogObjectModifier) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -20326,6 +21061,9 @@ func (c *CatalogObjectModifier) MarshalJSON() ([]byte, error) { } func (c *CatalogObjectModifier) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -20490,6 +21228,9 @@ func (c *CatalogObjectModifierList) GetModifierListData() *CatalogModifierList { } func (c *CatalogObjectModifierList) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -20605,6 +21346,9 @@ func (c *CatalogObjectModifierList) MarshalJSON() ([]byte, error) { } func (c *CatalogObjectModifierList) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -20770,6 +21514,9 @@ func (c *CatalogObjectPricingRule) GetPricingRuleData() *CatalogPricingRule { } func (c *CatalogObjectPricingRule) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -20885,6 +21632,9 @@ func (c *CatalogObjectPricingRule) MarshalJSON() ([]byte, error) { } func (c *CatalogObjectPricingRule) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -21049,6 +21799,9 @@ func (c *CatalogObjectProductSet) GetProductSetData() *CatalogProductSet { } func (c *CatalogObjectProductSet) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -21164,6 +21917,9 @@ func (c *CatalogObjectProductSet) MarshalJSON() ([]byte, error) { } func (c *CatalogObjectProductSet) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -21328,6 +22084,9 @@ func (c *CatalogObjectQuickAmountsSettings) GetQuickAmountsSettingsData() *Catal } func (c *CatalogObjectQuickAmountsSettings) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -21443,6 +22202,9 @@ func (c *CatalogObjectQuickAmountsSettings) MarshalJSON() ([]byte, error) { } func (c *CatalogObjectQuickAmountsSettings) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -21490,6 +22252,9 @@ func (c *CatalogObjectReference) GetCatalogVersion() *int64 { } func (c *CatalogObjectReference) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -21542,6 +22307,9 @@ func (c *CatalogObjectReference) MarshalJSON() ([]byte, error) { } func (c *CatalogObjectReference) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -21706,6 +22474,9 @@ func (c *CatalogObjectSubscriptionPlan) GetSubscriptionPlanData() *CatalogSubscr } func (c *CatalogObjectSubscriptionPlan) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -21821,6 +22592,9 @@ func (c *CatalogObjectSubscriptionPlan) MarshalJSON() ([]byte, error) { } func (c *CatalogObjectSubscriptionPlan) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -21985,6 +22759,9 @@ func (c *CatalogObjectSubscriptionPlanVariation) GetSubscriptionPlanVariationDat } func (c *CatalogObjectSubscriptionPlanVariation) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -22100,6 +22877,9 @@ func (c *CatalogObjectSubscriptionPlanVariation) MarshalJSON() ([]byte, error) { } func (c *CatalogObjectSubscriptionPlanVariation) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -22264,6 +23044,9 @@ func (c *CatalogObjectTax) GetTaxData() *CatalogTax { } func (c *CatalogObjectTax) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -22379,6 +23162,9 @@ func (c *CatalogObjectTax) MarshalJSON() ([]byte, error) { } func (c *CatalogObjectTax) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -22543,6 +23329,9 @@ func (c *CatalogObjectTimePeriod) GetTimePeriodData() *CatalogTimePeriod { } func (c *CatalogObjectTimePeriod) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -22658,6 +23447,9 @@ func (c *CatalogObjectTimePeriod) MarshalJSON() ([]byte, error) { } func (c *CatalogObjectTimePeriod) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -22917,6 +23709,9 @@ func (c *CatalogPricingRule) GetCustomerGroupIDsAny() []string { } func (c *CatalogPricingRule) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -23046,6 +23841,9 @@ func (c *CatalogPricingRule) MarshalJSON() ([]byte, error) { } func (c *CatalogPricingRule) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -23191,6 +23989,9 @@ func (c *CatalogProductSet) GetAllProducts() *bool { } func (c *CatalogProductSet) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -23278,6 +24079,9 @@ func (c *CatalogProductSet) MarshalJSON() ([]byte, error) { } func (c *CatalogProductSet) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -23345,6 +24149,9 @@ func (c *CatalogQuickAmount) GetOrdinal() *int64 { } func (c *CatalogQuickAmount) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -23411,6 +24218,9 @@ func (c *CatalogQuickAmount) MarshalJSON() ([]byte, error) { } func (c *CatalogQuickAmount) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -23491,6 +24301,9 @@ func (c *CatalogQuickAmountsSettings) GetAmounts() []*CatalogQuickAmount { } func (c *CatalogQuickAmountsSettings) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -23550,6 +24363,9 @@ func (c *CatalogQuickAmountsSettings) MarshalJSON() ([]byte, error) { } func (c *CatalogQuickAmountsSettings) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -23644,6 +24460,9 @@ func (c *CatalogStockConversion) GetNonstockableQuantity() string { } func (c *CatalogStockConversion) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -23703,6 +24522,9 @@ func (c *CatalogStockConversion) MarshalJSON() ([]byte, error) { } func (c *CatalogStockConversion) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -23790,6 +24612,9 @@ func (c *CatalogSubscriptionPlan) GetAllItems() *bool { } func (c *CatalogSubscriptionPlan) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -23870,6 +24695,9 @@ func (c *CatalogSubscriptionPlan) MarshalJSON() ([]byte, error) { } func (c *CatalogSubscriptionPlan) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -23958,6 +24786,9 @@ func (c *CatalogSubscriptionPlanVariation) GetSuccessorPlanVariationID() *string } func (c *CatalogSubscriptionPlanVariation) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -24038,6 +24869,9 @@ func (c *CatalogSubscriptionPlanVariation) MarshalJSON() ([]byte, error) { } func (c *CatalogSubscriptionPlanVariation) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -24137,6 +24971,9 @@ func (c *CatalogTax) GetAppliesToProductSetID() *string { } func (c *CatalogTax) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -24224,6 +25061,9 @@ func (c *CatalogTax) MarshalJSON() ([]byte, error) { } func (c *CatalogTax) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -24273,6 +25113,9 @@ func (c *CatalogTimePeriod) GetEvent() *string { } func (c *CatalogTimePeriod) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -24318,6 +25161,9 @@ func (c *CatalogTimePeriod) MarshalJSON() ([]byte, error) { } func (c *CatalogTimePeriod) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -24363,6 +25209,9 @@ func (c *CatalogV1ID) GetLocationID() *string { } func (c *CatalogV1ID) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -24415,6 +25264,9 @@ func (c *CatalogV1ID) MarshalJSON() ([]byte, error) { } func (c *CatalogV1ID) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -24490,6 +25342,9 @@ func (c *CatalogVersionUpdatedEvent) GetData() *CatalogVersionUpdatedEventData { } func (c *CatalogVersionUpdatedEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -24563,6 +25418,9 @@ func (c *CatalogVersionUpdatedEvent) MarshalJSON() ([]byte, error) { } func (c *CatalogVersionUpdatedEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -24597,6 +25455,9 @@ func (c *CatalogVersionUpdatedEventCatalogVersion) GetUpdatedAt() *string { } func (c *CatalogVersionUpdatedEventCatalogVersion) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -24642,6 +25503,9 @@ func (c *CatalogVersionUpdatedEventCatalogVersion) MarshalJSON() ([]byte, error) } func (c *CatalogVersionUpdatedEventCatalogVersion) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -24686,6 +25550,9 @@ func (c *CatalogVersionUpdatedEventData) GetObject() *CatalogVersionUpdatedEvent } func (c *CatalogVersionUpdatedEventData) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -24738,6 +25605,9 @@ func (c *CatalogVersionUpdatedEventData) MarshalJSON() ([]byte, error) { } func (c *CatalogVersionUpdatedEventData) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -24772,6 +25642,9 @@ func (c *CatalogVersionUpdatedEventObject) GetCatalogVersion() *CatalogVersionUp } func (c *CatalogVersionUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -24817,6 +25690,9 @@ func (c *CatalogVersionUpdatedEventObject) MarshalJSON() ([]byte, error) { } func (c *CatalogVersionUpdatedEventObject) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -24862,6 +25738,9 @@ func (c *CategoryPathToRootNode) GetCategoryName() *string { } func (c *CategoryPathToRootNode) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -24914,6 +25793,9 @@ func (c *CategoryPathToRootNode) MarshalJSON() ([]byte, error) { } func (c *CategoryPathToRootNode) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -25057,6 +25939,9 @@ func (c *CheckoutOptions) GetEnableLoyalty() *bool { } func (c *CheckoutOptions) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -25172,6 +26057,9 @@ func (c *CheckoutOptions) MarshalJSON() ([]byte, error) { } func (c *CheckoutOptions) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -25246,6 +26134,9 @@ func (c *CollectedData) GetInputText() *string { } func (c *CollectedData) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -25291,6 +26182,9 @@ func (c *CollectedData) MarshalJSON() ([]byte, error) { } func (c *CollectedData) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -25325,6 +26219,9 @@ func (c *ConfirmationDecision) GetHasAgreed() *bool { } func (c *ConfirmationDecision) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -25370,6 +26267,9 @@ func (c *ConfirmationDecision) MarshalJSON() ([]byte, error) { } func (c *ConfirmationDecision) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -25444,6 +26344,9 @@ func (c *ConfirmationOptions) GetDecision() *ConfirmationDecision { } func (c *ConfirmationOptions) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -25517,6 +26420,9 @@ func (c *ConfirmationOptions) MarshalJSON() ([]byte, error) { } func (c *ConfirmationOptions) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -26331,6 +27237,9 @@ func (c *CreateBookingCustomAttributeDefinitionResponse) GetErrors() []*Error { } func (c *CreateBookingCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -26383,6 +27292,9 @@ func (c *CreateBookingCustomAttributeDefinitionResponse) MarshalJSON() ([]byte, } func (c *CreateBookingCustomAttributeDefinitionResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -26430,6 +27342,9 @@ func (c *CreateBreakTypeResponse) GetErrors() []*Error { } func (c *CreateBreakTypeResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -26482,6 +27397,9 @@ func (c *CreateBreakTypeResponse) MarshalJSON() ([]byte, error) { } func (c *CreateBreakTypeResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -26555,6 +27473,9 @@ func (c *CreateCatalogImageRequest) GetIsPrimary() *bool { } func (c *CreateCatalogImageRequest) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -26621,6 +27542,9 @@ func (c *CreateCatalogImageRequest) MarshalJSON() ([]byte, error) { } func (c *CreateCatalogImageRequest) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -26666,6 +27590,9 @@ func (c *CreateCatalogImageResponse) GetImage() *CatalogObject { } func (c *CreateCatalogImageResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -26718,6 +27645,9 @@ func (c *CreateCatalogImageResponse) MarshalJSON() ([]byte, error) { } func (c *CreateCatalogImageResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -26766,6 +27696,9 @@ func (c *CreateCustomerCardResponse) GetCard() *Card { } func (c *CreateCustomerCardResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -26818,6 +27751,9 @@ func (c *CreateCustomerCardResponse) MarshalJSON() ([]byte, error) { } func (c *CreateCustomerCardResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -26864,6 +27800,9 @@ func (c *CreateCustomerCustomAttributeDefinitionResponse) GetErrors() []*Error { } func (c *CreateCustomerCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -26916,6 +27855,9 @@ func (c *CreateCustomerCustomAttributeDefinitionResponse) MarshalJSON() ([]byte, } func (c *CreateCustomerCustomAttributeDefinitionResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -26964,6 +27906,9 @@ func (c *CreateCustomerGroupResponse) GetGroup() *CustomerGroup { } func (c *CreateCustomerGroupResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -27016,6 +27961,9 @@ func (c *CreateCustomerGroupResponse) MarshalJSON() ([]byte, error) { } func (c *CreateCustomerGroupResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -27060,6 +28008,9 @@ func (c *CreateDeviceCodeResponse) GetDeviceCode() *DeviceCode { } func (c *CreateDeviceCodeResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -27112,6 +28063,9 @@ func (c *CreateDeviceCodeResponse) MarshalJSON() ([]byte, error) { } func (c *CreateDeviceCodeResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -27158,6 +28112,9 @@ func (c *CreateGiftCardActivityResponse) GetGiftCardActivity() *GiftCardActivity } func (c *CreateGiftCardActivityResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -27210,6 +28167,9 @@ func (c *CreateGiftCardActivityResponse) MarshalJSON() ([]byte, error) { } func (c *CreateGiftCardActivityResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -27256,6 +28216,9 @@ func (c *CreateLocationCustomAttributeDefinitionResponse) GetErrors() []*Error { } func (c *CreateLocationCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -27308,6 +28271,9 @@ func (c *CreateLocationCustomAttributeDefinitionResponse) MarshalJSON() ([]byte, } func (c *CreateLocationCustomAttributeDefinitionResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -27353,6 +28319,9 @@ func (c *CreateLoyaltyAccountResponse) GetLoyaltyAccount() *LoyaltyAccount { } func (c *CreateLoyaltyAccountResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -27405,6 +28374,9 @@ func (c *CreateLoyaltyAccountResponse) MarshalJSON() ([]byte, error) { } func (c *CreateLoyaltyAccountResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -27451,6 +28423,9 @@ func (c *CreateLoyaltyPromotionResponse) GetLoyaltyPromotion() *LoyaltyPromotion } func (c *CreateLoyaltyPromotionResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -27503,6 +28478,9 @@ func (c *CreateLoyaltyPromotionResponse) MarshalJSON() ([]byte, error) { } func (c *CreateLoyaltyPromotionResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -27548,6 +28526,9 @@ func (c *CreateLoyaltyRewardResponse) GetReward() *LoyaltyReward { } func (c *CreateLoyaltyRewardResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -27600,6 +28581,9 @@ func (c *CreateLoyaltyRewardResponse) MarshalJSON() ([]byte, error) { } func (c *CreateLoyaltyRewardResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -27646,6 +28630,9 @@ func (c *CreateMerchantCustomAttributeDefinitionResponse) GetErrors() []*Error { } func (c *CreateMerchantCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -27698,6 +28685,9 @@ func (c *CreateMerchantCustomAttributeDefinitionResponse) MarshalJSON() ([]byte, } func (c *CreateMerchantCustomAttributeDefinitionResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -27743,6 +28733,9 @@ func (c *CreateOrderCustomAttributeDefinitionResponse) GetErrors() []*Error { } func (c *CreateOrderCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -27795,6 +28788,9 @@ func (c *CreateOrderCustomAttributeDefinitionResponse) MarshalJSON() ([]byte, er } func (c *CreateOrderCustomAttributeDefinitionResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -27847,6 +28843,9 @@ func (c *CreateOrderRequest) GetIdempotencyKey() *string { } func (c *CreateOrderRequest) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -27899,6 +28898,9 @@ func (c *CreateOrderRequest) MarshalJSON() ([]byte, error) { } func (c *CreateOrderRequest) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -27953,6 +28955,9 @@ func (c *CreatePaymentLinkResponse) GetRelatedResources() *PaymentLinkRelatedRes } func (c *CreatePaymentLinkResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -28012,6 +29017,9 @@ func (c *CreatePaymentLinkResponse) MarshalJSON() ([]byte, error) { } func (c *CreatePaymentLinkResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -28059,6 +29067,9 @@ func (c *CreateShiftResponse) GetErrors() []*Error { } func (c *CreateShiftResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -28111,6 +29122,9 @@ func (c *CreateShiftResponse) MarshalJSON() ([]byte, error) { } func (c *CreateShiftResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -28155,6 +29169,9 @@ func (c *CreateTerminalActionResponse) GetAction() *TerminalAction { } func (c *CreateTerminalActionResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -28207,6 +29224,9 @@ func (c *CreateTerminalActionResponse) MarshalJSON() ([]byte, error) { } func (c *CreateTerminalActionResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -28251,6 +29271,9 @@ func (c *CreateTerminalCheckoutResponse) GetCheckout() *TerminalCheckout { } func (c *CreateTerminalCheckoutResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -28303,6 +29326,9 @@ func (c *CreateTerminalCheckoutResponse) MarshalJSON() ([]byte, error) { } func (c *CreateTerminalCheckoutResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -28347,6 +29373,9 @@ func (c *CreateTerminalRefundResponse) GetRefund() *TerminalRefund { } func (c *CreateTerminalRefundResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -28399,6 +29428,9 @@ func (c *CreateTerminalRefundResponse) MarshalJSON() ([]byte, error) { } func (c *CreateTerminalRefundResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -28448,6 +29480,9 @@ func (c *CreateWebhookSubscriptionResponse) GetSubscription() *WebhookSubscripti } func (c *CreateWebhookSubscriptionResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -28500,6 +29535,9 @@ func (c *CreateWebhookSubscriptionResponse) MarshalJSON() ([]byte, error) { } func (c *CreateWebhookSubscriptionResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -29184,6 +30222,9 @@ func (c *CustomAttribute) GetCreatedAt() *string { } func (c *CustomAttribute) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -29271,6 +30312,9 @@ func (c *CustomAttribute) MarshalJSON() ([]byte, error) { } func (c *CustomAttribute) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -29408,6 +30452,9 @@ func (c *CustomAttributeDefinition) GetCreatedAt() *string { } func (c *CustomAttributeDefinition) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -29502,6 +30549,9 @@ func (c *CustomAttributeDefinition) MarshalJSON() ([]byte, error) { } func (c *CustomAttributeDefinition) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -29558,6 +30608,9 @@ func (c *CustomAttributeDefinitionEventData) GetObject() *CustomAttributeDefinit } func (c *CustomAttributeDefinitionEventData) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -29617,6 +30670,9 @@ func (c *CustomAttributeDefinitionEventData) MarshalJSON() ([]byte, error) { } func (c *CustomAttributeDefinitionEventData) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -29651,6 +30707,9 @@ func (c *CustomAttributeDefinitionEventDataObject) GetCustomAttributeDefinition( } func (c *CustomAttributeDefinitionEventDataObject) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -29696,6 +30755,9 @@ func (c *CustomAttributeDefinitionEventDataObject) MarshalJSON() ([]byte, error) } func (c *CustomAttributeDefinitionEventDataObject) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -29779,6 +30841,9 @@ func (c *CustomAttributeEventData) GetObject() *CustomAttributeEventDataObject { } func (c *CustomAttributeEventData) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -29838,6 +30903,9 @@ func (c *CustomAttributeEventData) MarshalJSON() ([]byte, error) { } func (c *CustomAttributeEventData) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -29872,6 +30940,9 @@ func (c *CustomAttributeEventDataObject) GetCustomAttribute() *CustomAttribute { } func (c *CustomAttributeEventDataObject) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -29917,6 +30988,9 @@ func (c *CustomAttributeEventDataObject) MarshalJSON() ([]byte, error) { } func (c *CustomAttributeEventDataObject) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -29954,6 +31028,9 @@ func (c *CustomField) GetTitle() string { } func (c *CustomField) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -29999,6 +31076,9 @@ func (c *CustomField) MarshalJSON() ([]byte, error) { } func (c *CustomField) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -30077,6 +31157,9 @@ func (c *CustomerCreatedEvent) GetData() *CustomerCreatedEventData { } func (c *CustomerCreatedEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -30150,6 +31233,9 @@ func (c *CustomerCreatedEvent) MarshalJSON() ([]byte, error) { } func (c *CustomerCreatedEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -30205,6 +31291,9 @@ func (c *CustomerCreatedEventData) GetObject() *CustomerCreatedEventObject { } func (c *CustomerCreatedEventData) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -30264,6 +31353,9 @@ func (c *CustomerCreatedEventData) MarshalJSON() ([]byte, error) { } func (c *CustomerCreatedEventData) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -30299,6 +31391,9 @@ func (c *CustomerCreatedEventEventContext) GetMerge() *CustomerCreatedEventEvent } func (c *CustomerCreatedEventEventContext) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -30344,6 +31439,9 @@ func (c *CustomerCreatedEventEventContext) MarshalJSON() ([]byte, error) { } func (c *CustomerCreatedEventEventContext) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -30389,6 +31487,9 @@ func (c *CustomerCreatedEventEventContextMerge) GetToCustomerID() *string { } func (c *CustomerCreatedEventEventContextMerge) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -30441,6 +31542,9 @@ func (c *CustomerCreatedEventEventContextMerge) MarshalJSON() ([]byte, error) { } func (c *CustomerCreatedEventEventContextMerge) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -30486,6 +31590,9 @@ func (c *CustomerCreatedEventObject) GetEventContext() *CustomerCreatedEventEven } func (c *CustomerCreatedEventObject) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -30538,6 +31645,9 @@ func (c *CustomerCreatedEventObject) MarshalJSON() ([]byte, error) { } func (c *CustomerCreatedEventObject) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -30617,6 +31727,9 @@ func (c *CustomerCustomAttributeDefinitionCreatedEvent) GetData() *CustomAttribu } func (c *CustomerCustomAttributeDefinitionCreatedEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -30690,6 +31803,9 @@ func (c *CustomerCustomAttributeDefinitionCreatedEvent) MarshalJSON() ([]byte, e } func (c *CustomerCustomAttributeDefinitionCreatedEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -30771,6 +31887,9 @@ func (c *CustomerCustomAttributeDefinitionCreatedPublicEvent) GetData() *CustomA } func (c *CustomerCustomAttributeDefinitionCreatedPublicEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -30844,6 +31963,9 @@ func (c *CustomerCustomAttributeDefinitionCreatedPublicEvent) MarshalJSON() ([]b } func (c *CustomerCustomAttributeDefinitionCreatedPublicEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -30924,6 +32046,9 @@ func (c *CustomerCustomAttributeDefinitionDeletedEvent) GetData() *CustomAttribu } func (c *CustomerCustomAttributeDefinitionDeletedEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -30997,6 +32122,9 @@ func (c *CustomerCustomAttributeDefinitionDeletedEvent) MarshalJSON() ([]byte, e } func (c *CustomerCustomAttributeDefinitionDeletedEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -31078,6 +32206,9 @@ func (c *CustomerCustomAttributeDefinitionDeletedPublicEvent) GetData() *CustomA } func (c *CustomerCustomAttributeDefinitionDeletedPublicEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -31151,6 +32282,9 @@ func (c *CustomerCustomAttributeDefinitionDeletedPublicEvent) MarshalJSON() ([]b } func (c *CustomerCustomAttributeDefinitionDeletedPublicEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -31227,6 +32361,9 @@ func (c *CustomerCustomAttributeDefinitionOwnedCreatedEvent) GetData() *CustomAt } func (c *CustomerCustomAttributeDefinitionOwnedCreatedEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -31300,6 +32437,9 @@ func (c *CustomerCustomAttributeDefinitionOwnedCreatedEvent) MarshalJSON() ([]by } func (c *CustomerCustomAttributeDefinitionOwnedCreatedEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -31377,6 +32517,9 @@ func (c *CustomerCustomAttributeDefinitionOwnedDeletedEvent) GetData() *CustomAt } func (c *CustomerCustomAttributeDefinitionOwnedDeletedEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -31450,6 +32593,9 @@ func (c *CustomerCustomAttributeDefinitionOwnedDeletedEvent) MarshalJSON() ([]by } func (c *CustomerCustomAttributeDefinitionOwnedDeletedEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -31527,6 +32673,9 @@ func (c *CustomerCustomAttributeDefinitionOwnedUpdatedEvent) GetData() *CustomAt } func (c *CustomerCustomAttributeDefinitionOwnedUpdatedEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -31600,6 +32749,9 @@ func (c *CustomerCustomAttributeDefinitionOwnedUpdatedEvent) MarshalJSON() ([]by } func (c *CustomerCustomAttributeDefinitionOwnedUpdatedEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -31680,6 +32832,9 @@ func (c *CustomerCustomAttributeDefinitionUpdatedEvent) GetData() *CustomAttribu } func (c *CustomerCustomAttributeDefinitionUpdatedEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -31753,6 +32908,9 @@ func (c *CustomerCustomAttributeDefinitionUpdatedEvent) MarshalJSON() ([]byte, e } func (c *CustomerCustomAttributeDefinitionUpdatedEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -31834,6 +32992,9 @@ func (c *CustomerCustomAttributeDefinitionUpdatedPublicEvent) GetData() *CustomA } func (c *CustomerCustomAttributeDefinitionUpdatedPublicEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -31907,6 +33068,9 @@ func (c *CustomerCustomAttributeDefinitionUpdatedPublicEvent) MarshalJSON() ([]b } func (c *CustomerCustomAttributeDefinitionUpdatedPublicEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -31985,6 +33149,9 @@ func (c *CustomerCustomAttributeDefinitionVisibleCreatedEvent) GetData() *Custom } func (c *CustomerCustomAttributeDefinitionVisibleCreatedEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -32058,6 +33225,9 @@ func (c *CustomerCustomAttributeDefinitionVisibleCreatedEvent) MarshalJSON() ([] } func (c *CustomerCustomAttributeDefinitionVisibleCreatedEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -32137,6 +33307,9 @@ func (c *CustomerCustomAttributeDefinitionVisibleDeletedEvent) GetData() *Custom } func (c *CustomerCustomAttributeDefinitionVisibleDeletedEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -32210,6 +33383,9 @@ func (c *CustomerCustomAttributeDefinitionVisibleDeletedEvent) MarshalJSON() ([] } func (c *CustomerCustomAttributeDefinitionVisibleDeletedEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -32289,6 +33465,9 @@ func (c *CustomerCustomAttributeDefinitionVisibleUpdatedEvent) GetData() *Custom } func (c *CustomerCustomAttributeDefinitionVisibleUpdatedEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -32362,6 +33541,9 @@ func (c *CustomerCustomAttributeDefinitionVisibleUpdatedEvent) MarshalJSON() ([] } func (c *CustomerCustomAttributeDefinitionVisibleUpdatedEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -32443,6 +33625,9 @@ func (c *CustomerCustomAttributeDeletedEvent) GetData() *CustomAttributeEventDat } func (c *CustomerCustomAttributeDeletedEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -32516,6 +33701,9 @@ func (c *CustomerCustomAttributeDeletedEvent) MarshalJSON() ([]byte, error) { } func (c *CustomerCustomAttributeDeletedEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -32597,6 +33785,9 @@ func (c *CustomerCustomAttributeDeletedPublicEvent) GetData() *CustomAttributeEv } func (c *CustomerCustomAttributeDeletedPublicEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -32670,6 +33861,9 @@ func (c *CustomerCustomAttributeDeletedPublicEvent) MarshalJSON() ([]byte, error } func (c *CustomerCustomAttributeDeletedPublicEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -32748,6 +33942,9 @@ func (c *CustomerCustomAttributeOwnedDeletedEvent) GetData() *CustomAttributeEve } func (c *CustomerCustomAttributeOwnedDeletedEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -32821,6 +34018,9 @@ func (c *CustomerCustomAttributeOwnedDeletedEvent) MarshalJSON() ([]byte, error) } func (c *CustomerCustomAttributeOwnedDeletedEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -32899,6 +34099,9 @@ func (c *CustomerCustomAttributeOwnedUpdatedEvent) GetData() *CustomAttributeEve } func (c *CustomerCustomAttributeOwnedUpdatedEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -32972,6 +34175,9 @@ func (c *CustomerCustomAttributeOwnedUpdatedEvent) MarshalJSON() ([]byte, error) } func (c *CustomerCustomAttributeOwnedUpdatedEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -33053,6 +34259,9 @@ func (c *CustomerCustomAttributeUpdatedEvent) GetData() *CustomAttributeEventDat } func (c *CustomerCustomAttributeUpdatedEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -33126,6 +34335,9 @@ func (c *CustomerCustomAttributeUpdatedEvent) MarshalJSON() ([]byte, error) { } func (c *CustomerCustomAttributeUpdatedEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -33207,6 +34419,9 @@ func (c *CustomerCustomAttributeUpdatedPublicEvent) GetData() *CustomAttributeEv } func (c *CustomerCustomAttributeUpdatedPublicEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -33280,6 +34495,9 @@ func (c *CustomerCustomAttributeUpdatedPublicEvent) MarshalJSON() ([]byte, error } func (c *CustomerCustomAttributeUpdatedPublicEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -33363,6 +34581,9 @@ func (c *CustomerCustomAttributeVisibleDeletedEvent) GetData() *CustomAttributeE } func (c *CustomerCustomAttributeVisibleDeletedEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -33436,6 +34657,9 @@ func (c *CustomerCustomAttributeVisibleDeletedEvent) MarshalJSON() ([]byte, erro } func (c *CustomerCustomAttributeVisibleDeletedEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -33519,6 +34743,9 @@ func (c *CustomerCustomAttributeVisibleUpdatedEvent) GetData() *CustomAttributeE } func (c *CustomerCustomAttributeVisibleUpdatedEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -33592,6 +34819,9 @@ func (c *CustomerCustomAttributeVisibleUpdatedEvent) MarshalJSON() ([]byte, erro } func (c *CustomerCustomAttributeVisibleUpdatedEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -33669,6 +34899,9 @@ func (c *CustomerDeletedEvent) GetData() *CustomerDeletedEventData { } func (c *CustomerDeletedEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -33742,6 +34975,9 @@ func (c *CustomerDeletedEvent) MarshalJSON() ([]byte, error) { } func (c *CustomerDeletedEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -33797,6 +35033,9 @@ func (c *CustomerDeletedEventData) GetObject() *CustomerDeletedEventObject { } func (c *CustomerDeletedEventData) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -33856,6 +35095,9 @@ func (c *CustomerDeletedEventData) MarshalJSON() ([]byte, error) { } func (c *CustomerDeletedEventData) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -33891,6 +35133,9 @@ func (c *CustomerDeletedEventEventContext) GetMerge() *CustomerDeletedEventEvent } func (c *CustomerDeletedEventEventContext) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -33936,6 +35181,9 @@ func (c *CustomerDeletedEventEventContext) MarshalJSON() ([]byte, error) { } func (c *CustomerDeletedEventEventContext) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -33981,6 +35229,9 @@ func (c *CustomerDeletedEventEventContextMerge) GetToCustomerID() *string { } func (c *CustomerDeletedEventEventContextMerge) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -34033,6 +35284,9 @@ func (c *CustomerDeletedEventEventContextMerge) MarshalJSON() ([]byte, error) { } func (c *CustomerDeletedEventEventContextMerge) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -34078,6 +35332,9 @@ func (c *CustomerDeletedEventObject) GetEventContext() *CustomerDeletedEventEven } func (c *CustomerDeletedEventObject) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -34130,6 +35387,9 @@ func (c *CustomerDeletedEventObject) MarshalJSON() ([]byte, error) { } func (c *CustomerDeletedEventObject) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -34198,6 +35458,9 @@ func (c *CustomerGroup) GetUpdatedAt() *string { } func (c *CustomerGroup) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -34264,6 +35527,9 @@ func (c *CustomerGroup) MarshalJSON() ([]byte, error) { } func (c *CustomerGroup) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -34332,6 +35598,9 @@ func (c *CustomerSegment) GetUpdatedAt() *string { } func (c *CustomerSegment) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -34398,6 +35667,9 @@ func (c *CustomerSegment) MarshalJSON() ([]byte, error) { } func (c *CustomerSegment) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -34475,6 +35747,9 @@ func (c *CustomerUpdatedEvent) GetData() *CustomerUpdatedEventData { } func (c *CustomerUpdatedEvent) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -34548,6 +35823,9 @@ func (c *CustomerUpdatedEvent) MarshalJSON() ([]byte, error) { } func (c *CustomerUpdatedEvent) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -34603,6 +35881,9 @@ func (c *CustomerUpdatedEventData) GetObject() *CustomerUpdatedEventObject { } func (c *CustomerUpdatedEventData) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -34662,6 +35943,9 @@ func (c *CustomerUpdatedEventData) MarshalJSON() ([]byte, error) { } func (c *CustomerUpdatedEventData) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -34697,6 +35981,9 @@ func (c *CustomerUpdatedEventObject) GetCustomer() *Customer { } func (c *CustomerUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -34742,6 +36029,9 @@ func (c *CustomerUpdatedEventObject) MarshalJSON() ([]byte, error) { } func (c *CustomerUpdatedEventObject) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -34808,6 +36098,9 @@ func (d *DataCollectionOptions) GetCollectedData() *CollectedData { } func (d *DataCollectionOptions) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -34874,6 +36167,9 @@ func (d *DataCollectionOptions) MarshalJSON() ([]byte, error) { } func (d *DataCollectionOptions) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -34947,6 +36243,9 @@ func (d *DateRange) GetEndDate() *string { } func (d *DateRange) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -34999,6 +36298,9 @@ func (d *DateRange) MarshalJSON() ([]byte, error) { } func (d *DateRange) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -35073,6 +36375,9 @@ func (d *DeleteBookingCustomAttributeDefinitionResponse) GetErrors() []*Error { } func (d *DeleteBookingCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -35118,6 +36423,9 @@ func (d *DeleteBookingCustomAttributeDefinitionResponse) MarshalJSON() ([]byte, } func (d *DeleteBookingCustomAttributeDefinitionResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -35154,6 +36462,9 @@ func (d *DeleteBookingCustomAttributeResponse) GetErrors() []*Error { } func (d *DeleteBookingCustomAttributeResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -35199,6 +36510,9 @@ func (d *DeleteBookingCustomAttributeResponse) MarshalJSON() ([]byte, error) { } func (d *DeleteBookingCustomAttributeResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -35235,6 +36549,9 @@ func (d *DeleteBreakTypeResponse) GetErrors() []*Error { } func (d *DeleteBreakTypeResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -35280,6 +36597,9 @@ func (d *DeleteBreakTypeResponse) MarshalJSON() ([]byte, error) { } func (d *DeleteBreakTypeResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -35338,6 +36658,9 @@ func (d *DeleteCatalogObjectResponse) GetDeletedAt() *string { } func (d *DeleteCatalogObjectResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -35397,6 +36720,9 @@ func (d *DeleteCatalogObjectResponse) MarshalJSON() ([]byte, error) { } func (d *DeleteCatalogObjectResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -35433,6 +36759,9 @@ func (d *DeleteCustomerCardResponse) GetErrors() []*Error { } func (d *DeleteCustomerCardResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -35478,6 +36807,9 @@ func (d *DeleteCustomerCardResponse) MarshalJSON() ([]byte, error) { } func (d *DeleteCustomerCardResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -35513,6 +36845,9 @@ func (d *DeleteCustomerCustomAttributeDefinitionResponse) GetErrors() []*Error { } func (d *DeleteCustomerCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -35558,6 +36893,9 @@ func (d *DeleteCustomerCustomAttributeDefinitionResponse) MarshalJSON() ([]byte, } func (d *DeleteCustomerCustomAttributeDefinitionResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -35594,6 +36932,9 @@ func (d *DeleteCustomerCustomAttributeResponse) GetErrors() []*Error { } func (d *DeleteCustomerCustomAttributeResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -35639,6 +36980,9 @@ func (d *DeleteCustomerCustomAttributeResponse) MarshalJSON() ([]byte, error) { } func (d *DeleteCustomerCustomAttributeResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -35675,6 +37019,9 @@ func (d *DeleteCustomerGroupResponse) GetErrors() []*Error { } func (d *DeleteCustomerGroupResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -35720,6 +37067,9 @@ func (d *DeleteCustomerGroupResponse) MarshalJSON() ([]byte, error) { } func (d *DeleteCustomerGroupResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -35755,6 +37105,9 @@ func (d *DeleteDisputeEvidenceResponse) GetErrors() []*Error { } func (d *DeleteDisputeEvidenceResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -35800,6 +37153,9 @@ func (d *DeleteDisputeEvidenceResponse) MarshalJSON() ([]byte, error) { } func (d *DeleteDisputeEvidenceResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -35835,6 +37191,9 @@ func (d *DeleteLocationCustomAttributeDefinitionResponse) GetErrors() []*Error { } func (d *DeleteLocationCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -35880,6 +37239,9 @@ func (d *DeleteLocationCustomAttributeDefinitionResponse) MarshalJSON() ([]byte, } func (d *DeleteLocationCustomAttributeDefinitionResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -35916,6 +37278,9 @@ func (d *DeleteLocationCustomAttributeResponse) GetErrors() []*Error { } func (d *DeleteLocationCustomAttributeResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -35961,6 +37326,9 @@ func (d *DeleteLocationCustomAttributeResponse) MarshalJSON() ([]byte, error) { } func (d *DeleteLocationCustomAttributeResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -35996,6 +37364,9 @@ func (d *DeleteLoyaltyRewardResponse) GetErrors() []*Error { } func (d *DeleteLoyaltyRewardResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -36041,6 +37412,9 @@ func (d *DeleteLoyaltyRewardResponse) MarshalJSON() ([]byte, error) { } func (d *DeleteLoyaltyRewardResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -36076,6 +37450,9 @@ func (d *DeleteMerchantCustomAttributeDefinitionResponse) GetErrors() []*Error { } func (d *DeleteMerchantCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -36121,6 +37498,9 @@ func (d *DeleteMerchantCustomAttributeDefinitionResponse) MarshalJSON() ([]byte, } func (d *DeleteMerchantCustomAttributeDefinitionResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -36157,6 +37537,9 @@ func (d *DeleteMerchantCustomAttributeResponse) GetErrors() []*Error { } func (d *DeleteMerchantCustomAttributeResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -36202,6 +37585,9 @@ func (d *DeleteMerchantCustomAttributeResponse) MarshalJSON() ([]byte, error) { } func (d *DeleteMerchantCustomAttributeResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -36237,6 +37623,9 @@ func (d *DeleteOrderCustomAttributeDefinitionResponse) GetErrors() []*Error { } func (d *DeleteOrderCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -36282,6 +37671,9 @@ func (d *DeleteOrderCustomAttributeDefinitionResponse) MarshalJSON() ([]byte, er } func (d *DeleteOrderCustomAttributeDefinitionResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -36317,6 +37709,9 @@ func (d *DeleteOrderCustomAttributeResponse) GetErrors() []*Error { } func (d *DeleteOrderCustomAttributeResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -36362,6 +37757,9 @@ func (d *DeleteOrderCustomAttributeResponse) MarshalJSON() ([]byte, error) { } func (d *DeleteOrderCustomAttributeResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -36416,6 +37814,9 @@ func (d *DeletePaymentLinkResponse) GetCancelledOrderID() *string { } func (d *DeletePaymentLinkResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -36475,6 +37876,9 @@ func (d *DeletePaymentLinkResponse) MarshalJSON() ([]byte, error) { } func (d *DeletePaymentLinkResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -36511,6 +37915,9 @@ func (d *DeleteShiftResponse) GetErrors() []*Error { } func (d *DeleteShiftResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -36556,6 +37963,9 @@ func (d *DeleteShiftResponse) MarshalJSON() ([]byte, error) { } func (d *DeleteShiftResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -36592,6 +38002,9 @@ func (d *DeleteWebhookSubscriptionResponse) GetErrors() []*Error { } func (d *DeleteWebhookSubscriptionResponse) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -36637,6 +38050,9 @@ func (d *DeleteWebhookSubscriptionResponse) MarshalJSON() ([]byte, error) { } func (d *DeleteWebhookSubscriptionResponse) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -36727,6 +38143,9 @@ func (d *DeviceCheckoutOptions) GetAllowAutoCardSurcharge() *bool { } func (d *DeviceCheckoutOptions) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -36807,6 +38226,9 @@ func (d *DeviceCheckoutOptions) MarshalJSON() ([]byte, error) { } func (d *DeviceCheckoutOptions) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -36935,6 +38357,9 @@ func (d *DeviceCode) GetPairedAt() *string { } func (d *DeviceCode) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -37050,6 +38475,9 @@ func (d *DeviceCode) MarshalJSON() ([]byte, error) { } func (d *DeviceCode) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -37137,6 +38565,9 @@ func (d *DeviceCodePairedEvent) GetData() *DeviceCodePairedEventData { } func (d *DeviceCodePairedEvent) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -37217,6 +38648,9 @@ func (d *DeviceCodePairedEvent) MarshalJSON() ([]byte, error) { } func (d *DeviceCodePairedEvent) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -37271,6 +38705,9 @@ func (d *DeviceCodePairedEventData) GetObject() *DeviceCodePairedEventObject { } func (d *DeviceCodePairedEventData) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -37330,6 +38767,9 @@ func (d *DeviceCodePairedEventData) MarshalJSON() ([]byte, error) { } func (d *DeviceCodePairedEventData) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -37364,6 +38804,9 @@ func (d *DeviceCodePairedEventObject) GetDeviceCode() *DeviceCode { } func (d *DeviceCodePairedEventObject) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -37409,6 +38852,9 @@ func (d *DeviceCodePairedEventObject) MarshalJSON() ([]byte, error) { } func (d *DeviceCodePairedEventObject) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -37513,6 +38959,9 @@ func (d *DeviceCreatedEvent) GetData() *DeviceCreatedEventData { } func (d *DeviceCreatedEvent) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -37586,6 +39035,9 @@ func (d *DeviceCreatedEvent) MarshalJSON() ([]byte, error) { } func (d *DeviceCreatedEvent) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -37640,6 +39092,9 @@ func (d *DeviceCreatedEventData) GetObject() *DeviceCreatedEventObject { } func (d *DeviceCreatedEventData) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -37699,6 +39154,9 @@ func (d *DeviceCreatedEventData) MarshalJSON() ([]byte, error) { } func (d *DeviceCreatedEventData) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -37733,6 +39191,9 @@ func (d *DeviceCreatedEventObject) GetDevice() *Device { } func (d *DeviceCreatedEventObject) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -37778,6 +39239,9 @@ func (d *DeviceCreatedEventObject) MarshalJSON() ([]byte, error) { } func (d *DeviceCreatedEventObject) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -37926,6 +39390,9 @@ func (d *DeviceMetadata) GetIPAddress() *string { } func (d *DeviceMetadata) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -38048,6 +39515,9 @@ func (d *DeviceMetadata) MarshalJSON() ([]byte, error) { } func (d *DeviceMetadata) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -38133,6 +39603,9 @@ func (d *DisputeCreatedEvent) GetData() *DisputeCreatedEventData { } func (d *DisputeCreatedEvent) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -38213,6 +39686,9 @@ func (d *DisputeCreatedEvent) MarshalJSON() ([]byte, error) { } func (d *DisputeCreatedEvent) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -38267,6 +39743,9 @@ func (d *DisputeCreatedEventData) GetObject() *DisputeCreatedEventObject { } func (d *DisputeCreatedEventData) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -38326,6 +39805,9 @@ func (d *DisputeCreatedEventData) MarshalJSON() ([]byte, error) { } func (d *DisputeCreatedEventData) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -38360,6 +39842,9 @@ func (d *DisputeCreatedEventObject) GetObject() *Dispute { } func (d *DisputeCreatedEventObject) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -38405,6 +39890,9 @@ func (d *DisputeCreatedEventObject) MarshalJSON() ([]byte, error) { } func (d *DisputeCreatedEventObject) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -38500,6 +39988,9 @@ func (d *DisputeEvidence) GetEvidenceType() *DisputeEvidenceType { } func (d *DisputeEvidence) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -38587,6 +40078,9 @@ func (d *DisputeEvidence) MarshalJSON() ([]byte, error) { } func (d *DisputeEvidence) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -38674,6 +40168,9 @@ func (d *DisputeEvidenceAddedEvent) GetData() *DisputeEvidenceAddedEventData { } func (d *DisputeEvidenceAddedEvent) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -38754,6 +40251,9 @@ func (d *DisputeEvidenceAddedEvent) MarshalJSON() ([]byte, error) { } func (d *DisputeEvidenceAddedEvent) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -38808,6 +40308,9 @@ func (d *DisputeEvidenceAddedEventData) GetObject() *DisputeEvidenceAddedEventOb } func (d *DisputeEvidenceAddedEventData) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -38867,6 +40370,9 @@ func (d *DisputeEvidenceAddedEventData) MarshalJSON() ([]byte, error) { } func (d *DisputeEvidenceAddedEventData) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -38901,6 +40407,9 @@ func (d *DisputeEvidenceAddedEventObject) GetObject() *Dispute { } func (d *DisputeEvidenceAddedEventObject) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -38946,6 +40455,9 @@ func (d *DisputeEvidenceAddedEventObject) MarshalJSON() ([]byte, error) { } func (d *DisputeEvidenceAddedEventObject) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -39033,6 +40545,9 @@ func (d *DisputeEvidenceCreatedEvent) GetData() *DisputeEvidenceCreatedEventData } func (d *DisputeEvidenceCreatedEvent) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -39113,6 +40628,9 @@ func (d *DisputeEvidenceCreatedEvent) MarshalJSON() ([]byte, error) { } func (d *DisputeEvidenceCreatedEvent) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -39167,6 +40685,9 @@ func (d *DisputeEvidenceCreatedEventData) GetObject() *DisputeEvidenceCreatedEve } func (d *DisputeEvidenceCreatedEventData) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -39226,6 +40747,9 @@ func (d *DisputeEvidenceCreatedEventData) MarshalJSON() ([]byte, error) { } func (d *DisputeEvidenceCreatedEventData) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -39260,6 +40784,9 @@ func (d *DisputeEvidenceCreatedEventObject) GetObject() *Dispute { } func (d *DisputeEvidenceCreatedEventObject) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -39305,6 +40832,9 @@ func (d *DisputeEvidenceCreatedEventObject) MarshalJSON() ([]byte, error) { } func (d *DisputeEvidenceCreatedEventObject) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -39392,6 +40922,9 @@ func (d *DisputeEvidenceDeletedEvent) GetData() *DisputeEvidenceDeletedEventData } func (d *DisputeEvidenceDeletedEvent) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -39472,6 +41005,9 @@ func (d *DisputeEvidenceDeletedEvent) MarshalJSON() ([]byte, error) { } func (d *DisputeEvidenceDeletedEvent) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -39526,6 +41062,9 @@ func (d *DisputeEvidenceDeletedEventData) GetObject() *DisputeEvidenceDeletedEve } func (d *DisputeEvidenceDeletedEventData) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -39585,6 +41124,9 @@ func (d *DisputeEvidenceDeletedEventData) MarshalJSON() ([]byte, error) { } func (d *DisputeEvidenceDeletedEventData) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -39619,6 +41161,9 @@ func (d *DisputeEvidenceDeletedEventObject) GetObject() *Dispute { } func (d *DisputeEvidenceDeletedEventObject) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -39664,6 +41209,9 @@ func (d *DisputeEvidenceDeletedEventObject) MarshalJSON() ([]byte, error) { } func (d *DisputeEvidenceDeletedEventObject) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -39709,6 +41257,9 @@ func (d *DisputeEvidenceFile) GetFiletype() *string { } func (d *DisputeEvidenceFile) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -39761,6 +41312,9 @@ func (d *DisputeEvidenceFile) MarshalJSON() ([]byte, error) { } func (d *DisputeEvidenceFile) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -39848,6 +41402,9 @@ func (d *DisputeEvidenceRemovedEvent) GetData() *DisputeEvidenceRemovedEventData } func (d *DisputeEvidenceRemovedEvent) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -39928,6 +41485,9 @@ func (d *DisputeEvidenceRemovedEvent) MarshalJSON() ([]byte, error) { } func (d *DisputeEvidenceRemovedEvent) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -39982,6 +41542,9 @@ func (d *DisputeEvidenceRemovedEventData) GetObject() *DisputeEvidenceRemovedEve } func (d *DisputeEvidenceRemovedEventData) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -40041,6 +41604,9 @@ func (d *DisputeEvidenceRemovedEventData) MarshalJSON() ([]byte, error) { } func (d *DisputeEvidenceRemovedEventData) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -40075,6 +41641,9 @@ func (d *DisputeEvidenceRemovedEventObject) GetObject() *Dispute { } func (d *DisputeEvidenceRemovedEventObject) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -40120,6 +41689,9 @@ func (d *DisputeEvidenceRemovedEventObject) MarshalJSON() ([]byte, error) { } func (d *DisputeEvidenceRemovedEventObject) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -40269,6 +41841,9 @@ func (d *DisputeStateChangedEvent) GetData() *DisputeStateChangedEventData { } func (d *DisputeStateChangedEvent) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -40349,6 +41924,9 @@ func (d *DisputeStateChangedEvent) MarshalJSON() ([]byte, error) { } func (d *DisputeStateChangedEvent) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -40403,6 +41981,9 @@ func (d *DisputeStateChangedEventData) GetObject() *DisputeStateChangedEventObje } func (d *DisputeStateChangedEventData) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -40462,6 +42043,9 @@ func (d *DisputeStateChangedEventData) MarshalJSON() ([]byte, error) { } func (d *DisputeStateChangedEventData) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -40496,6 +42080,9 @@ func (d *DisputeStateChangedEventObject) GetObject() *Dispute { } func (d *DisputeStateChangedEventObject) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -40541,6 +42128,9 @@ func (d *DisputeStateChangedEventObject) MarshalJSON() ([]byte, error) { } func (d *DisputeStateChangedEventObject) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -40628,6 +42218,9 @@ func (d *DisputeStateUpdatedEvent) GetData() *DisputeStateUpdatedEventData { } func (d *DisputeStateUpdatedEvent) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -40708,6 +42301,9 @@ func (d *DisputeStateUpdatedEvent) MarshalJSON() ([]byte, error) { } func (d *DisputeStateUpdatedEvent) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -40762,6 +42358,9 @@ func (d *DisputeStateUpdatedEventData) GetObject() *DisputeStateUpdatedEventObje } func (d *DisputeStateUpdatedEventData) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -40821,6 +42420,9 @@ func (d *DisputeStateUpdatedEventData) MarshalJSON() ([]byte, error) { } func (d *DisputeStateUpdatedEventData) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -40855,6 +42457,9 @@ func (d *DisputeStateUpdatedEventObject) GetObject() *Dispute { } func (d *DisputeStateUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if d == nil { + return nil + } return d.extraProperties } @@ -40900,6 +42505,9 @@ func (d *DisputeStateUpdatedEventObject) MarshalJSON() ([]byte, error) { } func (d *DisputeStateUpdatedEventObject) String() string { + if d == nil { + return "" + } if len(d.rawJSON) > 0 { if value, err := internal.StringifyJSON(d.rawJSON); err == nil { return value @@ -40995,6 +42603,9 @@ func (e *EmployeeWage) GetHourlyRate() *Money { } func (e *EmployeeWage) GetExtraProperties() map[string]interface{} { + if e == nil { + return nil + } return e.extraProperties } @@ -41061,6 +42672,9 @@ func (e *EmployeeWage) MarshalJSON() ([]byte, error) { } func (e *EmployeeWage) String() string { + if e == nil { + return "" + } if len(e.rawJSON) > 0 { if value, err := internal.StringifyJSON(e.rawJSON); err == nil { return value @@ -41131,6 +42745,9 @@ func (e *Error) GetField() *string { } func (e *Error) GetExtraProperties() map[string]interface{} { + if e == nil { + return nil + } return e.extraProperties } @@ -41197,6 +42814,9 @@ func (e *Error) MarshalJSON() ([]byte, error) { } func (e *Error) String() string { + if e == nil { + return "" + } if len(e.rawJSON) > 0 { if value, err := internal.StringifyJSON(e.rawJSON); err == nil { return value @@ -41777,6 +43397,9 @@ func (e *EventTypeMetadata) GetReleaseStatus() *string { } func (e *EventTypeMetadata) GetExtraProperties() map[string]interface{} { + if e == nil { + return nil + } return e.extraProperties } @@ -41836,6 +43459,9 @@ func (e *EventTypeMetadata) MarshalJSON() ([]byte, error) { } func (e *EventTypeMetadata) String() string { + if e == nil { + return "" + } if len(e.rawJSON) > 0 { if value, err := internal.StringifyJSON(e.rawJSON); err == nil { return value @@ -41920,6 +43546,9 @@ func (f *FilterValue) GetNone() []string { } func (f *FilterValue) GetExtraProperties() map[string]interface{} { + if f == nil { + return nil + } return f.extraProperties } @@ -41979,6 +43608,9 @@ func (f *FilterValue) MarshalJSON() ([]byte, error) { } func (f *FilterValue) String() string { + if f == nil { + return "" + } if len(f.rawJSON) > 0 { if value, err := internal.StringifyJSON(f.rawJSON); err == nil { return value @@ -42137,6 +43769,9 @@ func (f *Fulfillment) GetDeliveryDetails() *FulfillmentDeliveryDetails { } func (f *Fulfillment) GetExtraProperties() map[string]interface{} { + if f == nil { + return nil + } return f.extraProperties } @@ -42238,6 +43873,9 @@ func (f *Fulfillment) MarshalJSON() ([]byte, error) { } func (f *Fulfillment) String() string { + if f == nil { + return "" + } if len(f.rawJSON) > 0 { if value, err := internal.StringifyJSON(f.rawJSON); err == nil { return value @@ -42545,6 +44183,9 @@ func (f *FulfillmentDeliveryDetails) GetManagedDelivery() *bool { } func (f *FulfillmentDeliveryDetails) GetExtraProperties() map[string]interface{} { + if f == nil { + return nil + } return f.extraProperties } @@ -42744,6 +44385,9 @@ func (f *FulfillmentDeliveryDetails) MarshalJSON() ([]byte, error) { } func (f *FulfillmentDeliveryDetails) String() string { + if f == nil { + return "" + } if len(f.rawJSON) > 0 { if value, err := internal.StringifyJSON(f.rawJSON); err == nil { return value @@ -42855,6 +44499,9 @@ func (f *FulfillmentFulfillmentEntry) GetMetadata() map[string]*string { } func (f *FulfillmentFulfillmentEntry) GetExtraProperties() map[string]interface{} { + if f == nil { + return nil + } return f.extraProperties } @@ -42921,6 +44568,9 @@ func (f *FulfillmentFulfillmentEntry) MarshalJSON() ([]byte, error) { } func (f *FulfillmentFulfillmentEntry) String() string { + if f == nil { + return "" + } if len(f.rawJSON) > 0 { if value, err := internal.StringifyJSON(f.rawJSON); err == nil { return value @@ -43188,6 +44838,9 @@ func (f *FulfillmentPickupDetails) GetCurbsidePickupDetails() *FulfillmentPickup } func (f *FulfillmentPickupDetails) GetExtraProperties() map[string]interface{} { + if f == nil { + return nil + } return f.extraProperties } @@ -43352,6 +45005,9 @@ func (f *FulfillmentPickupDetails) MarshalJSON() ([]byte, error) { } func (f *FulfillmentPickupDetails) String() string { + if f == nil { + return "" + } if len(f.rawJSON) > 0 { if value, err := internal.StringifyJSON(f.rawJSON); err == nil { return value @@ -43399,6 +45055,9 @@ func (f *FulfillmentPickupDetailsCurbsidePickupDetails) GetBuyerArrivedAt() *str } func (f *FulfillmentPickupDetailsCurbsidePickupDetails) GetExtraProperties() map[string]interface{} { + if f == nil { + return nil + } return f.extraProperties } @@ -43451,6 +45110,9 @@ func (f *FulfillmentPickupDetailsCurbsidePickupDetails) MarshalJSON() ([]byte, e } func (f *FulfillmentPickupDetailsCurbsidePickupDetails) String() string { + if f == nil { + return "" + } if len(f.rawJSON) > 0 { if value, err := internal.StringifyJSON(f.rawJSON); err == nil { return value @@ -43568,6 +45230,9 @@ func (f *FulfillmentRecipient) GetAddress() *Address { } func (f *FulfillmentRecipient) GetExtraProperties() map[string]interface{} { + if f == nil { + return nil + } return f.extraProperties } @@ -43641,6 +45306,9 @@ func (f *FulfillmentRecipient) MarshalJSON() ([]byte, error) { } func (f *FulfillmentRecipient) String() string { + if f == nil { + return "" + } if len(f.rawJSON) > 0 { if value, err := internal.StringifyJSON(f.rawJSON); err == nil { return value @@ -43832,6 +45500,9 @@ func (f *FulfillmentShipmentDetails) GetFailureReason() *string { } func (f *FulfillmentShipmentDetails) GetExtraProperties() map[string]interface{} { + if f == nil { + return nil + } return f.extraProperties } @@ -43975,6 +45646,9 @@ func (f *FulfillmentShipmentDetails) MarshalJSON() ([]byte, error) { } func (f *FulfillmentShipmentDetails) String() string { + if f == nil { + return "" + } if len(f.rawJSON) > 0 { if value, err := internal.StringifyJSON(f.rawJSON); err == nil { return value @@ -44085,6 +45759,9 @@ func (g *GetBreakTypeResponse) GetErrors() []*Error { } func (g *GetBreakTypeResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -44137,6 +45814,9 @@ func (g *GetBreakTypeResponse) MarshalJSON() ([]byte, error) { } func (g *GetBreakTypeResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -44185,6 +45865,9 @@ func (g *GetCashDrawerShiftResponse) GetErrors() []*Error { } func (g *GetCashDrawerShiftResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -44237,6 +45920,9 @@ func (g *GetCashDrawerShiftResponse) MarshalJSON() ([]byte, error) { } func (g *GetCashDrawerShiftResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -44291,6 +45977,9 @@ func (g *GetCatalogObjectResponse) GetRelatedObjects() []*CatalogObject { } func (g *GetCatalogObjectResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -44350,6 +46039,9 @@ func (g *GetCatalogObjectResponse) MarshalJSON() ([]byte, error) { } func (g *GetCatalogObjectResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -44396,6 +46088,9 @@ func (g *GetCustomerCustomAttributeDefinitionResponse) GetErrors() []*Error { } func (g *GetCustomerCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -44448,6 +46143,9 @@ func (g *GetCustomerCustomAttributeDefinitionResponse) MarshalJSON() ([]byte, er } func (g *GetCustomerCustomAttributeDefinitionResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -44495,6 +46193,9 @@ func (g *GetCustomerCustomAttributeResponse) GetErrors() []*Error { } func (g *GetCustomerCustomAttributeResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -44547,6 +46248,9 @@ func (g *GetCustomerCustomAttributeResponse) MarshalJSON() ([]byte, error) { } func (g *GetCustomerCustomAttributeResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -44597,6 +46301,9 @@ func (g *GetCustomerGroupResponse) GetGroup() *CustomerGroup { } func (g *GetCustomerGroupResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -44649,6 +46356,9 @@ func (g *GetCustomerGroupResponse) MarshalJSON() ([]byte, error) { } func (g *GetCustomerGroupResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -44700,6 +46410,9 @@ func (g *GetCustomerSegmentResponse) GetSegment() *CustomerSegment { } func (g *GetCustomerSegmentResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -44752,6 +46465,9 @@ func (g *GetCustomerSegmentResponse) MarshalJSON() ([]byte, error) { } func (g *GetCustomerSegmentResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -44796,6 +46512,9 @@ func (g *GetDeviceCodeResponse) GetDeviceCode() *DeviceCode { } func (g *GetDeviceCodeResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -44848,6 +46567,9 @@ func (g *GetDeviceCodeResponse) MarshalJSON() ([]byte, error) { } func (g *GetDeviceCodeResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -44895,6 +46617,9 @@ func (g *GetDisputeEvidenceResponse) GetEvidence() *DisputeEvidence { } func (g *GetDisputeEvidenceResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -44947,6 +46672,9 @@ func (g *GetDisputeEvidenceResponse) MarshalJSON() ([]byte, error) { } func (g *GetDisputeEvidenceResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -44998,6 +46726,9 @@ func (g *GetEmployeeWageResponse) GetErrors() []*Error { } func (g *GetEmployeeWageResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -45050,6 +46781,9 @@ func (g *GetEmployeeWageResponse) MarshalJSON() ([]byte, error) { } func (g *GetEmployeeWageResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -45107,6 +46841,9 @@ func (g *GetLoyaltyAccountResponse) GetLoyaltyAccount() *LoyaltyAccount { } func (g *GetLoyaltyAccountResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -45159,6 +46896,9 @@ func (g *GetLoyaltyAccountResponse) MarshalJSON() ([]byte, error) { } func (g *GetLoyaltyAccountResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -45206,6 +46946,9 @@ func (g *GetLoyaltyProgramResponse) GetProgram() *LoyaltyProgram { } func (g *GetLoyaltyProgramResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -45258,6 +47001,9 @@ func (g *GetLoyaltyProgramResponse) MarshalJSON() ([]byte, error) { } func (g *GetLoyaltyProgramResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -45305,6 +47051,9 @@ func (g *GetLoyaltyPromotionResponse) GetLoyaltyPromotion() *LoyaltyPromotion { } func (g *GetLoyaltyPromotionResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -45357,6 +47106,9 @@ func (g *GetLoyaltyPromotionResponse) MarshalJSON() ([]byte, error) { } func (g *GetLoyaltyPromotionResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -45404,6 +47156,9 @@ func (g *GetLoyaltyRewardResponse) GetReward() *LoyaltyReward { } func (g *GetLoyaltyRewardResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -45456,6 +47211,9 @@ func (g *GetLoyaltyRewardResponse) MarshalJSON() ([]byte, error) { } func (g *GetLoyaltyRewardResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -45506,6 +47264,9 @@ func (g *GetPaymentLinkResponse) GetPaymentLink() *PaymentLink { } func (g *GetPaymentLinkResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -45558,6 +47319,9 @@ func (g *GetPaymentLinkResponse) MarshalJSON() ([]byte, error) { } func (g *GetPaymentLinkResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -45605,6 +47369,9 @@ func (g *GetShiftResponse) GetErrors() []*Error { } func (g *GetShiftResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -45657,6 +47424,9 @@ func (g *GetShiftResponse) MarshalJSON() ([]byte, error) { } func (g *GetShiftResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -45705,6 +47475,9 @@ func (g *GetTeamMemberBookingProfileResponse) GetErrors() []*Error { } func (g *GetTeamMemberBookingProfileResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -45757,6 +47530,9 @@ func (g *GetTeamMemberBookingProfileResponse) MarshalJSON() ([]byte, error) { } func (g *GetTeamMemberBookingProfileResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -45806,6 +47582,9 @@ func (g *GetTeamMemberWageResponse) GetErrors() []*Error { } func (g *GetTeamMemberWageResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -45858,6 +47637,9 @@ func (g *GetTeamMemberWageResponse) MarshalJSON() ([]byte, error) { } func (g *GetTeamMemberWageResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -45902,6 +47684,9 @@ func (g *GetTerminalActionResponse) GetAction() *TerminalAction { } func (g *GetTerminalActionResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -45954,6 +47739,9 @@ func (g *GetTerminalActionResponse) MarshalJSON() ([]byte, error) { } func (g *GetTerminalActionResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -45998,6 +47786,9 @@ func (g *GetTerminalCheckoutResponse) GetCheckout() *TerminalCheckout { } func (g *GetTerminalCheckoutResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -46050,6 +47841,9 @@ func (g *GetTerminalCheckoutResponse) MarshalJSON() ([]byte, error) { } func (g *GetTerminalCheckoutResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -46094,6 +47888,9 @@ func (g *GetTerminalRefundResponse) GetRefund() *TerminalRefund { } func (g *GetTerminalRefundResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -46146,6 +47943,9 @@ func (g *GetTerminalRefundResponse) MarshalJSON() ([]byte, error) { } func (g *GetTerminalRefundResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -46196,6 +47996,9 @@ func (g *GetTransactionResponse) GetTransaction() *Transaction { } func (g *GetTransactionResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -46248,6 +48051,9 @@ func (g *GetTransactionResponse) MarshalJSON() ([]byte, error) { } func (g *GetTransactionResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -46297,6 +48103,9 @@ func (g *GetWageSettingResponse) GetErrors() []*Error { } func (g *GetWageSettingResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -46349,6 +48158,9 @@ func (g *GetWageSettingResponse) MarshalJSON() ([]byte, error) { } func (g *GetWageSettingResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -46400,6 +48212,9 @@ func (g *GetWebhookSubscriptionResponse) GetSubscription() *WebhookSubscription } func (g *GetWebhookSubscriptionResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -46452,6 +48267,9 @@ func (g *GetWebhookSubscriptionResponse) MarshalJSON() ([]byte, error) { } func (g *GetWebhookSubscriptionResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -46722,6 +48540,9 @@ func (g *GiftCardActivity) GetTransferBalanceFromActivityDetails() *GiftCardActi } func (g *GiftCardActivity) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -46914,6 +48735,9 @@ func (g *GiftCardActivity) MarshalJSON() ([]byte, error) { } func (g *GiftCardActivity) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -47011,6 +48835,9 @@ func (g *GiftCardActivityActivate) GetBuyerPaymentInstrumentIDs() []string { } func (g *GiftCardActivityActivate) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -47084,6 +48911,9 @@ func (g *GiftCardActivityActivate) MarshalJSON() ([]byte, error) { } func (g *GiftCardActivityActivate) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -47130,6 +48960,9 @@ func (g *GiftCardActivityAdjustDecrement) GetReason() GiftCardActivityAdjustDecr } func (g *GiftCardActivityAdjustDecrement) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -47182,6 +49015,9 @@ func (g *GiftCardActivityAdjustDecrement) MarshalJSON() ([]byte, error) { } func (g *GiftCardActivityAdjustDecrement) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -47257,6 +49093,9 @@ func (g *GiftCardActivityAdjustIncrement) GetReason() GiftCardActivityAdjustIncr } func (g *GiftCardActivityAdjustIncrement) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -47309,6 +49148,9 @@ func (g *GiftCardActivityAdjustIncrement) MarshalJSON() ([]byte, error) { } func (g *GiftCardActivityAdjustIncrement) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -47364,6 +49206,9 @@ type GiftCardActivityBlock struct { } func (g *GiftCardActivityBlock) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -47409,6 +49254,9 @@ func (g *GiftCardActivityBlock) MarshalJSON() ([]byte, error) { } func (g *GiftCardActivityBlock) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -47448,6 +49296,9 @@ func (g *GiftCardActivityClearBalance) GetReason() GiftCardActivityClearBalanceR } func (g *GiftCardActivityClearBalance) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -47493,6 +49344,9 @@ func (g *GiftCardActivityClearBalance) MarshalJSON() ([]byte, error) { } func (g *GiftCardActivityClearBalance) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -47595,6 +49449,9 @@ func (g *GiftCardActivityCreatedEvent) GetData() *GiftCardActivityCreatedEventDa } func (g *GiftCardActivityCreatedEvent) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -47668,6 +49525,9 @@ func (g *GiftCardActivityCreatedEvent) MarshalJSON() ([]byte, error) { } func (g *GiftCardActivityCreatedEvent) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -47723,6 +49583,9 @@ func (g *GiftCardActivityCreatedEventData) GetObject() *GiftCardActivityCreatedE } func (g *GiftCardActivityCreatedEventData) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -47782,6 +49645,9 @@ func (g *GiftCardActivityCreatedEventData) MarshalJSON() ([]byte, error) { } func (g *GiftCardActivityCreatedEventData) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -47818,6 +49684,9 @@ func (g *GiftCardActivityCreatedEventObject) GetGiftCardActivity() *GiftCardActi } func (g *GiftCardActivityCreatedEventObject) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -47863,6 +49732,9 @@ func (g *GiftCardActivityCreatedEventObject) MarshalJSON() ([]byte, error) { } func (g *GiftCardActivityCreatedEventObject) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -47899,6 +49771,9 @@ func (g *GiftCardActivityDeactivate) GetReason() GiftCardActivityDeactivateReaso } func (g *GiftCardActivityDeactivate) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -47944,6 +49819,9 @@ func (g *GiftCardActivityDeactivate) MarshalJSON() ([]byte, error) { } func (g *GiftCardActivityDeactivate) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -48007,6 +49885,9 @@ func (g *GiftCardActivityImport) GetAmountMoney() *Money { } func (g *GiftCardActivityImport) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -48052,6 +49933,9 @@ func (g *GiftCardActivityImport) MarshalJSON() ([]byte, error) { } func (g *GiftCardActivityImport) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -48088,6 +49972,9 @@ func (g *GiftCardActivityImportReversal) GetAmountMoney() *Money { } func (g *GiftCardActivityImportReversal) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -48133,6 +50020,9 @@ func (g *GiftCardActivityImportReversal) MarshalJSON() ([]byte, error) { } func (g *GiftCardActivityImportReversal) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -48230,6 +50120,9 @@ func (g *GiftCardActivityLoad) GetBuyerPaymentInstrumentIDs() []string { } func (g *GiftCardActivityLoad) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -48303,6 +50196,9 @@ func (g *GiftCardActivityLoad) MarshalJSON() ([]byte, error) { } func (g *GiftCardActivityLoad) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -48379,6 +50275,9 @@ func (g *GiftCardActivityRedeem) GetStatus() *GiftCardActivityRedeemStatus { } func (g *GiftCardActivityRedeem) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -48445,6 +50344,9 @@ func (g *GiftCardActivityRedeem) MarshalJSON() ([]byte, error) { } func (g *GiftCardActivityRedeem) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -48547,6 +50449,9 @@ func (g *GiftCardActivityRefund) GetPaymentID() *string { } func (g *GiftCardActivityRefund) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -48613,6 +50518,9 @@ func (g *GiftCardActivityRefund) MarshalJSON() ([]byte, error) { } func (g *GiftCardActivityRefund) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -48658,6 +50566,9 @@ func (g *GiftCardActivityTransferBalanceFrom) GetAmountMoney() *Money { } func (g *GiftCardActivityTransferBalanceFrom) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -48710,6 +50621,9 @@ func (g *GiftCardActivityTransferBalanceFrom) MarshalJSON() ([]byte, error) { } func (g *GiftCardActivityTransferBalanceFrom) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -48755,6 +50669,9 @@ func (g *GiftCardActivityTransferBalanceTo) GetAmountMoney() *Money { } func (g *GiftCardActivityTransferBalanceTo) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -48807,6 +50724,9 @@ func (g *GiftCardActivityTransferBalanceTo) MarshalJSON() ([]byte, error) { } func (g *GiftCardActivityTransferBalanceTo) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -48898,6 +50818,9 @@ type GiftCardActivityUnblock struct { } func (g *GiftCardActivityUnblock) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -48943,6 +50866,9 @@ func (g *GiftCardActivityUnblock) MarshalJSON() ([]byte, error) { } func (g *GiftCardActivityUnblock) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -49001,6 +50927,9 @@ func (g *GiftCardActivityUnlinkedActivityRefund) GetPaymentID() *string { } func (g *GiftCardActivityUnlinkedActivityRefund) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -49060,6 +50989,9 @@ func (g *GiftCardActivityUnlinkedActivityRefund) MarshalJSON() ([]byte, error) { } func (g *GiftCardActivityUnlinkedActivityRefund) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -49140,6 +51072,9 @@ func (g *GiftCardActivityUpdatedEvent) GetData() *GiftCardActivityUpdatedEventDa } func (g *GiftCardActivityUpdatedEvent) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -49213,6 +51148,9 @@ func (g *GiftCardActivityUpdatedEvent) MarshalJSON() ([]byte, error) { } func (g *GiftCardActivityUpdatedEvent) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -49268,6 +51206,9 @@ func (g *GiftCardActivityUpdatedEventData) GetObject() *GiftCardActivityUpdatedE } func (g *GiftCardActivityUpdatedEventData) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -49327,6 +51268,9 @@ func (g *GiftCardActivityUpdatedEventData) MarshalJSON() ([]byte, error) { } func (g *GiftCardActivityUpdatedEventData) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -49363,6 +51307,9 @@ func (g *GiftCardActivityUpdatedEventObject) GetGiftCardActivity() *GiftCardActi } func (g *GiftCardActivityUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -49408,6 +51355,9 @@ func (g *GiftCardActivityUpdatedEventObject) MarshalJSON() ([]byte, error) { } func (g *GiftCardActivityUpdatedEventObject) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -49484,6 +51434,9 @@ func (g *GiftCardCreatedEvent) GetData() *GiftCardCreatedEventData { } func (g *GiftCardCreatedEvent) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -49557,6 +51510,9 @@ func (g *GiftCardCreatedEvent) MarshalJSON() ([]byte, error) { } func (g *GiftCardCreatedEvent) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -49612,6 +51568,9 @@ func (g *GiftCardCreatedEventData) GetObject() *GiftCardCreatedEventObject { } func (g *GiftCardCreatedEventData) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -49671,6 +51630,9 @@ func (g *GiftCardCreatedEventData) MarshalJSON() ([]byte, error) { } func (g *GiftCardCreatedEventData) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -49706,6 +51668,9 @@ func (g *GiftCardCreatedEventObject) GetGiftCard() *GiftCard { } func (g *GiftCardCreatedEventObject) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -49751,6 +51716,9 @@ func (g *GiftCardCreatedEventObject) MarshalJSON() ([]byte, error) { } func (g *GiftCardCreatedEventObject) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -49827,6 +51795,9 @@ func (g *GiftCardCustomerLinkedEvent) GetData() *GiftCardCustomerLinkedEventData } func (g *GiftCardCustomerLinkedEvent) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -49900,6 +51871,9 @@ func (g *GiftCardCustomerLinkedEvent) MarshalJSON() ([]byte, error) { } func (g *GiftCardCustomerLinkedEvent) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -49955,6 +51929,9 @@ func (g *GiftCardCustomerLinkedEventData) GetObject() *GiftCardCustomerLinkedEve } func (g *GiftCardCustomerLinkedEventData) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -50014,6 +51991,9 @@ func (g *GiftCardCustomerLinkedEventData) MarshalJSON() ([]byte, error) { } func (g *GiftCardCustomerLinkedEventData) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -50060,6 +52040,9 @@ func (g *GiftCardCustomerLinkedEventObject) GetLinkedCustomerID() *string { } func (g *GiftCardCustomerLinkedEventObject) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -50112,6 +52095,9 @@ func (g *GiftCardCustomerLinkedEventObject) MarshalJSON() ([]byte, error) { } func (g *GiftCardCustomerLinkedEventObject) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -50188,6 +52174,9 @@ func (g *GiftCardCustomerUnlinkedEvent) GetData() *GiftCardCustomerUnlinkedEvent } func (g *GiftCardCustomerUnlinkedEvent) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -50261,6 +52250,9 @@ func (g *GiftCardCustomerUnlinkedEvent) MarshalJSON() ([]byte, error) { } func (g *GiftCardCustomerUnlinkedEvent) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -50316,6 +52308,9 @@ func (g *GiftCardCustomerUnlinkedEventData) GetObject() *GiftCardCustomerUnlinke } func (g *GiftCardCustomerUnlinkedEventData) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -50375,6 +52370,9 @@ func (g *GiftCardCustomerUnlinkedEventData) MarshalJSON() ([]byte, error) { } func (g *GiftCardCustomerUnlinkedEventData) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -50422,6 +52420,9 @@ func (g *GiftCardCustomerUnlinkedEventObject) GetUnlinkedCustomerID() *string { } func (g *GiftCardCustomerUnlinkedEventObject) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -50474,6 +52475,9 @@ func (g *GiftCardCustomerUnlinkedEventObject) MarshalJSON() ([]byte, error) { } func (g *GiftCardCustomerUnlinkedEventObject) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -50551,6 +52555,9 @@ func (g *GiftCardUpdatedEvent) GetData() *GiftCardUpdatedEventData { } func (g *GiftCardUpdatedEvent) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -50624,6 +52631,9 @@ func (g *GiftCardUpdatedEvent) MarshalJSON() ([]byte, error) { } func (g *GiftCardUpdatedEvent) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -50679,6 +52689,9 @@ func (g *GiftCardUpdatedEventData) GetObject() *GiftCardUpdatedEventObject { } func (g *GiftCardUpdatedEventData) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -50738,6 +52751,9 @@ func (g *GiftCardUpdatedEventData) MarshalJSON() ([]byte, error) { } func (g *GiftCardUpdatedEventData) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -50774,6 +52790,9 @@ func (g *GiftCardUpdatedEventObject) GetGiftCard() *GiftCard { } func (g *GiftCardUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -50819,6 +52838,9 @@ func (g *GiftCardUpdatedEventObject) MarshalJSON() ([]byte, error) { } func (g *GiftCardUpdatedEventObject) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -50918,6 +52940,9 @@ func (i *InventoryCountUpdatedEvent) GetData() *InventoryCountUpdatedEventData { } func (i *InventoryCountUpdatedEvent) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -50991,6 +53016,9 @@ func (i *InventoryCountUpdatedEvent) MarshalJSON() ([]byte, error) { } func (i *InventoryCountUpdatedEvent) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -51045,6 +53073,9 @@ func (i *InventoryCountUpdatedEventData) GetObject() *InventoryCountUpdatedEvent } func (i *InventoryCountUpdatedEventData) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -51104,6 +53135,9 @@ func (i *InventoryCountUpdatedEventData) MarshalJSON() ([]byte, error) { } func (i *InventoryCountUpdatedEventData) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -51138,6 +53172,9 @@ func (i *InventoryCountUpdatedEventObject) GetInventoryCounts() []*InventoryCoun } func (i *InventoryCountUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -51183,6 +53220,9 @@ func (i *InventoryCountUpdatedEventObject) MarshalJSON() ([]byte, error) { } func (i *InventoryCountUpdatedEventObject) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -51258,6 +53298,9 @@ func (i *InvoiceCanceledEvent) GetData() *InvoiceCanceledEventData { } func (i *InvoiceCanceledEvent) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -51331,6 +53374,9 @@ func (i *InvoiceCanceledEvent) MarshalJSON() ([]byte, error) { } func (i *InvoiceCanceledEvent) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -51385,6 +53431,9 @@ func (i *InvoiceCanceledEventData) GetObject() *InvoiceCanceledEventObject { } func (i *InvoiceCanceledEventData) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -51444,6 +53493,9 @@ func (i *InvoiceCanceledEventData) MarshalJSON() ([]byte, error) { } func (i *InvoiceCanceledEventData) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -51478,6 +53530,9 @@ func (i *InvoiceCanceledEventObject) GetInvoice() *Invoice { } func (i *InvoiceCanceledEventObject) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -51523,6 +53578,9 @@ func (i *InvoiceCanceledEventObject) MarshalJSON() ([]byte, error) { } func (i *InvoiceCanceledEventObject) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -51598,6 +53656,9 @@ func (i *InvoiceCreatedEvent) GetData() *InvoiceCreatedEventData { } func (i *InvoiceCreatedEvent) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -51671,6 +53732,9 @@ func (i *InvoiceCreatedEvent) MarshalJSON() ([]byte, error) { } func (i *InvoiceCreatedEvent) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -51725,6 +53789,9 @@ func (i *InvoiceCreatedEventData) GetObject() *InvoiceCreatedEventObject { } func (i *InvoiceCreatedEventData) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -51784,6 +53851,9 @@ func (i *InvoiceCreatedEventData) MarshalJSON() ([]byte, error) { } func (i *InvoiceCreatedEventData) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -51818,6 +53888,9 @@ func (i *InvoiceCreatedEventObject) GetInvoice() *Invoice { } func (i *InvoiceCreatedEventObject) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -51863,6 +53936,9 @@ func (i *InvoiceCreatedEventObject) MarshalJSON() ([]byte, error) { } func (i *InvoiceCreatedEventObject) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -51938,6 +54014,9 @@ func (i *InvoiceDeletedEvent) GetData() *InvoiceDeletedEventData { } func (i *InvoiceDeletedEvent) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -52011,6 +54090,9 @@ func (i *InvoiceDeletedEvent) MarshalJSON() ([]byte, error) { } func (i *InvoiceDeletedEvent) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -52065,6 +54147,9 @@ func (i *InvoiceDeletedEventData) GetDeleted() *bool { } func (i *InvoiceDeletedEventData) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -52124,6 +54209,9 @@ func (i *InvoiceDeletedEventData) MarshalJSON() ([]byte, error) { } func (i *InvoiceDeletedEventData) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -52200,6 +54288,9 @@ func (i *InvoicePaymentMadeEvent) GetData() *InvoicePaymentMadeEventData { } func (i *InvoicePaymentMadeEvent) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -52273,6 +54364,9 @@ func (i *InvoicePaymentMadeEvent) MarshalJSON() ([]byte, error) { } func (i *InvoicePaymentMadeEvent) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -52327,6 +54421,9 @@ func (i *InvoicePaymentMadeEventData) GetObject() *InvoicePaymentMadeEventObject } func (i *InvoicePaymentMadeEventData) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -52386,6 +54483,9 @@ func (i *InvoicePaymentMadeEventData) MarshalJSON() ([]byte, error) { } func (i *InvoicePaymentMadeEventData) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -52420,6 +54520,9 @@ func (i *InvoicePaymentMadeEventObject) GetInvoice() *Invoice { } func (i *InvoicePaymentMadeEventObject) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -52465,6 +54568,9 @@ func (i *InvoicePaymentMadeEventObject) MarshalJSON() ([]byte, error) { } func (i *InvoicePaymentMadeEventObject) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -52540,6 +54646,9 @@ func (i *InvoicePublishedEvent) GetData() *InvoicePublishedEventData { } func (i *InvoicePublishedEvent) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -52613,6 +54722,9 @@ func (i *InvoicePublishedEvent) MarshalJSON() ([]byte, error) { } func (i *InvoicePublishedEvent) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -52667,6 +54779,9 @@ func (i *InvoicePublishedEventData) GetObject() *InvoicePublishedEventObject { } func (i *InvoicePublishedEventData) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -52726,6 +54841,9 @@ func (i *InvoicePublishedEventData) MarshalJSON() ([]byte, error) { } func (i *InvoicePublishedEventData) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -52760,6 +54878,9 @@ func (i *InvoicePublishedEventObject) GetInvoice() *Invoice { } func (i *InvoicePublishedEventObject) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -52805,6 +54926,9 @@ func (i *InvoicePublishedEventObject) MarshalJSON() ([]byte, error) { } func (i *InvoicePublishedEventObject) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -52881,6 +55005,9 @@ func (i *InvoiceRefundedEvent) GetData() *InvoiceRefundedEventData { } func (i *InvoiceRefundedEvent) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -52954,6 +55081,9 @@ func (i *InvoiceRefundedEvent) MarshalJSON() ([]byte, error) { } func (i *InvoiceRefundedEvent) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -53008,6 +55138,9 @@ func (i *InvoiceRefundedEventData) GetObject() *InvoiceRefundedEventObject { } func (i *InvoiceRefundedEventData) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -53067,6 +55200,9 @@ func (i *InvoiceRefundedEventData) MarshalJSON() ([]byte, error) { } func (i *InvoiceRefundedEventData) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -53101,6 +55237,9 @@ func (i *InvoiceRefundedEventObject) GetInvoice() *Invoice { } func (i *InvoiceRefundedEventObject) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -53146,6 +55285,9 @@ func (i *InvoiceRefundedEventObject) MarshalJSON() ([]byte, error) { } func (i *InvoiceRefundedEventObject) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -53221,6 +55363,9 @@ func (i *InvoiceScheduledChargeFailedEvent) GetData() *InvoiceScheduledChargeFai } func (i *InvoiceScheduledChargeFailedEvent) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -53294,6 +55439,9 @@ func (i *InvoiceScheduledChargeFailedEvent) MarshalJSON() ([]byte, error) { } func (i *InvoiceScheduledChargeFailedEvent) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -53348,6 +55496,9 @@ func (i *InvoiceScheduledChargeFailedEventData) GetObject() *InvoiceScheduledCha } func (i *InvoiceScheduledChargeFailedEventData) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -53407,6 +55558,9 @@ func (i *InvoiceScheduledChargeFailedEventData) MarshalJSON() ([]byte, error) { } func (i *InvoiceScheduledChargeFailedEventData) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -53441,6 +55595,9 @@ func (i *InvoiceScheduledChargeFailedEventObject) GetInvoice() *Invoice { } func (i *InvoiceScheduledChargeFailedEventObject) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -53486,6 +55643,9 @@ func (i *InvoiceScheduledChargeFailedEventObject) MarshalJSON() ([]byte, error) } func (i *InvoiceScheduledChargeFailedEventObject) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -53561,6 +55721,9 @@ func (i *InvoiceUpdatedEvent) GetData() *InvoiceUpdatedEventData { } func (i *InvoiceUpdatedEvent) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -53634,6 +55797,9 @@ func (i *InvoiceUpdatedEvent) MarshalJSON() ([]byte, error) { } func (i *InvoiceUpdatedEvent) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -53688,6 +55854,9 @@ func (i *InvoiceUpdatedEventData) GetObject() *InvoiceUpdatedEventObject { } func (i *InvoiceUpdatedEventData) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -53747,6 +55916,9 @@ func (i *InvoiceUpdatedEventData) MarshalJSON() ([]byte, error) { } func (i *InvoiceUpdatedEventData) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -53781,6 +55953,9 @@ func (i *InvoiceUpdatedEventObject) GetInvoice() *Invoice { } func (i *InvoiceUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -53826,6 +56001,9 @@ func (i *InvoiceUpdatedEventObject) MarshalJSON() ([]byte, error) { } func (i *InvoiceUpdatedEventObject) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -53945,6 +56123,9 @@ func (i *ItemVariationLocationOverrides) GetSoldOutValidUntil() *string { } func (i *ItemVariationLocationOverrides) GetExtraProperties() map[string]interface{} { + if i == nil { + return nil + } return i.extraProperties } @@ -54039,6 +56220,9 @@ func (i *ItemVariationLocationOverrides) MarshalJSON() ([]byte, error) { } func (i *ItemVariationLocationOverrides) String() string { + if i == nil { + return "" + } if len(i.rawJSON) > 0 { if value, err := internal.StringifyJSON(i.rawJSON); err == nil { return value @@ -54128,6 +56312,9 @@ func (j *JobAssignment) GetJobID() *string { } func (j *JobAssignment) GetExtraProperties() map[string]interface{} { + if j == nil { + return nil + } return j.extraProperties } @@ -54208,6 +56395,9 @@ func (j *JobAssignment) MarshalJSON() ([]byte, error) { } func (j *JobAssignment) String() string { + if j == nil { + return "" + } if len(j.rawJSON) > 0 { if value, err := internal.StringifyJSON(j.rawJSON); err == nil { return value @@ -54309,6 +56499,9 @@ func (j *JobCreatedEvent) GetData() *JobCreatedEventData { } func (j *JobCreatedEvent) GetExtraProperties() map[string]interface{} { + if j == nil { + return nil + } return j.extraProperties } @@ -54382,6 +56575,9 @@ func (j *JobCreatedEvent) MarshalJSON() ([]byte, error) { } func (j *JobCreatedEvent) String() string { + if j == nil { + return "" + } if len(j.rawJSON) > 0 { if value, err := internal.StringifyJSON(j.rawJSON); err == nil { return value @@ -54436,6 +56632,9 @@ func (j *JobCreatedEventData) GetObject() *JobCreatedEventObject { } func (j *JobCreatedEventData) GetExtraProperties() map[string]interface{} { + if j == nil { + return nil + } return j.extraProperties } @@ -54495,6 +56694,9 @@ func (j *JobCreatedEventData) MarshalJSON() ([]byte, error) { } func (j *JobCreatedEventData) String() string { + if j == nil { + return "" + } if len(j.rawJSON) > 0 { if value, err := internal.StringifyJSON(j.rawJSON); err == nil { return value @@ -54529,6 +56731,9 @@ func (j *JobCreatedEventObject) GetJob() *Job { } func (j *JobCreatedEventObject) GetExtraProperties() map[string]interface{} { + if j == nil { + return nil + } return j.extraProperties } @@ -54574,6 +56779,9 @@ func (j *JobCreatedEventObject) MarshalJSON() ([]byte, error) { } func (j *JobCreatedEventObject) String() string { + if j == nil { + return "" + } if len(j.rawJSON) > 0 { if value, err := internal.StringifyJSON(j.rawJSON); err == nil { return value @@ -54649,6 +56857,9 @@ func (j *JobUpdatedEvent) GetData() *JobUpdatedEventData { } func (j *JobUpdatedEvent) GetExtraProperties() map[string]interface{} { + if j == nil { + return nil + } return j.extraProperties } @@ -54722,6 +56933,9 @@ func (j *JobUpdatedEvent) MarshalJSON() ([]byte, error) { } func (j *JobUpdatedEvent) String() string { + if j == nil { + return "" + } if len(j.rawJSON) > 0 { if value, err := internal.StringifyJSON(j.rawJSON); err == nil { return value @@ -54776,6 +56990,9 @@ func (j *JobUpdatedEventData) GetObject() *JobUpdatedEventObject { } func (j *JobUpdatedEventData) GetExtraProperties() map[string]interface{} { + if j == nil { + return nil + } return j.extraProperties } @@ -54835,6 +57052,9 @@ func (j *JobUpdatedEventData) MarshalJSON() ([]byte, error) { } func (j *JobUpdatedEventData) String() string { + if j == nil { + return "" + } if len(j.rawJSON) > 0 { if value, err := internal.StringifyJSON(j.rawJSON); err == nil { return value @@ -54869,6 +57089,9 @@ func (j *JobUpdatedEventObject) GetJob() *Job { } func (j *JobUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if j == nil { + return nil + } return j.extraProperties } @@ -54914,6 +57137,9 @@ func (j *JobUpdatedEventObject) MarshalJSON() ([]byte, error) { } func (j *JobUpdatedEventObject) String() string { + if j == nil { + return "" + } if len(j.rawJSON) > 0 { if value, err := internal.StringifyJSON(j.rawJSON); err == nil { return value @@ -54999,6 +57225,9 @@ func (l *LaborScheduledShiftCreatedEvent) GetData() *LaborScheduledShiftCreatedE } func (l *LaborScheduledShiftCreatedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -55079,6 +57308,9 @@ func (l *LaborScheduledShiftCreatedEvent) MarshalJSON() ([]byte, error) { } func (l *LaborScheduledShiftCreatedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -55133,6 +57365,9 @@ func (l *LaborScheduledShiftCreatedEventData) GetObject() *LaborScheduledShiftCr } func (l *LaborScheduledShiftCreatedEventData) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -55192,6 +57427,9 @@ func (l *LaborScheduledShiftCreatedEventData) MarshalJSON() ([]byte, error) { } func (l *LaborScheduledShiftCreatedEventData) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -55226,6 +57464,9 @@ func (l *LaborScheduledShiftCreatedEventObject) GetScheduledShift() *ScheduledSh } func (l *LaborScheduledShiftCreatedEventObject) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -55271,6 +57512,9 @@ func (l *LaborScheduledShiftCreatedEventObject) MarshalJSON() ([]byte, error) { } func (l *LaborScheduledShiftCreatedEventObject) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -55356,6 +57600,9 @@ func (l *LaborScheduledShiftDeletedEvent) GetData() *LaborScheduledShiftDeletedE } func (l *LaborScheduledShiftDeletedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -55436,6 +57683,9 @@ func (l *LaborScheduledShiftDeletedEvent) MarshalJSON() ([]byte, error) { } func (l *LaborScheduledShiftDeletedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -55490,6 +57740,9 @@ func (l *LaborScheduledShiftDeletedEventData) GetDeleted() *bool { } func (l *LaborScheduledShiftDeletedEventData) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -55549,6 +57802,9 @@ func (l *LaborScheduledShiftDeletedEventData) MarshalJSON() ([]byte, error) { } func (l *LaborScheduledShiftDeletedEventData) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -55634,6 +57890,9 @@ func (l *LaborScheduledShiftPublishedEvent) GetData() *LaborScheduledShiftPublis } func (l *LaborScheduledShiftPublishedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -55714,6 +57973,9 @@ func (l *LaborScheduledShiftPublishedEvent) MarshalJSON() ([]byte, error) { } func (l *LaborScheduledShiftPublishedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -55768,6 +58030,9 @@ func (l *LaborScheduledShiftPublishedEventData) GetObject() *LaborScheduledShift } func (l *LaborScheduledShiftPublishedEventData) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -55827,6 +58092,9 @@ func (l *LaborScheduledShiftPublishedEventData) MarshalJSON() ([]byte, error) { } func (l *LaborScheduledShiftPublishedEventData) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -55861,6 +58129,9 @@ func (l *LaborScheduledShiftPublishedEventObject) GetScheduledShift() *Scheduled } func (l *LaborScheduledShiftPublishedEventObject) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -55906,6 +58177,9 @@ func (l *LaborScheduledShiftPublishedEventObject) MarshalJSON() ([]byte, error) } func (l *LaborScheduledShiftPublishedEventObject) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -55991,6 +58265,9 @@ func (l *LaborScheduledShiftUpdatedEvent) GetData() *LaborScheduledShiftUpdatedE } func (l *LaborScheduledShiftUpdatedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -56071,6 +58348,9 @@ func (l *LaborScheduledShiftUpdatedEvent) MarshalJSON() ([]byte, error) { } func (l *LaborScheduledShiftUpdatedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -56125,6 +58405,9 @@ func (l *LaborScheduledShiftUpdatedEventData) GetObject() *LaborScheduledShiftUp } func (l *LaborScheduledShiftUpdatedEventData) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -56184,6 +58467,9 @@ func (l *LaborScheduledShiftUpdatedEventData) MarshalJSON() ([]byte, error) { } func (l *LaborScheduledShiftUpdatedEventData) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -56218,6 +58504,9 @@ func (l *LaborScheduledShiftUpdatedEventObject) GetScheduledShift() *ScheduledSh } func (l *LaborScheduledShiftUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -56263,6 +58552,9 @@ func (l *LaborScheduledShiftUpdatedEventObject) MarshalJSON() ([]byte, error) { } func (l *LaborScheduledShiftUpdatedEventObject) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -56340,6 +58632,9 @@ func (l *LaborShiftCreatedEvent) GetData() *LaborShiftCreatedEventData { } func (l *LaborShiftCreatedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -56413,6 +58708,9 @@ func (l *LaborShiftCreatedEvent) MarshalJSON() ([]byte, error) { } func (l *LaborShiftCreatedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -56467,6 +58765,9 @@ func (l *LaborShiftCreatedEventData) GetObject() *LaborShiftCreatedEventObject { } func (l *LaborShiftCreatedEventData) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -56526,6 +58827,9 @@ func (l *LaborShiftCreatedEventData) MarshalJSON() ([]byte, error) { } func (l *LaborShiftCreatedEventData) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -56560,6 +58864,9 @@ func (l *LaborShiftCreatedEventObject) GetShift() *Shift { } func (l *LaborShiftCreatedEventObject) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -56605,6 +58912,9 @@ func (l *LaborShiftCreatedEventObject) MarshalJSON() ([]byte, error) { } func (l *LaborShiftCreatedEventObject) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -56682,6 +58992,9 @@ func (l *LaborShiftDeletedEvent) GetData() *LaborShiftDeletedEventData { } func (l *LaborShiftDeletedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -56755,6 +59068,9 @@ func (l *LaborShiftDeletedEvent) MarshalJSON() ([]byte, error) { } func (l *LaborShiftDeletedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -56809,6 +59125,9 @@ func (l *LaborShiftDeletedEventData) GetDeleted() *bool { } func (l *LaborShiftDeletedEventData) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -56868,6 +59187,9 @@ func (l *LaborShiftDeletedEventData) MarshalJSON() ([]byte, error) { } func (l *LaborShiftDeletedEventData) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -56945,6 +59267,9 @@ func (l *LaborShiftUpdatedEvent) GetData() *LaborShiftUpdatedEventData { } func (l *LaborShiftUpdatedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -57018,6 +59343,9 @@ func (l *LaborShiftUpdatedEvent) MarshalJSON() ([]byte, error) { } func (l *LaborShiftUpdatedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -57072,6 +59400,9 @@ func (l *LaborShiftUpdatedEventData) GetObject() *LaborShiftUpdatedEventObject { } func (l *LaborShiftUpdatedEventData) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -57131,6 +59462,9 @@ func (l *LaborShiftUpdatedEventData) MarshalJSON() ([]byte, error) { } func (l *LaborShiftUpdatedEventData) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -57165,6 +59499,9 @@ func (l *LaborShiftUpdatedEventObject) GetShift() *Shift { } func (l *LaborShiftUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -57210,6 +59547,9 @@ func (l *LaborShiftUpdatedEventObject) MarshalJSON() ([]byte, error) { } func (l *LaborShiftUpdatedEventObject) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -57285,6 +59625,9 @@ func (l *LaborTimecardCreatedEvent) GetData() *LaborTimecardCreatedEventData { } func (l *LaborTimecardCreatedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -57358,6 +59701,9 @@ func (l *LaborTimecardCreatedEvent) MarshalJSON() ([]byte, error) { } func (l *LaborTimecardCreatedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -57412,6 +59758,9 @@ func (l *LaborTimecardCreatedEventData) GetObject() *LaborTimecardCreatedEventOb } func (l *LaborTimecardCreatedEventData) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -57471,6 +59820,9 @@ func (l *LaborTimecardCreatedEventData) MarshalJSON() ([]byte, error) { } func (l *LaborTimecardCreatedEventData) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -57505,6 +59857,9 @@ func (l *LaborTimecardCreatedEventObject) GetTimecard() *Timecard { } func (l *LaborTimecardCreatedEventObject) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -57550,6 +59905,9 @@ func (l *LaborTimecardCreatedEventObject) MarshalJSON() ([]byte, error) { } func (l *LaborTimecardCreatedEventObject) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -57625,6 +59983,9 @@ func (l *LaborTimecardDeletedEvent) GetData() *LaborTimecardDeletedEventData { } func (l *LaborTimecardDeletedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -57698,6 +60059,9 @@ func (l *LaborTimecardDeletedEvent) MarshalJSON() ([]byte, error) { } func (l *LaborTimecardDeletedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -57752,6 +60116,9 @@ func (l *LaborTimecardDeletedEventData) GetDeleted() *bool { } func (l *LaborTimecardDeletedEventData) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -57811,6 +60178,9 @@ func (l *LaborTimecardDeletedEventData) MarshalJSON() ([]byte, error) { } func (l *LaborTimecardDeletedEventData) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -57886,6 +60256,9 @@ func (l *LaborTimecardUpdatedEvent) GetData() *LaborTimecardUpdatedEventData { } func (l *LaborTimecardUpdatedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -57959,6 +60332,9 @@ func (l *LaborTimecardUpdatedEvent) MarshalJSON() ([]byte, error) { } func (l *LaborTimecardUpdatedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -58013,6 +60389,9 @@ func (l *LaborTimecardUpdatedEventData) GetObject() *LaborTimecardUpdatedEventOb } func (l *LaborTimecardUpdatedEventData) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -58072,6 +60451,9 @@ func (l *LaborTimecardUpdatedEventData) MarshalJSON() ([]byte, error) { } func (l *LaborTimecardUpdatedEventData) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -58106,6 +60488,9 @@ func (l *LaborTimecardUpdatedEventObject) GetTimecard() *Timecard { } func (l *LaborTimecardUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -58151,6 +60536,9 @@ func (l *LaborTimecardUpdatedEventObject) MarshalJSON() ([]byte, error) { } func (l *LaborTimecardUpdatedEventObject) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -58211,6 +60599,9 @@ func (l *ListBookingCustomAttributeDefinitionsResponse) GetErrors() []*Error { } func (l *ListBookingCustomAttributeDefinitionsResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -58270,6 +60661,9 @@ func (l *ListBookingCustomAttributeDefinitionsResponse) MarshalJSON() ([]byte, e } func (l *ListBookingCustomAttributeDefinitionsResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -58332,6 +60726,9 @@ func (l *ListBookingCustomAttributesResponse) GetErrors() []*Error { } func (l *ListBookingCustomAttributesResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -58391,6 +60788,9 @@ func (l *ListBookingCustomAttributesResponse) MarshalJSON() ([]byte, error) { } func (l *ListBookingCustomAttributesResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -58449,6 +60849,9 @@ func (l *ListBreakTypesResponse) GetErrors() []*Error { } func (l *ListBreakTypesResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -58508,6 +60911,9 @@ func (l *ListBreakTypesResponse) MarshalJSON() ([]byte, error) { } func (l *ListBreakTypesResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -58564,6 +60970,9 @@ func (l *ListCashDrawerShiftEventsResponse) GetCashDrawerShiftEvents() []*CashDr } func (l *ListCashDrawerShiftEventsResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -58623,6 +61032,9 @@ func (l *ListCashDrawerShiftEventsResponse) MarshalJSON() ([]byte, error) { } func (l *ListCashDrawerShiftEventsResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -58679,6 +61091,9 @@ func (l *ListCashDrawerShiftsResponse) GetCashDrawerShifts() []*CashDrawerShiftS } func (l *ListCashDrawerShiftsResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -58738,6 +61153,9 @@ func (l *ListCashDrawerShiftsResponse) MarshalJSON() ([]byte, error) { } func (l *ListCashDrawerShiftsResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -58800,6 +61218,9 @@ func (l *ListCustomerCustomAttributeDefinitionsResponse) GetErrors() []*Error { } func (l *ListCustomerCustomAttributeDefinitionsResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -58859,6 +61280,9 @@ func (l *ListCustomerCustomAttributeDefinitionsResponse) MarshalJSON() ([]byte, } func (l *ListCustomerCustomAttributeDefinitionsResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -58921,6 +61345,9 @@ func (l *ListCustomerCustomAttributesResponse) GetErrors() []*Error { } func (l *ListCustomerCustomAttributesResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -58980,6 +61407,9 @@ func (l *ListCustomerCustomAttributesResponse) MarshalJSON() ([]byte, error) { } func (l *ListCustomerCustomAttributesResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -59042,6 +61472,9 @@ func (l *ListCustomerGroupsResponse) GetCursor() *string { } func (l *ListCustomerGroupsResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -59101,6 +61534,9 @@ func (l *ListCustomerGroupsResponse) MarshalJSON() ([]byte, error) { } func (l *ListCustomerGroupsResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -59162,6 +61598,9 @@ func (l *ListCustomerSegmentsResponse) GetCursor() *string { } func (l *ListCustomerSegmentsResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -59221,6 +61660,9 @@ func (l *ListCustomerSegmentsResponse) MarshalJSON() ([]byte, error) { } func (l *ListCustomerSegmentsResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -59279,6 +61721,9 @@ func (l *ListDeviceCodesResponse) GetCursor() *string { } func (l *ListDeviceCodesResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -59338,6 +61783,9 @@ func (l *ListDeviceCodesResponse) MarshalJSON() ([]byte, error) { } func (l *ListDeviceCodesResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -59394,6 +61842,9 @@ func (l *ListDisputeEvidenceResponse) GetCursor() *string { } func (l *ListDisputeEvidenceResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -59453,6 +61904,9 @@ func (l *ListDisputeEvidenceResponse) MarshalJSON() ([]byte, error) { } func (l *ListDisputeEvidenceResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -59510,6 +61964,9 @@ func (l *ListEmployeeWagesResponse) GetErrors() []*Error { } func (l *ListEmployeeWagesResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -59569,6 +62026,9 @@ func (l *ListEmployeeWagesResponse) MarshalJSON() ([]byte, error) { } func (l *ListEmployeeWagesResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -59628,6 +62088,9 @@ func (l *ListGiftCardActivitiesResponse) GetCursor() *string { } func (l *ListGiftCardActivitiesResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -59687,6 +62150,9 @@ func (l *ListGiftCardActivitiesResponse) MarshalJSON() ([]byte, error) { } func (l *ListGiftCardActivitiesResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -59741,6 +62207,9 @@ func (l *ListLocationBookingProfilesResponse) GetErrors() []*Error { } func (l *ListLocationBookingProfilesResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -59800,6 +62269,9 @@ func (l *ListLocationBookingProfilesResponse) MarshalJSON() ([]byte, error) { } func (l *ListLocationBookingProfilesResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -59860,6 +62332,9 @@ func (l *ListLocationCustomAttributeDefinitionsResponse) GetErrors() []*Error { } func (l *ListLocationCustomAttributeDefinitionsResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -59919,6 +62394,9 @@ func (l *ListLocationCustomAttributeDefinitionsResponse) MarshalJSON() ([]byte, } func (l *ListLocationCustomAttributeDefinitionsResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -59980,6 +62458,9 @@ func (l *ListLocationCustomAttributesResponse) GetErrors() []*Error { } func (l *ListLocationCustomAttributesResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -60039,6 +62520,9 @@ func (l *ListLocationCustomAttributesResponse) MarshalJSON() ([]byte, error) { } func (l *ListLocationCustomAttributesResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -60084,6 +62568,9 @@ func (l *ListLoyaltyProgramsResponse) GetPrograms() []*LoyaltyProgram { } func (l *ListLoyaltyProgramsResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -60136,6 +62623,9 @@ func (l *ListLoyaltyProgramsResponse) MarshalJSON() ([]byte, error) { } func (l *ListLoyaltyProgramsResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -60195,6 +62685,9 @@ func (l *ListLoyaltyPromotionsResponse) GetCursor() *string { } func (l *ListLoyaltyPromotionsResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -60254,6 +62747,9 @@ func (l *ListLoyaltyPromotionsResponse) MarshalJSON() ([]byte, error) { } func (l *ListLoyaltyPromotionsResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -60314,6 +62810,9 @@ func (l *ListMerchantCustomAttributeDefinitionsResponse) GetErrors() []*Error { } func (l *ListMerchantCustomAttributeDefinitionsResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -60373,6 +62872,9 @@ func (l *ListMerchantCustomAttributeDefinitionsResponse) MarshalJSON() ([]byte, } func (l *ListMerchantCustomAttributeDefinitionsResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -60434,6 +62936,9 @@ func (l *ListMerchantCustomAttributesResponse) GetErrors() []*Error { } func (l *ListMerchantCustomAttributesResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -60493,6 +62998,9 @@ func (l *ListMerchantCustomAttributesResponse) MarshalJSON() ([]byte, error) { } func (l *ListMerchantCustomAttributesResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -60550,6 +63058,9 @@ func (l *ListOrderCustomAttributeDefinitionsResponse) GetErrors() []*Error { } func (l *ListOrderCustomAttributeDefinitionsResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -60609,6 +63120,9 @@ func (l *ListOrderCustomAttributeDefinitionsResponse) MarshalJSON() ([]byte, err } func (l *ListOrderCustomAttributeDefinitionsResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -60666,6 +63180,9 @@ func (l *ListOrderCustomAttributesResponse) GetErrors() []*Error { } func (l *ListOrderCustomAttributesResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -60725,6 +63242,9 @@ func (l *ListOrderCustomAttributesResponse) MarshalJSON() ([]byte, error) { } func (l *ListOrderCustomAttributesResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -60782,6 +63302,9 @@ func (l *ListPaymentLinksResponse) GetCursor() *string { } func (l *ListPaymentLinksResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -60841,6 +63364,9 @@ func (l *ListPaymentLinksResponse) MarshalJSON() ([]byte, error) { } func (l *ListPaymentLinksResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -60897,6 +63423,9 @@ func (l *ListTeamMemberBookingProfilesResponse) GetErrors() []*Error { } func (l *ListTeamMemberBookingProfilesResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -60956,6 +63485,9 @@ func (l *ListTeamMemberBookingProfilesResponse) MarshalJSON() ([]byte, error) { } func (l *ListTeamMemberBookingProfilesResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -61013,6 +63545,9 @@ func (l *ListTeamMemberWagesResponse) GetErrors() []*Error { } func (l *ListTeamMemberWagesResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -61072,6 +63607,9 @@ func (l *ListTeamMemberWagesResponse) MarshalJSON() ([]byte, error) { } func (l *ListTeamMemberWagesResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -61134,6 +63672,9 @@ func (l *ListTransactionsResponse) GetCursor() *string { } func (l *ListTransactionsResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -61193,6 +63734,9 @@ func (l *ListTransactionsResponse) MarshalJSON() ([]byte, error) { } func (l *ListTransactionsResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -61252,6 +63796,9 @@ func (l *ListWebhookEventTypesResponse) GetMetadata() []*EventTypeMetadata { } func (l *ListWebhookEventTypesResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -61311,6 +63858,9 @@ func (l *ListWebhookEventTypesResponse) MarshalJSON() ([]byte, error) { } func (l *ListWebhookEventTypesResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -61373,6 +63923,9 @@ func (l *ListWebhookSubscriptionsResponse) GetCursor() *string { } func (l *ListWebhookSubscriptionsResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -61432,6 +63985,9 @@ func (l *ListWebhookSubscriptionsResponse) MarshalJSON() ([]byte, error) { } func (l *ListWebhookSubscriptionsResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -61490,6 +64046,9 @@ func (l *ListWorkweekConfigsResponse) GetErrors() []*Error { } func (l *ListWorkweekConfigsResponse) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -61549,6 +64108,9 @@ func (l *ListWorkweekConfigsResponse) MarshalJSON() ([]byte, error) { } func (l *ListWorkweekConfigsResponse) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -61604,6 +64166,9 @@ func (l *LocationBookingProfile) GetOnlineBookingEnabled() *bool { } func (l *LocationBookingProfile) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -61663,6 +64228,9 @@ func (l *LocationBookingProfile) MarshalJSON() ([]byte, error) { } func (l *LocationBookingProfile) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -61748,6 +64316,9 @@ func (l *LocationCreatedEvent) GetData() *LocationCreatedEventData { } func (l *LocationCreatedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -61828,6 +64399,9 @@ func (l *LocationCreatedEvent) MarshalJSON() ([]byte, error) { } func (l *LocationCreatedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -61872,6 +64446,9 @@ func (l *LocationCreatedEventData) GetID() *string { } func (l *LocationCreatedEventData) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -61924,6 +64501,9 @@ func (l *LocationCreatedEventData) MarshalJSON() ([]byte, error) { } func (l *LocationCreatedEventData) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -62000,6 +64580,9 @@ func (l *LocationCustomAttributeDefinitionOwnedCreatedEvent) GetData() *CustomAt } func (l *LocationCustomAttributeDefinitionOwnedCreatedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -62073,6 +64656,9 @@ func (l *LocationCustomAttributeDefinitionOwnedCreatedEvent) MarshalJSON() ([]by } func (l *LocationCustomAttributeDefinitionOwnedCreatedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -62150,6 +64736,9 @@ func (l *LocationCustomAttributeDefinitionOwnedDeletedEvent) GetData() *CustomAt } func (l *LocationCustomAttributeDefinitionOwnedDeletedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -62223,6 +64812,9 @@ func (l *LocationCustomAttributeDefinitionOwnedDeletedEvent) MarshalJSON() ([]by } func (l *LocationCustomAttributeDefinitionOwnedDeletedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -62300,6 +64892,9 @@ func (l *LocationCustomAttributeDefinitionOwnedUpdatedEvent) GetData() *CustomAt } func (l *LocationCustomAttributeDefinitionOwnedUpdatedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -62373,6 +64968,9 @@ func (l *LocationCustomAttributeDefinitionOwnedUpdatedEvent) MarshalJSON() ([]by } func (l *LocationCustomAttributeDefinitionOwnedUpdatedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -62451,6 +65049,9 @@ func (l *LocationCustomAttributeDefinitionVisibleCreatedEvent) GetData() *Custom } func (l *LocationCustomAttributeDefinitionVisibleCreatedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -62524,6 +65125,9 @@ func (l *LocationCustomAttributeDefinitionVisibleCreatedEvent) MarshalJSON() ([] } func (l *LocationCustomAttributeDefinitionVisibleCreatedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -62603,6 +65207,9 @@ func (l *LocationCustomAttributeDefinitionVisibleDeletedEvent) GetData() *Custom } func (l *LocationCustomAttributeDefinitionVisibleDeletedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -62676,6 +65283,9 @@ func (l *LocationCustomAttributeDefinitionVisibleDeletedEvent) MarshalJSON() ([] } func (l *LocationCustomAttributeDefinitionVisibleDeletedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -62755,6 +65365,9 @@ func (l *LocationCustomAttributeDefinitionVisibleUpdatedEvent) GetData() *Custom } func (l *LocationCustomAttributeDefinitionVisibleUpdatedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -62828,6 +65441,9 @@ func (l *LocationCustomAttributeDefinitionVisibleUpdatedEvent) MarshalJSON() ([] } func (l *LocationCustomAttributeDefinitionVisibleUpdatedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -62906,6 +65522,9 @@ func (l *LocationCustomAttributeOwnedDeletedEvent) GetData() *CustomAttributeEve } func (l *LocationCustomAttributeOwnedDeletedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -62979,6 +65598,9 @@ func (l *LocationCustomAttributeOwnedDeletedEvent) MarshalJSON() ([]byte, error) } func (l *LocationCustomAttributeOwnedDeletedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -63057,6 +65679,9 @@ func (l *LocationCustomAttributeOwnedUpdatedEvent) GetData() *CustomAttributeEve } func (l *LocationCustomAttributeOwnedUpdatedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -63130,6 +65755,9 @@ func (l *LocationCustomAttributeOwnedUpdatedEvent) MarshalJSON() ([]byte, error) } func (l *LocationCustomAttributeOwnedUpdatedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -63213,6 +65841,9 @@ func (l *LocationCustomAttributeVisibleDeletedEvent) GetData() *CustomAttributeE } func (l *LocationCustomAttributeVisibleDeletedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -63286,6 +65917,9 @@ func (l *LocationCustomAttributeVisibleDeletedEvent) MarshalJSON() ([]byte, erro } func (l *LocationCustomAttributeVisibleDeletedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -63369,6 +66003,9 @@ func (l *LocationCustomAttributeVisibleUpdatedEvent) GetData() *CustomAttributeE } func (l *LocationCustomAttributeVisibleUpdatedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -63442,6 +66079,9 @@ func (l *LocationCustomAttributeVisibleUpdatedEvent) MarshalJSON() ([]byte, erro } func (l *LocationCustomAttributeVisibleUpdatedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -63517,6 +66157,9 @@ func (l *LocationSettingsUpdatedEvent) GetData() *LocationSettingsUpdatedEventDa } func (l *LocationSettingsUpdatedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -63590,6 +66233,9 @@ func (l *LocationSettingsUpdatedEvent) MarshalJSON() ([]byte, error) { } func (l *LocationSettingsUpdatedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -63644,6 +66290,9 @@ func (l *LocationSettingsUpdatedEventData) GetObject() *LocationSettingsUpdatedE } func (l *LocationSettingsUpdatedEventData) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -63703,6 +66352,9 @@ func (l *LocationSettingsUpdatedEventData) MarshalJSON() ([]byte, error) { } func (l *LocationSettingsUpdatedEventData) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -63737,6 +66389,9 @@ func (l *LocationSettingsUpdatedEventObject) GetLocationSettings() *CheckoutLoca } func (l *LocationSettingsUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -63782,6 +66437,9 @@ func (l *LocationSettingsUpdatedEventObject) MarshalJSON() ([]byte, error) { } func (l *LocationSettingsUpdatedEventObject) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -63867,6 +66525,9 @@ func (l *LocationUpdatedEvent) GetData() *LocationUpdatedEventData { } func (l *LocationUpdatedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -63947,6 +66608,9 @@ func (l *LocationUpdatedEvent) MarshalJSON() ([]byte, error) { } func (l *LocationUpdatedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -63991,6 +66655,9 @@ func (l *LocationUpdatedEventData) GetID() *string { } func (l *LocationUpdatedEventData) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -64043,6 +66710,9 @@ func (l *LocationUpdatedEventData) MarshalJSON() ([]byte, error) { } func (l *LocationUpdatedEventData) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -64184,6 +66854,9 @@ func (l *LoyaltyAccount) GetExpiringPointDeadlines() []*LoyaltyAccountExpiringPo } func (l *LoyaltyAccount) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -64292,6 +66965,9 @@ func (l *LoyaltyAccount) MarshalJSON() ([]byte, error) { } func (l *LoyaltyAccount) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -64368,6 +67044,9 @@ func (l *LoyaltyAccountCreatedEvent) GetData() *LoyaltyAccountCreatedEventData { } func (l *LoyaltyAccountCreatedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -64441,6 +67120,9 @@ func (l *LoyaltyAccountCreatedEvent) MarshalJSON() ([]byte, error) { } func (l *LoyaltyAccountCreatedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -64496,6 +67178,9 @@ func (l *LoyaltyAccountCreatedEventData) GetObject() *LoyaltyAccountCreatedEvent } func (l *LoyaltyAccountCreatedEventData) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -64555,6 +67240,9 @@ func (l *LoyaltyAccountCreatedEventData) MarshalJSON() ([]byte, error) { } func (l *LoyaltyAccountCreatedEventData) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -64589,6 +67277,9 @@ func (l *LoyaltyAccountCreatedEventObject) GetLoyaltyAccount() *LoyaltyAccount { } func (l *LoyaltyAccountCreatedEventObject) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -64634,6 +67325,9 @@ func (l *LoyaltyAccountCreatedEventObject) MarshalJSON() ([]byte, error) { } func (l *LoyaltyAccountCreatedEventObject) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -64710,6 +67404,9 @@ func (l *LoyaltyAccountDeletedEvent) GetData() *LoyaltyAccountDeletedEventData { } func (l *LoyaltyAccountDeletedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -64783,6 +67480,9 @@ func (l *LoyaltyAccountDeletedEvent) MarshalJSON() ([]byte, error) { } func (l *LoyaltyAccountDeletedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -64838,6 +67538,9 @@ func (l *LoyaltyAccountDeletedEventData) GetObject() *LoyaltyAccountDeletedEvent } func (l *LoyaltyAccountDeletedEventData) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -64897,6 +67600,9 @@ func (l *LoyaltyAccountDeletedEventData) MarshalJSON() ([]byte, error) { } func (l *LoyaltyAccountDeletedEventData) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -64931,6 +67637,9 @@ func (l *LoyaltyAccountDeletedEventObject) GetLoyaltyAccount() *LoyaltyAccount { } func (l *LoyaltyAccountDeletedEventObject) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -64976,6 +67685,9 @@ func (l *LoyaltyAccountDeletedEventObject) MarshalJSON() ([]byte, error) { } func (l *LoyaltyAccountDeletedEventObject) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -65021,6 +67733,9 @@ func (l *LoyaltyAccountExpiringPointDeadline) GetExpiresAt() string { } func (l *LoyaltyAccountExpiringPointDeadline) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -65073,6 +67788,9 @@ func (l *LoyaltyAccountExpiringPointDeadline) MarshalJSON() ([]byte, error) { } func (l *LoyaltyAccountExpiringPointDeadline) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -65131,6 +67849,9 @@ func (l *LoyaltyAccountMapping) GetPhoneNumber() *string { } func (l *LoyaltyAccountMapping) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -65190,6 +67911,9 @@ func (l *LoyaltyAccountMapping) MarshalJSON() ([]byte, error) { } func (l *LoyaltyAccountMapping) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -65269,6 +67993,9 @@ func (l *LoyaltyAccountUpdatedEvent) GetData() *LoyaltyAccountUpdatedEventData { } func (l *LoyaltyAccountUpdatedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -65342,6 +68069,9 @@ func (l *LoyaltyAccountUpdatedEvent) MarshalJSON() ([]byte, error) { } func (l *LoyaltyAccountUpdatedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -65397,6 +68127,9 @@ func (l *LoyaltyAccountUpdatedEventData) GetObject() *LoyaltyAccountUpdatedEvent } func (l *LoyaltyAccountUpdatedEventData) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -65456,6 +68189,9 @@ func (l *LoyaltyAccountUpdatedEventData) MarshalJSON() ([]byte, error) { } func (l *LoyaltyAccountUpdatedEventData) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -65490,6 +68226,9 @@ func (l *LoyaltyAccountUpdatedEventObject) GetLoyaltyAccount() *LoyaltyAccount { } func (l *LoyaltyAccountUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -65535,6 +68274,9 @@ func (l *LoyaltyAccountUpdatedEventObject) MarshalJSON() ([]byte, error) { } func (l *LoyaltyAccountUpdatedEventObject) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -65703,6 +68445,9 @@ func (l *LoyaltyEvent) GetAccumulatePromotionPoints() *LoyaltyEventAccumulatePro } func (l *LoyaltyEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -65839,6 +68584,9 @@ func (l *LoyaltyEvent) MarshalJSON() ([]byte, error) { } func (l *LoyaltyEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -65895,6 +68643,9 @@ func (l *LoyaltyEventAccumulatePoints) GetOrderID() *string { } func (l *LoyaltyEventAccumulatePoints) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -65954,6 +68705,9 @@ func (l *LoyaltyEventAccumulatePoints) MarshalJSON() ([]byte, error) { } func (l *LoyaltyEventAccumulatePoints) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -66020,6 +68774,9 @@ func (l *LoyaltyEventAccumulatePromotionPoints) GetOrderID() *string { } func (l *LoyaltyEventAccumulatePromotionPoints) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -66086,6 +68843,9 @@ func (l *LoyaltyEventAccumulatePromotionPoints) MarshalJSON() ([]byte, error) { } func (l *LoyaltyEventAccumulatePromotionPoints) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -66141,6 +68901,9 @@ func (l *LoyaltyEventAdjustPoints) GetReason() *string { } func (l *LoyaltyEventAdjustPoints) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -66200,6 +68963,9 @@ func (l *LoyaltyEventAdjustPoints) MarshalJSON() ([]byte, error) { } func (l *LoyaltyEventAdjustPoints) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -66256,6 +69022,9 @@ func (l *LoyaltyEventCreateReward) GetPoints() *int { } func (l *LoyaltyEventCreateReward) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -66315,6 +69084,9 @@ func (l *LoyaltyEventCreateReward) MarshalJSON() ([]byte, error) { } func (l *LoyaltyEventCreateReward) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -66391,6 +69163,9 @@ func (l *LoyaltyEventCreatedEvent) GetData() *LoyaltyEventCreatedEventData { } func (l *LoyaltyEventCreatedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -66464,6 +69239,9 @@ func (l *LoyaltyEventCreatedEvent) MarshalJSON() ([]byte, error) { } func (l *LoyaltyEventCreatedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -66519,6 +69297,9 @@ func (l *LoyaltyEventCreatedEventData) GetObject() *LoyaltyEventCreatedEventObje } func (l *LoyaltyEventCreatedEventData) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -66578,6 +69359,9 @@ func (l *LoyaltyEventCreatedEventData) MarshalJSON() ([]byte, error) { } func (l *LoyaltyEventCreatedEventData) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -66612,6 +69396,9 @@ func (l *LoyaltyEventCreatedEventObject) GetLoyaltyEvent() *LoyaltyEvent { } func (l *LoyaltyEventCreatedEventObject) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -66657,6 +69444,9 @@ func (l *LoyaltyEventCreatedEventObject) MarshalJSON() ([]byte, error) { } func (l *LoyaltyEventCreatedEventObject) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -66713,6 +69503,9 @@ func (l *LoyaltyEventDeleteReward) GetPoints() *int { } func (l *LoyaltyEventDeleteReward) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -66772,6 +69565,9 @@ func (l *LoyaltyEventDeleteReward) MarshalJSON() ([]byte, error) { } func (l *LoyaltyEventDeleteReward) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -66817,6 +69613,9 @@ func (l *LoyaltyEventExpirePoints) GetPoints() int { } func (l *LoyaltyEventExpirePoints) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -66869,6 +69668,9 @@ func (l *LoyaltyEventExpirePoints) MarshalJSON() ([]byte, error) { } func (l *LoyaltyEventExpirePoints) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -66914,6 +69716,9 @@ func (l *LoyaltyEventOther) GetPoints() int { } func (l *LoyaltyEventOther) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -66966,6 +69771,9 @@ func (l *LoyaltyEventOther) MarshalJSON() ([]byte, error) { } func (l *LoyaltyEventOther) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -67023,6 +69831,9 @@ func (l *LoyaltyEventRedeemReward) GetOrderID() *string { } func (l *LoyaltyEventRedeemReward) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -67082,6 +69893,9 @@ func (l *LoyaltyEventRedeemReward) MarshalJSON() ([]byte, error) { } func (l *LoyaltyEventRedeemReward) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -67267,6 +70081,9 @@ func (l *LoyaltyProgram) GetAccrualRules() []*LoyaltyProgramAccrualRule { } func (l *LoyaltyProgram) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -67368,6 +70185,9 @@ func (l *LoyaltyProgram) MarshalJSON() ([]byte, error) { } func (l *LoyaltyProgram) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -67455,6 +70275,9 @@ func (l *LoyaltyProgramAccrualRule) GetCategoryData() *LoyaltyProgramAccrualRule } func (l *LoyaltyProgramAccrualRule) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -67535,6 +70358,9 @@ func (l *LoyaltyProgramAccrualRule) MarshalJSON() ([]byte, error) { } func (l *LoyaltyProgramAccrualRule) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -67571,6 +70397,9 @@ func (l *LoyaltyProgramAccrualRuleCategoryData) GetCategoryID() string { } func (l *LoyaltyProgramAccrualRuleCategoryData) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -67616,6 +70445,9 @@ func (l *LoyaltyProgramAccrualRuleCategoryData) MarshalJSON() ([]byte, error) { } func (l *LoyaltyProgramAccrualRuleCategoryData) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -67652,6 +70484,9 @@ func (l *LoyaltyProgramAccrualRuleItemVariationData) GetItemVariationID() string } func (l *LoyaltyProgramAccrualRuleItemVariationData) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -67697,6 +70532,9 @@ func (l *LoyaltyProgramAccrualRuleItemVariationData) MarshalJSON() ([]byte, erro } func (l *LoyaltyProgramAccrualRuleItemVariationData) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -67770,6 +70608,9 @@ func (l *LoyaltyProgramAccrualRuleSpendData) GetTaxMode() LoyaltyProgramAccrualR } func (l *LoyaltyProgramAccrualRuleSpendData) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -67836,6 +70677,9 @@ func (l *LoyaltyProgramAccrualRuleSpendData) MarshalJSON() ([]byte, error) { } func (l *LoyaltyProgramAccrualRuleSpendData) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -67936,6 +70780,9 @@ func (l *LoyaltyProgramAccrualRuleVisitData) GetTaxMode() LoyaltyProgramAccrualR } func (l *LoyaltyProgramAccrualRuleVisitData) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -67988,6 +70835,9 @@ func (l *LoyaltyProgramAccrualRuleVisitData) MarshalJSON() ([]byte, error) { } func (l *LoyaltyProgramAccrualRuleVisitData) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -68064,6 +70914,9 @@ func (l *LoyaltyProgramCreatedEvent) GetData() *LoyaltyProgramCreatedEventData { } func (l *LoyaltyProgramCreatedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -68137,6 +70990,9 @@ func (l *LoyaltyProgramCreatedEvent) MarshalJSON() ([]byte, error) { } func (l *LoyaltyProgramCreatedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -68192,6 +71048,9 @@ func (l *LoyaltyProgramCreatedEventData) GetObject() *LoyaltyProgramCreatedEvent } func (l *LoyaltyProgramCreatedEventData) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -68251,6 +71110,9 @@ func (l *LoyaltyProgramCreatedEventData) MarshalJSON() ([]byte, error) { } func (l *LoyaltyProgramCreatedEventData) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -68286,6 +71148,9 @@ func (l *LoyaltyProgramCreatedEventObject) GetLoyaltyProgram() *LoyaltyProgram { } func (l *LoyaltyProgramCreatedEventObject) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -68331,6 +71196,9 @@ func (l *LoyaltyProgramCreatedEventObject) MarshalJSON() ([]byte, error) { } func (l *LoyaltyProgramCreatedEventObject) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -68367,6 +71235,9 @@ func (l *LoyaltyProgramExpirationPolicy) GetExpirationDuration() string { } func (l *LoyaltyProgramExpirationPolicy) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -68412,6 +71283,9 @@ func (l *LoyaltyProgramExpirationPolicy) MarshalJSON() ([]byte, error) { } func (l *LoyaltyProgramExpirationPolicy) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -68491,6 +71365,9 @@ func (l *LoyaltyProgramRewardTier) GetPricingRuleReference() *CatalogObjectRefer } func (l *LoyaltyProgramRewardTier) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -68564,6 +71441,9 @@ func (l *LoyaltyProgramRewardTier) MarshalJSON() ([]byte, error) { } func (l *LoyaltyProgramRewardTier) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -68632,6 +71512,9 @@ func (l *LoyaltyProgramTerminology) GetOther() string { } func (l *LoyaltyProgramTerminology) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -68684,6 +71567,9 @@ func (l *LoyaltyProgramTerminology) MarshalJSON() ([]byte, error) { } func (l *LoyaltyProgramTerminology) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -68760,6 +71646,9 @@ func (l *LoyaltyProgramUpdatedEvent) GetData() *LoyaltyProgramUpdatedEventData { } func (l *LoyaltyProgramUpdatedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -68833,6 +71722,9 @@ func (l *LoyaltyProgramUpdatedEvent) MarshalJSON() ([]byte, error) { } func (l *LoyaltyProgramUpdatedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -68888,6 +71780,9 @@ func (l *LoyaltyProgramUpdatedEventData) GetObject() *LoyaltyProgramUpdatedEvent } func (l *LoyaltyProgramUpdatedEventData) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -68947,6 +71842,9 @@ func (l *LoyaltyProgramUpdatedEventData) MarshalJSON() ([]byte, error) { } func (l *LoyaltyProgramUpdatedEventData) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -68982,6 +71880,9 @@ func (l *LoyaltyProgramUpdatedEventObject) GetLoyaltyProgram() *LoyaltyProgram { } func (l *LoyaltyProgramUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -69027,6 +71928,9 @@ func (l *LoyaltyProgramUpdatedEventObject) MarshalJSON() ([]byte, error) { } func (l *LoyaltyProgramUpdatedEventObject) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -69200,6 +72104,9 @@ func (l *LoyaltyPromotion) GetQualifyingCategoryIDs() []string { } func (l *LoyaltyPromotion) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -69329,6 +72236,9 @@ func (l *LoyaltyPromotion) MarshalJSON() ([]byte, error) { } func (l *LoyaltyPromotion) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -69398,6 +72308,9 @@ func (l *LoyaltyPromotionAvailableTimeData) GetTimePeriods() []string { } func (l *LoyaltyPromotionAvailableTimeData) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -69457,6 +72370,9 @@ func (l *LoyaltyPromotionAvailableTimeData) MarshalJSON() ([]byte, error) { } func (l *LoyaltyPromotionAvailableTimeData) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -69533,6 +72449,9 @@ func (l *LoyaltyPromotionCreatedEvent) GetData() *LoyaltyPromotionCreatedEventDa } func (l *LoyaltyPromotionCreatedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -69606,6 +72525,9 @@ func (l *LoyaltyPromotionCreatedEvent) MarshalJSON() ([]byte, error) { } func (l *LoyaltyPromotionCreatedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -69661,6 +72583,9 @@ func (l *LoyaltyPromotionCreatedEventData) GetObject() *LoyaltyPromotionCreatedE } func (l *LoyaltyPromotionCreatedEventData) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -69720,6 +72645,9 @@ func (l *LoyaltyPromotionCreatedEventData) MarshalJSON() ([]byte, error) { } func (l *LoyaltyPromotionCreatedEventData) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -69755,6 +72683,9 @@ func (l *LoyaltyPromotionCreatedEventObject) GetLoyaltyPromotion() *LoyaltyPromo } func (l *LoyaltyPromotionCreatedEventObject) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -69800,6 +72731,9 @@ func (l *LoyaltyPromotionCreatedEventObject) MarshalJSON() ([]byte, error) { } func (l *LoyaltyPromotionCreatedEventObject) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -69858,6 +72792,9 @@ func (l *LoyaltyPromotionIncentive) GetPointsAdditionData() *LoyaltyPromotionInc } func (l *LoyaltyPromotionIncentive) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -69917,6 +72854,9 @@ func (l *LoyaltyPromotionIncentive) MarshalJSON() ([]byte, error) { } func (l *LoyaltyPromotionIncentive) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -69955,6 +72895,9 @@ func (l *LoyaltyPromotionIncentivePointsAdditionData) GetPointsAddition() int { } func (l *LoyaltyPromotionIncentivePointsAdditionData) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -70000,6 +72943,9 @@ func (l *LoyaltyPromotionIncentivePointsAdditionData) MarshalJSON() ([]byte, err } func (l *LoyaltyPromotionIncentivePointsAdditionData) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -70065,6 +73011,9 @@ func (l *LoyaltyPromotionIncentivePointsMultiplierData) GetMultiplier() *string } func (l *LoyaltyPromotionIncentivePointsMultiplierData) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -70117,6 +73066,9 @@ func (l *LoyaltyPromotionIncentivePointsMultiplierData) MarshalJSON() ([]byte, e } func (l *LoyaltyPromotionIncentivePointsMultiplierData) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -70220,6 +73172,9 @@ func (l *LoyaltyPromotionTriggerLimit) GetInterval() *LoyaltyPromotionTriggerLim } func (l *LoyaltyPromotionTriggerLimit) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -70272,6 +73227,9 @@ func (l *LoyaltyPromotionTriggerLimit) MarshalJSON() ([]byte, error) { } func (l *LoyaltyPromotionTriggerLimit) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -70373,6 +73331,9 @@ func (l *LoyaltyPromotionUpdatedEvent) GetData() *LoyaltyPromotionUpdatedEventDa } func (l *LoyaltyPromotionUpdatedEvent) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -70446,6 +73407,9 @@ func (l *LoyaltyPromotionUpdatedEvent) MarshalJSON() ([]byte, error) { } func (l *LoyaltyPromotionUpdatedEvent) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -70501,6 +73465,9 @@ func (l *LoyaltyPromotionUpdatedEventData) GetObject() *LoyaltyPromotionUpdatedE } func (l *LoyaltyPromotionUpdatedEventData) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -70560,6 +73527,9 @@ func (l *LoyaltyPromotionUpdatedEventData) MarshalJSON() ([]byte, error) { } func (l *LoyaltyPromotionUpdatedEventData) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -70595,6 +73565,9 @@ func (l *LoyaltyPromotionUpdatedEventObject) GetLoyaltyPromotion() *LoyaltyPromo } func (l *LoyaltyPromotionUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -70640,6 +73613,9 @@ func (l *LoyaltyPromotionUpdatedEventObject) MarshalJSON() ([]byte, error) { } func (l *LoyaltyPromotionUpdatedEventObject) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -70757,6 +73733,9 @@ func (l *LoyaltyReward) GetRedeemedAt() *string { } func (l *LoyaltyReward) GetExtraProperties() map[string]interface{} { + if l == nil { + return nil + } return l.extraProperties } @@ -70858,6 +73837,9 @@ func (l *LoyaltyReward) MarshalJSON() ([]byte, error) { } func (l *LoyaltyReward) String() string { + if l == nil { + return "" + } if len(l.rawJSON) > 0 { if value, err := internal.StringifyJSON(l.rawJSON); err == nil { return value @@ -70992,6 +73974,9 @@ func (m *MeasurementUnit) GetType() *MeasurementUnitUnitType { } func (m *MeasurementUnit) GetExtraProperties() map[string]interface{} { + if m == nil { + return nil + } return m.extraProperties } @@ -71086,6 +74071,9 @@ func (m *MeasurementUnit) MarshalJSON() ([]byte, error) { } func (m *MeasurementUnit) String() string { + if m == nil { + return "" + } if len(m.rawJSON) > 0 { if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value @@ -71173,6 +74161,9 @@ func (m *MeasurementUnitCustom) GetAbbreviation() string { } func (m *MeasurementUnitCustom) GetExtraProperties() map[string]interface{} { + if m == nil { + return nil + } return m.extraProperties } @@ -71225,6 +74216,9 @@ func (m *MeasurementUnitCustom) MarshalJSON() ([]byte, error) { } func (m *MeasurementUnitCustom) String() string { + if m == nil { + return "" + } if len(m.rawJSON) > 0 { if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value @@ -71497,6 +74491,9 @@ func (m *MerchantCustomAttributeDefinitionOwnedCreatedEvent) GetData() *CustomAt } func (m *MerchantCustomAttributeDefinitionOwnedCreatedEvent) GetExtraProperties() map[string]interface{} { + if m == nil { + return nil + } return m.extraProperties } @@ -71570,6 +74567,9 @@ func (m *MerchantCustomAttributeDefinitionOwnedCreatedEvent) MarshalJSON() ([]by } func (m *MerchantCustomAttributeDefinitionOwnedCreatedEvent) String() string { + if m == nil { + return "" + } if len(m.rawJSON) > 0 { if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value @@ -71647,6 +74647,9 @@ func (m *MerchantCustomAttributeDefinitionOwnedDeletedEvent) GetData() *CustomAt } func (m *MerchantCustomAttributeDefinitionOwnedDeletedEvent) GetExtraProperties() map[string]interface{} { + if m == nil { + return nil + } return m.extraProperties } @@ -71720,6 +74723,9 @@ func (m *MerchantCustomAttributeDefinitionOwnedDeletedEvent) MarshalJSON() ([]by } func (m *MerchantCustomAttributeDefinitionOwnedDeletedEvent) String() string { + if m == nil { + return "" + } if len(m.rawJSON) > 0 { if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value @@ -71797,6 +74803,9 @@ func (m *MerchantCustomAttributeDefinitionOwnedUpdatedEvent) GetData() *CustomAt } func (m *MerchantCustomAttributeDefinitionOwnedUpdatedEvent) GetExtraProperties() map[string]interface{} { + if m == nil { + return nil + } return m.extraProperties } @@ -71870,6 +74879,9 @@ func (m *MerchantCustomAttributeDefinitionOwnedUpdatedEvent) MarshalJSON() ([]by } func (m *MerchantCustomAttributeDefinitionOwnedUpdatedEvent) String() string { + if m == nil { + return "" + } if len(m.rawJSON) > 0 { if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value @@ -71948,6 +74960,9 @@ func (m *MerchantCustomAttributeDefinitionVisibleCreatedEvent) GetData() *Custom } func (m *MerchantCustomAttributeDefinitionVisibleCreatedEvent) GetExtraProperties() map[string]interface{} { + if m == nil { + return nil + } return m.extraProperties } @@ -72021,6 +75036,9 @@ func (m *MerchantCustomAttributeDefinitionVisibleCreatedEvent) MarshalJSON() ([] } func (m *MerchantCustomAttributeDefinitionVisibleCreatedEvent) String() string { + if m == nil { + return "" + } if len(m.rawJSON) > 0 { if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value @@ -72099,6 +75117,9 @@ func (m *MerchantCustomAttributeDefinitionVisibleDeletedEvent) GetData() *Custom } func (m *MerchantCustomAttributeDefinitionVisibleDeletedEvent) GetExtraProperties() map[string]interface{} { + if m == nil { + return nil + } return m.extraProperties } @@ -72172,6 +75193,9 @@ func (m *MerchantCustomAttributeDefinitionVisibleDeletedEvent) MarshalJSON() ([] } func (m *MerchantCustomAttributeDefinitionVisibleDeletedEvent) String() string { + if m == nil { + return "" + } if len(m.rawJSON) > 0 { if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value @@ -72250,6 +75274,9 @@ func (m *MerchantCustomAttributeDefinitionVisibleUpdatedEvent) GetData() *Custom } func (m *MerchantCustomAttributeDefinitionVisibleUpdatedEvent) GetExtraProperties() map[string]interface{} { + if m == nil { + return nil + } return m.extraProperties } @@ -72323,6 +75350,9 @@ func (m *MerchantCustomAttributeDefinitionVisibleUpdatedEvent) MarshalJSON() ([] } func (m *MerchantCustomAttributeDefinitionVisibleUpdatedEvent) String() string { + if m == nil { + return "" + } if len(m.rawJSON) > 0 { if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value @@ -72401,6 +75431,9 @@ func (m *MerchantCustomAttributeOwnedDeletedEvent) GetData() *CustomAttributeEve } func (m *MerchantCustomAttributeOwnedDeletedEvent) GetExtraProperties() map[string]interface{} { + if m == nil { + return nil + } return m.extraProperties } @@ -72474,6 +75507,9 @@ func (m *MerchantCustomAttributeOwnedDeletedEvent) MarshalJSON() ([]byte, error) } func (m *MerchantCustomAttributeOwnedDeletedEvent) String() string { + if m == nil { + return "" + } if len(m.rawJSON) > 0 { if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value @@ -72552,6 +75588,9 @@ func (m *MerchantCustomAttributeOwnedUpdatedEvent) GetData() *CustomAttributeEve } func (m *MerchantCustomAttributeOwnedUpdatedEvent) GetExtraProperties() map[string]interface{} { + if m == nil { + return nil + } return m.extraProperties } @@ -72625,6 +75664,9 @@ func (m *MerchantCustomAttributeOwnedUpdatedEvent) MarshalJSON() ([]byte, error) } func (m *MerchantCustomAttributeOwnedUpdatedEvent) String() string { + if m == nil { + return "" + } if len(m.rawJSON) > 0 { if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value @@ -72703,6 +75745,9 @@ func (m *MerchantCustomAttributeVisibleDeletedEvent) GetData() *CustomAttributeE } func (m *MerchantCustomAttributeVisibleDeletedEvent) GetExtraProperties() map[string]interface{} { + if m == nil { + return nil + } return m.extraProperties } @@ -72776,6 +75821,9 @@ func (m *MerchantCustomAttributeVisibleDeletedEvent) MarshalJSON() ([]byte, erro } func (m *MerchantCustomAttributeVisibleDeletedEvent) String() string { + if m == nil { + return "" + } if len(m.rawJSON) > 0 { if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value @@ -72854,6 +75902,9 @@ func (m *MerchantCustomAttributeVisibleUpdatedEvent) GetData() *CustomAttributeE } func (m *MerchantCustomAttributeVisibleUpdatedEvent) GetExtraProperties() map[string]interface{} { + if m == nil { + return nil + } return m.extraProperties } @@ -72927,6 +75978,9 @@ func (m *MerchantCustomAttributeVisibleUpdatedEvent) MarshalJSON() ([]byte, erro } func (m *MerchantCustomAttributeVisibleUpdatedEvent) String() string { + if m == nil { + return "" + } if len(m.rawJSON) > 0 { if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value @@ -73002,6 +76056,9 @@ func (m *MerchantSettingsUpdatedEvent) GetData() *MerchantSettingsUpdatedEventDa } func (m *MerchantSettingsUpdatedEvent) GetExtraProperties() map[string]interface{} { + if m == nil { + return nil + } return m.extraProperties } @@ -73075,6 +76132,9 @@ func (m *MerchantSettingsUpdatedEvent) MarshalJSON() ([]byte, error) { } func (m *MerchantSettingsUpdatedEvent) String() string { + if m == nil { + return "" + } if len(m.rawJSON) > 0 { if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value @@ -73129,6 +76189,9 @@ func (m *MerchantSettingsUpdatedEventData) GetObject() *MerchantSettingsUpdatedE } func (m *MerchantSettingsUpdatedEventData) GetExtraProperties() map[string]interface{} { + if m == nil { + return nil + } return m.extraProperties } @@ -73188,6 +76251,9 @@ func (m *MerchantSettingsUpdatedEventData) MarshalJSON() ([]byte, error) { } func (m *MerchantSettingsUpdatedEventData) String() string { + if m == nil { + return "" + } if len(m.rawJSON) > 0 { if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value @@ -73222,6 +76288,9 @@ func (m *MerchantSettingsUpdatedEventObject) GetMerchantSettings() *CheckoutMerc } func (m *MerchantSettingsUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if m == nil { + return nil + } return m.extraProperties } @@ -73267,6 +76336,9 @@ func (m *MerchantSettingsUpdatedEventObject) MarshalJSON() ([]byte, error) { } func (m *MerchantSettingsUpdatedEventObject) String() string { + if m == nil { + return "" + } if len(m.rawJSON) > 0 { if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value @@ -73324,6 +76396,9 @@ func (m *ModifierLocationOverrides) GetSoldOut() *bool { } func (m *ModifierLocationOverrides) GetExtraProperties() map[string]interface{} { + if m == nil { + return nil + } return m.extraProperties } @@ -73383,6 +76458,9 @@ func (m *ModifierLocationOverrides) MarshalJSON() ([]byte, error) { } func (m *ModifierLocationOverrides) String() string { + if m == nil { + return "" + } if len(m.rawJSON) > 0 { if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value @@ -73440,6 +76518,9 @@ func (m *Money) GetCurrency() *Currency { } func (m *Money) GetExtraProperties() map[string]interface{} { + if m == nil { + return nil + } return m.extraProperties } @@ -73492,6 +76573,9 @@ func (m *Money) MarshalJSON() ([]byte, error) { } func (m *Money) String() string { + if m == nil { + return "" + } if len(m.rawJSON) > 0 { if value, err := internal.StringifyJSON(m.rawJSON); err == nil { return value @@ -73567,6 +76651,9 @@ func (o *OauthAuthorizationRevokedEvent) GetData() *OauthAuthorizationRevokedEve } func (o *OauthAuthorizationRevokedEvent) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -73640,6 +76727,9 @@ func (o *OauthAuthorizationRevokedEvent) MarshalJSON() ([]byte, error) { } func (o *OauthAuthorizationRevokedEvent) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -73694,6 +76784,9 @@ func (o *OauthAuthorizationRevokedEventData) GetObject() *OauthAuthorizationRevo } func (o *OauthAuthorizationRevokedEventData) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -73753,6 +76846,9 @@ func (o *OauthAuthorizationRevokedEventData) MarshalJSON() ([]byte, error) { } func (o *OauthAuthorizationRevokedEventData) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -73787,6 +76883,9 @@ func (o *OauthAuthorizationRevokedEventObject) GetRevocation() *OauthAuthorizati } func (o *OauthAuthorizationRevokedEventObject) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -73832,6 +76931,9 @@ func (o *OauthAuthorizationRevokedEventObject) MarshalJSON() ([]byte, error) { } func (o *OauthAuthorizationRevokedEventObject) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -73877,6 +76979,9 @@ func (o *OauthAuthorizationRevokedEventRevocationObject) GetRevokerType() *Oauth } func (o *OauthAuthorizationRevokedEventRevocationObject) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -73929,6 +77034,9 @@ func (o *OauthAuthorizationRevokedEventRevocationObject) MarshalJSON() ([]byte, } func (o *OauthAuthorizationRevokedEventRevocationObject) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -74355,6 +77463,9 @@ func (o *Order) GetNetAmountDueMoney() *Money { } func (o *Order) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -74610,6 +77721,9 @@ func (o *Order) MarshalJSON() ([]byte, error) { } func (o *Order) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -74713,6 +77827,9 @@ func (o *OrderCreated) GetCreatedAt() *string { } func (o *OrderCreated) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -74786,6 +77903,9 @@ func (o *OrderCreated) MarshalJSON() ([]byte, error) { } func (o *OrderCreated) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -74864,6 +77984,9 @@ func (o *OrderCreatedEvent) GetData() *OrderCreatedEventData { } func (o *OrderCreatedEvent) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -74937,6 +78060,9 @@ func (o *OrderCreatedEvent) MarshalJSON() ([]byte, error) { } func (o *OrderCreatedEvent) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -74991,6 +78117,9 @@ func (o *OrderCreatedEventData) GetObject() *OrderCreatedObject { } func (o *OrderCreatedEventData) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -75050,6 +78179,9 @@ func (o *OrderCreatedEventData) MarshalJSON() ([]byte, error) { } func (o *OrderCreatedEventData) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -75084,6 +78216,9 @@ func (o *OrderCreatedObject) GetOrderCreated() *OrderCreated { } func (o *OrderCreatedObject) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -75129,6 +78264,9 @@ func (o *OrderCreatedObject) MarshalJSON() ([]byte, error) { } func (o *OrderCreatedObject) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -75204,6 +78342,9 @@ func (o *OrderCustomAttributeDefinitionOwnedCreatedEvent) GetData() *CustomAttri } func (o *OrderCustomAttributeDefinitionOwnedCreatedEvent) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -75277,6 +78418,9 @@ func (o *OrderCustomAttributeDefinitionOwnedCreatedEvent) MarshalJSON() ([]byte, } func (o *OrderCustomAttributeDefinitionOwnedCreatedEvent) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -75352,6 +78496,9 @@ func (o *OrderCustomAttributeDefinitionOwnedDeletedEvent) GetData() *CustomAttri } func (o *OrderCustomAttributeDefinitionOwnedDeletedEvent) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -75425,6 +78572,9 @@ func (o *OrderCustomAttributeDefinitionOwnedDeletedEvent) MarshalJSON() ([]byte, } func (o *OrderCustomAttributeDefinitionOwnedDeletedEvent) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -75500,6 +78650,9 @@ func (o *OrderCustomAttributeDefinitionOwnedUpdatedEvent) GetData() *CustomAttri } func (o *OrderCustomAttributeDefinitionOwnedUpdatedEvent) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -75573,6 +78726,9 @@ func (o *OrderCustomAttributeDefinitionOwnedUpdatedEvent) MarshalJSON() ([]byte, } func (o *OrderCustomAttributeDefinitionOwnedUpdatedEvent) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -75648,6 +78804,9 @@ func (o *OrderCustomAttributeDefinitionVisibleCreatedEvent) GetData() *CustomAtt } func (o *OrderCustomAttributeDefinitionVisibleCreatedEvent) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -75721,6 +78880,9 @@ func (o *OrderCustomAttributeDefinitionVisibleCreatedEvent) MarshalJSON() ([]byt } func (o *OrderCustomAttributeDefinitionVisibleCreatedEvent) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -75796,6 +78958,9 @@ func (o *OrderCustomAttributeDefinitionVisibleDeletedEvent) GetData() *CustomAtt } func (o *OrderCustomAttributeDefinitionVisibleDeletedEvent) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -75869,6 +79034,9 @@ func (o *OrderCustomAttributeDefinitionVisibleDeletedEvent) MarshalJSON() ([]byt } func (o *OrderCustomAttributeDefinitionVisibleDeletedEvent) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -75944,6 +79112,9 @@ func (o *OrderCustomAttributeDefinitionVisibleUpdatedEvent) GetData() *CustomAtt } func (o *OrderCustomAttributeDefinitionVisibleUpdatedEvent) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -76017,6 +79188,9 @@ func (o *OrderCustomAttributeDefinitionVisibleUpdatedEvent) MarshalJSON() ([]byt } func (o *OrderCustomAttributeDefinitionVisibleUpdatedEvent) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -76092,6 +79266,9 @@ func (o *OrderCustomAttributeOwnedDeletedEvent) GetData() *CustomAttributeEventD } func (o *OrderCustomAttributeOwnedDeletedEvent) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -76165,6 +79342,9 @@ func (o *OrderCustomAttributeOwnedDeletedEvent) MarshalJSON() ([]byte, error) { } func (o *OrderCustomAttributeOwnedDeletedEvent) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -76240,6 +79420,9 @@ func (o *OrderCustomAttributeOwnedUpdatedEvent) GetData() *CustomAttributeEventD } func (o *OrderCustomAttributeOwnedUpdatedEvent) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -76313,6 +79496,9 @@ func (o *OrderCustomAttributeOwnedUpdatedEvent) MarshalJSON() ([]byte, error) { } func (o *OrderCustomAttributeOwnedUpdatedEvent) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -76388,6 +79574,9 @@ func (o *OrderCustomAttributeVisibleDeletedEvent) GetData() *CustomAttributeEven } func (o *OrderCustomAttributeVisibleDeletedEvent) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -76461,6 +79650,9 @@ func (o *OrderCustomAttributeVisibleDeletedEvent) MarshalJSON() ([]byte, error) } func (o *OrderCustomAttributeVisibleDeletedEvent) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -76536,6 +79728,9 @@ func (o *OrderCustomAttributeVisibleUpdatedEvent) GetData() *CustomAttributeEven } func (o *OrderCustomAttributeVisibleUpdatedEvent) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -76609,6 +79804,9 @@ func (o *OrderCustomAttributeVisibleUpdatedEvent) MarshalJSON() ([]byte, error) } func (o *OrderCustomAttributeVisibleUpdatedEvent) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -76839,6 +80037,9 @@ func (o *OrderFulfillmentUpdated) GetFulfillmentUpdate() []*OrderFulfillmentUpda } func (o *OrderFulfillmentUpdated) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -76926,6 +80127,9 @@ func (o *OrderFulfillmentUpdated) MarshalJSON() ([]byte, error) { } func (o *OrderFulfillmentUpdated) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -77003,6 +80207,9 @@ func (o *OrderFulfillmentUpdatedEvent) GetData() *OrderFulfillmentUpdatedEventDa } func (o *OrderFulfillmentUpdatedEvent) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -77076,6 +80283,9 @@ func (o *OrderFulfillmentUpdatedEvent) MarshalJSON() ([]byte, error) { } func (o *OrderFulfillmentUpdatedEvent) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -77130,6 +80340,9 @@ func (o *OrderFulfillmentUpdatedEventData) GetObject() *OrderFulfillmentUpdatedO } func (o *OrderFulfillmentUpdatedEventData) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -77189,6 +80402,9 @@ func (o *OrderFulfillmentUpdatedEventData) MarshalJSON() ([]byte, error) { } func (o *OrderFulfillmentUpdatedEventData) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -77223,6 +80439,9 @@ func (o *OrderFulfillmentUpdatedObject) GetOrderFulfillmentUpdated() *OrderFulfi } func (o *OrderFulfillmentUpdatedObject) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -77268,6 +80487,9 @@ func (o *OrderFulfillmentUpdatedObject) MarshalJSON() ([]byte, error) { } func (o *OrderFulfillmentUpdatedObject) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -77325,6 +80547,9 @@ func (o *OrderFulfillmentUpdatedUpdate) GetNewState() *FulfillmentState { } func (o *OrderFulfillmentUpdatedUpdate) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -77384,6 +80609,9 @@ func (o *OrderFulfillmentUpdatedUpdate) MarshalJSON() ([]byte, error) { } func (o *OrderFulfillmentUpdatedUpdate) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -77692,6 +80920,9 @@ func (o *OrderLineItem) GetTotalServiceChargeMoney() *Money { } func (o *OrderLineItem) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -77884,6 +81115,9 @@ func (o *OrderLineItem) MarshalJSON() ([]byte, error) { } func (o *OrderLineItem) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -77948,6 +81182,9 @@ func (o *OrderLineItemAppliedDiscount) GetAppliedMoney() *Money { } func (o *OrderLineItemAppliedDiscount) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -78007,6 +81244,9 @@ func (o *OrderLineItemAppliedDiscount) MarshalJSON() ([]byte, error) { } func (o *OrderLineItemAppliedDiscount) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -78065,6 +81305,9 @@ func (o *OrderLineItemAppliedServiceCharge) GetAppliedMoney() *Money { } func (o *OrderLineItemAppliedServiceCharge) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -78124,6 +81367,9 @@ func (o *OrderLineItemAppliedServiceCharge) MarshalJSON() ([]byte, error) { } func (o *OrderLineItemAppliedServiceCharge) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -78200,6 +81446,9 @@ func (o *OrderLineItemAppliedTax) GetAutoApplied() *bool { } func (o *OrderLineItemAppliedTax) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -78266,6 +81515,9 @@ func (o *OrderLineItemAppliedTax) MarshalJSON() ([]byte, error) { } func (o *OrderLineItemAppliedTax) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -78461,6 +81713,9 @@ func (o *OrderLineItemDiscount) GetPricingRuleID() *string { } func (o *OrderLineItemDiscount) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -78583,6 +81838,9 @@ func (o *OrderLineItemDiscount) MarshalJSON() ([]byte, error) { } func (o *OrderLineItemDiscount) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -78800,6 +82058,9 @@ func (o *OrderLineItemModifier) GetMetadata() map[string]*string { } func (o *OrderLineItemModifier) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -78894,6 +82155,9 @@ func (o *OrderLineItemModifier) MarshalJSON() ([]byte, error) { } func (o *OrderLineItemModifier) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -78958,6 +82222,9 @@ func (o *OrderLineItemPricingBlocklists) GetBlockedServiceCharges() []*OrderLine } func (o *OrderLineItemPricingBlocklists) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -79017,6 +82284,9 @@ func (o *OrderLineItemPricingBlocklists) MarshalJSON() ([]byte, error) { } func (o *OrderLineItemPricingBlocklists) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -79076,6 +82346,9 @@ func (o *OrderLineItemPricingBlocklistsBlockedDiscount) GetDiscountCatalogObject } func (o *OrderLineItemPricingBlocklistsBlockedDiscount) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -79135,6 +82408,9 @@ func (o *OrderLineItemPricingBlocklistsBlockedDiscount) MarshalJSON() ([]byte, e } func (o *OrderLineItemPricingBlocklistsBlockedDiscount) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -79196,6 +82472,9 @@ func (o *OrderLineItemPricingBlocklistsBlockedServiceCharge) GetServiceChargeCat } func (o *OrderLineItemPricingBlocklistsBlockedServiceCharge) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -79255,6 +82534,9 @@ func (o *OrderLineItemPricingBlocklistsBlockedServiceCharge) MarshalJSON() ([]by } func (o *OrderLineItemPricingBlocklistsBlockedServiceCharge) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -79314,6 +82596,9 @@ func (o *OrderLineItemPricingBlocklistsBlockedTax) GetTaxCatalogObjectID() *stri } func (o *OrderLineItemPricingBlocklistsBlockedTax) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -79373,6 +82658,9 @@ func (o *OrderLineItemPricingBlocklistsBlockedTax) MarshalJSON() ([]byte, error) } func (o *OrderLineItemPricingBlocklistsBlockedTax) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -79534,6 +82822,9 @@ func (o *OrderLineItemTax) GetAutoApplied() *bool { } func (o *OrderLineItemTax) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -79642,6 +82933,9 @@ func (o *OrderLineItemTax) MarshalJSON() ([]byte, error) { } func (o *OrderLineItemTax) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -79769,6 +83063,9 @@ func (o *OrderMoneyAmounts) GetServiceChargeMoney() *Money { } func (o *OrderMoneyAmounts) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -79842,6 +83139,9 @@ func (o *OrderMoneyAmounts) MarshalJSON() ([]byte, error) { } func (o *OrderMoneyAmounts) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -79891,6 +83191,9 @@ func (o *OrderPricingOptions) GetAutoApplyTaxes() *bool { } func (o *OrderPricingOptions) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -79943,6 +83246,9 @@ func (o *OrderPricingOptions) MarshalJSON() ([]byte, error) { } func (o *OrderPricingOptions) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -80020,6 +83326,9 @@ func (o *OrderQuantityUnit) GetCatalogVersion() *int64 { } func (o *OrderQuantityUnit) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -80086,6 +83395,9 @@ func (o *OrderQuantityUnit) MarshalJSON() ([]byte, error) { } func (o *OrderQuantityUnit) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -80208,6 +83520,9 @@ func (o *OrderReturn) GetReturnAmounts() *OrderMoneyAmounts { } func (o *OrderReturn) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -80309,6 +83624,9 @@ func (o *OrderReturn) MarshalJSON() ([]byte, error) { } func (o *OrderReturn) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -80454,6 +83772,9 @@ func (o *OrderReturnDiscount) GetScope() *OrderLineItemDiscountScope { } func (o *OrderReturnDiscount) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -80562,6 +83883,9 @@ func (o *OrderReturnDiscount) MarshalJSON() ([]byte, error) { } func (o *OrderReturnDiscount) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -80814,6 +84138,9 @@ func (o *OrderReturnLineItem) GetTotalServiceChargeMoney() *Money { } func (o *OrderReturnLineItem) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -80999,6 +84326,9 @@ func (o *OrderReturnLineItem) MarshalJSON() ([]byte, error) { } func (o *OrderReturnLineItem) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -81115,6 +84445,9 @@ func (o *OrderReturnLineItemModifier) GetQuantity() *string { } func (o *OrderReturnLineItemModifier) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -81209,6 +84542,9 @@ func (o *OrderReturnLineItemModifier) MarshalJSON() ([]byte, error) { } func (o *OrderReturnLineItemModifier) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -81426,6 +84762,9 @@ func (o *OrderReturnServiceCharge) GetType() *OrderServiceChargeType { } func (o *OrderReturnServiceCharge) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -81576,6 +84915,9 @@ func (o *OrderReturnServiceCharge) MarshalJSON() ([]byte, error) { } func (o *OrderReturnServiceCharge) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -81701,6 +85043,9 @@ func (o *OrderReturnTax) GetScope() *OrderLineItemTaxScope { } func (o *OrderReturnTax) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -81802,6 +85147,9 @@ func (o *OrderReturnTax) MarshalJSON() ([]byte, error) { } func (o *OrderReturnTax) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -81868,6 +85216,9 @@ func (o *OrderReturnTip) GetSourceTenderID() *string { } func (o *OrderReturnTip) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -81934,6 +85285,9 @@ func (o *OrderReturnTip) MarshalJSON() ([]byte, error) { } func (o *OrderReturnTip) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -81980,6 +85334,9 @@ func (o *OrderReward) GetRewardTierID() string { } func (o *OrderReward) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -82032,6 +85389,9 @@ func (o *OrderReward) MarshalJSON() ([]byte, error) { } func (o *OrderReward) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -82088,6 +85448,9 @@ func (o *OrderRoundingAdjustment) GetAmountMoney() *Money { } func (o *OrderRoundingAdjustment) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -82147,6 +85510,9 @@ func (o *OrderRoundingAdjustment) MarshalJSON() ([]byte, error) { } func (o *OrderRoundingAdjustment) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -82388,6 +85754,9 @@ func (o *OrderServiceCharge) GetScope() *OrderServiceChargeScope { } func (o *OrderServiceCharge) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -82538,6 +85907,9 @@ func (o *OrderServiceCharge) MarshalJSON() ([]byte, error) { } func (o *OrderServiceCharge) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -82679,6 +86051,9 @@ func (o *OrderSource) GetName() *string { } func (o *OrderSource) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -82724,6 +86099,9 @@ func (o *OrderSource) MarshalJSON() ([]byte, error) { } func (o *OrderSource) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -82842,6 +86220,9 @@ func (o *OrderUpdated) GetUpdatedAt() *string { } func (o *OrderUpdated) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -82922,6 +86303,9 @@ func (o *OrderUpdated) MarshalJSON() ([]byte, error) { } func (o *OrderUpdated) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -82999,6 +86383,9 @@ func (o *OrderUpdatedEvent) GetData() *OrderUpdatedEventData { } func (o *OrderUpdatedEvent) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -83072,6 +86459,9 @@ func (o *OrderUpdatedEvent) MarshalJSON() ([]byte, error) { } func (o *OrderUpdatedEvent) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -83126,6 +86516,9 @@ func (o *OrderUpdatedEventData) GetObject() *OrderUpdatedObject { } func (o *OrderUpdatedEventData) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -83185,6 +86578,9 @@ func (o *OrderUpdatedEventData) MarshalJSON() ([]byte, error) { } func (o *OrderUpdatedEventData) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -83219,6 +86615,9 @@ func (o *OrderUpdatedObject) GetOrderUpdated() *OrderUpdated { } func (o *OrderUpdatedObject) GetExtraProperties() map[string]interface{} { + if o == nil { + return nil + } return o.extraProperties } @@ -83264,6 +86663,9 @@ func (o *OrderUpdatedObject) MarshalJSON() ([]byte, error) { } func (o *OrderUpdatedObject) String() string { + if o == nil { + return "" + } if len(o.rawJSON) > 0 { if value, err := internal.StringifyJSON(o.rawJSON); err == nil { return value @@ -83339,6 +86741,9 @@ func (p *PaymentCreatedEvent) GetData() *PaymentCreatedEventData { } func (p *PaymentCreatedEvent) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -83412,6 +86817,9 @@ func (p *PaymentCreatedEvent) MarshalJSON() ([]byte, error) { } func (p *PaymentCreatedEvent) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -83466,6 +86874,9 @@ func (p *PaymentCreatedEventData) GetObject() *PaymentCreatedEventObject { } func (p *PaymentCreatedEventData) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -83525,6 +86936,9 @@ func (p *PaymentCreatedEventData) MarshalJSON() ([]byte, error) { } func (p *PaymentCreatedEventData) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -83559,6 +86973,9 @@ func (p *PaymentCreatedEventObject) GetPayment() *Payment { } func (p *PaymentCreatedEventObject) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -83604,6 +87021,9 @@ func (p *PaymentCreatedEventObject) MarshalJSON() ([]byte, error) { } func (p *PaymentCreatedEventObject) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -83742,6 +87162,9 @@ func (p *PaymentLink) GetPaymentNote() *string { } func (p *PaymentLink) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -83857,6 +87280,9 @@ func (p *PaymentLink) MarshalJSON() ([]byte, error) { } func (p *PaymentLink) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -83901,6 +87327,9 @@ func (p *PaymentLinkRelatedResources) GetSubscriptionPlans() []*CatalogObject { } func (p *PaymentLinkRelatedResources) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -83953,6 +87382,9 @@ func (p *PaymentLinkRelatedResources) MarshalJSON() ([]byte, error) { } func (p *PaymentLinkRelatedResources) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -84050,6 +87482,9 @@ func (p *PaymentOptions) GetDelayAction() *PaymentOptionsDelayAction { } func (p *PaymentOptions) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -84116,6 +87551,9 @@ func (p *PaymentOptions) MarshalJSON() ([]byte, error) { } func (p *PaymentOptions) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -84217,6 +87655,9 @@ func (p *PaymentUpdatedEvent) GetData() *PaymentUpdatedEventData { } func (p *PaymentUpdatedEvent) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -84290,6 +87731,9 @@ func (p *PaymentUpdatedEvent) MarshalJSON() ([]byte, error) { } func (p *PaymentUpdatedEvent) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -84344,6 +87788,9 @@ func (p *PaymentUpdatedEventData) GetObject() *PaymentUpdatedEventObject { } func (p *PaymentUpdatedEventData) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -84403,6 +87850,9 @@ func (p *PaymentUpdatedEventData) MarshalJSON() ([]byte, error) { } func (p *PaymentUpdatedEventData) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -84437,6 +87887,9 @@ func (p *PaymentUpdatedEventObject) GetPayment() *Payment { } func (p *PaymentUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -84482,6 +87935,9 @@ func (p *PaymentUpdatedEventObject) MarshalJSON() ([]byte, error) { } func (p *PaymentUpdatedEventObject) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -84567,6 +88023,9 @@ func (p *PayoutFailedEvent) GetData() *PayoutFailedEventData { } func (p *PayoutFailedEvent) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -84647,6 +88106,9 @@ func (p *PayoutFailedEvent) MarshalJSON() ([]byte, error) { } func (p *PayoutFailedEvent) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -84701,6 +88163,9 @@ func (p *PayoutFailedEventData) GetObject() *PayoutFailedEventObject { } func (p *PayoutFailedEventData) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -84760,6 +88225,9 @@ func (p *PayoutFailedEventData) MarshalJSON() ([]byte, error) { } func (p *PayoutFailedEventData) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -84794,6 +88262,9 @@ func (p *PayoutFailedEventObject) GetPayout() *Payout { } func (p *PayoutFailedEventObject) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -84839,6 +88310,9 @@ func (p *PayoutFailedEventObject) MarshalJSON() ([]byte, error) { } func (p *PayoutFailedEventObject) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -84924,6 +88398,9 @@ func (p *PayoutPaidEvent) GetData() *PayoutPaidEventData { } func (p *PayoutPaidEvent) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -85004,6 +88481,9 @@ func (p *PayoutPaidEvent) MarshalJSON() ([]byte, error) { } func (p *PayoutPaidEvent) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -85058,6 +88538,9 @@ func (p *PayoutPaidEventData) GetObject() *PayoutPaidEventObject { } func (p *PayoutPaidEventData) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -85117,6 +88600,9 @@ func (p *PayoutPaidEventData) MarshalJSON() ([]byte, error) { } func (p *PayoutPaidEventData) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -85151,6 +88637,9 @@ func (p *PayoutPaidEventObject) GetPayout() *Payout { } func (p *PayoutPaidEventObject) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -85196,6 +88685,9 @@ func (p *PayoutPaidEventObject) MarshalJSON() ([]byte, error) { } func (p *PayoutPaidEventObject) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -85281,6 +88773,9 @@ func (p *PayoutSentEvent) GetData() *PayoutSentEventData { } func (p *PayoutSentEvent) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -85361,6 +88856,9 @@ func (p *PayoutSentEvent) MarshalJSON() ([]byte, error) { } func (p *PayoutSentEvent) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -85415,6 +88913,9 @@ func (p *PayoutSentEventData) GetObject() *PayoutSentEventObject { } func (p *PayoutSentEventData) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -85474,6 +88975,9 @@ func (p *PayoutSentEventData) MarshalJSON() ([]byte, error) { } func (p *PayoutSentEventData) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -85508,6 +89012,9 @@ func (p *PayoutSentEventObject) GetPayout() *Payout { } func (p *PayoutSentEventObject) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -85553,6 +89060,9 @@ func (p *PayoutSentEventObject) MarshalJSON() ([]byte, error) { } func (p *PayoutSentEventObject) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -85610,6 +89120,9 @@ func (p *PrePopulatedData) GetBuyerAddress() *Address { } func (p *PrePopulatedData) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -85669,6 +89182,9 @@ func (p *PrePopulatedData) MarshalJSON() ([]byte, error) { } func (p *PrePopulatedData) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -85727,6 +89243,9 @@ func (p *ProcessingFee) GetAmountMoney() *Money { } func (p *ProcessingFee) GetExtraProperties() map[string]interface{} { + if p == nil { + return nil + } return p.extraProperties } @@ -85786,6 +89305,9 @@ func (p *ProcessingFee) MarshalJSON() ([]byte, error) { } func (p *ProcessingFee) String() string { + if p == nil { + return "" + } if len(p.rawJSON) > 0 { if value, err := internal.StringifyJSON(p.rawJSON); err == nil { return value @@ -85891,6 +89413,9 @@ func (q *QrCodeOptions) GetBarcodeContents() string { } func (q *QrCodeOptions) GetExtraProperties() map[string]interface{} { + if q == nil { + return nil + } return q.extraProperties } @@ -85950,6 +89475,9 @@ func (q *QrCodeOptions) MarshalJSON() ([]byte, error) { } func (q *QrCodeOptions) String() string { + if q == nil { + return "" + } if len(q.rawJSON) > 0 { if value, err := internal.StringifyJSON(q.rawJSON); err == nil { return value @@ -86007,6 +89535,9 @@ func (q *QuickPay) GetLocationID() string { } func (q *QuickPay) GetExtraProperties() map[string]interface{} { + if q == nil { + return nil + } return q.extraProperties } @@ -86066,6 +89597,9 @@ func (q *QuickPay) MarshalJSON() ([]byte, error) { } func (q *QuickPay) String() string { + if q == nil { + return "" + } if len(q.rawJSON) > 0 { if value, err := internal.StringifyJSON(q.rawJSON); err == nil { return value @@ -86124,6 +89658,9 @@ func (r *ReceiptOptions) GetIsDuplicate() *bool { } func (r *ReceiptOptions) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -86183,6 +89720,9 @@ func (r *ReceiptOptions) MarshalJSON() ([]byte, error) { } func (r *ReceiptOptions) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -86228,6 +89768,9 @@ func (r *RedeemLoyaltyRewardResponse) GetEvent() *LoyaltyEvent { } func (r *RedeemLoyaltyRewardResponse) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -86280,6 +89823,9 @@ func (r *RedeemLoyaltyRewardResponse) MarshalJSON() ([]byte, error) { } func (r *RedeemLoyaltyRewardResponse) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -86408,6 +89954,9 @@ func (r *Refund) GetAdditionalRecipients() []*AdditionalRecipient { } func (r *Refund) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -86516,6 +90065,9 @@ func (r *Refund) MarshalJSON() ([]byte, error) { } func (r *Refund) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -86591,6 +90143,9 @@ func (r *RefundCreatedEvent) GetData() *RefundCreatedEventData { } func (r *RefundCreatedEvent) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -86664,6 +90219,9 @@ func (r *RefundCreatedEvent) MarshalJSON() ([]byte, error) { } func (r *RefundCreatedEvent) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -86718,6 +90276,9 @@ func (r *RefundCreatedEventData) GetObject() *RefundCreatedEventObject { } func (r *RefundCreatedEventData) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -86777,6 +90338,9 @@ func (r *RefundCreatedEventData) MarshalJSON() ([]byte, error) { } func (r *RefundCreatedEventData) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -86811,6 +90375,9 @@ func (r *RefundCreatedEventObject) GetRefund() *PaymentRefund { } func (r *RefundCreatedEventObject) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -86856,6 +90423,9 @@ func (r *RefundCreatedEventObject) MarshalJSON() ([]byte, error) { } func (r *RefundCreatedEventObject) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -86961,6 +90531,9 @@ func (r *RefundUpdatedEvent) GetData() *RefundUpdatedEventData { } func (r *RefundUpdatedEvent) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -87034,6 +90607,9 @@ func (r *RefundUpdatedEvent) MarshalJSON() ([]byte, error) { } func (r *RefundUpdatedEvent) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -87088,6 +90664,9 @@ func (r *RefundUpdatedEventData) GetObject() *RefundUpdatedEventObject { } func (r *RefundUpdatedEventData) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -87147,6 +90726,9 @@ func (r *RefundUpdatedEventData) MarshalJSON() ([]byte, error) { } func (r *RefundUpdatedEventData) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -87181,6 +90763,9 @@ func (r *RefundUpdatedEventObject) GetRefund() *PaymentRefund { } func (r *RefundUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -87226,6 +90811,9 @@ func (r *RefundUpdatedEventObject) MarshalJSON() ([]byte, error) { } func (r *RefundUpdatedEventObject) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -87263,6 +90851,9 @@ func (r *RemoveGroupFromCustomerResponse) GetErrors() []*Error { } func (r *RemoveGroupFromCustomerResponse) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -87308,6 +90899,9 @@ func (r *RemoveGroupFromCustomerResponse) MarshalJSON() ([]byte, error) { } func (r *RemoveGroupFromCustomerResponse) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -87354,6 +90948,9 @@ func (r *RetrieveBookingCustomAttributeDefinitionResponse) GetErrors() []*Error } func (r *RetrieveBookingCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -87406,6 +91003,9 @@ func (r *RetrieveBookingCustomAttributeDefinitionResponse) MarshalJSON() ([]byte } func (r *RetrieveBookingCustomAttributeDefinitionResponse) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -87453,6 +91053,9 @@ func (r *RetrieveBookingCustomAttributeResponse) GetErrors() []*Error { } func (r *RetrieveBookingCustomAttributeResponse) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -87505,6 +91108,9 @@ func (r *RetrieveBookingCustomAttributeResponse) MarshalJSON() ([]byte, error) { } func (r *RetrieveBookingCustomAttributeResponse) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -87551,6 +91157,9 @@ func (r *RetrieveLocationCustomAttributeDefinitionResponse) GetErrors() []*Error } func (r *RetrieveLocationCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -87603,6 +91212,9 @@ func (r *RetrieveLocationCustomAttributeDefinitionResponse) MarshalJSON() ([]byt } func (r *RetrieveLocationCustomAttributeDefinitionResponse) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -87650,6 +91262,9 @@ func (r *RetrieveLocationCustomAttributeResponse) GetErrors() []*Error { } func (r *RetrieveLocationCustomAttributeResponse) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -87702,6 +91317,9 @@ func (r *RetrieveLocationCustomAttributeResponse) MarshalJSON() ([]byte, error) } func (r *RetrieveLocationCustomAttributeResponse) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -87748,6 +91366,9 @@ func (r *RetrieveMerchantCustomAttributeDefinitionResponse) GetErrors() []*Error } func (r *RetrieveMerchantCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -87800,6 +91421,9 @@ func (r *RetrieveMerchantCustomAttributeDefinitionResponse) MarshalJSON() ([]byt } func (r *RetrieveMerchantCustomAttributeDefinitionResponse) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -87847,6 +91471,9 @@ func (r *RetrieveMerchantCustomAttributeResponse) GetErrors() []*Error { } func (r *RetrieveMerchantCustomAttributeResponse) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -87899,6 +91526,9 @@ func (r *RetrieveMerchantCustomAttributeResponse) MarshalJSON() ([]byte, error) } func (r *RetrieveMerchantCustomAttributeResponse) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -87944,6 +91574,9 @@ func (r *RetrieveOrderCustomAttributeDefinitionResponse) GetErrors() []*Error { } func (r *RetrieveOrderCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -87996,6 +91629,9 @@ func (r *RetrieveOrderCustomAttributeDefinitionResponse) MarshalJSON() ([]byte, } func (r *RetrieveOrderCustomAttributeDefinitionResponse) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -88041,6 +91677,9 @@ func (r *RetrieveOrderCustomAttributeResponse) GetErrors() []*Error { } func (r *RetrieveOrderCustomAttributeResponse) GetExtraProperties() map[string]interface{} { + if r == nil { + return nil + } return r.extraProperties } @@ -88093,6 +91732,9 @@ func (r *RetrieveOrderCustomAttributeResponse) MarshalJSON() ([]byte, error) { } func (r *RetrieveOrderCustomAttributeResponse) String() string { + if r == nil { + return "" + } if len(r.rawJSON) > 0 { if value, err := internal.StringifyJSON(r.rawJSON); err == nil { return value @@ -88150,6 +91792,9 @@ func (s *SaveCardOptions) GetReferenceID() *string { } func (s *SaveCardOptions) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -88209,6 +91854,9 @@ func (s *SaveCardOptions) MarshalJSON() ([]byte, error) { } func (s *SaveCardOptions) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -88262,6 +91910,9 @@ func (s *SearchLoyaltyAccountsRequestLoyaltyAccountQuery) GetCustomerIDs() []str } func (s *SearchLoyaltyAccountsRequestLoyaltyAccountQuery) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -88314,6 +91965,9 @@ func (s *SearchLoyaltyAccountsRequestLoyaltyAccountQuery) MarshalJSON() ([]byte, } func (s *SearchLoyaltyAccountsRequestLoyaltyAccountQuery) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -88373,6 +92027,9 @@ func (s *SearchLoyaltyAccountsResponse) GetCursor() *string { } func (s *SearchLoyaltyAccountsResponse) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -88432,6 +92089,9 @@ func (s *SearchLoyaltyAccountsResponse) MarshalJSON() ([]byte, error) { } func (s *SearchLoyaltyAccountsResponse) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -88478,6 +92138,9 @@ func (s *SearchLoyaltyRewardsRequestLoyaltyRewardQuery) GetStatus() *LoyaltyRewa } func (s *SearchLoyaltyRewardsRequestLoyaltyRewardQuery) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -88530,6 +92193,9 @@ func (s *SearchLoyaltyRewardsRequestLoyaltyRewardQuery) MarshalJSON() ([]byte, e } func (s *SearchLoyaltyRewardsRequestLoyaltyRewardQuery) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -88587,6 +92253,9 @@ func (s *SearchLoyaltyRewardsResponse) GetCursor() *string { } func (s *SearchLoyaltyRewardsResponse) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -88646,6 +92315,9 @@ func (s *SearchLoyaltyRewardsResponse) MarshalJSON() ([]byte, error) { } func (s *SearchLoyaltyRewardsResponse) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -88703,6 +92375,9 @@ func (s *SearchShiftsResponse) GetErrors() []*Error { } func (s *SearchShiftsResponse) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -88762,6 +92437,9 @@ func (s *SearchShiftsResponse) MarshalJSON() ([]byte, error) { } func (s *SearchShiftsResponse) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -88820,6 +92498,9 @@ func (s *SearchTerminalActionsResponse) GetCursor() *string { } func (s *SearchTerminalActionsResponse) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -88879,6 +92560,9 @@ func (s *SearchTerminalActionsResponse) MarshalJSON() ([]byte, error) { } func (s *SearchTerminalActionsResponse) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -88936,6 +92620,9 @@ func (s *SearchTerminalCheckoutsResponse) GetCursor() *string { } func (s *SearchTerminalCheckoutsResponse) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -88995,6 +92682,9 @@ func (s *SearchTerminalCheckoutsResponse) MarshalJSON() ([]byte, error) { } func (s *SearchTerminalCheckoutsResponse) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -89052,6 +92742,9 @@ func (s *SearchTerminalRefundsResponse) GetCursor() *string { } func (s *SearchTerminalRefundsResponse) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -89111,6 +92804,9 @@ func (s *SearchTerminalRefundsResponse) MarshalJSON() ([]byte, error) { } func (s *SearchTerminalRefundsResponse) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -89155,6 +92851,9 @@ func (s *SelectOption) GetTitle() string { } func (s *SelectOption) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -89207,6 +92906,9 @@ func (s *SelectOption) MarshalJSON() ([]byte, error) { } func (s *SelectOption) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -89271,6 +92973,9 @@ func (s *SelectOptions) GetSelectedOption() *SelectOption { } func (s *SelectOptions) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -89337,6 +93042,9 @@ func (s *SelectOptions) MarshalJSON() ([]byte, error) { } func (s *SelectOptions) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -89518,6 +93226,9 @@ func (s *Shift) GetDeclaredCashTipMoney() *Money { } func (s *Shift) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -89654,6 +93365,9 @@ func (s *Shift) MarshalJSON() ([]byte, error) { } func (s *Shift) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -89753,6 +93467,9 @@ func (s *ShiftFilter) GetTeamMemberIDs() []string { } func (s *ShiftFilter) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -89840,6 +93557,9 @@ func (s *ShiftFilter) MarshalJSON() ([]byte, error) { } func (s *ShiftFilter) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -89912,6 +93632,9 @@ func (s *ShiftQuery) GetSort() *ShiftSort { } func (s *ShiftQuery) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -89964,6 +93687,9 @@ func (s *ShiftQuery) MarshalJSON() ([]byte, error) { } func (s *ShiftQuery) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -90013,6 +93739,9 @@ func (s *ShiftSort) GetOrder() *SortOrder { } func (s *ShiftSort) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -90065,6 +93794,9 @@ func (s *ShiftSort) MarshalJSON() ([]byte, error) { } func (s *ShiftSort) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -90190,6 +93922,9 @@ func (s *ShiftWage) GetTipEligible() *bool { } func (s *ShiftWage) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -90256,6 +93991,9 @@ func (s *ShiftWage) MarshalJSON() ([]byte, error) { } func (s *ShiftWage) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -90318,6 +94056,9 @@ func (s *ShiftWorkday) GetDefaultTimezone() *string { } func (s *ShiftWorkday) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -90377,6 +94118,9 @@ func (s *ShiftWorkday) MarshalJSON() ([]byte, error) { } func (s *ShiftWorkday) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -90447,6 +94191,9 @@ func (s *ShippingFee) GetCharge() *Money { } func (s *ShippingFee) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -90499,6 +94246,9 @@ func (s *ShippingFee) MarshalJSON() ([]byte, error) { } func (s *ShippingFee) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -90544,6 +94294,9 @@ func (s *SignatureImage) GetData() *string { } func (s *SignatureImage) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -90596,6 +94349,9 @@ func (s *SignatureImage) MarshalJSON() ([]byte, error) { } func (s *SignatureImage) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -90650,6 +94406,9 @@ func (s *SignatureOptions) GetSignature() []*SignatureImage { } func (s *SignatureOptions) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -90709,6 +94468,9 @@ func (s *SignatureOptions) MarshalJSON() ([]byte, error) { } func (s *SignatureOptions) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -90790,6 +94552,9 @@ func (s *SourceApplication) GetName() *string { } func (s *SourceApplication) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -90849,6 +94614,9 @@ func (s *SourceApplication) MarshalJSON() ([]byte, error) { } func (s *SourceApplication) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -90980,6 +94748,9 @@ func (s *SubscriptionCreatedEvent) GetData() *SubscriptionCreatedEventData { } func (s *SubscriptionCreatedEvent) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -91053,6 +94824,9 @@ func (s *SubscriptionCreatedEvent) MarshalJSON() ([]byte, error) { } func (s *SubscriptionCreatedEvent) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -91107,6 +94881,9 @@ func (s *SubscriptionCreatedEventData) GetObject() *SubscriptionCreatedEventObje } func (s *SubscriptionCreatedEventData) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -91166,6 +94943,9 @@ func (s *SubscriptionCreatedEventData) MarshalJSON() ([]byte, error) { } func (s *SubscriptionCreatedEventData) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -91200,6 +94980,9 @@ func (s *SubscriptionCreatedEventObject) GetSubscription() *Subscription { } func (s *SubscriptionCreatedEventObject) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -91245,6 +95028,9 @@ func (s *SubscriptionCreatedEventObject) MarshalJSON() ([]byte, error) { } func (s *SubscriptionCreatedEventObject) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -91331,6 +95117,9 @@ func (s *SubscriptionPhase) GetPricing() *SubscriptionPricing { } func (s *SubscriptionPhase) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -91411,6 +95200,9 @@ func (s *SubscriptionPhase) MarshalJSON() ([]byte, error) { } func (s *SubscriptionPhase) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -91467,6 +95259,9 @@ func (s *SubscriptionPricing) GetPriceMoney() *Money { } func (s *SubscriptionPricing) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -91526,6 +95321,9 @@ func (s *SubscriptionPricing) MarshalJSON() ([]byte, error) { } func (s *SubscriptionPricing) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -91646,6 +95444,9 @@ func (s *SubscriptionTestResult) GetPassesFilter() *bool { } func (s *SubscriptionTestResult) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -91733,6 +95534,9 @@ func (s *SubscriptionTestResult) MarshalJSON() ([]byte, error) { } func (s *SubscriptionTestResult) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -91810,6 +95614,9 @@ func (s *SubscriptionUpdatedEvent) GetData() *SubscriptionUpdatedEventData { } func (s *SubscriptionUpdatedEvent) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -91883,6 +95690,9 @@ func (s *SubscriptionUpdatedEvent) MarshalJSON() ([]byte, error) { } func (s *SubscriptionUpdatedEvent) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -91937,6 +95747,9 @@ func (s *SubscriptionUpdatedEventData) GetObject() *SubscriptionUpdatedEventObje } func (s *SubscriptionUpdatedEventData) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -91996,6 +95809,9 @@ func (s *SubscriptionUpdatedEventData) MarshalJSON() ([]byte, error) { } func (s *SubscriptionUpdatedEventData) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -92030,6 +95846,9 @@ func (s *SubscriptionUpdatedEventObject) GetSubscription() *Subscription { } func (s *SubscriptionUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -92075,6 +95894,9 @@ func (s *SubscriptionUpdatedEventObject) MarshalJSON() ([]byte, error) { } func (s *SubscriptionUpdatedEventObject) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -92196,6 +96018,9 @@ func (t *TeamMemberBookingProfile) GetProfileImageURL() *string { } func (t *TeamMemberBookingProfile) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -92269,6 +96094,9 @@ func (t *TeamMemberBookingProfile) MarshalJSON() ([]byte, error) { } func (t *TeamMemberBookingProfile) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -92344,6 +96172,9 @@ func (t *TeamMemberCreatedEvent) GetData() *TeamMemberCreatedEventData { } func (t *TeamMemberCreatedEvent) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -92417,6 +96248,9 @@ func (t *TeamMemberCreatedEvent) MarshalJSON() ([]byte, error) { } func (t *TeamMemberCreatedEvent) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -92471,6 +96305,9 @@ func (t *TeamMemberCreatedEventData) GetObject() *TeamMemberCreatedEventObject { } func (t *TeamMemberCreatedEventData) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -92530,6 +96367,9 @@ func (t *TeamMemberCreatedEventData) MarshalJSON() ([]byte, error) { } func (t *TeamMemberCreatedEventData) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -92564,6 +96404,9 @@ func (t *TeamMemberCreatedEventObject) GetTeamMember() *TeamMember { } func (t *TeamMemberCreatedEventObject) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -92609,6 +96452,9 @@ func (t *TeamMemberCreatedEventObject) MarshalJSON() ([]byte, error) { } func (t *TeamMemberCreatedEventObject) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -92710,6 +96556,9 @@ func (t *TeamMemberUpdatedEvent) GetData() *TeamMemberUpdatedEventData { } func (t *TeamMemberUpdatedEvent) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -92783,6 +96632,9 @@ func (t *TeamMemberUpdatedEvent) MarshalJSON() ([]byte, error) { } func (t *TeamMemberUpdatedEvent) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -92837,6 +96689,9 @@ func (t *TeamMemberUpdatedEventData) GetObject() *TeamMemberUpdatedEventObject { } func (t *TeamMemberUpdatedEventData) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -92896,6 +96751,9 @@ func (t *TeamMemberUpdatedEventData) MarshalJSON() ([]byte, error) { } func (t *TeamMemberUpdatedEventData) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -92930,6 +96788,9 @@ func (t *TeamMemberUpdatedEventObject) GetTeamMember() *TeamMember { } func (t *TeamMemberUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -92975,6 +96836,9 @@ func (t *TeamMemberUpdatedEventObject) MarshalJSON() ([]byte, error) { } func (t *TeamMemberUpdatedEventObject) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -93063,6 +96927,9 @@ func (t *TeamMemberWage) GetTipEligible() *bool { } func (t *TeamMemberWage) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -93143,6 +97010,9 @@ func (t *TeamMemberWage) MarshalJSON() ([]byte, error) { } func (t *TeamMemberWage) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -93218,6 +97088,9 @@ func (t *TeamMemberWageSettingUpdatedEvent) GetData() *TeamMemberWageSettingUpda } func (t *TeamMemberWageSettingUpdatedEvent) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -93291,6 +97164,9 @@ func (t *TeamMemberWageSettingUpdatedEvent) MarshalJSON() ([]byte, error) { } func (t *TeamMemberWageSettingUpdatedEvent) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -93345,6 +97221,9 @@ func (t *TeamMemberWageSettingUpdatedEventData) GetObject() *TeamMemberWageSetti } func (t *TeamMemberWageSettingUpdatedEventData) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -93404,6 +97283,9 @@ func (t *TeamMemberWageSettingUpdatedEventData) MarshalJSON() ([]byte, error) { } func (t *TeamMemberWageSettingUpdatedEventData) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -93438,6 +97320,9 @@ func (t *TeamMemberWageSettingUpdatedEventObject) GetWageSetting() *WageSetting } func (t *TeamMemberWageSettingUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -93483,6 +97368,9 @@ func (t *TeamMemberWageSettingUpdatedEventObject) MarshalJSON() ([]byte, error) } func (t *TeamMemberWageSettingUpdatedEventObject) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -93697,6 +97585,9 @@ func (t *Tender) GetPaymentID() *string { } func (t *Tender) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -93854,6 +97745,9 @@ func (t *Tender) MarshalJSON() ([]byte, error) { } func (t *Tender) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -93895,6 +97789,9 @@ func (t *TenderBankAccountDetails) GetStatus() *TenderBankAccountDetailsStatus { } func (t *TenderBankAccountDetails) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -93940,6 +97837,9 @@ func (t *TenderBankAccountDetails) MarshalJSON() ([]byte, error) { } func (t *TenderBankAccountDetails) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -94015,6 +97915,9 @@ func (t *TenderBuyNowPayLaterDetails) GetStatus() *TenderBuyNowPayLaterDetailsSt } func (t *TenderBuyNowPayLaterDetails) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -94067,6 +97970,9 @@ func (t *TenderBuyNowPayLaterDetails) MarshalJSON() ([]byte, error) { } func (t *TenderBuyNowPayLaterDetails) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -94176,6 +98082,9 @@ func (t *TenderCardDetails) GetEntryMethod() *TenderCardDetailsEntryMethod { } func (t *TenderCardDetails) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -94235,6 +98144,9 @@ func (t *TenderCardDetails) MarshalJSON() ([]byte, error) { } func (t *TenderCardDetails) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -94341,6 +98253,9 @@ func (t *TenderCashDetails) GetChangeBackMoney() *Money { } func (t *TenderCashDetails) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -94393,6 +98308,9 @@ func (t *TenderCashDetails) MarshalJSON() ([]byte, error) { } func (t *TenderCashDetails) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -94431,6 +98349,9 @@ func (t *TenderSquareAccountDetails) GetStatus() *TenderSquareAccountDetailsStat } func (t *TenderSquareAccountDetails) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -94476,6 +98397,9 @@ func (t *TenderSquareAccountDetails) MarshalJSON() ([]byte, error) { } func (t *TenderSquareAccountDetails) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -94797,6 +98721,9 @@ func (t *TerminalAction) GetAwaitNextActionDuration() *string { } func (t *TerminalAction) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -94975,6 +98902,9 @@ func (t *TerminalAction) MarshalJSON() ([]byte, error) { } func (t *TerminalAction) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -95091,6 +99021,9 @@ func (t *TerminalActionCreatedEvent) GetData() *TerminalActionCreatedEventData { } func (t *TerminalActionCreatedEvent) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -95164,6 +99097,9 @@ func (t *TerminalActionCreatedEvent) MarshalJSON() ([]byte, error) { } func (t *TerminalActionCreatedEvent) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -95218,6 +99154,9 @@ func (t *TerminalActionCreatedEventData) GetObject() *TerminalActionCreatedEvent } func (t *TerminalActionCreatedEventData) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -95277,6 +99216,9 @@ func (t *TerminalActionCreatedEventData) MarshalJSON() ([]byte, error) { } func (t *TerminalActionCreatedEventData) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -95311,6 +99253,9 @@ func (t *TerminalActionCreatedEventObject) GetAction() *TerminalAction { } func (t *TerminalActionCreatedEventObject) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -95356,6 +99301,9 @@ func (t *TerminalActionCreatedEventObject) MarshalJSON() ([]byte, error) { } func (t *TerminalActionCreatedEventObject) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -95400,6 +99348,9 @@ func (t *TerminalActionQuery) GetSort() *TerminalActionQuerySort { } func (t *TerminalActionQuery) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -95452,6 +99403,9 @@ func (t *TerminalActionQuery) MarshalJSON() ([]byte, error) { } func (t *TerminalActionQuery) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -95521,6 +99475,9 @@ func (t *TerminalActionQueryFilter) GetType() *TerminalActionActionType { } func (t *TerminalActionQueryFilter) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -95587,6 +99544,9 @@ func (t *TerminalActionQueryFilter) MarshalJSON() ([]byte, error) { } func (t *TerminalActionQueryFilter) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -95624,6 +99584,9 @@ func (t *TerminalActionQuerySort) GetSortOrder() *SortOrder { } func (t *TerminalActionQuerySort) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -95669,6 +99632,9 @@ func (t *TerminalActionQuerySort) MarshalJSON() ([]byte, error) { } func (t *TerminalActionQuerySort) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -95744,6 +99710,9 @@ func (t *TerminalActionUpdatedEvent) GetData() *TerminalActionUpdatedEventData { } func (t *TerminalActionUpdatedEvent) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -95817,6 +99786,9 @@ func (t *TerminalActionUpdatedEvent) MarshalJSON() ([]byte, error) { } func (t *TerminalActionUpdatedEvent) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -95871,6 +99843,9 @@ func (t *TerminalActionUpdatedEventData) GetObject() *TerminalActionUpdatedEvent } func (t *TerminalActionUpdatedEventData) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -95930,6 +99905,9 @@ func (t *TerminalActionUpdatedEventData) MarshalJSON() ([]byte, error) { } func (t *TerminalActionUpdatedEventData) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -95964,6 +99942,9 @@ func (t *TerminalActionUpdatedEventObject) GetAction() *TerminalAction { } func (t *TerminalActionUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -96009,6 +99990,9 @@ func (t *TerminalActionUpdatedEventObject) MarshalJSON() ([]byte, error) { } func (t *TerminalActionUpdatedEventObject) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -96271,6 +100255,9 @@ func (t *TerminalCheckout) GetTipMoney() *Money { } func (t *TerminalCheckout) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -96456,6 +100443,9 @@ func (t *TerminalCheckout) MarshalJSON() ([]byte, error) { } func (t *TerminalCheckout) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -96531,6 +100521,9 @@ func (t *TerminalCheckoutCreatedEvent) GetData() *TerminalCheckoutCreatedEventDa } func (t *TerminalCheckoutCreatedEvent) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -96604,6 +100597,9 @@ func (t *TerminalCheckoutCreatedEvent) MarshalJSON() ([]byte, error) { } func (t *TerminalCheckoutCreatedEvent) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -96658,6 +100654,9 @@ func (t *TerminalCheckoutCreatedEventData) GetObject() *TerminalCheckoutCreatedE } func (t *TerminalCheckoutCreatedEventData) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -96717,6 +100716,9 @@ func (t *TerminalCheckoutCreatedEventData) MarshalJSON() ([]byte, error) { } func (t *TerminalCheckoutCreatedEventData) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -96751,6 +100753,9 @@ func (t *TerminalCheckoutCreatedEventObject) GetCheckout() *TerminalCheckout { } func (t *TerminalCheckoutCreatedEventObject) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -96796,6 +100801,9 @@ func (t *TerminalCheckoutCreatedEventObject) MarshalJSON() ([]byte, error) { } func (t *TerminalCheckoutCreatedEventObject) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -96840,6 +100848,9 @@ func (t *TerminalCheckoutQuery) GetSort() *TerminalCheckoutQuerySort { } func (t *TerminalCheckoutQuery) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -96892,6 +100903,9 @@ func (t *TerminalCheckoutQuery) MarshalJSON() ([]byte, error) { } func (t *TerminalCheckoutQuery) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -96950,6 +100964,9 @@ func (t *TerminalCheckoutQueryFilter) GetStatus() *string { } func (t *TerminalCheckoutQueryFilter) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -97009,6 +101026,9 @@ func (t *TerminalCheckoutQueryFilter) MarshalJSON() ([]byte, error) { } func (t *TerminalCheckoutQueryFilter) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -97045,6 +101065,9 @@ func (t *TerminalCheckoutQuerySort) GetSortOrder() *SortOrder { } func (t *TerminalCheckoutQuerySort) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -97090,6 +101113,9 @@ func (t *TerminalCheckoutQuerySort) MarshalJSON() ([]byte, error) { } func (t *TerminalCheckoutQuerySort) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -97165,6 +101191,9 @@ func (t *TerminalCheckoutUpdatedEvent) GetData() *TerminalCheckoutUpdatedEventDa } func (t *TerminalCheckoutUpdatedEvent) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -97238,6 +101267,9 @@ func (t *TerminalCheckoutUpdatedEvent) MarshalJSON() ([]byte, error) { } func (t *TerminalCheckoutUpdatedEvent) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -97292,6 +101324,9 @@ func (t *TerminalCheckoutUpdatedEventData) GetObject() *TerminalCheckoutUpdatedE } func (t *TerminalCheckoutUpdatedEventData) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -97351,6 +101386,9 @@ func (t *TerminalCheckoutUpdatedEventData) MarshalJSON() ([]byte, error) { } func (t *TerminalCheckoutUpdatedEventData) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -97385,6 +101423,9 @@ func (t *TerminalCheckoutUpdatedEventObject) GetCheckout() *TerminalCheckout { } func (t *TerminalCheckoutUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -97430,6 +101471,9 @@ func (t *TerminalCheckoutUpdatedEventObject) MarshalJSON() ([]byte, error) { } func (t *TerminalCheckoutUpdatedEventObject) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -97606,6 +101650,9 @@ func (t *TerminalRefund) GetLocationID() *string { } func (t *TerminalRefund) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -97742,6 +101789,9 @@ func (t *TerminalRefund) MarshalJSON() ([]byte, error) { } func (t *TerminalRefund) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -97817,6 +101867,9 @@ func (t *TerminalRefundCreatedEvent) GetData() *TerminalRefundCreatedEventData { } func (t *TerminalRefundCreatedEvent) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -97890,6 +101943,9 @@ func (t *TerminalRefundCreatedEvent) MarshalJSON() ([]byte, error) { } func (t *TerminalRefundCreatedEvent) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -97944,6 +102000,9 @@ func (t *TerminalRefundCreatedEventData) GetObject() *TerminalRefundCreatedEvent } func (t *TerminalRefundCreatedEventData) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -98003,6 +102062,9 @@ func (t *TerminalRefundCreatedEventData) MarshalJSON() ([]byte, error) { } func (t *TerminalRefundCreatedEventData) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -98037,6 +102099,9 @@ func (t *TerminalRefundCreatedEventObject) GetRefund() *TerminalRefund { } func (t *TerminalRefundCreatedEventObject) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -98082,6 +102147,9 @@ func (t *TerminalRefundCreatedEventObject) MarshalJSON() ([]byte, error) { } func (t *TerminalRefundCreatedEventObject) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -98126,6 +102194,9 @@ func (t *TerminalRefundQuery) GetSort() *TerminalRefundQuerySort { } func (t *TerminalRefundQuery) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -98178,6 +102249,9 @@ func (t *TerminalRefundQuery) MarshalJSON() ([]byte, error) { } func (t *TerminalRefundQuery) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -98236,6 +102310,9 @@ func (t *TerminalRefundQueryFilter) GetStatus() *string { } func (t *TerminalRefundQueryFilter) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -98295,6 +102372,9 @@ func (t *TerminalRefundQueryFilter) MarshalJSON() ([]byte, error) { } func (t *TerminalRefundQueryFilter) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -98331,6 +102411,9 @@ func (t *TerminalRefundQuerySort) GetSortOrder() *string { } func (t *TerminalRefundQuerySort) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -98376,6 +102459,9 @@ func (t *TerminalRefundQuerySort) MarshalJSON() ([]byte, error) { } func (t *TerminalRefundQuerySort) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -98451,6 +102537,9 @@ func (t *TerminalRefundUpdatedEvent) GetData() *TerminalRefundUpdatedEventData { } func (t *TerminalRefundUpdatedEvent) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -98524,6 +102613,9 @@ func (t *TerminalRefundUpdatedEvent) MarshalJSON() ([]byte, error) { } func (t *TerminalRefundUpdatedEvent) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -98578,6 +102670,9 @@ func (t *TerminalRefundUpdatedEventData) GetObject() *TerminalRefundUpdatedEvent } func (t *TerminalRefundUpdatedEventData) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -98637,6 +102732,9 @@ func (t *TerminalRefundUpdatedEventData) MarshalJSON() ([]byte, error) { } func (t *TerminalRefundUpdatedEventData) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -98671,6 +102769,9 @@ func (t *TerminalRefundUpdatedEventObject) GetRefund() *TerminalRefund { } func (t *TerminalRefundUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -98716,6 +102817,9 @@ func (t *TerminalRefundUpdatedEventObject) MarshalJSON() ([]byte, error) { } func (t *TerminalRefundUpdatedEventObject) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -98801,6 +102905,9 @@ func (t *TestWebhookSubscriptionResponse) GetPayload() map[string]interface{} { } func (t *TestWebhookSubscriptionResponse) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -98881,6 +102988,9 @@ func (t *TestWebhookSubscriptionResponse) MarshalJSON() ([]byte, error) { } func (t *TestWebhookSubscriptionResponse) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -98932,6 +103042,9 @@ func (t *TimeRange) GetEndAt() *string { } func (t *TimeRange) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -98984,6 +103097,9 @@ func (t *TimeRange) MarshalJSON() ([]byte, error) { } func (t *TimeRange) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -99070,6 +103186,9 @@ func (t *TipSettings) GetSmartTipping() *bool { } func (t *TipSettings) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -99143,6 +103262,9 @@ func (t *TipSettings) MarshalJSON() ([]byte, error) { } func (t *TipSettings) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -99284,6 +103406,9 @@ func (t *Transaction) GetOrderID() *string { } func (t *Transaction) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -99392,6 +103517,9 @@ func (t *Transaction) MarshalJSON() ([]byte, error) { } func (t *Transaction) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -99531,6 +103659,9 @@ func (t *TransferOrderCreatedEvent) GetData() *TransferOrderCreatedEventData { } func (t *TransferOrderCreatedEvent) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -99604,6 +103735,9 @@ func (t *TransferOrderCreatedEvent) MarshalJSON() ([]byte, error) { } func (t *TransferOrderCreatedEvent) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -99658,6 +103792,9 @@ func (t *TransferOrderCreatedEventData) GetObject() *TransferOrderCreatedEventOb } func (t *TransferOrderCreatedEventData) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -99717,6 +103854,9 @@ func (t *TransferOrderCreatedEventData) MarshalJSON() ([]byte, error) { } func (t *TransferOrderCreatedEventData) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -99751,6 +103891,9 @@ func (t *TransferOrderCreatedEventObject) GetTransferOrder() *TransferOrder { } func (t *TransferOrderCreatedEventObject) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -99796,6 +103939,9 @@ func (t *TransferOrderCreatedEventObject) MarshalJSON() ([]byte, error) { } func (t *TransferOrderCreatedEventObject) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -99871,6 +104017,9 @@ func (t *TransferOrderDeletedEvent) GetData() *TransferOrderDeletedEventData { } func (t *TransferOrderDeletedEvent) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -99944,6 +104093,9 @@ func (t *TransferOrderDeletedEvent) MarshalJSON() ([]byte, error) { } func (t *TransferOrderDeletedEvent) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -99998,6 +104150,9 @@ func (t *TransferOrderDeletedEventData) GetDeleted() *bool { } func (t *TransferOrderDeletedEventData) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -100057,6 +104212,9 @@ func (t *TransferOrderDeletedEventData) MarshalJSON() ([]byte, error) { } func (t *TransferOrderDeletedEventData) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -100132,6 +104290,9 @@ func (t *TransferOrderUpdatedEvent) GetData() *TransferOrderUpdatedEventData { } func (t *TransferOrderUpdatedEvent) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -100205,6 +104366,9 @@ func (t *TransferOrderUpdatedEvent) MarshalJSON() ([]byte, error) { } func (t *TransferOrderUpdatedEvent) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -100259,6 +104423,9 @@ func (t *TransferOrderUpdatedEventData) GetObject() *TransferOrderUpdatedEventOb } func (t *TransferOrderUpdatedEventData) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -100318,6 +104485,9 @@ func (t *TransferOrderUpdatedEventData) MarshalJSON() ([]byte, error) { } func (t *TransferOrderUpdatedEventData) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -100352,6 +104522,9 @@ func (t *TransferOrderUpdatedEventObject) GetTransferOrder() *TransferOrder { } func (t *TransferOrderUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if t == nil { + return nil + } return t.extraProperties } @@ -100397,6 +104570,9 @@ func (t *TransferOrderUpdatedEventObject) MarshalJSON() ([]byte, error) { } func (t *TransferOrderUpdatedEventObject) String() string { + if t == nil { + return "" + } if len(t.rawJSON) > 0 { if value, err := internal.StringifyJSON(t.rawJSON); err == nil { return value @@ -100443,6 +104619,9 @@ func (u *UpdateBookingCustomAttributeDefinitionResponse) GetErrors() []*Error { } func (u *UpdateBookingCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -100495,6 +104674,9 @@ func (u *UpdateBookingCustomAttributeDefinitionResponse) MarshalJSON() ([]byte, } func (u *UpdateBookingCustomAttributeDefinitionResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -100542,6 +104724,9 @@ func (u *UpdateBreakTypeResponse) GetErrors() []*Error { } func (u *UpdateBreakTypeResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -100594,6 +104779,9 @@ func (u *UpdateBreakTypeResponse) MarshalJSON() ([]byte, error) { } func (u *UpdateBreakTypeResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -100631,6 +104819,9 @@ func (u *UpdateCatalogImageRequest) GetIdempotencyKey() string { } func (u *UpdateCatalogImageRequest) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -100676,6 +104867,9 @@ func (u *UpdateCatalogImageRequest) MarshalJSON() ([]byte, error) { } func (u *UpdateCatalogImageRequest) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -100721,6 +104915,9 @@ func (u *UpdateCatalogImageResponse) GetImage() *CatalogObject { } func (u *UpdateCatalogImageResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -100773,6 +104970,9 @@ func (u *UpdateCatalogImageResponse) MarshalJSON() ([]byte, error) { } func (u *UpdateCatalogImageResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -100819,6 +105019,9 @@ func (u *UpdateCustomerCustomAttributeDefinitionResponse) GetErrors() []*Error { } func (u *UpdateCustomerCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -100871,6 +105074,9 @@ func (u *UpdateCustomerCustomAttributeDefinitionResponse) MarshalJSON() ([]byte, } func (u *UpdateCustomerCustomAttributeDefinitionResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -100919,6 +105125,9 @@ func (u *UpdateCustomerGroupResponse) GetGroup() *CustomerGroup { } func (u *UpdateCustomerGroupResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -100971,6 +105180,9 @@ func (u *UpdateCustomerGroupResponse) MarshalJSON() ([]byte, error) { } func (u *UpdateCustomerGroupResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -101017,6 +105229,9 @@ func (u *UpdateLocationCustomAttributeDefinitionResponse) GetErrors() []*Error { } func (u *UpdateLocationCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -101069,6 +105284,9 @@ func (u *UpdateLocationCustomAttributeDefinitionResponse) MarshalJSON() ([]byte, } func (u *UpdateLocationCustomAttributeDefinitionResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -101115,6 +105333,9 @@ func (u *UpdateMerchantCustomAttributeDefinitionResponse) GetErrors() []*Error { } func (u *UpdateMerchantCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -101167,6 +105388,9 @@ func (u *UpdateMerchantCustomAttributeDefinitionResponse) MarshalJSON() ([]byte, } func (u *UpdateMerchantCustomAttributeDefinitionResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -101212,6 +105436,9 @@ func (u *UpdateOrderCustomAttributeDefinitionResponse) GetErrors() []*Error { } func (u *UpdateOrderCustomAttributeDefinitionResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -101264,6 +105491,9 @@ func (u *UpdateOrderCustomAttributeDefinitionResponse) MarshalJSON() ([]byte, er } func (u *UpdateOrderCustomAttributeDefinitionResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -101308,6 +105538,9 @@ func (u *UpdatePaymentLinkResponse) GetPaymentLink() *PaymentLink { } func (u *UpdatePaymentLinkResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -101360,6 +105593,9 @@ func (u *UpdatePaymentLinkResponse) MarshalJSON() ([]byte, error) { } func (u *UpdatePaymentLinkResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -101407,6 +105643,9 @@ func (u *UpdateShiftResponse) GetErrors() []*Error { } func (u *UpdateShiftResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -101459,6 +105698,9 @@ func (u *UpdateShiftResponse) MarshalJSON() ([]byte, error) { } func (u *UpdateShiftResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -101505,6 +105747,9 @@ func (u *UpdateWageSettingResponse) GetErrors() []*Error { } func (u *UpdateWageSettingResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -101557,6 +105802,9 @@ func (u *UpdateWageSettingResponse) MarshalJSON() ([]byte, error) { } func (u *UpdateWageSettingResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -101606,6 +105854,9 @@ func (u *UpdateWebhookSubscriptionResponse) GetSubscription() *WebhookSubscripti } func (u *UpdateWebhookSubscriptionResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -101658,6 +105909,9 @@ func (u *UpdateWebhookSubscriptionResponse) MarshalJSON() ([]byte, error) { } func (u *UpdateWebhookSubscriptionResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -101707,6 +105961,9 @@ func (u *UpdateWebhookSubscriptionSignatureKeyResponse) GetSignatureKey() *strin } func (u *UpdateWebhookSubscriptionSignatureKeyResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -101759,6 +106016,9 @@ func (u *UpdateWebhookSubscriptionSignatureKeyResponse) MarshalJSON() ([]byte, e } func (u *UpdateWebhookSubscriptionSignatureKeyResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -101806,6 +106066,9 @@ func (u *UpdateWorkweekConfigResponse) GetErrors() []*Error { } func (u *UpdateWorkweekConfigResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -101858,6 +106121,9 @@ func (u *UpdateWorkweekConfigResponse) MarshalJSON() ([]byte, error) { } func (u *UpdateWorkweekConfigResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -101904,6 +106170,9 @@ func (u *UpsertBookingCustomAttributeResponse) GetErrors() []*Error { } func (u *UpsertBookingCustomAttributeResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -101956,6 +106225,9 @@ func (u *UpsertBookingCustomAttributeResponse) MarshalJSON() ([]byte, error) { } func (u *UpsertBookingCustomAttributeResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -102010,6 +106282,9 @@ func (u *UpsertCatalogObjectResponse) GetIDMappings() []*CatalogIDMapping { } func (u *UpsertCatalogObjectResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -102069,6 +106344,9 @@ func (u *UpsertCatalogObjectResponse) MarshalJSON() ([]byte, error) { } func (u *UpsertCatalogObjectResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -102115,6 +106393,9 @@ func (u *UpsertCustomerCustomAttributeResponse) GetErrors() []*Error { } func (u *UpsertCustomerCustomAttributeResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -102167,6 +106448,9 @@ func (u *UpsertCustomerCustomAttributeResponse) MarshalJSON() ([]byte, error) { } func (u *UpsertCustomerCustomAttributeResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -102213,6 +106497,9 @@ func (u *UpsertLocationCustomAttributeResponse) GetErrors() []*Error { } func (u *UpsertLocationCustomAttributeResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -102265,6 +106552,9 @@ func (u *UpsertLocationCustomAttributeResponse) MarshalJSON() ([]byte, error) { } func (u *UpsertLocationCustomAttributeResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -102311,6 +106601,9 @@ func (u *UpsertMerchantCustomAttributeResponse) GetErrors() []*Error { } func (u *UpsertMerchantCustomAttributeResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -102363,6 +106656,9 @@ func (u *UpsertMerchantCustomAttributeResponse) MarshalJSON() ([]byte, error) { } func (u *UpsertMerchantCustomAttributeResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -102408,6 +106704,9 @@ func (u *UpsertOrderCustomAttributeResponse) GetErrors() []*Error { } func (u *UpsertOrderCustomAttributeResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -102460,6 +106759,9 @@ func (u *UpsertOrderCustomAttributeResponse) MarshalJSON() ([]byte, error) { } func (u *UpsertOrderCustomAttributeResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -102549,6 +106851,9 @@ func (v *VendorCreatedEvent) GetData() *VendorCreatedEventData { } func (v *VendorCreatedEvent) GetExtraProperties() map[string]interface{} { + if v == nil { + return nil + } return v.extraProperties } @@ -102629,6 +106934,9 @@ func (v *VendorCreatedEvent) MarshalJSON() ([]byte, error) { } func (v *VendorCreatedEvent) String() string { + if v == nil { + return "" + } if len(v.rawJSON) > 0 { if value, err := internal.StringifyJSON(v.rawJSON); err == nil { return value @@ -102684,6 +106992,9 @@ func (v *VendorCreatedEventData) GetObject() *VendorCreatedEventObject { } func (v *VendorCreatedEventData) GetExtraProperties() map[string]interface{} { + if v == nil { + return nil + } return v.extraProperties } @@ -102743,6 +107054,9 @@ func (v *VendorCreatedEventData) MarshalJSON() ([]byte, error) { } func (v *VendorCreatedEventData) String() string { + if v == nil { + return "" + } if len(v.rawJSON) > 0 { if value, err := internal.StringifyJSON(v.rawJSON); err == nil { return value @@ -102781,6 +107095,9 @@ func (v *VendorCreatedEventObject) GetVendor() *Vendor { } func (v *VendorCreatedEventObject) GetExtraProperties() map[string]interface{} { + if v == nil { + return nil + } return v.extraProperties } @@ -102833,6 +107150,9 @@ func (v *VendorCreatedEventObject) MarshalJSON() ([]byte, error) { } func (v *VendorCreatedEventObject) String() string { + if v == nil { + return "" + } if len(v.rawJSON) > 0 { if value, err := internal.StringifyJSON(v.rawJSON); err == nil { return value @@ -102921,6 +107241,9 @@ func (v *VendorUpdatedEvent) GetData() *VendorUpdatedEventData { } func (v *VendorUpdatedEvent) GetExtraProperties() map[string]interface{} { + if v == nil { + return nil + } return v.extraProperties } @@ -103001,6 +107324,9 @@ func (v *VendorUpdatedEvent) MarshalJSON() ([]byte, error) { } func (v *VendorUpdatedEvent) String() string { + if v == nil { + return "" + } if len(v.rawJSON) > 0 { if value, err := internal.StringifyJSON(v.rawJSON); err == nil { return value @@ -103056,6 +107382,9 @@ func (v *VendorUpdatedEventData) GetObject() *VendorUpdatedEventObject { } func (v *VendorUpdatedEventData) GetExtraProperties() map[string]interface{} { + if v == nil { + return nil + } return v.extraProperties } @@ -103115,6 +107444,9 @@ func (v *VendorUpdatedEventData) MarshalJSON() ([]byte, error) { } func (v *VendorUpdatedEventData) String() string { + if v == nil { + return "" + } if len(v.rawJSON) > 0 { if value, err := internal.StringifyJSON(v.rawJSON); err == nil { return value @@ -103153,6 +107485,9 @@ func (v *VendorUpdatedEventObject) GetVendor() *Vendor { } func (v *VendorUpdatedEventObject) GetExtraProperties() map[string]interface{} { + if v == nil { + return nil + } return v.extraProperties } @@ -103205,6 +107540,9 @@ func (v *VendorUpdatedEventObject) MarshalJSON() ([]byte, error) { } func (v *VendorUpdatedEventObject) String() string { + if v == nil { + return "" + } if len(v.rawJSON) > 0 { if value, err := internal.StringifyJSON(v.rawJSON); err == nil { return value @@ -103270,6 +107608,9 @@ func (v *VoidTransactionResponse) GetErrors() []*Error { } func (v *VoidTransactionResponse) GetExtraProperties() map[string]interface{} { + if v == nil { + return nil + } return v.extraProperties } @@ -103315,6 +107656,9 @@ func (v *VoidTransactionResponse) MarshalJSON() ([]byte, error) { } func (v *VoidTransactionResponse) String() string { + if v == nil { + return "" + } if len(v.rawJSON) > 0 { if value, err := internal.StringifyJSON(v.rawJSON); err == nil { return value @@ -103405,6 +107749,9 @@ func (w *WageSetting) GetUpdatedAt() *string { } func (w *WageSetting) GetExtraProperties() map[string]interface{} { + if w == nil { + return nil + } return w.extraProperties } @@ -103485,6 +107832,9 @@ func (w *WageSetting) MarshalJSON() ([]byte, error) { } func (w *WageSetting) String() string { + if w == nil { + return "" + } if len(w.rawJSON) > 0 { if value, err := internal.StringifyJSON(w.rawJSON); err == nil { return value @@ -103604,6 +107954,9 @@ func (w *WebhookSubscription) GetUpdatedAt() *string { } func (w *WebhookSubscription) GetExtraProperties() map[string]interface{} { + if w == nil { + return nil + } return w.extraProperties } @@ -103705,6 +108058,9 @@ func (w *WebhookSubscription) MarshalJSON() ([]byte, error) { } func (w *WebhookSubscription) String() string { + if w == nil { + return "" + } if len(w.rawJSON) > 0 { if value, err := internal.StringifyJSON(w.rawJSON); err == nil { return value @@ -103836,6 +108192,9 @@ func (w *WorkweekConfig) GetUpdatedAt() *string { } func (w *WorkweekConfig) GetExtraProperties() map[string]interface{} { + if w == nil { + return nil + } return w.extraProperties } @@ -103916,6 +108275,9 @@ func (w *WorkweekConfig) MarshalJSON() ([]byte, error) { } func (w *WorkweekConfig) String() string { + if w == nil { + return "" + } if len(w.rawJSON) > 0 { if value, err := internal.StringifyJSON(w.rawJSON); err == nil { return value diff --git a/types_test.go b/types_test.go new file mode 100644 index 0000000..c1cf755 --- /dev/null +++ b/types_test.go @@ -0,0 +1,277427 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersAcceptedPaymentMethods(t *testing.T) { + t.Run("SetApplePay", func(t *testing.T) { + obj := &AcceptedPaymentMethods{} + var fernTestValueApplePay *bool + obj.SetApplePay(fernTestValueApplePay) + assert.Equal(t, fernTestValueApplePay, obj.ApplePay) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGooglePay", func(t *testing.T) { + obj := &AcceptedPaymentMethods{} + var fernTestValueGooglePay *bool + obj.SetGooglePay(fernTestValueGooglePay) + assert.Equal(t, fernTestValueGooglePay, obj.GooglePay) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCashAppPay", func(t *testing.T) { + obj := &AcceptedPaymentMethods{} + var fernTestValueCashAppPay *bool + obj.SetCashAppPay(fernTestValueCashAppPay) + assert.Equal(t, fernTestValueCashAppPay, obj.CashAppPay) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAfterpayClearpay", func(t *testing.T) { + obj := &AcceptedPaymentMethods{} + var fernTestValueAfterpayClearpay *bool + obj.SetAfterpayClearpay(fernTestValueAfterpayClearpay) + assert.Equal(t, fernTestValueAfterpayClearpay, obj.AfterpayClearpay) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersAcceptedPaymentMethods(t *testing.T) { + t.Run("GetApplePay", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AcceptedPaymentMethods{} + var expected *bool + obj.ApplePay = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetApplePay(), "getter should return the property value") + }) + + t.Run("GetApplePay_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AcceptedPaymentMethods{} + obj.ApplePay = nil + + // Act & Assert + assert.Nil(t, obj.GetApplePay(), "getter should return nil when property is nil") + }) + + t.Run("GetApplePay_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AcceptedPaymentMethods + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetApplePay() // Should return zero value + }) + + t.Run("GetGooglePay", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AcceptedPaymentMethods{} + var expected *bool + obj.GooglePay = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGooglePay(), "getter should return the property value") + }) + + t.Run("GetGooglePay_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AcceptedPaymentMethods{} + obj.GooglePay = nil + + // Act & Assert + assert.Nil(t, obj.GetGooglePay(), "getter should return nil when property is nil") + }) + + t.Run("GetGooglePay_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AcceptedPaymentMethods + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGooglePay() // Should return zero value + }) + + t.Run("GetCashAppPay", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AcceptedPaymentMethods{} + var expected *bool + obj.CashAppPay = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCashAppPay(), "getter should return the property value") + }) + + t.Run("GetCashAppPay_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AcceptedPaymentMethods{} + obj.CashAppPay = nil + + // Act & Assert + assert.Nil(t, obj.GetCashAppPay(), "getter should return nil when property is nil") + }) + + t.Run("GetCashAppPay_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AcceptedPaymentMethods + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCashAppPay() // Should return zero value + }) + + t.Run("GetAfterpayClearpay", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AcceptedPaymentMethods{} + var expected *bool + obj.AfterpayClearpay = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAfterpayClearpay(), "getter should return the property value") + }) + + t.Run("GetAfterpayClearpay_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AcceptedPaymentMethods{} + obj.AfterpayClearpay = nil + + // Act & Assert + assert.Nil(t, obj.GetAfterpayClearpay(), "getter should return nil when property is nil") + }) + + t.Run("GetAfterpayClearpay_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AcceptedPaymentMethods + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAfterpayClearpay() // Should return zero value + }) + +} + +func TestSettersMarkExplicitAcceptedPaymentMethods(t *testing.T) { + t.Run("SetApplePay_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AcceptedPaymentMethods{} + var fernTestValueApplePay *bool + + // Act + obj.SetApplePay(fernTestValueApplePay) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGooglePay_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AcceptedPaymentMethods{} + var fernTestValueGooglePay *bool + + // Act + obj.SetGooglePay(fernTestValueGooglePay) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCashAppPay_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AcceptedPaymentMethods{} + var fernTestValueCashAppPay *bool + + // Act + obj.SetCashAppPay(fernTestValueCashAppPay) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAfterpayClearpay_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AcceptedPaymentMethods{} + var fernTestValueAfterpayClearpay *bool + + // Act + obj.SetAfterpayClearpay(fernTestValueAfterpayClearpay) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersAccumulateLoyaltyPointsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &AccumulateLoyaltyPointsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEvent", func(t *testing.T) { + obj := &AccumulateLoyaltyPointsResponse{} + var fernTestValueEvent *LoyaltyEvent + obj.SetEvent(fernTestValueEvent) + assert.Equal(t, fernTestValueEvent, obj.Event) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEvents", func(t *testing.T) { + obj := &AccumulateLoyaltyPointsResponse{} + var fernTestValueEvents []*LoyaltyEvent + obj.SetEvents(fernTestValueEvents) + assert.Equal(t, fernTestValueEvents, obj.Events) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersAccumulateLoyaltyPointsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AccumulateLoyaltyPointsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AccumulateLoyaltyPointsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AccumulateLoyaltyPointsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetEvent", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AccumulateLoyaltyPointsResponse{} + var expected *LoyaltyEvent + obj.Event = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEvent(), "getter should return the property value") + }) + + t.Run("GetEvent_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AccumulateLoyaltyPointsResponse{} + obj.Event = nil + + // Act & Assert + assert.Nil(t, obj.GetEvent(), "getter should return nil when property is nil") + }) + + t.Run("GetEvent_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AccumulateLoyaltyPointsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEvent() // Should return zero value + }) + + t.Run("GetEvents", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AccumulateLoyaltyPointsResponse{} + var expected []*LoyaltyEvent + obj.Events = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEvents(), "getter should return the property value") + }) + + t.Run("GetEvents_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AccumulateLoyaltyPointsResponse{} + obj.Events = nil + + // Act & Assert + assert.Nil(t, obj.GetEvents(), "getter should return nil when property is nil") + }) + + t.Run("GetEvents_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AccumulateLoyaltyPointsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEvents() // Should return zero value + }) + +} + +func TestSettersMarkExplicitAccumulateLoyaltyPointsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AccumulateLoyaltyPointsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEvent_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AccumulateLoyaltyPointsResponse{} + var fernTestValueEvent *LoyaltyEvent + + // Act + obj.SetEvent(fernTestValueEvent) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEvents_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AccumulateLoyaltyPointsResponse{} + var fernTestValueEvents []*LoyaltyEvent + + // Act + obj.SetEvents(fernTestValueEvents) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersAddGroupToCustomerResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &AddGroupToCustomerResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersAddGroupToCustomerResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AddGroupToCustomerResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AddGroupToCustomerResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AddGroupToCustomerResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitAddGroupToCustomerResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AddGroupToCustomerResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersAdditionalRecipient(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &AdditionalRecipient{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDescription", func(t *testing.T) { + obj := &AdditionalRecipient{} + var fernTestValueDescription *string + obj.SetDescription(fernTestValueDescription) + assert.Equal(t, fernTestValueDescription, obj.Description) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &AdditionalRecipient{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReceivableID", func(t *testing.T) { + obj := &AdditionalRecipient{} + var fernTestValueReceivableID *string + obj.SetReceivableID(fernTestValueReceivableID) + assert.Equal(t, fernTestValueReceivableID, obj.ReceivableID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersAdditionalRecipient(t *testing.T) { + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AdditionalRecipient{} + var expected string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AdditionalRecipient + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetDescription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AdditionalRecipient{} + var expected *string + obj.Description = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDescription(), "getter should return the property value") + }) + + t.Run("GetDescription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AdditionalRecipient{} + obj.Description = nil + + // Act & Assert + assert.Nil(t, obj.GetDescription(), "getter should return nil when property is nil") + }) + + t.Run("GetDescription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AdditionalRecipient + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDescription() // Should return zero value + }) + + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AdditionalRecipient{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AdditionalRecipient{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AdditionalRecipient + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + + t.Run("GetReceivableID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AdditionalRecipient{} + var expected *string + obj.ReceivableID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReceivableID(), "getter should return the property value") + }) + + t.Run("GetReceivableID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AdditionalRecipient{} + obj.ReceivableID = nil + + // Act & Assert + assert.Nil(t, obj.GetReceivableID(), "getter should return nil when property is nil") + }) + + t.Run("GetReceivableID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AdditionalRecipient + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReceivableID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitAdditionalRecipient(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AdditionalRecipient{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDescription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AdditionalRecipient{} + var fernTestValueDescription *string + + // Act + obj.SetDescription(fernTestValueDescription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AdditionalRecipient{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReceivableID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AdditionalRecipient{} + var fernTestValueReceivableID *string + + // Act + obj.SetReceivableID(fernTestValueReceivableID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersAddress(t *testing.T) { + t.Run("SetAddressLine1", func(t *testing.T) { + obj := &Address{} + var fernTestValueAddressLine1 *string + obj.SetAddressLine1(fernTestValueAddressLine1) + assert.Equal(t, fernTestValueAddressLine1, obj.AddressLine1) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAddressLine2", func(t *testing.T) { + obj := &Address{} + var fernTestValueAddressLine2 *string + obj.SetAddressLine2(fernTestValueAddressLine2) + assert.Equal(t, fernTestValueAddressLine2, obj.AddressLine2) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAddressLine3", func(t *testing.T) { + obj := &Address{} + var fernTestValueAddressLine3 *string + obj.SetAddressLine3(fernTestValueAddressLine3) + assert.Equal(t, fernTestValueAddressLine3, obj.AddressLine3) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocality", func(t *testing.T) { + obj := &Address{} + var fernTestValueLocality *string + obj.SetLocality(fernTestValueLocality) + assert.Equal(t, fernTestValueLocality, obj.Locality) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSublocality", func(t *testing.T) { + obj := &Address{} + var fernTestValueSublocality *string + obj.SetSublocality(fernTestValueSublocality) + assert.Equal(t, fernTestValueSublocality, obj.Sublocality) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSublocality2", func(t *testing.T) { + obj := &Address{} + var fernTestValueSublocality2 *string + obj.SetSublocality2(fernTestValueSublocality2) + assert.Equal(t, fernTestValueSublocality2, obj.Sublocality2) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSublocality3", func(t *testing.T) { + obj := &Address{} + var fernTestValueSublocality3 *string + obj.SetSublocality3(fernTestValueSublocality3) + assert.Equal(t, fernTestValueSublocality3, obj.Sublocality3) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAdministrativeDistrictLevel1", func(t *testing.T) { + obj := &Address{} + var fernTestValueAdministrativeDistrictLevel1 *string + obj.SetAdministrativeDistrictLevel1(fernTestValueAdministrativeDistrictLevel1) + assert.Equal(t, fernTestValueAdministrativeDistrictLevel1, obj.AdministrativeDistrictLevel1) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAdministrativeDistrictLevel2", func(t *testing.T) { + obj := &Address{} + var fernTestValueAdministrativeDistrictLevel2 *string + obj.SetAdministrativeDistrictLevel2(fernTestValueAdministrativeDistrictLevel2) + assert.Equal(t, fernTestValueAdministrativeDistrictLevel2, obj.AdministrativeDistrictLevel2) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAdministrativeDistrictLevel3", func(t *testing.T) { + obj := &Address{} + var fernTestValueAdministrativeDistrictLevel3 *string + obj.SetAdministrativeDistrictLevel3(fernTestValueAdministrativeDistrictLevel3) + assert.Equal(t, fernTestValueAdministrativeDistrictLevel3, obj.AdministrativeDistrictLevel3) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPostalCode", func(t *testing.T) { + obj := &Address{} + var fernTestValuePostalCode *string + obj.SetPostalCode(fernTestValuePostalCode) + assert.Equal(t, fernTestValuePostalCode, obj.PostalCode) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCountry", func(t *testing.T) { + obj := &Address{} + var fernTestValueCountry *Country + obj.SetCountry(fernTestValueCountry) + assert.Equal(t, fernTestValueCountry, obj.Country) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFirstName", func(t *testing.T) { + obj := &Address{} + var fernTestValueFirstName *string + obj.SetFirstName(fernTestValueFirstName) + assert.Equal(t, fernTestValueFirstName, obj.FirstName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLastName", func(t *testing.T) { + obj := &Address{} + var fernTestValueLastName *string + obj.SetLastName(fernTestValueLastName) + assert.Equal(t, fernTestValueLastName, obj.LastName) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersAddress(t *testing.T) { + t.Run("GetAddressLine1", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + var expected *string + obj.AddressLine1 = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAddressLine1(), "getter should return the property value") + }) + + t.Run("GetAddressLine1_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + obj.AddressLine1 = nil + + // Act & Assert + assert.Nil(t, obj.GetAddressLine1(), "getter should return nil when property is nil") + }) + + t.Run("GetAddressLine1_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Address + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAddressLine1() // Should return zero value + }) + + t.Run("GetAddressLine2", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + var expected *string + obj.AddressLine2 = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAddressLine2(), "getter should return the property value") + }) + + t.Run("GetAddressLine2_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + obj.AddressLine2 = nil + + // Act & Assert + assert.Nil(t, obj.GetAddressLine2(), "getter should return nil when property is nil") + }) + + t.Run("GetAddressLine2_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Address + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAddressLine2() // Should return zero value + }) + + t.Run("GetAddressLine3", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + var expected *string + obj.AddressLine3 = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAddressLine3(), "getter should return the property value") + }) + + t.Run("GetAddressLine3_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + obj.AddressLine3 = nil + + // Act & Assert + assert.Nil(t, obj.GetAddressLine3(), "getter should return nil when property is nil") + }) + + t.Run("GetAddressLine3_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Address + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAddressLine3() // Should return zero value + }) + + t.Run("GetLocality", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + var expected *string + obj.Locality = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocality(), "getter should return the property value") + }) + + t.Run("GetLocality_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + obj.Locality = nil + + // Act & Assert + assert.Nil(t, obj.GetLocality(), "getter should return nil when property is nil") + }) + + t.Run("GetLocality_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Address + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocality() // Should return zero value + }) + + t.Run("GetSublocality", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + var expected *string + obj.Sublocality = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSublocality(), "getter should return the property value") + }) + + t.Run("GetSublocality_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + obj.Sublocality = nil + + // Act & Assert + assert.Nil(t, obj.GetSublocality(), "getter should return nil when property is nil") + }) + + t.Run("GetSublocality_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Address + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSublocality() // Should return zero value + }) + + t.Run("GetSublocality2", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + var expected *string + obj.Sublocality2 = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSublocality2(), "getter should return the property value") + }) + + t.Run("GetSublocality2_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + obj.Sublocality2 = nil + + // Act & Assert + assert.Nil(t, obj.GetSublocality2(), "getter should return nil when property is nil") + }) + + t.Run("GetSublocality2_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Address + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSublocality2() // Should return zero value + }) + + t.Run("GetSublocality3", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + var expected *string + obj.Sublocality3 = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSublocality3(), "getter should return the property value") + }) + + t.Run("GetSublocality3_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + obj.Sublocality3 = nil + + // Act & Assert + assert.Nil(t, obj.GetSublocality3(), "getter should return nil when property is nil") + }) + + t.Run("GetSublocality3_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Address + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSublocality3() // Should return zero value + }) + + t.Run("GetAdministrativeDistrictLevel1", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + var expected *string + obj.AdministrativeDistrictLevel1 = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAdministrativeDistrictLevel1(), "getter should return the property value") + }) + + t.Run("GetAdministrativeDistrictLevel1_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + obj.AdministrativeDistrictLevel1 = nil + + // Act & Assert + assert.Nil(t, obj.GetAdministrativeDistrictLevel1(), "getter should return nil when property is nil") + }) + + t.Run("GetAdministrativeDistrictLevel1_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Address + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAdministrativeDistrictLevel1() // Should return zero value + }) + + t.Run("GetAdministrativeDistrictLevel2", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + var expected *string + obj.AdministrativeDistrictLevel2 = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAdministrativeDistrictLevel2(), "getter should return the property value") + }) + + t.Run("GetAdministrativeDistrictLevel2_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + obj.AdministrativeDistrictLevel2 = nil + + // Act & Assert + assert.Nil(t, obj.GetAdministrativeDistrictLevel2(), "getter should return nil when property is nil") + }) + + t.Run("GetAdministrativeDistrictLevel2_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Address + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAdministrativeDistrictLevel2() // Should return zero value + }) + + t.Run("GetAdministrativeDistrictLevel3", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + var expected *string + obj.AdministrativeDistrictLevel3 = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAdministrativeDistrictLevel3(), "getter should return the property value") + }) + + t.Run("GetAdministrativeDistrictLevel3_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + obj.AdministrativeDistrictLevel3 = nil + + // Act & Assert + assert.Nil(t, obj.GetAdministrativeDistrictLevel3(), "getter should return nil when property is nil") + }) + + t.Run("GetAdministrativeDistrictLevel3_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Address + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAdministrativeDistrictLevel3() // Should return zero value + }) + + t.Run("GetPostalCode", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + var expected *string + obj.PostalCode = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPostalCode(), "getter should return the property value") + }) + + t.Run("GetPostalCode_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + obj.PostalCode = nil + + // Act & Assert + assert.Nil(t, obj.GetPostalCode(), "getter should return nil when property is nil") + }) + + t.Run("GetPostalCode_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Address + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPostalCode() // Should return zero value + }) + + t.Run("GetCountry", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + var expected *Country + obj.Country = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCountry(), "getter should return the property value") + }) + + t.Run("GetCountry_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + obj.Country = nil + + // Act & Assert + assert.Nil(t, obj.GetCountry(), "getter should return nil when property is nil") + }) + + t.Run("GetCountry_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Address + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCountry() // Should return zero value + }) + + t.Run("GetFirstName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + var expected *string + obj.FirstName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFirstName(), "getter should return the property value") + }) + + t.Run("GetFirstName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + obj.FirstName = nil + + // Act & Assert + assert.Nil(t, obj.GetFirstName(), "getter should return nil when property is nil") + }) + + t.Run("GetFirstName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Address + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFirstName() // Should return zero value + }) + + t.Run("GetLastName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + var expected *string + obj.LastName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLastName(), "getter should return the property value") + }) + + t.Run("GetLastName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + obj.LastName = nil + + // Act & Assert + assert.Nil(t, obj.GetLastName(), "getter should return nil when property is nil") + }) + + t.Run("GetLastName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Address + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLastName() // Should return zero value + }) + +} + +func TestSettersMarkExplicitAddress(t *testing.T) { + t.Run("SetAddressLine1_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + var fernTestValueAddressLine1 *string + + // Act + obj.SetAddressLine1(fernTestValueAddressLine1) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAddressLine2_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + var fernTestValueAddressLine2 *string + + // Act + obj.SetAddressLine2(fernTestValueAddressLine2) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAddressLine3_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + var fernTestValueAddressLine3 *string + + // Act + obj.SetAddressLine3(fernTestValueAddressLine3) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocality_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + var fernTestValueLocality *string + + // Act + obj.SetLocality(fernTestValueLocality) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSublocality_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + var fernTestValueSublocality *string + + // Act + obj.SetSublocality(fernTestValueSublocality) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSublocality2_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + var fernTestValueSublocality2 *string + + // Act + obj.SetSublocality2(fernTestValueSublocality2) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSublocality3_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + var fernTestValueSublocality3 *string + + // Act + obj.SetSublocality3(fernTestValueSublocality3) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAdministrativeDistrictLevel1_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + var fernTestValueAdministrativeDistrictLevel1 *string + + // Act + obj.SetAdministrativeDistrictLevel1(fernTestValueAdministrativeDistrictLevel1) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAdministrativeDistrictLevel2_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + var fernTestValueAdministrativeDistrictLevel2 *string + + // Act + obj.SetAdministrativeDistrictLevel2(fernTestValueAdministrativeDistrictLevel2) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAdministrativeDistrictLevel3_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + var fernTestValueAdministrativeDistrictLevel3 *string + + // Act + obj.SetAdministrativeDistrictLevel3(fernTestValueAdministrativeDistrictLevel3) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPostalCode_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + var fernTestValuePostalCode *string + + // Act + obj.SetPostalCode(fernTestValuePostalCode) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCountry_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + var fernTestValueCountry *Country + + // Act + obj.SetCountry(fernTestValueCountry) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFirstName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + var fernTestValueFirstName *string + + // Act + obj.SetFirstName(fernTestValueFirstName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLastName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + var fernTestValueLastName *string + + // Act + obj.SetLastName(fernTestValueLastName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersAdjustLoyaltyPointsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &AdjustLoyaltyPointsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEvent", func(t *testing.T) { + obj := &AdjustLoyaltyPointsResponse{} + var fernTestValueEvent *LoyaltyEvent + obj.SetEvent(fernTestValueEvent) + assert.Equal(t, fernTestValueEvent, obj.Event) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersAdjustLoyaltyPointsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AdjustLoyaltyPointsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AdjustLoyaltyPointsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AdjustLoyaltyPointsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetEvent", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AdjustLoyaltyPointsResponse{} + var expected *LoyaltyEvent + obj.Event = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEvent(), "getter should return the property value") + }) + + t.Run("GetEvent_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AdjustLoyaltyPointsResponse{} + obj.Event = nil + + // Act & Assert + assert.Nil(t, obj.GetEvent(), "getter should return nil when property is nil") + }) + + t.Run("GetEvent_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AdjustLoyaltyPointsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEvent() // Should return zero value + }) + +} + +func TestSettersMarkExplicitAdjustLoyaltyPointsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AdjustLoyaltyPointsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEvent_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AdjustLoyaltyPointsResponse{} + var fernTestValueEvent *LoyaltyEvent + + // Act + obj.SetEvent(fernTestValueEvent) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBankAccountCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &BankAccountCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &BankAccountCreatedEvent{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &BankAccountCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &BankAccountCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &BankAccountCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &BankAccountCreatedEvent{} + var fernTestValueData *BankAccountCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBankAccountCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEvent{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEvent{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEvent{} + var expected *BankAccountCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBankAccountCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEvent{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEvent{} + var fernTestValueData *BankAccountCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBankAccountCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &BankAccountCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &BankAccountCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &BankAccountCreatedEventData{} + var fernTestValueObject *BankAccountCreatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBankAccountCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEventData{} + var expected *BankAccountCreatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBankAccountCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEventData{} + var fernTestValueObject *BankAccountCreatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBankAccountCreatedEventObject(t *testing.T) { + t.Run("SetBankAccount", func(t *testing.T) { + obj := &BankAccountCreatedEventObject{} + var fernTestValueBankAccount *BankAccount + obj.SetBankAccount(fernTestValueBankAccount) + assert.Equal(t, fernTestValueBankAccount, obj.BankAccount) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBankAccountCreatedEventObject(t *testing.T) { + t.Run("GetBankAccount", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEventObject{} + var expected *BankAccount + obj.BankAccount = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBankAccount(), "getter should return the property value") + }) + + t.Run("GetBankAccount_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEventObject{} + obj.BankAccount = nil + + // Act & Assert + assert.Nil(t, obj.GetBankAccount(), "getter should return nil when property is nil") + }) + + t.Run("GetBankAccount_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountCreatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBankAccount() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBankAccountCreatedEventObject(t *testing.T) { + t.Run("SetBankAccount_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEventObject{} + var fernTestValueBankAccount *BankAccount + + // Act + obj.SetBankAccount(fernTestValueBankAccount) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBankAccountDisabledEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &BankAccountDisabledEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &BankAccountDisabledEvent{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &BankAccountDisabledEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &BankAccountDisabledEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &BankAccountDisabledEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &BankAccountDisabledEvent{} + var fernTestValueData *BankAccountDisabledEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBankAccountDisabledEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountDisabledEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEvent{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEvent{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountDisabledEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountDisabledEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountDisabledEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountDisabledEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEvent{} + var expected *BankAccountDisabledEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountDisabledEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBankAccountDisabledEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEvent{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEvent{} + var fernTestValueData *BankAccountDisabledEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBankAccountDisabledEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &BankAccountDisabledEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &BankAccountDisabledEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &BankAccountDisabledEventData{} + var fernTestValueObject *BankAccountDisabledEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBankAccountDisabledEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountDisabledEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountDisabledEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEventData{} + var expected *BankAccountDisabledEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountDisabledEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBankAccountDisabledEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEventData{} + var fernTestValueObject *BankAccountDisabledEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBankAccountDisabledEventObject(t *testing.T) { + t.Run("SetBankAccount", func(t *testing.T) { + obj := &BankAccountDisabledEventObject{} + var fernTestValueBankAccount *BankAccount + obj.SetBankAccount(fernTestValueBankAccount) + assert.Equal(t, fernTestValueBankAccount, obj.BankAccount) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBankAccountDisabledEventObject(t *testing.T) { + t.Run("GetBankAccount", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEventObject{} + var expected *BankAccount + obj.BankAccount = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBankAccount(), "getter should return the property value") + }) + + t.Run("GetBankAccount_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEventObject{} + obj.BankAccount = nil + + // Act & Assert + assert.Nil(t, obj.GetBankAccount(), "getter should return nil when property is nil") + }) + + t.Run("GetBankAccount_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountDisabledEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBankAccount() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBankAccountDisabledEventObject(t *testing.T) { + t.Run("SetBankAccount_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEventObject{} + var fernTestValueBankAccount *BankAccount + + // Act + obj.SetBankAccount(fernTestValueBankAccount) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBankAccountVerifiedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &BankAccountVerifiedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &BankAccountVerifiedEvent{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &BankAccountVerifiedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &BankAccountVerifiedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &BankAccountVerifiedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &BankAccountVerifiedEvent{} + var fernTestValueData *BankAccountVerifiedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBankAccountVerifiedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountVerifiedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEvent{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEvent{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountVerifiedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountVerifiedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountVerifiedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountVerifiedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEvent{} + var expected *BankAccountVerifiedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountVerifiedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBankAccountVerifiedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEvent{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEvent{} + var fernTestValueData *BankAccountVerifiedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBankAccountVerifiedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &BankAccountVerifiedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &BankAccountVerifiedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &BankAccountVerifiedEventData{} + var fernTestValueObject *BankAccountVerifiedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBankAccountVerifiedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountVerifiedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountVerifiedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEventData{} + var expected *BankAccountVerifiedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountVerifiedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBankAccountVerifiedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEventData{} + var fernTestValueObject *BankAccountVerifiedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBankAccountVerifiedEventObject(t *testing.T) { + t.Run("SetBankAccount", func(t *testing.T) { + obj := &BankAccountVerifiedEventObject{} + var fernTestValueBankAccount *BankAccount + obj.SetBankAccount(fernTestValueBankAccount) + assert.Equal(t, fernTestValueBankAccount, obj.BankAccount) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBankAccountVerifiedEventObject(t *testing.T) { + t.Run("GetBankAccount", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEventObject{} + var expected *BankAccount + obj.BankAccount = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBankAccount(), "getter should return the property value") + }) + + t.Run("GetBankAccount_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEventObject{} + obj.BankAccount = nil + + // Act & Assert + assert.Nil(t, obj.GetBankAccount(), "getter should return nil when property is nil") + }) + + t.Run("GetBankAccount_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountVerifiedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBankAccount() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBankAccountVerifiedEventObject(t *testing.T) { + t.Run("SetBankAccount_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEventObject{} + var fernTestValueBankAccount *BankAccount + + // Act + obj.SetBankAccount(fernTestValueBankAccount) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest(t *testing.T) { + t.Run("SetCustomerID", func(t *testing.T) { + obj := &BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest{} + var fernTestValueCustomerID string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttribute", func(t *testing.T) { + obj := &BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest{} + var fernTestValueCustomAttribute *CustomAttribute + obj.SetCustomAttribute(fernTestValueCustomAttribute) + assert.Equal(t, fernTestValueCustomAttribute, obj.CustomAttribute) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest(t *testing.T) { + t.Run("GetCustomerID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest{} + var expected string + obj.CustomerID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomerID(), "getter should return the property value") + }) + + t.Run("GetCustomerID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomerID() // Should return zero value + }) + + t.Run("GetCustomAttribute", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest{} + var expected *CustomAttribute + obj.CustomAttribute = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttribute(), "getter should return the property value") + }) + + t.Run("GetCustomAttribute_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest{} + obj.CustomAttribute = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttribute(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttribute_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttribute() // Should return zero value + }) + + t.Run("GetIdempotencyKey", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest{} + var expected *string + obj.IdempotencyKey = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIdempotencyKey(), "getter should return the property value") + }) + + t.Run("GetIdempotencyKey_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest{} + obj.IdempotencyKey = nil + + // Act & Assert + assert.Nil(t, obj.GetIdempotencyKey(), "getter should return nil when property is nil") + }) + + t.Run("GetIdempotencyKey_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIdempotencyKey() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest(t *testing.T) { + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest{} + var fernTestValueCustomerID string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttribute_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest{} + var fernTestValueCustomAttribute *CustomAttribute + + // Act + obj.SetCustomAttribute(fernTestValueCustomAttribute) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBatchUpsertCustomerCustomAttributesResponse(t *testing.T) { + t.Run("SetValues", func(t *testing.T) { + obj := &BatchUpsertCustomerCustomAttributesResponse{} + var fernTestValueValues map[string]*BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse + obj.SetValues(fernTestValueValues) + assert.Equal(t, fernTestValueValues, obj.Values) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &BatchUpsertCustomerCustomAttributesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBatchUpsertCustomerCustomAttributesResponse(t *testing.T) { + t.Run("GetValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCustomerCustomAttributesResponse{} + var expected map[string]*BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse + obj.Values = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetValues(), "getter should return the property value") + }) + + t.Run("GetValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCustomerCustomAttributesResponse{} + obj.Values = nil + + // Act & Assert + assert.Nil(t, obj.GetValues(), "getter should return nil when property is nil") + }) + + t.Run("GetValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchUpsertCustomerCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetValues() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCustomerCustomAttributesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCustomerCustomAttributesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchUpsertCustomerCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBatchUpsertCustomerCustomAttributesResponse(t *testing.T) { + t.Run("SetValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCustomerCustomAttributesResponse{} + var fernTestValueValues map[string]*BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse + + // Act + obj.SetValues(fernTestValueValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCustomerCustomAttributesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse(t *testing.T) { + t.Run("SetCustomerID", func(t *testing.T) { + obj := &BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse{} + var fernTestValueCustomerID *string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttribute", func(t *testing.T) { + obj := &BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse{} + var fernTestValueCustomAttribute *CustomAttribute + obj.SetCustomAttribute(fernTestValueCustomAttribute) + assert.Equal(t, fernTestValueCustomAttribute, obj.CustomAttribute) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse(t *testing.T) { + t.Run("GetCustomerID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse{} + var expected *string + obj.CustomerID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomerID(), "getter should return the property value") + }) + + t.Run("GetCustomerID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse{} + obj.CustomerID = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomerID(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomerID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomerID() // Should return zero value + }) + + t.Run("GetCustomAttribute", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse{} + var expected *CustomAttribute + obj.CustomAttribute = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttribute(), "getter should return the property value") + }) + + t.Run("GetCustomAttribute_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse{} + obj.CustomAttribute = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttribute(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttribute_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttribute() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse(t *testing.T) { + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse{} + var fernTestValueCustomerID *string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttribute_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse{} + var fernTestValueCustomAttribute *CustomAttribute + + // Act + obj.SetCustomAttribute(fernTestValueCustomAttribute) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBookingCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &BookingCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &BookingCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &BookingCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &BookingCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &BookingCreatedEvent{} + var fernTestValueData *BookingCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBookingCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEvent{} + var expected *BookingCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBookingCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEvent{} + var fernTestValueData *BookingCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBookingCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &BookingCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &BookingCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &BookingCreatedEventData{} + var fernTestValueObject *BookingCreatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBookingCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEventData{} + var expected *BookingCreatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBookingCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEventData{} + var fernTestValueObject *BookingCreatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBookingCreatedEventObject(t *testing.T) { + t.Run("SetBooking", func(t *testing.T) { + obj := &BookingCreatedEventObject{} + var fernTestValueBooking *Booking + obj.SetBooking(fernTestValueBooking) + assert.Equal(t, fernTestValueBooking, obj.Booking) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBookingCreatedEventObject(t *testing.T) { + t.Run("GetBooking", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEventObject{} + var expected *Booking + obj.Booking = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBooking(), "getter should return the property value") + }) + + t.Run("GetBooking_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEventObject{} + obj.Booking = nil + + // Act & Assert + assert.Nil(t, obj.GetBooking(), "getter should return nil when property is nil") + }) + + t.Run("GetBooking_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCreatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBooking() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBookingCreatedEventObject(t *testing.T) { + t.Run("SetBooking_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEventObject{} + var fernTestValueBooking *Booking + + // Act + obj.SetBooking(fernTestValueBooking) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBookingCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBookingCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionOwnedCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionOwnedCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionOwnedCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionOwnedCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedCreatedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionOwnedCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBookingCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBookingCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBookingCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedDeletedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBookingCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBookingCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBookingCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedUpdatedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBookingCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBookingCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBookingCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionVisibleCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionVisibleCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionVisibleCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionVisibleCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleCreatedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionVisibleCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBookingCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBookingCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBookingCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleDeletedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBookingCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBookingCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &BookingCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBookingCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleUpdatedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBookingCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBookingCustomAttributeDeleteRequest(t *testing.T) { + t.Run("SetBookingID", func(t *testing.T) { + obj := &BookingCustomAttributeDeleteRequest{} + var fernTestValueBookingID string + obj.SetBookingID(fernTestValueBookingID) + assert.Equal(t, fernTestValueBookingID, obj.BookingID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetKey", func(t *testing.T) { + obj := &BookingCustomAttributeDeleteRequest{} + var fernTestValueKey string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBookingCustomAttributeDeleteRequest(t *testing.T) { + t.Run("GetBookingID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDeleteRequest{} + var expected string + obj.BookingID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBookingID(), "getter should return the property value") + }) + + t.Run("GetBookingID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDeleteRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBookingID() // Should return zero value + }) + + t.Run("GetKey", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDeleteRequest{} + var expected string + obj.Key = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetKey(), "getter should return the property value") + }) + + t.Run("GetKey_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDeleteRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetKey() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBookingCustomAttributeDeleteRequest(t *testing.T) { + t.Run("SetBookingID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDeleteRequest{} + var fernTestValueBookingID string + + // Act + obj.SetBookingID(fernTestValueBookingID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDeleteRequest{} + var fernTestValueKey string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBookingCustomAttributeDeleteResponse(t *testing.T) { + t.Run("SetBookingID", func(t *testing.T) { + obj := &BookingCustomAttributeDeleteResponse{} + var fernTestValueBookingID *string + obj.SetBookingID(fernTestValueBookingID) + assert.Equal(t, fernTestValueBookingID, obj.BookingID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &BookingCustomAttributeDeleteResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBookingCustomAttributeDeleteResponse(t *testing.T) { + t.Run("GetBookingID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDeleteResponse{} + var expected *string + obj.BookingID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBookingID(), "getter should return the property value") + }) + + t.Run("GetBookingID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDeleteResponse{} + obj.BookingID = nil + + // Act & Assert + assert.Nil(t, obj.GetBookingID(), "getter should return nil when property is nil") + }) + + t.Run("GetBookingID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDeleteResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBookingID() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDeleteResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDeleteResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDeleteResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBookingCustomAttributeDeleteResponse(t *testing.T) { + t.Run("SetBookingID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDeleteResponse{} + var fernTestValueBookingID *string + + // Act + obj.SetBookingID(fernTestValueBookingID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDeleteResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBookingCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &BookingCustomAttributeOwnedDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &BookingCustomAttributeOwnedDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &BookingCustomAttributeOwnedDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &BookingCustomAttributeOwnedDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &BookingCustomAttributeOwnedDeletedEvent{} + var fernTestValueData *CustomAttributeEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBookingCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedDeletedEvent{} + var expected *CustomAttributeEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBookingCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedDeletedEvent{} + var fernTestValueData *CustomAttributeEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBookingCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &BookingCustomAttributeOwnedUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &BookingCustomAttributeOwnedUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &BookingCustomAttributeOwnedUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &BookingCustomAttributeOwnedUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &BookingCustomAttributeOwnedUpdatedEvent{} + var fernTestValueData *CustomAttributeEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBookingCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedUpdatedEvent{} + var expected *CustomAttributeEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBookingCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedUpdatedEvent{} + var fernTestValueData *CustomAttributeEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBookingCustomAttributeUpsertRequest(t *testing.T) { + t.Run("SetBookingID", func(t *testing.T) { + obj := &BookingCustomAttributeUpsertRequest{} + var fernTestValueBookingID string + obj.SetBookingID(fernTestValueBookingID) + assert.Equal(t, fernTestValueBookingID, obj.BookingID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttribute", func(t *testing.T) { + obj := &BookingCustomAttributeUpsertRequest{} + var fernTestValueCustomAttribute *CustomAttribute + obj.SetCustomAttribute(fernTestValueCustomAttribute) + assert.Equal(t, fernTestValueCustomAttribute, obj.CustomAttribute) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &BookingCustomAttributeUpsertRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBookingCustomAttributeUpsertRequest(t *testing.T) { + t.Run("GetBookingID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeUpsertRequest{} + var expected string + obj.BookingID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBookingID(), "getter should return the property value") + }) + + t.Run("GetBookingID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeUpsertRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBookingID() // Should return zero value + }) + + t.Run("GetCustomAttribute", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeUpsertRequest{} + var expected *CustomAttribute + obj.CustomAttribute = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttribute(), "getter should return the property value") + }) + + t.Run("GetCustomAttribute_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeUpsertRequest{} + obj.CustomAttribute = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttribute(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttribute_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeUpsertRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttribute() // Should return zero value + }) + + t.Run("GetIdempotencyKey", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeUpsertRequest{} + var expected *string + obj.IdempotencyKey = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIdempotencyKey(), "getter should return the property value") + }) + + t.Run("GetIdempotencyKey_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeUpsertRequest{} + obj.IdempotencyKey = nil + + // Act & Assert + assert.Nil(t, obj.GetIdempotencyKey(), "getter should return nil when property is nil") + }) + + t.Run("GetIdempotencyKey_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeUpsertRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIdempotencyKey() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBookingCustomAttributeUpsertRequest(t *testing.T) { + t.Run("SetBookingID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeUpsertRequest{} + var fernTestValueBookingID string + + // Act + obj.SetBookingID(fernTestValueBookingID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttribute_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeUpsertRequest{} + var fernTestValueCustomAttribute *CustomAttribute + + // Act + obj.SetCustomAttribute(fernTestValueCustomAttribute) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeUpsertRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBookingCustomAttributeUpsertResponse(t *testing.T) { + t.Run("SetBookingID", func(t *testing.T) { + obj := &BookingCustomAttributeUpsertResponse{} + var fernTestValueBookingID *string + obj.SetBookingID(fernTestValueBookingID) + assert.Equal(t, fernTestValueBookingID, obj.BookingID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttribute", func(t *testing.T) { + obj := &BookingCustomAttributeUpsertResponse{} + var fernTestValueCustomAttribute *CustomAttribute + obj.SetCustomAttribute(fernTestValueCustomAttribute) + assert.Equal(t, fernTestValueCustomAttribute, obj.CustomAttribute) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &BookingCustomAttributeUpsertResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBookingCustomAttributeUpsertResponse(t *testing.T) { + t.Run("GetBookingID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeUpsertResponse{} + var expected *string + obj.BookingID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBookingID(), "getter should return the property value") + }) + + t.Run("GetBookingID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeUpsertResponse{} + obj.BookingID = nil + + // Act & Assert + assert.Nil(t, obj.GetBookingID(), "getter should return nil when property is nil") + }) + + t.Run("GetBookingID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeUpsertResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBookingID() // Should return zero value + }) + + t.Run("GetCustomAttribute", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeUpsertResponse{} + var expected *CustomAttribute + obj.CustomAttribute = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttribute(), "getter should return the property value") + }) + + t.Run("GetCustomAttribute_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeUpsertResponse{} + obj.CustomAttribute = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttribute(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttribute_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeUpsertResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttribute() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeUpsertResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeUpsertResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeUpsertResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBookingCustomAttributeUpsertResponse(t *testing.T) { + t.Run("SetBookingID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeUpsertResponse{} + var fernTestValueBookingID *string + + // Act + obj.SetBookingID(fernTestValueBookingID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttribute_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeUpsertResponse{} + var fernTestValueCustomAttribute *CustomAttribute + + // Act + obj.SetCustomAttribute(fernTestValueCustomAttribute) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeUpsertResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBookingCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &BookingCustomAttributeVisibleDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &BookingCustomAttributeVisibleDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &BookingCustomAttributeVisibleDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &BookingCustomAttributeVisibleDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &BookingCustomAttributeVisibleDeletedEvent{} + var fernTestValueData *CustomAttributeEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBookingCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleDeletedEvent{} + var expected *CustomAttributeEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBookingCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleDeletedEvent{} + var fernTestValueData *CustomAttributeEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBookingCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &BookingCustomAttributeVisibleUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &BookingCustomAttributeVisibleUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &BookingCustomAttributeVisibleUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &BookingCustomAttributeVisibleUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &BookingCustomAttributeVisibleUpdatedEvent{} + var fernTestValueData *CustomAttributeEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBookingCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleUpdatedEvent{} + var expected *CustomAttributeEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBookingCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleUpdatedEvent{} + var fernTestValueData *CustomAttributeEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBookingUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &BookingUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &BookingUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &BookingUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &BookingUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &BookingUpdatedEvent{} + var fernTestValueData *BookingUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBookingUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEvent{} + var expected *BookingUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBookingUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEvent{} + var fernTestValueData *BookingUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBookingUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &BookingUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &BookingUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &BookingUpdatedEventData{} + var fernTestValueObject *BookingUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBookingUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEventData{} + var expected *BookingUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBookingUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEventData{} + var fernTestValueObject *BookingUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBookingUpdatedEventObject(t *testing.T) { + t.Run("SetBooking", func(t *testing.T) { + obj := &BookingUpdatedEventObject{} + var fernTestValueBooking *Booking + obj.SetBooking(fernTestValueBooking) + assert.Equal(t, fernTestValueBooking, obj.Booking) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBookingUpdatedEventObject(t *testing.T) { + t.Run("GetBooking", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEventObject{} + var expected *Booking + obj.Booking = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBooking(), "getter should return the property value") + }) + + t.Run("GetBooking_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEventObject{} + obj.Booking = nil + + // Act & Assert + assert.Nil(t, obj.GetBooking(), "getter should return nil when property is nil") + }) + + t.Run("GetBooking_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBooking() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBookingUpdatedEventObject(t *testing.T) { + t.Run("SetBooking_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEventObject{} + var fernTestValueBooking *Booking + + // Act + obj.SetBooking(fernTestValueBooking) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBreak(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &Break{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStartAt", func(t *testing.T) { + obj := &Break{} + var fernTestValueStartAt string + obj.SetStartAt(fernTestValueStartAt) + assert.Equal(t, fernTestValueStartAt, obj.StartAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEndAt", func(t *testing.T) { + obj := &Break{} + var fernTestValueEndAt *string + obj.SetEndAt(fernTestValueEndAt) + assert.Equal(t, fernTestValueEndAt, obj.EndAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBreakTypeID", func(t *testing.T) { + obj := &Break{} + var fernTestValueBreakTypeID string + obj.SetBreakTypeID(fernTestValueBreakTypeID) + assert.Equal(t, fernTestValueBreakTypeID, obj.BreakTypeID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &Break{} + var fernTestValueName string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExpectedDuration", func(t *testing.T) { + obj := &Break{} + var fernTestValueExpectedDuration string + obj.SetExpectedDuration(fernTestValueExpectedDuration) + assert.Equal(t, fernTestValueExpectedDuration, obj.ExpectedDuration) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsPaid", func(t *testing.T) { + obj := &Break{} + var fernTestValueIsPaid bool + obj.SetIsPaid(fernTestValueIsPaid) + assert.Equal(t, fernTestValueIsPaid, obj.IsPaid) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBreak(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Break{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Break{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Break + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetStartAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Break{} + var expected string + obj.StartAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStartAt(), "getter should return the property value") + }) + + t.Run("GetStartAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Break + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStartAt() // Should return zero value + }) + + t.Run("GetEndAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Break{} + var expected *string + obj.EndAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEndAt(), "getter should return the property value") + }) + + t.Run("GetEndAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Break{} + obj.EndAt = nil + + // Act & Assert + assert.Nil(t, obj.GetEndAt(), "getter should return nil when property is nil") + }) + + t.Run("GetEndAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Break + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEndAt() // Should return zero value + }) + + t.Run("GetBreakTypeID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Break{} + var expected string + obj.BreakTypeID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBreakTypeID(), "getter should return the property value") + }) + + t.Run("GetBreakTypeID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Break + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBreakTypeID() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Break{} + var expected string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Break + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetExpectedDuration", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Break{} + var expected string + obj.ExpectedDuration = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExpectedDuration(), "getter should return the property value") + }) + + t.Run("GetExpectedDuration_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Break + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExpectedDuration() // Should return zero value + }) + + t.Run("GetIsPaid", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Break{} + var expected bool + obj.IsPaid = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsPaid(), "getter should return the property value") + }) + + t.Run("GetIsPaid_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Break + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsPaid() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBreak(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Break{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStartAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Break{} + var fernTestValueStartAt string + + // Act + obj.SetStartAt(fernTestValueStartAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEndAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Break{} + var fernTestValueEndAt *string + + // Act + obj.SetEndAt(fernTestValueEndAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBreakTypeID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Break{} + var fernTestValueBreakTypeID string + + // Act + obj.SetBreakTypeID(fernTestValueBreakTypeID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Break{} + var fernTestValueName string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExpectedDuration_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Break{} + var fernTestValueExpectedDuration string + + // Act + obj.SetExpectedDuration(fernTestValueExpectedDuration) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsPaid_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Break{} + var fernTestValueIsPaid bool + + // Act + obj.SetIsPaid(fernTestValueIsPaid) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBreakType(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &BreakType{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &BreakType{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBreakName", func(t *testing.T) { + obj := &BreakType{} + var fernTestValueBreakName string + obj.SetBreakName(fernTestValueBreakName) + assert.Equal(t, fernTestValueBreakName, obj.BreakName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExpectedDuration", func(t *testing.T) { + obj := &BreakType{} + var fernTestValueExpectedDuration string + obj.SetExpectedDuration(fernTestValueExpectedDuration) + assert.Equal(t, fernTestValueExpectedDuration, obj.ExpectedDuration) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsPaid", func(t *testing.T) { + obj := &BreakType{} + var fernTestValueIsPaid bool + obj.SetIsPaid(fernTestValueIsPaid) + assert.Equal(t, fernTestValueIsPaid, obj.IsPaid) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &BreakType{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &BreakType{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &BreakType{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBreakType(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BreakType{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BreakType{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BreakType + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BreakType{} + var expected string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BreakType + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetBreakName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BreakType{} + var expected string + obj.BreakName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBreakName(), "getter should return the property value") + }) + + t.Run("GetBreakName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BreakType + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBreakName() // Should return zero value + }) + + t.Run("GetExpectedDuration", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BreakType{} + var expected string + obj.ExpectedDuration = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExpectedDuration(), "getter should return the property value") + }) + + t.Run("GetExpectedDuration_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BreakType + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExpectedDuration() // Should return zero value + }) + + t.Run("GetIsPaid", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BreakType{} + var expected bool + obj.IsPaid = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsPaid(), "getter should return the property value") + }) + + t.Run("GetIsPaid_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BreakType + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsPaid() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BreakType{} + var expected *int + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BreakType{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BreakType + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BreakType{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BreakType{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BreakType + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BreakType{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BreakType{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BreakType + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBreakType(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BreakType{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BreakType{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBreakName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BreakType{} + var fernTestValueBreakName string + + // Act + obj.SetBreakName(fernTestValueBreakName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExpectedDuration_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BreakType{} + var fernTestValueExpectedDuration string + + // Act + obj.SetExpectedDuration(fernTestValueExpectedDuration) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsPaid_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BreakType{} + var fernTestValueIsPaid bool + + // Act + obj.SetIsPaid(fernTestValueIsPaid) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BreakType{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BreakType{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BreakType{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkDeleteBookingCustomAttributesResponse(t *testing.T) { + t.Run("SetValues", func(t *testing.T) { + obj := &BulkDeleteBookingCustomAttributesResponse{} + var fernTestValueValues map[string]*BookingCustomAttributeDeleteResponse + obj.SetValues(fernTestValueValues) + assert.Equal(t, fernTestValueValues, obj.Values) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &BulkDeleteBookingCustomAttributesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkDeleteBookingCustomAttributesResponse(t *testing.T) { + t.Run("GetValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteBookingCustomAttributesResponse{} + var expected map[string]*BookingCustomAttributeDeleteResponse + obj.Values = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetValues(), "getter should return the property value") + }) + + t.Run("GetValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteBookingCustomAttributesResponse{} + obj.Values = nil + + // Act & Assert + assert.Nil(t, obj.GetValues(), "getter should return nil when property is nil") + }) + + t.Run("GetValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteBookingCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetValues() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteBookingCustomAttributesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteBookingCustomAttributesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteBookingCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkDeleteBookingCustomAttributesResponse(t *testing.T) { + t.Run("SetValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteBookingCustomAttributesResponse{} + var fernTestValueValues map[string]*BookingCustomAttributeDeleteResponse + + // Act + obj.SetValues(fernTestValueValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteBookingCustomAttributesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest(t *testing.T) { + t.Run("SetKey", func(t *testing.T) { + obj := &BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest{} + var fernTestValueKey *string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest(t *testing.T) { + t.Run("GetKey", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest{} + var expected *string + obj.Key = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetKey(), "getter should return the property value") + }) + + t.Run("GetKey_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest{} + obj.Key = nil + + // Act & Assert + assert.Nil(t, obj.GetKey(), "getter should return nil when property is nil") + }) + + t.Run("GetKey_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetKey() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest(t *testing.T) { + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest{} + var fernTestValueKey *string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkDeleteLocationCustomAttributesResponse(t *testing.T) { + t.Run("SetValues", func(t *testing.T) { + obj := &BulkDeleteLocationCustomAttributesResponse{} + var fernTestValueValues map[string]*BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse + obj.SetValues(fernTestValueValues) + assert.Equal(t, fernTestValueValues, obj.Values) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &BulkDeleteLocationCustomAttributesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkDeleteLocationCustomAttributesResponse(t *testing.T) { + t.Run("GetValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteLocationCustomAttributesResponse{} + var expected map[string]*BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse + obj.Values = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetValues(), "getter should return the property value") + }) + + t.Run("GetValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteLocationCustomAttributesResponse{} + obj.Values = nil + + // Act & Assert + assert.Nil(t, obj.GetValues(), "getter should return nil when property is nil") + }) + + t.Run("GetValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteLocationCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetValues() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteLocationCustomAttributesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteLocationCustomAttributesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteLocationCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkDeleteLocationCustomAttributesResponse(t *testing.T) { + t.Run("SetValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteLocationCustomAttributesResponse{} + var fernTestValueValues map[string]*BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse + + // Act + obj.SetValues(fernTestValueValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteLocationCustomAttributesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse(t *testing.T) { + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest(t *testing.T) { + t.Run("SetKey", func(t *testing.T) { + obj := &BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest{} + var fernTestValueKey *string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest(t *testing.T) { + t.Run("GetKey", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest{} + var expected *string + obj.Key = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetKey(), "getter should return the property value") + }) + + t.Run("GetKey_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest{} + obj.Key = nil + + // Act & Assert + assert.Nil(t, obj.GetKey(), "getter should return nil when property is nil") + }) + + t.Run("GetKey_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetKey() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest(t *testing.T) { + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest{} + var fernTestValueKey *string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkDeleteMerchantCustomAttributesResponse(t *testing.T) { + t.Run("SetValues", func(t *testing.T) { + obj := &BulkDeleteMerchantCustomAttributesResponse{} + var fernTestValueValues map[string]*BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse + obj.SetValues(fernTestValueValues) + assert.Equal(t, fernTestValueValues, obj.Values) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &BulkDeleteMerchantCustomAttributesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkDeleteMerchantCustomAttributesResponse(t *testing.T) { + t.Run("GetValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteMerchantCustomAttributesResponse{} + var expected map[string]*BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse + obj.Values = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetValues(), "getter should return the property value") + }) + + t.Run("GetValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteMerchantCustomAttributesResponse{} + obj.Values = nil + + // Act & Assert + assert.Nil(t, obj.GetValues(), "getter should return nil when property is nil") + }) + + t.Run("GetValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteMerchantCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetValues() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteMerchantCustomAttributesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteMerchantCustomAttributesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteMerchantCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkDeleteMerchantCustomAttributesResponse(t *testing.T) { + t.Run("SetValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteMerchantCustomAttributesResponse{} + var fernTestValueValues map[string]*BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse + + // Act + obj.SetValues(fernTestValueValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteMerchantCustomAttributesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute(t *testing.T) { + t.Run("SetKey", func(t *testing.T) { + obj := &BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute{} + var fernTestValueKey *string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrderID", func(t *testing.T) { + obj := &BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute{} + var fernTestValueOrderID string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute(t *testing.T) { + t.Run("GetKey", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute{} + var expected *string + obj.Key = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetKey(), "getter should return the property value") + }) + + t.Run("GetKey_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute{} + obj.Key = nil + + // Act & Assert + assert.Nil(t, obj.GetKey(), "getter should return nil when property is nil") + }) + + t.Run("GetKey_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetKey() // Should return zero value + }) + + t.Run("GetOrderID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute{} + var expected string + obj.OrderID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderID(), "getter should return the property value") + }) + + t.Run("GetOrderID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute(t *testing.T) { + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute{} + var fernTestValueKey *string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute{} + var fernTestValueOrderID string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkDeleteOrderCustomAttributesResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &BulkDeleteOrderCustomAttributesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetValues", func(t *testing.T) { + obj := &BulkDeleteOrderCustomAttributesResponse{} + var fernTestValueValues map[string]*DeleteOrderCustomAttributeResponse + obj.SetValues(fernTestValueValues) + assert.Equal(t, fernTestValueValues, obj.Values) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkDeleteOrderCustomAttributesResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteOrderCustomAttributesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteOrderCustomAttributesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteOrderCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteOrderCustomAttributesResponse{} + var expected map[string]*DeleteOrderCustomAttributeResponse + obj.Values = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetValues(), "getter should return the property value") + }) + + t.Run("GetValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteOrderCustomAttributesResponse{} + obj.Values = nil + + // Act & Assert + assert.Nil(t, obj.GetValues(), "getter should return nil when property is nil") + }) + + t.Run("GetValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteOrderCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetValues() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkDeleteOrderCustomAttributesResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteOrderCustomAttributesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteOrderCustomAttributesResponse{} + var fernTestValueValues map[string]*DeleteOrderCustomAttributeResponse + + // Act + obj.SetValues(fernTestValueValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkUpsertBookingCustomAttributesResponse(t *testing.T) { + t.Run("SetValues", func(t *testing.T) { + obj := &BulkUpsertBookingCustomAttributesResponse{} + var fernTestValueValues map[string]*BookingCustomAttributeUpsertResponse + obj.SetValues(fernTestValueValues) + assert.Equal(t, fernTestValueValues, obj.Values) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &BulkUpsertBookingCustomAttributesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkUpsertBookingCustomAttributesResponse(t *testing.T) { + t.Run("GetValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertBookingCustomAttributesResponse{} + var expected map[string]*BookingCustomAttributeUpsertResponse + obj.Values = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetValues(), "getter should return the property value") + }) + + t.Run("GetValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertBookingCustomAttributesResponse{} + obj.Values = nil + + // Act & Assert + assert.Nil(t, obj.GetValues(), "getter should return nil when property is nil") + }) + + t.Run("GetValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertBookingCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetValues() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertBookingCustomAttributesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertBookingCustomAttributesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertBookingCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkUpsertBookingCustomAttributesResponse(t *testing.T) { + t.Run("SetValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertBookingCustomAttributesResponse{} + var fernTestValueValues map[string]*BookingCustomAttributeUpsertResponse + + // Act + obj.SetValues(fernTestValueValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertBookingCustomAttributesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttribute", func(t *testing.T) { + obj := &BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest{} + var fernTestValueCustomAttribute *CustomAttribute + obj.SetCustomAttribute(fernTestValueCustomAttribute) + assert.Equal(t, fernTestValueCustomAttribute, obj.CustomAttribute) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest(t *testing.T) { + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest{} + var expected string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetCustomAttribute", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest{} + var expected *CustomAttribute + obj.CustomAttribute = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttribute(), "getter should return the property value") + }) + + t.Run("GetCustomAttribute_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest{} + obj.CustomAttribute = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttribute(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttribute_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttribute() // Should return zero value + }) + + t.Run("GetIdempotencyKey", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest{} + var expected *string + obj.IdempotencyKey = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIdempotencyKey(), "getter should return the property value") + }) + + t.Run("GetIdempotencyKey_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest{} + obj.IdempotencyKey = nil + + // Act & Assert + assert.Nil(t, obj.GetIdempotencyKey(), "getter should return nil when property is nil") + }) + + t.Run("GetIdempotencyKey_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIdempotencyKey() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttribute_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest{} + var fernTestValueCustomAttribute *CustomAttribute + + // Act + obj.SetCustomAttribute(fernTestValueCustomAttribute) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkUpsertLocationCustomAttributesResponse(t *testing.T) { + t.Run("SetValues", func(t *testing.T) { + obj := &BulkUpsertLocationCustomAttributesResponse{} + var fernTestValueValues map[string]*BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse + obj.SetValues(fernTestValueValues) + assert.Equal(t, fernTestValueValues, obj.Values) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &BulkUpsertLocationCustomAttributesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkUpsertLocationCustomAttributesResponse(t *testing.T) { + t.Run("GetValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertLocationCustomAttributesResponse{} + var expected map[string]*BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse + obj.Values = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetValues(), "getter should return the property value") + }) + + t.Run("GetValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertLocationCustomAttributesResponse{} + obj.Values = nil + + // Act & Assert + assert.Nil(t, obj.GetValues(), "getter should return nil when property is nil") + }) + + t.Run("GetValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertLocationCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetValues() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertLocationCustomAttributesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertLocationCustomAttributesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertLocationCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkUpsertLocationCustomAttributesResponse(t *testing.T) { + t.Run("SetValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertLocationCustomAttributesResponse{} + var fernTestValueValues map[string]*BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse + + // Act + obj.SetValues(fernTestValueValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertLocationCustomAttributesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttribute", func(t *testing.T) { + obj := &BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse{} + var fernTestValueCustomAttribute *CustomAttribute + obj.SetCustomAttribute(fernTestValueCustomAttribute) + assert.Equal(t, fernTestValueCustomAttribute, obj.CustomAttribute) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse(t *testing.T) { + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetCustomAttribute", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse{} + var expected *CustomAttribute + obj.CustomAttribute = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttribute(), "getter should return the property value") + }) + + t.Run("GetCustomAttribute_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse{} + obj.CustomAttribute = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttribute(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttribute_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttribute() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttribute_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse{} + var fernTestValueCustomAttribute *CustomAttribute + + // Act + obj.SetCustomAttribute(fernTestValueCustomAttribute) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest{} + var fernTestValueMerchantID string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttribute", func(t *testing.T) { + obj := &BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest{} + var fernTestValueCustomAttribute *CustomAttribute + obj.SetCustomAttribute(fernTestValueCustomAttribute) + assert.Equal(t, fernTestValueCustomAttribute, obj.CustomAttribute) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest{} + var expected string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetCustomAttribute", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest{} + var expected *CustomAttribute + obj.CustomAttribute = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttribute(), "getter should return the property value") + }) + + t.Run("GetCustomAttribute_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest{} + obj.CustomAttribute = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttribute(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttribute_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttribute() // Should return zero value + }) + + t.Run("GetIdempotencyKey", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest{} + var expected *string + obj.IdempotencyKey = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIdempotencyKey(), "getter should return the property value") + }) + + t.Run("GetIdempotencyKey_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest{} + obj.IdempotencyKey = nil + + // Act & Assert + assert.Nil(t, obj.GetIdempotencyKey(), "getter should return nil when property is nil") + }) + + t.Run("GetIdempotencyKey_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIdempotencyKey() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest{} + var fernTestValueMerchantID string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttribute_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest{} + var fernTestValueCustomAttribute *CustomAttribute + + // Act + obj.SetCustomAttribute(fernTestValueCustomAttribute) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkUpsertMerchantCustomAttributesResponse(t *testing.T) { + t.Run("SetValues", func(t *testing.T) { + obj := &BulkUpsertMerchantCustomAttributesResponse{} + var fernTestValueValues map[string]*BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse + obj.SetValues(fernTestValueValues) + assert.Equal(t, fernTestValueValues, obj.Values) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &BulkUpsertMerchantCustomAttributesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkUpsertMerchantCustomAttributesResponse(t *testing.T) { + t.Run("GetValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertMerchantCustomAttributesResponse{} + var expected map[string]*BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse + obj.Values = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetValues(), "getter should return the property value") + }) + + t.Run("GetValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertMerchantCustomAttributesResponse{} + obj.Values = nil + + // Act & Assert + assert.Nil(t, obj.GetValues(), "getter should return nil when property is nil") + }) + + t.Run("GetValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertMerchantCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetValues() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertMerchantCustomAttributesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertMerchantCustomAttributesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertMerchantCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkUpsertMerchantCustomAttributesResponse(t *testing.T) { + t.Run("SetValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertMerchantCustomAttributesResponse{} + var fernTestValueValues map[string]*BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse + + // Act + obj.SetValues(fernTestValueValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertMerchantCustomAttributesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttribute", func(t *testing.T) { + obj := &BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse{} + var fernTestValueCustomAttribute *CustomAttribute + obj.SetCustomAttribute(fernTestValueCustomAttribute) + assert.Equal(t, fernTestValueCustomAttribute, obj.CustomAttribute) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetCustomAttribute", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse{} + var expected *CustomAttribute + obj.CustomAttribute = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttribute(), "getter should return the property value") + }) + + t.Run("GetCustomAttribute_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse{} + obj.CustomAttribute = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttribute(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttribute_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttribute() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttribute_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse{} + var fernTestValueCustomAttribute *CustomAttribute + + // Act + obj.SetCustomAttribute(fernTestValueCustomAttribute) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute(t *testing.T) { + t.Run("SetCustomAttribute", func(t *testing.T) { + obj := &BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute{} + var fernTestValueCustomAttribute *CustomAttribute + obj.SetCustomAttribute(fernTestValueCustomAttribute) + assert.Equal(t, fernTestValueCustomAttribute, obj.CustomAttribute) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrderID", func(t *testing.T) { + obj := &BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute{} + var fernTestValueOrderID string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute(t *testing.T) { + t.Run("GetCustomAttribute", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute{} + var expected *CustomAttribute + obj.CustomAttribute = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttribute(), "getter should return the property value") + }) + + t.Run("GetCustomAttribute_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute{} + obj.CustomAttribute = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttribute(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttribute_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttribute() // Should return zero value + }) + + t.Run("GetIdempotencyKey", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute{} + var expected *string + obj.IdempotencyKey = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIdempotencyKey(), "getter should return the property value") + }) + + t.Run("GetIdempotencyKey_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute{} + obj.IdempotencyKey = nil + + // Act & Assert + assert.Nil(t, obj.GetIdempotencyKey(), "getter should return nil when property is nil") + }) + + t.Run("GetIdempotencyKey_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIdempotencyKey() // Should return zero value + }) + + t.Run("GetOrderID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute{} + var expected string + obj.OrderID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderID(), "getter should return the property value") + }) + + t.Run("GetOrderID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute(t *testing.T) { + t.Run("SetCustomAttribute_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute{} + var fernTestValueCustomAttribute *CustomAttribute + + // Act + obj.SetCustomAttribute(fernTestValueCustomAttribute) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute{} + var fernTestValueOrderID string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBulkUpsertOrderCustomAttributesResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &BulkUpsertOrderCustomAttributesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetValues", func(t *testing.T) { + obj := &BulkUpsertOrderCustomAttributesResponse{} + var fernTestValueValues map[string]*UpsertOrderCustomAttributeResponse + obj.SetValues(fernTestValueValues) + assert.Equal(t, fernTestValueValues, obj.Values) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBulkUpsertOrderCustomAttributesResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertOrderCustomAttributesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertOrderCustomAttributesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertOrderCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertOrderCustomAttributesResponse{} + var expected map[string]*UpsertOrderCustomAttributeResponse + obj.Values = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetValues(), "getter should return the property value") + }) + + t.Run("GetValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertOrderCustomAttributesResponse{} + obj.Values = nil + + // Act & Assert + assert.Nil(t, obj.GetValues(), "getter should return nil when property is nil") + }) + + t.Run("GetValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertOrderCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetValues() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBulkUpsertOrderCustomAttributesResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertOrderCustomAttributesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertOrderCustomAttributesResponse{} + var fernTestValueValues map[string]*UpsertOrderCustomAttributeResponse + + // Act + obj.SetValues(fernTestValueValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCalculateLoyaltyPointsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CalculateLoyaltyPointsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPoints", func(t *testing.T) { + obj := &CalculateLoyaltyPointsResponse{} + var fernTestValuePoints *int + obj.SetPoints(fernTestValuePoints) + assert.Equal(t, fernTestValuePoints, obj.Points) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPromotionPoints", func(t *testing.T) { + obj := &CalculateLoyaltyPointsResponse{} + var fernTestValuePromotionPoints *int + obj.SetPromotionPoints(fernTestValuePromotionPoints) + assert.Equal(t, fernTestValuePromotionPoints, obj.PromotionPoints) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCalculateLoyaltyPointsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CalculateLoyaltyPointsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CalculateLoyaltyPointsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CalculateLoyaltyPointsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetPoints", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CalculateLoyaltyPointsResponse{} + var expected *int + obj.Points = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPoints(), "getter should return the property value") + }) + + t.Run("GetPoints_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CalculateLoyaltyPointsResponse{} + obj.Points = nil + + // Act & Assert + assert.Nil(t, obj.GetPoints(), "getter should return nil when property is nil") + }) + + t.Run("GetPoints_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CalculateLoyaltyPointsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPoints() // Should return zero value + }) + + t.Run("GetPromotionPoints", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CalculateLoyaltyPointsResponse{} + var expected *int + obj.PromotionPoints = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPromotionPoints(), "getter should return the property value") + }) + + t.Run("GetPromotionPoints_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CalculateLoyaltyPointsResponse{} + obj.PromotionPoints = nil + + // Act & Assert + assert.Nil(t, obj.GetPromotionPoints(), "getter should return nil when property is nil") + }) + + t.Run("GetPromotionPoints_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CalculateLoyaltyPointsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPromotionPoints() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCalculateLoyaltyPointsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CalculateLoyaltyPointsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPoints_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CalculateLoyaltyPointsResponse{} + var fernTestValuePoints *int + + // Act + obj.SetPoints(fernTestValuePoints) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPromotionPoints_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CalculateLoyaltyPointsResponse{} + var fernTestValuePromotionPoints *int + + // Act + obj.SetPromotionPoints(fernTestValuePromotionPoints) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCancelLoyaltyPromotionResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CancelLoyaltyPromotionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLoyaltyPromotion", func(t *testing.T) { + obj := &CancelLoyaltyPromotionResponse{} + var fernTestValueLoyaltyPromotion *LoyaltyPromotion + obj.SetLoyaltyPromotion(fernTestValueLoyaltyPromotion) + assert.Equal(t, fernTestValueLoyaltyPromotion, obj.LoyaltyPromotion) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCancelLoyaltyPromotionResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelLoyaltyPromotionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelLoyaltyPromotionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelLoyaltyPromotionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetLoyaltyPromotion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelLoyaltyPromotionResponse{} + var expected *LoyaltyPromotion + obj.LoyaltyPromotion = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyPromotion(), "getter should return the property value") + }) + + t.Run("GetLoyaltyPromotion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelLoyaltyPromotionResponse{} + obj.LoyaltyPromotion = nil + + // Act & Assert + assert.Nil(t, obj.GetLoyaltyPromotion(), "getter should return nil when property is nil") + }) + + t.Run("GetLoyaltyPromotion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelLoyaltyPromotionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyPromotion() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCancelLoyaltyPromotionResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelLoyaltyPromotionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLoyaltyPromotion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelLoyaltyPromotionResponse{} + var fernTestValueLoyaltyPromotion *LoyaltyPromotion + + // Act + obj.SetLoyaltyPromotion(fernTestValueLoyaltyPromotion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCancelTerminalActionResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CancelTerminalActionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAction", func(t *testing.T) { + obj := &CancelTerminalActionResponse{} + var fernTestValueAction *TerminalAction + obj.SetAction(fernTestValueAction) + assert.Equal(t, fernTestValueAction, obj.Action) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCancelTerminalActionResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTerminalActionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTerminalActionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelTerminalActionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetAction", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTerminalActionResponse{} + var expected *TerminalAction + obj.Action = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAction(), "getter should return the property value") + }) + + t.Run("GetAction_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTerminalActionResponse{} + obj.Action = nil + + // Act & Assert + assert.Nil(t, obj.GetAction(), "getter should return nil when property is nil") + }) + + t.Run("GetAction_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelTerminalActionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAction() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCancelTerminalActionResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTerminalActionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAction_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTerminalActionResponse{} + var fernTestValueAction *TerminalAction + + // Act + obj.SetAction(fernTestValueAction) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCancelTerminalCheckoutResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CancelTerminalCheckoutResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCheckout", func(t *testing.T) { + obj := &CancelTerminalCheckoutResponse{} + var fernTestValueCheckout *TerminalCheckout + obj.SetCheckout(fernTestValueCheckout) + assert.Equal(t, fernTestValueCheckout, obj.Checkout) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCancelTerminalCheckoutResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTerminalCheckoutResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTerminalCheckoutResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelTerminalCheckoutResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetCheckout", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTerminalCheckoutResponse{} + var expected *TerminalCheckout + obj.Checkout = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCheckout(), "getter should return the property value") + }) + + t.Run("GetCheckout_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTerminalCheckoutResponse{} + obj.Checkout = nil + + // Act & Assert + assert.Nil(t, obj.GetCheckout(), "getter should return nil when property is nil") + }) + + t.Run("GetCheckout_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelTerminalCheckoutResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCheckout() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCancelTerminalCheckoutResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTerminalCheckoutResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCheckout_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTerminalCheckoutResponse{} + var fernTestValueCheckout *TerminalCheckout + + // Act + obj.SetCheckout(fernTestValueCheckout) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCancelTerminalRefundResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CancelTerminalRefundResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRefund", func(t *testing.T) { + obj := &CancelTerminalRefundResponse{} + var fernTestValueRefund *TerminalRefund + obj.SetRefund(fernTestValueRefund) + assert.Equal(t, fernTestValueRefund, obj.Refund) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCancelTerminalRefundResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTerminalRefundResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTerminalRefundResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelTerminalRefundResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetRefund", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTerminalRefundResponse{} + var expected *TerminalRefund + obj.Refund = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRefund(), "getter should return the property value") + }) + + t.Run("GetRefund_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTerminalRefundResponse{} + obj.Refund = nil + + // Act & Assert + assert.Nil(t, obj.GetRefund(), "getter should return nil when property is nil") + }) + + t.Run("GetRefund_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelTerminalRefundResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRefund() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCancelTerminalRefundResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTerminalRefundResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRefund_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTerminalRefundResponse{} + var fernTestValueRefund *TerminalRefund + + // Act + obj.SetRefund(fernTestValueRefund) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCaptureTransactionResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CaptureTransactionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCaptureTransactionResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CaptureTransactionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CaptureTransactionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CaptureTransactionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCaptureTransactionResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CaptureTransactionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCard(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &Card{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCardBrand", func(t *testing.T) { + obj := &Card{} + var fernTestValueCardBrand *CardBrand + obj.SetCardBrand(fernTestValueCardBrand) + assert.Equal(t, fernTestValueCardBrand, obj.CardBrand) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLast4", func(t *testing.T) { + obj := &Card{} + var fernTestValueLast4 *string + obj.SetLast4(fernTestValueLast4) + assert.Equal(t, fernTestValueLast4, obj.Last4) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExpMonth", func(t *testing.T) { + obj := &Card{} + var fernTestValueExpMonth *int64 + obj.SetExpMonth(fernTestValueExpMonth) + assert.Equal(t, fernTestValueExpMonth, obj.ExpMonth) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExpYear", func(t *testing.T) { + obj := &Card{} + var fernTestValueExpYear *int64 + obj.SetExpYear(fernTestValueExpYear) + assert.Equal(t, fernTestValueExpYear, obj.ExpYear) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCardholderName", func(t *testing.T) { + obj := &Card{} + var fernTestValueCardholderName *string + obj.SetCardholderName(fernTestValueCardholderName) + assert.Equal(t, fernTestValueCardholderName, obj.CardholderName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBillingAddress", func(t *testing.T) { + obj := &Card{} + var fernTestValueBillingAddress *Address + obj.SetBillingAddress(fernTestValueBillingAddress) + assert.Equal(t, fernTestValueBillingAddress, obj.BillingAddress) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFingerprint", func(t *testing.T) { + obj := &Card{} + var fernTestValueFingerprint *string + obj.SetFingerprint(fernTestValueFingerprint) + assert.Equal(t, fernTestValueFingerprint, obj.Fingerprint) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerID", func(t *testing.T) { + obj := &Card{} + var fernTestValueCustomerID *string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMerchantID", func(t *testing.T) { + obj := &Card{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReferenceID", func(t *testing.T) { + obj := &Card{} + var fernTestValueReferenceID *string + obj.SetReferenceID(fernTestValueReferenceID) + assert.Equal(t, fernTestValueReferenceID, obj.ReferenceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEnabled", func(t *testing.T) { + obj := &Card{} + var fernTestValueEnabled *bool + obj.SetEnabled(fernTestValueEnabled) + assert.Equal(t, fernTestValueEnabled, obj.Enabled) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCardType", func(t *testing.T) { + obj := &Card{} + var fernTestValueCardType *CardType + obj.SetCardType(fernTestValueCardType) + assert.Equal(t, fernTestValueCardType, obj.CardType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPrepaidType", func(t *testing.T) { + obj := &Card{} + var fernTestValuePrepaidType *CardPrepaidType + obj.SetPrepaidType(fernTestValuePrepaidType) + assert.Equal(t, fernTestValuePrepaidType, obj.PrepaidType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBin", func(t *testing.T) { + obj := &Card{} + var fernTestValueBin *string + obj.SetBin(fernTestValueBin) + assert.Equal(t, fernTestValueBin, obj.Bin) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &Card{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDisabledAt", func(t *testing.T) { + obj := &Card{} + var fernTestValueDisabledAt *string + obj.SetDisabledAt(fernTestValueDisabledAt) + assert.Equal(t, fernTestValueDisabledAt, obj.DisabledAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &Card{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCardCoBrand", func(t *testing.T) { + obj := &Card{} + var fernTestValueCardCoBrand *CardCoBrand + obj.SetCardCoBrand(fernTestValueCardCoBrand) + assert.Equal(t, fernTestValueCardCoBrand, obj.CardCoBrand) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIssuerAlertAt", func(t *testing.T) { + obj := &Card{} + var fernTestValueIssuerAlertAt *string + obj.SetIssuerAlertAt(fernTestValueIssuerAlertAt) + assert.Equal(t, fernTestValueIssuerAlertAt, obj.IssuerAlertAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetHsaFsa", func(t *testing.T) { + obj := &Card{} + var fernTestValueHsaFsa *bool + obj.SetHsaFsa(fernTestValueHsaFsa) + assert.Equal(t, fernTestValueHsaFsa, obj.HsaFsa) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCard(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Card + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetCardBrand", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var expected *CardBrand + obj.CardBrand = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCardBrand(), "getter should return the property value") + }) + + t.Run("GetCardBrand_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + obj.CardBrand = nil + + // Act & Assert + assert.Nil(t, obj.GetCardBrand(), "getter should return nil when property is nil") + }) + + t.Run("GetCardBrand_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Card + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCardBrand() // Should return zero value + }) + + t.Run("GetLast4", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var expected *string + obj.Last4 = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLast4(), "getter should return the property value") + }) + + t.Run("GetLast4_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + obj.Last4 = nil + + // Act & Assert + assert.Nil(t, obj.GetLast4(), "getter should return nil when property is nil") + }) + + t.Run("GetLast4_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Card + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLast4() // Should return zero value + }) + + t.Run("GetExpMonth", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var expected *int64 + obj.ExpMonth = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExpMonth(), "getter should return the property value") + }) + + t.Run("GetExpMonth_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + obj.ExpMonth = nil + + // Act & Assert + assert.Nil(t, obj.GetExpMonth(), "getter should return nil when property is nil") + }) + + t.Run("GetExpMonth_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Card + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExpMonth() // Should return zero value + }) + + t.Run("GetExpYear", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var expected *int64 + obj.ExpYear = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExpYear(), "getter should return the property value") + }) + + t.Run("GetExpYear_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + obj.ExpYear = nil + + // Act & Assert + assert.Nil(t, obj.GetExpYear(), "getter should return nil when property is nil") + }) + + t.Run("GetExpYear_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Card + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExpYear() // Should return zero value + }) + + t.Run("GetCardholderName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var expected *string + obj.CardholderName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCardholderName(), "getter should return the property value") + }) + + t.Run("GetCardholderName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + obj.CardholderName = nil + + // Act & Assert + assert.Nil(t, obj.GetCardholderName(), "getter should return nil when property is nil") + }) + + t.Run("GetCardholderName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Card + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCardholderName() // Should return zero value + }) + + t.Run("GetBillingAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var expected *Address + obj.BillingAddress = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBillingAddress(), "getter should return the property value") + }) + + t.Run("GetBillingAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + obj.BillingAddress = nil + + // Act & Assert + assert.Nil(t, obj.GetBillingAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetBillingAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Card + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBillingAddress() // Should return zero value + }) + + t.Run("GetFingerprint", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var expected *string + obj.Fingerprint = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFingerprint(), "getter should return the property value") + }) + + t.Run("GetFingerprint_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + obj.Fingerprint = nil + + // Act & Assert + assert.Nil(t, obj.GetFingerprint(), "getter should return nil when property is nil") + }) + + t.Run("GetFingerprint_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Card + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFingerprint() // Should return zero value + }) + + t.Run("GetCustomerID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var expected *string + obj.CustomerID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomerID(), "getter should return the property value") + }) + + t.Run("GetCustomerID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + obj.CustomerID = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomerID(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomerID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Card + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomerID() // Should return zero value + }) + + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Card + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetReferenceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var expected *string + obj.ReferenceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReferenceID(), "getter should return the property value") + }) + + t.Run("GetReferenceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + obj.ReferenceID = nil + + // Act & Assert + assert.Nil(t, obj.GetReferenceID(), "getter should return nil when property is nil") + }) + + t.Run("GetReferenceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Card + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReferenceID() // Should return zero value + }) + + t.Run("GetEnabled", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var expected *bool + obj.Enabled = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEnabled(), "getter should return the property value") + }) + + t.Run("GetEnabled_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + obj.Enabled = nil + + // Act & Assert + assert.Nil(t, obj.GetEnabled(), "getter should return nil when property is nil") + }) + + t.Run("GetEnabled_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Card + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEnabled() // Should return zero value + }) + + t.Run("GetCardType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var expected *CardType + obj.CardType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCardType(), "getter should return the property value") + }) + + t.Run("GetCardType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + obj.CardType = nil + + // Act & Assert + assert.Nil(t, obj.GetCardType(), "getter should return nil when property is nil") + }) + + t.Run("GetCardType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Card + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCardType() // Should return zero value + }) + + t.Run("GetPrepaidType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var expected *CardPrepaidType + obj.PrepaidType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPrepaidType(), "getter should return the property value") + }) + + t.Run("GetPrepaidType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + obj.PrepaidType = nil + + // Act & Assert + assert.Nil(t, obj.GetPrepaidType(), "getter should return nil when property is nil") + }) + + t.Run("GetPrepaidType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Card + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPrepaidType() // Should return zero value + }) + + t.Run("GetBin", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var expected *string + obj.Bin = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBin(), "getter should return the property value") + }) + + t.Run("GetBin_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + obj.Bin = nil + + // Act & Assert + assert.Nil(t, obj.GetBin(), "getter should return nil when property is nil") + }) + + t.Run("GetBin_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Card + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBin() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Card + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetDisabledAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var expected *string + obj.DisabledAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDisabledAt(), "getter should return the property value") + }) + + t.Run("GetDisabledAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + obj.DisabledAt = nil + + // Act & Assert + assert.Nil(t, obj.GetDisabledAt(), "getter should return nil when property is nil") + }) + + t.Run("GetDisabledAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Card + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDisabledAt() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var expected *int64 + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Card + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetCardCoBrand", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var expected *CardCoBrand + obj.CardCoBrand = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCardCoBrand(), "getter should return the property value") + }) + + t.Run("GetCardCoBrand_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + obj.CardCoBrand = nil + + // Act & Assert + assert.Nil(t, obj.GetCardCoBrand(), "getter should return nil when property is nil") + }) + + t.Run("GetCardCoBrand_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Card + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCardCoBrand() // Should return zero value + }) + + t.Run("GetIssuerAlertAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var expected *string + obj.IssuerAlertAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIssuerAlertAt(), "getter should return the property value") + }) + + t.Run("GetIssuerAlertAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + obj.IssuerAlertAt = nil + + // Act & Assert + assert.Nil(t, obj.GetIssuerAlertAt(), "getter should return nil when property is nil") + }) + + t.Run("GetIssuerAlertAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Card + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIssuerAlertAt() // Should return zero value + }) + + t.Run("GetHsaFsa", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var expected *bool + obj.HsaFsa = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetHsaFsa(), "getter should return the property value") + }) + + t.Run("GetHsaFsa_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + obj.HsaFsa = nil + + // Act & Assert + assert.Nil(t, obj.GetHsaFsa(), "getter should return nil when property is nil") + }) + + t.Run("GetHsaFsa_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Card + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetHsaFsa() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCard(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCardBrand_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var fernTestValueCardBrand *CardBrand + + // Act + obj.SetCardBrand(fernTestValueCardBrand) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLast4_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var fernTestValueLast4 *string + + // Act + obj.SetLast4(fernTestValueLast4) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExpMonth_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var fernTestValueExpMonth *int64 + + // Act + obj.SetExpMonth(fernTestValueExpMonth) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExpYear_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var fernTestValueExpYear *int64 + + // Act + obj.SetExpYear(fernTestValueExpYear) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCardholderName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var fernTestValueCardholderName *string + + // Act + obj.SetCardholderName(fernTestValueCardholderName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBillingAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var fernTestValueBillingAddress *Address + + // Act + obj.SetBillingAddress(fernTestValueBillingAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFingerprint_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var fernTestValueFingerprint *string + + // Act + obj.SetFingerprint(fernTestValueFingerprint) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var fernTestValueCustomerID *string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReferenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var fernTestValueReferenceID *string + + // Act + obj.SetReferenceID(fernTestValueReferenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEnabled_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var fernTestValueEnabled *bool + + // Act + obj.SetEnabled(fernTestValueEnabled) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCardType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var fernTestValueCardType *CardType + + // Act + obj.SetCardType(fernTestValueCardType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPrepaidType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var fernTestValuePrepaidType *CardPrepaidType + + // Act + obj.SetPrepaidType(fernTestValuePrepaidType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBin_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var fernTestValueBin *string + + // Act + obj.SetBin(fernTestValueBin) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDisabledAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var fernTestValueDisabledAt *string + + // Act + obj.SetDisabledAt(fernTestValueDisabledAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCardCoBrand_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var fernTestValueCardCoBrand *CardCoBrand + + // Act + obj.SetCardCoBrand(fernTestValueCardCoBrand) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIssuerAlertAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var fernTestValueIssuerAlertAt *string + + // Act + obj.SetIssuerAlertAt(fernTestValueIssuerAlertAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetHsaFsa_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + var fernTestValueHsaFsa *bool + + // Act + obj.SetHsaFsa(fernTestValueHsaFsa) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCardAutomaticallyUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CardAutomaticallyUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CardAutomaticallyUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CardAutomaticallyUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CardAutomaticallyUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CardAutomaticallyUpdatedEvent{} + var fernTestValueData *CardAutomaticallyUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCardAutomaticallyUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardAutomaticallyUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardAutomaticallyUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardAutomaticallyUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardAutomaticallyUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEvent{} + var expected *CardAutomaticallyUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardAutomaticallyUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCardAutomaticallyUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEvent{} + var fernTestValueData *CardAutomaticallyUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCardAutomaticallyUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &CardAutomaticallyUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &CardAutomaticallyUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &CardAutomaticallyUpdatedEventData{} + var fernTestValueObject *CardAutomaticallyUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCardAutomaticallyUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardAutomaticallyUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardAutomaticallyUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEventData{} + var expected *CardAutomaticallyUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardAutomaticallyUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCardAutomaticallyUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEventData{} + var fernTestValueObject *CardAutomaticallyUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCardAutomaticallyUpdatedEventObject(t *testing.T) { + t.Run("SetCard", func(t *testing.T) { + obj := &CardAutomaticallyUpdatedEventObject{} + var fernTestValueCard *Card + obj.SetCard(fernTestValueCard) + assert.Equal(t, fernTestValueCard, obj.Card) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCardAutomaticallyUpdatedEventObject(t *testing.T) { + t.Run("GetCard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEventObject{} + var expected *Card + obj.Card = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCard(), "getter should return the property value") + }) + + t.Run("GetCard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEventObject{} + obj.Card = nil + + // Act & Assert + assert.Nil(t, obj.GetCard(), "getter should return nil when property is nil") + }) + + t.Run("GetCard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardAutomaticallyUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCard() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCardAutomaticallyUpdatedEventObject(t *testing.T) { + t.Run("SetCard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEventObject{} + var fernTestValueCard *Card + + // Act + obj.SetCard(fernTestValueCard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCardCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CardCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CardCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CardCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CardCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CardCreatedEvent{} + var fernTestValueData *CardCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCardCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEvent{} + var expected *CardCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCardCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEvent{} + var fernTestValueData *CardCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCardCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &CardCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &CardCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &CardCreatedEventData{} + var fernTestValueObject *CardCreatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCardCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEventData{} + var expected *CardCreatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCardCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEventData{} + var fernTestValueObject *CardCreatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCardCreatedEventObject(t *testing.T) { + t.Run("SetCard", func(t *testing.T) { + obj := &CardCreatedEventObject{} + var fernTestValueCard *Card + obj.SetCard(fernTestValueCard) + assert.Equal(t, fernTestValueCard, obj.Card) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCardCreatedEventObject(t *testing.T) { + t.Run("GetCard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEventObject{} + var expected *Card + obj.Card = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCard(), "getter should return the property value") + }) + + t.Run("GetCard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEventObject{} + obj.Card = nil + + // Act & Assert + assert.Nil(t, obj.GetCard(), "getter should return nil when property is nil") + }) + + t.Run("GetCard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardCreatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCard() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCardCreatedEventObject(t *testing.T) { + t.Run("SetCard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEventObject{} + var fernTestValueCard *Card + + // Act + obj.SetCard(fernTestValueCard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCardDisabledEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CardDisabledEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CardDisabledEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CardDisabledEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CardDisabledEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CardDisabledEvent{} + var fernTestValueData *CardDisabledEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCardDisabledEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardDisabledEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardDisabledEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardDisabledEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardDisabledEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEvent{} + var expected *CardDisabledEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardDisabledEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCardDisabledEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEvent{} + var fernTestValueData *CardDisabledEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCardDisabledEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &CardDisabledEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &CardDisabledEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &CardDisabledEventData{} + var fernTestValueObject *CardDisabledEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCardDisabledEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardDisabledEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardDisabledEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEventData{} + var expected *CardDisabledEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardDisabledEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCardDisabledEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEventData{} + var fernTestValueObject *CardDisabledEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCardDisabledEventObject(t *testing.T) { + t.Run("SetCard", func(t *testing.T) { + obj := &CardDisabledEventObject{} + var fernTestValueCard *Card + obj.SetCard(fernTestValueCard) + assert.Equal(t, fernTestValueCard, obj.Card) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCardDisabledEventObject(t *testing.T) { + t.Run("GetCard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEventObject{} + var expected *Card + obj.Card = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCard(), "getter should return the property value") + }) + + t.Run("GetCard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEventObject{} + obj.Card = nil + + // Act & Assert + assert.Nil(t, obj.GetCard(), "getter should return nil when property is nil") + }) + + t.Run("GetCard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardDisabledEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCard() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCardDisabledEventObject(t *testing.T) { + t.Run("SetCard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEventObject{} + var fernTestValueCard *Card + + // Act + obj.SetCard(fernTestValueCard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCardForgottenEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CardForgottenEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CardForgottenEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CardForgottenEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CardForgottenEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CardForgottenEvent{} + var fernTestValueData *CardForgottenEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCardForgottenEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardForgottenEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardForgottenEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardForgottenEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardForgottenEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEvent{} + var expected *CardForgottenEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardForgottenEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCardForgottenEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEvent{} + var fernTestValueData *CardForgottenEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCardForgottenEventCard(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &CardForgottenEventCard{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerID", func(t *testing.T) { + obj := &CardForgottenEventCard{} + var fernTestValueCustomerID *string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEnabled", func(t *testing.T) { + obj := &CardForgottenEventCard{} + var fernTestValueEnabled *bool + obj.SetEnabled(fernTestValueEnabled) + assert.Equal(t, fernTestValueEnabled, obj.Enabled) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReferenceID", func(t *testing.T) { + obj := &CardForgottenEventCard{} + var fernTestValueReferenceID *string + obj.SetReferenceID(fernTestValueReferenceID) + assert.Equal(t, fernTestValueReferenceID, obj.ReferenceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &CardForgottenEventCard{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CardForgottenEventCard{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCardForgottenEventCard(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventCard{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventCard{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardForgottenEventCard + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetCustomerID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventCard{} + var expected *string + obj.CustomerID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomerID(), "getter should return the property value") + }) + + t.Run("GetCustomerID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventCard{} + obj.CustomerID = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomerID(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomerID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardForgottenEventCard + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomerID() // Should return zero value + }) + + t.Run("GetEnabled", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventCard{} + var expected *bool + obj.Enabled = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEnabled(), "getter should return the property value") + }) + + t.Run("GetEnabled_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventCard{} + obj.Enabled = nil + + // Act & Assert + assert.Nil(t, obj.GetEnabled(), "getter should return nil when property is nil") + }) + + t.Run("GetEnabled_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardForgottenEventCard + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEnabled() // Should return zero value + }) + + t.Run("GetReferenceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventCard{} + var expected *string + obj.ReferenceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReferenceID(), "getter should return the property value") + }) + + t.Run("GetReferenceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventCard{} + obj.ReferenceID = nil + + // Act & Assert + assert.Nil(t, obj.GetReferenceID(), "getter should return nil when property is nil") + }) + + t.Run("GetReferenceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardForgottenEventCard + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReferenceID() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventCard{} + var expected *int64 + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventCard{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardForgottenEventCard + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventCard{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventCard{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardForgottenEventCard + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCardForgottenEventCard(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventCard{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventCard{} + var fernTestValueCustomerID *string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEnabled_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventCard{} + var fernTestValueEnabled *bool + + // Act + obj.SetEnabled(fernTestValueEnabled) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReferenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventCard{} + var fernTestValueReferenceID *string + + // Act + obj.SetReferenceID(fernTestValueReferenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventCard{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventCard{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCardForgottenEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &CardForgottenEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &CardForgottenEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &CardForgottenEventData{} + var fernTestValueObject *CardForgottenEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCardForgottenEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardForgottenEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardForgottenEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventData{} + var expected *CardForgottenEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardForgottenEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCardForgottenEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventData{} + var fernTestValueObject *CardForgottenEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCardForgottenEventObject(t *testing.T) { + t.Run("SetCard", func(t *testing.T) { + obj := &CardForgottenEventObject{} + var fernTestValueCard *CardForgottenEventCard + obj.SetCard(fernTestValueCard) + assert.Equal(t, fernTestValueCard, obj.Card) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCardForgottenEventObject(t *testing.T) { + t.Run("GetCard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventObject{} + var expected *CardForgottenEventCard + obj.Card = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCard(), "getter should return the property value") + }) + + t.Run("GetCard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventObject{} + obj.Card = nil + + // Act & Assert + assert.Nil(t, obj.GetCard(), "getter should return nil when property is nil") + }) + + t.Run("GetCard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardForgottenEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCard() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCardForgottenEventObject(t *testing.T) { + t.Run("SetCard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventObject{} + var fernTestValueCard *CardForgottenEventCard + + // Act + obj.SetCard(fernTestValueCard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCardUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CardUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CardUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CardUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CardUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CardUpdatedEvent{} + var fernTestValueData *CardUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCardUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEvent{} + var expected *CardUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCardUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEvent{} + var fernTestValueData *CardUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCardUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &CardUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &CardUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &CardUpdatedEventData{} + var fernTestValueObject *CardUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCardUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEventData{} + var expected *CardUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCardUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEventData{} + var fernTestValueObject *CardUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCardUpdatedEventObject(t *testing.T) { + t.Run("SetCard", func(t *testing.T) { + obj := &CardUpdatedEventObject{} + var fernTestValueCard *Card + obj.SetCard(fernTestValueCard) + assert.Equal(t, fernTestValueCard, obj.Card) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCardUpdatedEventObject(t *testing.T) { + t.Run("GetCard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEventObject{} + var expected *Card + obj.Card = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCard(), "getter should return the property value") + }) + + t.Run("GetCard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEventObject{} + obj.Card = nil + + // Act & Assert + assert.Nil(t, obj.GetCard(), "getter should return nil when property is nil") + }) + + t.Run("GetCard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCard() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCardUpdatedEventObject(t *testing.T) { + t.Run("SetCard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEventObject{} + var fernTestValueCard *Card + + // Act + obj.SetCard(fernTestValueCard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCashDrawerDevice(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &CashDrawerDevice{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &CashDrawerDevice{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCashDrawerDevice(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerDevice{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerDevice{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerDevice + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerDevice{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerDevice{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerDevice + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCashDrawerDevice(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerDevice{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerDevice{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCashDrawerShift(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &CashDrawerShift{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetState", func(t *testing.T) { + obj := &CashDrawerShift{} + var fernTestValueState *CashDrawerShiftState + obj.SetState(fernTestValueState) + assert.Equal(t, fernTestValueState, obj.State) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOpenedAt", func(t *testing.T) { + obj := &CashDrawerShift{} + var fernTestValueOpenedAt *string + obj.SetOpenedAt(fernTestValueOpenedAt) + assert.Equal(t, fernTestValueOpenedAt, obj.OpenedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEndedAt", func(t *testing.T) { + obj := &CashDrawerShift{} + var fernTestValueEndedAt *string + obj.SetEndedAt(fernTestValueEndedAt) + assert.Equal(t, fernTestValueEndedAt, obj.EndedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetClosedAt", func(t *testing.T) { + obj := &CashDrawerShift{} + var fernTestValueClosedAt *string + obj.SetClosedAt(fernTestValueClosedAt) + assert.Equal(t, fernTestValueClosedAt, obj.ClosedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDescription", func(t *testing.T) { + obj := &CashDrawerShift{} + var fernTestValueDescription *string + obj.SetDescription(fernTestValueDescription) + assert.Equal(t, fernTestValueDescription, obj.Description) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOpenedCashMoney", func(t *testing.T) { + obj := &CashDrawerShift{} + var fernTestValueOpenedCashMoney *Money + obj.SetOpenedCashMoney(fernTestValueOpenedCashMoney) + assert.Equal(t, fernTestValueOpenedCashMoney, obj.OpenedCashMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCashPaymentMoney", func(t *testing.T) { + obj := &CashDrawerShift{} + var fernTestValueCashPaymentMoney *Money + obj.SetCashPaymentMoney(fernTestValueCashPaymentMoney) + assert.Equal(t, fernTestValueCashPaymentMoney, obj.CashPaymentMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCashRefundsMoney", func(t *testing.T) { + obj := &CashDrawerShift{} + var fernTestValueCashRefundsMoney *Money + obj.SetCashRefundsMoney(fernTestValueCashRefundsMoney) + assert.Equal(t, fernTestValueCashRefundsMoney, obj.CashRefundsMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCashPaidInMoney", func(t *testing.T) { + obj := &CashDrawerShift{} + var fernTestValueCashPaidInMoney *Money + obj.SetCashPaidInMoney(fernTestValueCashPaidInMoney) + assert.Equal(t, fernTestValueCashPaidInMoney, obj.CashPaidInMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCashPaidOutMoney", func(t *testing.T) { + obj := &CashDrawerShift{} + var fernTestValueCashPaidOutMoney *Money + obj.SetCashPaidOutMoney(fernTestValueCashPaidOutMoney) + assert.Equal(t, fernTestValueCashPaidOutMoney, obj.CashPaidOutMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExpectedCashMoney", func(t *testing.T) { + obj := &CashDrawerShift{} + var fernTestValueExpectedCashMoney *Money + obj.SetExpectedCashMoney(fernTestValueExpectedCashMoney) + assert.Equal(t, fernTestValueExpectedCashMoney, obj.ExpectedCashMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetClosedCashMoney", func(t *testing.T) { + obj := &CashDrawerShift{} + var fernTestValueClosedCashMoney *Money + obj.SetClosedCashMoney(fernTestValueClosedCashMoney) + assert.Equal(t, fernTestValueClosedCashMoney, obj.ClosedCashMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDevice", func(t *testing.T) { + obj := &CashDrawerShift{} + var fernTestValueDevice *CashDrawerDevice + obj.SetDevice(fernTestValueDevice) + assert.Equal(t, fernTestValueDevice, obj.Device) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CashDrawerShift{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CashDrawerShift{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &CashDrawerShift{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTeamMemberIDs", func(t *testing.T) { + obj := &CashDrawerShift{} + var fernTestValueTeamMemberIDs []string + obj.SetTeamMemberIDs(fernTestValueTeamMemberIDs) + assert.Equal(t, fernTestValueTeamMemberIDs, obj.TeamMemberIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOpeningTeamMemberID", func(t *testing.T) { + obj := &CashDrawerShift{} + var fernTestValueOpeningTeamMemberID *string + obj.SetOpeningTeamMemberID(fernTestValueOpeningTeamMemberID) + assert.Equal(t, fernTestValueOpeningTeamMemberID, obj.OpeningTeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEndingTeamMemberID", func(t *testing.T) { + obj := &CashDrawerShift{} + var fernTestValueEndingTeamMemberID *string + obj.SetEndingTeamMemberID(fernTestValueEndingTeamMemberID) + assert.Equal(t, fernTestValueEndingTeamMemberID, obj.EndingTeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetClosingTeamMemberID", func(t *testing.T) { + obj := &CashDrawerShift{} + var fernTestValueClosingTeamMemberID *string + obj.SetClosingTeamMemberID(fernTestValueClosingTeamMemberID) + assert.Equal(t, fernTestValueClosingTeamMemberID, obj.ClosingTeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCashDrawerShift(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetState", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var expected *CashDrawerShiftState + obj.State = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetState(), "getter should return the property value") + }) + + t.Run("GetState_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + obj.State = nil + + // Act & Assert + assert.Nil(t, obj.GetState(), "getter should return nil when property is nil") + }) + + t.Run("GetState_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetState() // Should return zero value + }) + + t.Run("GetOpenedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var expected *string + obj.OpenedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOpenedAt(), "getter should return the property value") + }) + + t.Run("GetOpenedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + obj.OpenedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetOpenedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetOpenedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOpenedAt() // Should return zero value + }) + + t.Run("GetEndedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var expected *string + obj.EndedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEndedAt(), "getter should return the property value") + }) + + t.Run("GetEndedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + obj.EndedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetEndedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetEndedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEndedAt() // Should return zero value + }) + + t.Run("GetClosedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var expected *string + obj.ClosedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetClosedAt(), "getter should return the property value") + }) + + t.Run("GetClosedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + obj.ClosedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetClosedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetClosedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetClosedAt() // Should return zero value + }) + + t.Run("GetDescription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var expected *string + obj.Description = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDescription(), "getter should return the property value") + }) + + t.Run("GetDescription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + obj.Description = nil + + // Act & Assert + assert.Nil(t, obj.GetDescription(), "getter should return nil when property is nil") + }) + + t.Run("GetDescription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDescription() // Should return zero value + }) + + t.Run("GetOpenedCashMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var expected *Money + obj.OpenedCashMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOpenedCashMoney(), "getter should return the property value") + }) + + t.Run("GetOpenedCashMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + obj.OpenedCashMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetOpenedCashMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetOpenedCashMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOpenedCashMoney() // Should return zero value + }) + + t.Run("GetCashPaymentMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var expected *Money + obj.CashPaymentMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCashPaymentMoney(), "getter should return the property value") + }) + + t.Run("GetCashPaymentMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + obj.CashPaymentMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetCashPaymentMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetCashPaymentMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCashPaymentMoney() // Should return zero value + }) + + t.Run("GetCashRefundsMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var expected *Money + obj.CashRefundsMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCashRefundsMoney(), "getter should return the property value") + }) + + t.Run("GetCashRefundsMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + obj.CashRefundsMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetCashRefundsMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetCashRefundsMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCashRefundsMoney() // Should return zero value + }) + + t.Run("GetCashPaidInMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var expected *Money + obj.CashPaidInMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCashPaidInMoney(), "getter should return the property value") + }) + + t.Run("GetCashPaidInMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + obj.CashPaidInMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetCashPaidInMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetCashPaidInMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCashPaidInMoney() // Should return zero value + }) + + t.Run("GetCashPaidOutMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var expected *Money + obj.CashPaidOutMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCashPaidOutMoney(), "getter should return the property value") + }) + + t.Run("GetCashPaidOutMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + obj.CashPaidOutMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetCashPaidOutMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetCashPaidOutMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCashPaidOutMoney() // Should return zero value + }) + + t.Run("GetExpectedCashMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var expected *Money + obj.ExpectedCashMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExpectedCashMoney(), "getter should return the property value") + }) + + t.Run("GetExpectedCashMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + obj.ExpectedCashMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetExpectedCashMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetExpectedCashMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExpectedCashMoney() // Should return zero value + }) + + t.Run("GetClosedCashMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var expected *Money + obj.ClosedCashMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetClosedCashMoney(), "getter should return the property value") + }) + + t.Run("GetClosedCashMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + obj.ClosedCashMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetClosedCashMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetClosedCashMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetClosedCashMoney() // Should return zero value + }) + + t.Run("GetDevice", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var expected *CashDrawerDevice + obj.Device = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDevice(), "getter should return the property value") + }) + + t.Run("GetDevice_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + obj.Device = nil + + // Act & Assert + assert.Nil(t, obj.GetDevice(), "getter should return nil when property is nil") + }) + + t.Run("GetDevice_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDevice() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetTeamMemberIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var expected []string + obj.TeamMemberIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMemberIDs(), "getter should return the property value") + }) + + t.Run("GetTeamMemberIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + obj.TeamMemberIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMemberIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMemberIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMemberIDs() // Should return zero value + }) + + t.Run("GetOpeningTeamMemberID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var expected *string + obj.OpeningTeamMemberID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOpeningTeamMemberID(), "getter should return the property value") + }) + + t.Run("GetOpeningTeamMemberID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + obj.OpeningTeamMemberID = nil + + // Act & Assert + assert.Nil(t, obj.GetOpeningTeamMemberID(), "getter should return nil when property is nil") + }) + + t.Run("GetOpeningTeamMemberID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOpeningTeamMemberID() // Should return zero value + }) + + t.Run("GetEndingTeamMemberID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var expected *string + obj.EndingTeamMemberID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEndingTeamMemberID(), "getter should return the property value") + }) + + t.Run("GetEndingTeamMemberID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + obj.EndingTeamMemberID = nil + + // Act & Assert + assert.Nil(t, obj.GetEndingTeamMemberID(), "getter should return nil when property is nil") + }) + + t.Run("GetEndingTeamMemberID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEndingTeamMemberID() // Should return zero value + }) + + t.Run("GetClosingTeamMemberID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var expected *string + obj.ClosingTeamMemberID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetClosingTeamMemberID(), "getter should return the property value") + }) + + t.Run("GetClosingTeamMemberID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + obj.ClosingTeamMemberID = nil + + // Act & Assert + assert.Nil(t, obj.GetClosingTeamMemberID(), "getter should return nil when property is nil") + }) + + t.Run("GetClosingTeamMemberID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetClosingTeamMemberID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCashDrawerShift(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetState_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var fernTestValueState *CashDrawerShiftState + + // Act + obj.SetState(fernTestValueState) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOpenedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var fernTestValueOpenedAt *string + + // Act + obj.SetOpenedAt(fernTestValueOpenedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEndedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var fernTestValueEndedAt *string + + // Act + obj.SetEndedAt(fernTestValueEndedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetClosedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var fernTestValueClosedAt *string + + // Act + obj.SetClosedAt(fernTestValueClosedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDescription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var fernTestValueDescription *string + + // Act + obj.SetDescription(fernTestValueDescription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOpenedCashMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var fernTestValueOpenedCashMoney *Money + + // Act + obj.SetOpenedCashMoney(fernTestValueOpenedCashMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCashPaymentMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var fernTestValueCashPaymentMoney *Money + + // Act + obj.SetCashPaymentMoney(fernTestValueCashPaymentMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCashRefundsMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var fernTestValueCashRefundsMoney *Money + + // Act + obj.SetCashRefundsMoney(fernTestValueCashRefundsMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCashPaidInMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var fernTestValueCashPaidInMoney *Money + + // Act + obj.SetCashPaidInMoney(fernTestValueCashPaidInMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCashPaidOutMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var fernTestValueCashPaidOutMoney *Money + + // Act + obj.SetCashPaidOutMoney(fernTestValueCashPaidOutMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExpectedCashMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var fernTestValueExpectedCashMoney *Money + + // Act + obj.SetExpectedCashMoney(fernTestValueExpectedCashMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetClosedCashMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var fernTestValueClosedCashMoney *Money + + // Act + obj.SetClosedCashMoney(fernTestValueClosedCashMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDevice_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var fernTestValueDevice *CashDrawerDevice + + // Act + obj.SetDevice(fernTestValueDevice) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTeamMemberIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var fernTestValueTeamMemberIDs []string + + // Act + obj.SetTeamMemberIDs(fernTestValueTeamMemberIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOpeningTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var fernTestValueOpeningTeamMemberID *string + + // Act + obj.SetOpeningTeamMemberID(fernTestValueOpeningTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEndingTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var fernTestValueEndingTeamMemberID *string + + // Act + obj.SetEndingTeamMemberID(fernTestValueEndingTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetClosingTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + var fernTestValueClosingTeamMemberID *string + + // Act + obj.SetClosingTeamMemberID(fernTestValueClosingTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCashDrawerShiftEvent(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &CashDrawerShiftEvent{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventType", func(t *testing.T) { + obj := &CashDrawerShiftEvent{} + var fernTestValueEventType *CashDrawerEventType + obj.SetEventType(fernTestValueEventType) + assert.Equal(t, fernTestValueEventType, obj.EventType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventMoney", func(t *testing.T) { + obj := &CashDrawerShiftEvent{} + var fernTestValueEventMoney *Money + obj.SetEventMoney(fernTestValueEventMoney) + assert.Equal(t, fernTestValueEventMoney, obj.EventMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CashDrawerShiftEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDescription", func(t *testing.T) { + obj := &CashDrawerShiftEvent{} + var fernTestValueDescription *string + obj.SetDescription(fernTestValueDescription) + assert.Equal(t, fernTestValueDescription, obj.Description) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTeamMemberID", func(t *testing.T) { + obj := &CashDrawerShiftEvent{} + var fernTestValueTeamMemberID *string + obj.SetTeamMemberID(fernTestValueTeamMemberID) + assert.Equal(t, fernTestValueTeamMemberID, obj.TeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCashDrawerShiftEvent(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftEvent{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftEvent{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShiftEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetEventType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftEvent{} + var expected *CashDrawerEventType + obj.EventType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventType(), "getter should return the property value") + }) + + t.Run("GetEventType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftEvent{} + obj.EventType = nil + + // Act & Assert + assert.Nil(t, obj.GetEventType(), "getter should return nil when property is nil") + }) + + t.Run("GetEventType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShiftEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventType() // Should return zero value + }) + + t.Run("GetEventMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftEvent{} + var expected *Money + obj.EventMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventMoney(), "getter should return the property value") + }) + + t.Run("GetEventMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftEvent{} + obj.EventMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetEventMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetEventMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShiftEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventMoney() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShiftEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetDescription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftEvent{} + var expected *string + obj.Description = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDescription(), "getter should return the property value") + }) + + t.Run("GetDescription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftEvent{} + obj.Description = nil + + // Act & Assert + assert.Nil(t, obj.GetDescription(), "getter should return nil when property is nil") + }) + + t.Run("GetDescription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShiftEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDescription() // Should return zero value + }) + + t.Run("GetTeamMemberID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftEvent{} + var expected *string + obj.TeamMemberID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMemberID(), "getter should return the property value") + }) + + t.Run("GetTeamMemberID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftEvent{} + obj.TeamMemberID = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMemberID(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMemberID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShiftEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMemberID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCashDrawerShiftEvent(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftEvent{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftEvent{} + var fernTestValueEventType *CashDrawerEventType + + // Act + obj.SetEventType(fernTestValueEventType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftEvent{} + var fernTestValueEventMoney *Money + + // Act + obj.SetEventMoney(fernTestValueEventMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDescription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftEvent{} + var fernTestValueDescription *string + + // Act + obj.SetDescription(fernTestValueDescription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftEvent{} + var fernTestValueTeamMemberID *string + + // Act + obj.SetTeamMemberID(fernTestValueTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCashDrawerShiftSummary(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &CashDrawerShiftSummary{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetState", func(t *testing.T) { + obj := &CashDrawerShiftSummary{} + var fernTestValueState *CashDrawerShiftState + obj.SetState(fernTestValueState) + assert.Equal(t, fernTestValueState, obj.State) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOpenedAt", func(t *testing.T) { + obj := &CashDrawerShiftSummary{} + var fernTestValueOpenedAt *string + obj.SetOpenedAt(fernTestValueOpenedAt) + assert.Equal(t, fernTestValueOpenedAt, obj.OpenedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEndedAt", func(t *testing.T) { + obj := &CashDrawerShiftSummary{} + var fernTestValueEndedAt *string + obj.SetEndedAt(fernTestValueEndedAt) + assert.Equal(t, fernTestValueEndedAt, obj.EndedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetClosedAt", func(t *testing.T) { + obj := &CashDrawerShiftSummary{} + var fernTestValueClosedAt *string + obj.SetClosedAt(fernTestValueClosedAt) + assert.Equal(t, fernTestValueClosedAt, obj.ClosedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDescription", func(t *testing.T) { + obj := &CashDrawerShiftSummary{} + var fernTestValueDescription *string + obj.SetDescription(fernTestValueDescription) + assert.Equal(t, fernTestValueDescription, obj.Description) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOpenedCashMoney", func(t *testing.T) { + obj := &CashDrawerShiftSummary{} + var fernTestValueOpenedCashMoney *Money + obj.SetOpenedCashMoney(fernTestValueOpenedCashMoney) + assert.Equal(t, fernTestValueOpenedCashMoney, obj.OpenedCashMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExpectedCashMoney", func(t *testing.T) { + obj := &CashDrawerShiftSummary{} + var fernTestValueExpectedCashMoney *Money + obj.SetExpectedCashMoney(fernTestValueExpectedCashMoney) + assert.Equal(t, fernTestValueExpectedCashMoney, obj.ExpectedCashMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetClosedCashMoney", func(t *testing.T) { + obj := &CashDrawerShiftSummary{} + var fernTestValueClosedCashMoney *Money + obj.SetClosedCashMoney(fernTestValueClosedCashMoney) + assert.Equal(t, fernTestValueClosedCashMoney, obj.ClosedCashMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CashDrawerShiftSummary{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CashDrawerShiftSummary{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &CashDrawerShiftSummary{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCashDrawerShiftSummary(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShiftSummary + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetState", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + var expected *CashDrawerShiftState + obj.State = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetState(), "getter should return the property value") + }) + + t.Run("GetState_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + obj.State = nil + + // Act & Assert + assert.Nil(t, obj.GetState(), "getter should return nil when property is nil") + }) + + t.Run("GetState_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShiftSummary + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetState() // Should return zero value + }) + + t.Run("GetOpenedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + var expected *string + obj.OpenedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOpenedAt(), "getter should return the property value") + }) + + t.Run("GetOpenedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + obj.OpenedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetOpenedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetOpenedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShiftSummary + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOpenedAt() // Should return zero value + }) + + t.Run("GetEndedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + var expected *string + obj.EndedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEndedAt(), "getter should return the property value") + }) + + t.Run("GetEndedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + obj.EndedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetEndedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetEndedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShiftSummary + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEndedAt() // Should return zero value + }) + + t.Run("GetClosedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + var expected *string + obj.ClosedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetClosedAt(), "getter should return the property value") + }) + + t.Run("GetClosedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + obj.ClosedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetClosedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetClosedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShiftSummary + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetClosedAt() // Should return zero value + }) + + t.Run("GetDescription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + var expected *string + obj.Description = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDescription(), "getter should return the property value") + }) + + t.Run("GetDescription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + obj.Description = nil + + // Act & Assert + assert.Nil(t, obj.GetDescription(), "getter should return nil when property is nil") + }) + + t.Run("GetDescription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShiftSummary + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDescription() // Should return zero value + }) + + t.Run("GetOpenedCashMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + var expected *Money + obj.OpenedCashMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOpenedCashMoney(), "getter should return the property value") + }) + + t.Run("GetOpenedCashMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + obj.OpenedCashMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetOpenedCashMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetOpenedCashMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShiftSummary + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOpenedCashMoney() // Should return zero value + }) + + t.Run("GetExpectedCashMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + var expected *Money + obj.ExpectedCashMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExpectedCashMoney(), "getter should return the property value") + }) + + t.Run("GetExpectedCashMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + obj.ExpectedCashMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetExpectedCashMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetExpectedCashMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShiftSummary + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExpectedCashMoney() // Should return zero value + }) + + t.Run("GetClosedCashMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + var expected *Money + obj.ClosedCashMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetClosedCashMoney(), "getter should return the property value") + }) + + t.Run("GetClosedCashMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + obj.ClosedCashMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetClosedCashMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetClosedCashMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShiftSummary + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetClosedCashMoney() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShiftSummary + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShiftSummary + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShiftSummary + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCashDrawerShiftSummary(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetState_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + var fernTestValueState *CashDrawerShiftState + + // Act + obj.SetState(fernTestValueState) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOpenedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + var fernTestValueOpenedAt *string + + // Act + obj.SetOpenedAt(fernTestValueOpenedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEndedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + var fernTestValueEndedAt *string + + // Act + obj.SetEndedAt(fernTestValueEndedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetClosedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + var fernTestValueClosedAt *string + + // Act + obj.SetClosedAt(fernTestValueClosedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDescription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + var fernTestValueDescription *string + + // Act + obj.SetDescription(fernTestValueDescription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOpenedCashMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + var fernTestValueOpenedCashMoney *Money + + // Act + obj.SetOpenedCashMoney(fernTestValueOpenedCashMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExpectedCashMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + var fernTestValueExpectedCashMoney *Money + + // Act + obj.SetExpectedCashMoney(fernTestValueExpectedCashMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetClosedCashMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + var fernTestValueClosedCashMoney *Money + + // Act + obj.SetClosedCashMoney(fernTestValueClosedCashMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogAvailabilityPeriod(t *testing.T) { + t.Run("SetStartLocalTime", func(t *testing.T) { + obj := &CatalogAvailabilityPeriod{} + var fernTestValueStartLocalTime *string + obj.SetStartLocalTime(fernTestValueStartLocalTime) + assert.Equal(t, fernTestValueStartLocalTime, obj.StartLocalTime) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEndLocalTime", func(t *testing.T) { + obj := &CatalogAvailabilityPeriod{} + var fernTestValueEndLocalTime *string + obj.SetEndLocalTime(fernTestValueEndLocalTime) + assert.Equal(t, fernTestValueEndLocalTime, obj.EndLocalTime) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDayOfWeek", func(t *testing.T) { + obj := &CatalogAvailabilityPeriod{} + var fernTestValueDayOfWeek *DayOfWeek + obj.SetDayOfWeek(fernTestValueDayOfWeek) + assert.Equal(t, fernTestValueDayOfWeek, obj.DayOfWeek) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogAvailabilityPeriod(t *testing.T) { + t.Run("GetStartLocalTime", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogAvailabilityPeriod{} + var expected *string + obj.StartLocalTime = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStartLocalTime(), "getter should return the property value") + }) + + t.Run("GetStartLocalTime_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogAvailabilityPeriod{} + obj.StartLocalTime = nil + + // Act & Assert + assert.Nil(t, obj.GetStartLocalTime(), "getter should return nil when property is nil") + }) + + t.Run("GetStartLocalTime_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogAvailabilityPeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStartLocalTime() // Should return zero value + }) + + t.Run("GetEndLocalTime", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogAvailabilityPeriod{} + var expected *string + obj.EndLocalTime = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEndLocalTime(), "getter should return the property value") + }) + + t.Run("GetEndLocalTime_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogAvailabilityPeriod{} + obj.EndLocalTime = nil + + // Act & Assert + assert.Nil(t, obj.GetEndLocalTime(), "getter should return nil when property is nil") + }) + + t.Run("GetEndLocalTime_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogAvailabilityPeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEndLocalTime() // Should return zero value + }) + + t.Run("GetDayOfWeek", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogAvailabilityPeriod{} + var expected *DayOfWeek + obj.DayOfWeek = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDayOfWeek(), "getter should return the property value") + }) + + t.Run("GetDayOfWeek_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogAvailabilityPeriod{} + obj.DayOfWeek = nil + + // Act & Assert + assert.Nil(t, obj.GetDayOfWeek(), "getter should return nil when property is nil") + }) + + t.Run("GetDayOfWeek_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogAvailabilityPeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDayOfWeek() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogAvailabilityPeriod(t *testing.T) { + t.Run("SetStartLocalTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogAvailabilityPeriod{} + var fernTestValueStartLocalTime *string + + // Act + obj.SetStartLocalTime(fernTestValueStartLocalTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEndLocalTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogAvailabilityPeriod{} + var fernTestValueEndLocalTime *string + + // Act + obj.SetEndLocalTime(fernTestValueEndLocalTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDayOfWeek_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogAvailabilityPeriod{} + var fernTestValueDayOfWeek *DayOfWeek + + // Act + obj.SetDayOfWeek(fernTestValueDayOfWeek) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogCategory(t *testing.T) { + t.Run("SetName", func(t *testing.T) { + obj := &CatalogCategory{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImageIDs", func(t *testing.T) { + obj := &CatalogCategory{} + var fernTestValueImageIDs []string + obj.SetImageIDs(fernTestValueImageIDs) + assert.Equal(t, fernTestValueImageIDs, obj.ImageIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCategoryType", func(t *testing.T) { + obj := &CatalogCategory{} + var fernTestValueCategoryType *CatalogCategoryType + obj.SetCategoryType(fernTestValueCategoryType) + assert.Equal(t, fernTestValueCategoryType, obj.CategoryType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetParentCategory", func(t *testing.T) { + obj := &CatalogCategory{} + var fernTestValueParentCategory *CatalogObjectCategory + obj.SetParentCategory(fernTestValueParentCategory) + assert.Equal(t, fernTestValueParentCategory, obj.ParentCategory) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsTopLevel", func(t *testing.T) { + obj := &CatalogCategory{} + var fernTestValueIsTopLevel *bool + obj.SetIsTopLevel(fernTestValueIsTopLevel) + assert.Equal(t, fernTestValueIsTopLevel, obj.IsTopLevel) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetChannels", func(t *testing.T) { + obj := &CatalogCategory{} + var fernTestValueChannels []string + obj.SetChannels(fernTestValueChannels) + assert.Equal(t, fernTestValueChannels, obj.Channels) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAvailabilityPeriodIDs", func(t *testing.T) { + obj := &CatalogCategory{} + var fernTestValueAvailabilityPeriodIDs []string + obj.SetAvailabilityPeriodIDs(fernTestValueAvailabilityPeriodIDs) + assert.Equal(t, fernTestValueAvailabilityPeriodIDs, obj.AvailabilityPeriodIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOnlineVisibility", func(t *testing.T) { + obj := &CatalogCategory{} + var fernTestValueOnlineVisibility *bool + obj.SetOnlineVisibility(fernTestValueOnlineVisibility) + assert.Equal(t, fernTestValueOnlineVisibility, obj.OnlineVisibility) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRootCategory", func(t *testing.T) { + obj := &CatalogCategory{} + var fernTestValueRootCategory *string + obj.SetRootCategory(fernTestValueRootCategory) + assert.Equal(t, fernTestValueRootCategory, obj.RootCategory) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEcomSeoData", func(t *testing.T) { + obj := &CatalogCategory{} + var fernTestValueEcomSeoData *CatalogEcomSeoData + obj.SetEcomSeoData(fernTestValueEcomSeoData) + assert.Equal(t, fernTestValueEcomSeoData, obj.EcomSeoData) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPathToRoot", func(t *testing.T) { + obj := &CatalogCategory{} + var fernTestValuePathToRoot []*CategoryPathToRootNode + obj.SetPathToRoot(fernTestValuePathToRoot) + assert.Equal(t, fernTestValuePathToRoot, obj.PathToRoot) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogCategory(t *testing.T) { + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCategory + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetImageIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + var expected []string + obj.ImageIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImageIDs(), "getter should return the property value") + }) + + t.Run("GetImageIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + obj.ImageIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetImageIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetImageIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCategory + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImageIDs() // Should return zero value + }) + + t.Run("GetCategoryType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + var expected *CatalogCategoryType + obj.CategoryType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCategoryType(), "getter should return the property value") + }) + + t.Run("GetCategoryType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + obj.CategoryType = nil + + // Act & Assert + assert.Nil(t, obj.GetCategoryType(), "getter should return nil when property is nil") + }) + + t.Run("GetCategoryType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCategory + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCategoryType() // Should return zero value + }) + + t.Run("GetParentCategory", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + var expected *CatalogObjectCategory + obj.ParentCategory = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetParentCategory(), "getter should return the property value") + }) + + t.Run("GetParentCategory_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + obj.ParentCategory = nil + + // Act & Assert + assert.Nil(t, obj.GetParentCategory(), "getter should return nil when property is nil") + }) + + t.Run("GetParentCategory_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCategory + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetParentCategory() // Should return zero value + }) + + t.Run("GetIsTopLevel", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + var expected *bool + obj.IsTopLevel = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsTopLevel(), "getter should return the property value") + }) + + t.Run("GetIsTopLevel_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + obj.IsTopLevel = nil + + // Act & Assert + assert.Nil(t, obj.GetIsTopLevel(), "getter should return nil when property is nil") + }) + + t.Run("GetIsTopLevel_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCategory + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsTopLevel() // Should return zero value + }) + + t.Run("GetChannels", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + var expected []string + obj.Channels = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetChannels(), "getter should return the property value") + }) + + t.Run("GetChannels_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + obj.Channels = nil + + // Act & Assert + assert.Nil(t, obj.GetChannels(), "getter should return nil when property is nil") + }) + + t.Run("GetChannels_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCategory + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetChannels() // Should return zero value + }) + + t.Run("GetAvailabilityPeriodIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + var expected []string + obj.AvailabilityPeriodIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAvailabilityPeriodIDs(), "getter should return the property value") + }) + + t.Run("GetAvailabilityPeriodIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + obj.AvailabilityPeriodIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetAvailabilityPeriodIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetAvailabilityPeriodIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCategory + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAvailabilityPeriodIDs() // Should return zero value + }) + + t.Run("GetOnlineVisibility", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + var expected *bool + obj.OnlineVisibility = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOnlineVisibility(), "getter should return the property value") + }) + + t.Run("GetOnlineVisibility_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + obj.OnlineVisibility = nil + + // Act & Assert + assert.Nil(t, obj.GetOnlineVisibility(), "getter should return nil when property is nil") + }) + + t.Run("GetOnlineVisibility_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCategory + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOnlineVisibility() // Should return zero value + }) + + t.Run("GetRootCategory", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + var expected *string + obj.RootCategory = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRootCategory(), "getter should return the property value") + }) + + t.Run("GetRootCategory_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + obj.RootCategory = nil + + // Act & Assert + assert.Nil(t, obj.GetRootCategory(), "getter should return nil when property is nil") + }) + + t.Run("GetRootCategory_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCategory + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRootCategory() // Should return zero value + }) + + t.Run("GetEcomSeoData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + var expected *CatalogEcomSeoData + obj.EcomSeoData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEcomSeoData(), "getter should return the property value") + }) + + t.Run("GetEcomSeoData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + obj.EcomSeoData = nil + + // Act & Assert + assert.Nil(t, obj.GetEcomSeoData(), "getter should return nil when property is nil") + }) + + t.Run("GetEcomSeoData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCategory + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEcomSeoData() // Should return zero value + }) + + t.Run("GetPathToRoot", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + var expected []*CategoryPathToRootNode + obj.PathToRoot = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPathToRoot(), "getter should return the property value") + }) + + t.Run("GetPathToRoot_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + obj.PathToRoot = nil + + // Act & Assert + assert.Nil(t, obj.GetPathToRoot(), "getter should return nil when property is nil") + }) + + t.Run("GetPathToRoot_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCategory + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPathToRoot() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogCategory(t *testing.T) { + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImageIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + var fernTestValueImageIDs []string + + // Act + obj.SetImageIDs(fernTestValueImageIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCategoryType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + var fernTestValueCategoryType *CatalogCategoryType + + // Act + obj.SetCategoryType(fernTestValueCategoryType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetParentCategory_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + var fernTestValueParentCategory *CatalogObjectCategory + + // Act + obj.SetParentCategory(fernTestValueParentCategory) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsTopLevel_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + var fernTestValueIsTopLevel *bool + + // Act + obj.SetIsTopLevel(fernTestValueIsTopLevel) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetChannels_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + var fernTestValueChannels []string + + // Act + obj.SetChannels(fernTestValueChannels) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAvailabilityPeriodIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + var fernTestValueAvailabilityPeriodIDs []string + + // Act + obj.SetAvailabilityPeriodIDs(fernTestValueAvailabilityPeriodIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOnlineVisibility_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + var fernTestValueOnlineVisibility *bool + + // Act + obj.SetOnlineVisibility(fernTestValueOnlineVisibility) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRootCategory_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + var fernTestValueRootCategory *string + + // Act + obj.SetRootCategory(fernTestValueRootCategory) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEcomSeoData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + var fernTestValueEcomSeoData *CatalogEcomSeoData + + // Act + obj.SetEcomSeoData(fernTestValueEcomSeoData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPathToRoot_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + var fernTestValuePathToRoot []*CategoryPathToRootNode + + // Act + obj.SetPathToRoot(fernTestValuePathToRoot) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogCustomAttributeDefinition(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &CatalogCustomAttributeDefinition{} + var fernTestValueType CatalogCustomAttributeDefinitionType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &CatalogCustomAttributeDefinition{} + var fernTestValueName string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDescription", func(t *testing.T) { + obj := &CatalogCustomAttributeDefinition{} + var fernTestValueDescription *string + obj.SetDescription(fernTestValueDescription) + assert.Equal(t, fernTestValueDescription, obj.Description) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSourceApplication", func(t *testing.T) { + obj := &CatalogCustomAttributeDefinition{} + var fernTestValueSourceApplication *SourceApplication + obj.SetSourceApplication(fernTestValueSourceApplication) + assert.Equal(t, fernTestValueSourceApplication, obj.SourceApplication) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAllowedObjectTypes", func(t *testing.T) { + obj := &CatalogCustomAttributeDefinition{} + var fernTestValueAllowedObjectTypes []CatalogObjectType + obj.SetAllowedObjectTypes(fernTestValueAllowedObjectTypes) + assert.Equal(t, fernTestValueAllowedObjectTypes, obj.AllowedObjectTypes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSellerVisibility", func(t *testing.T) { + obj := &CatalogCustomAttributeDefinition{} + var fernTestValueSellerVisibility *CatalogCustomAttributeDefinitionSellerVisibility + obj.SetSellerVisibility(fernTestValueSellerVisibility) + assert.Equal(t, fernTestValueSellerVisibility, obj.SellerVisibility) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppVisibility", func(t *testing.T) { + obj := &CatalogCustomAttributeDefinition{} + var fernTestValueAppVisibility *CatalogCustomAttributeDefinitionAppVisibility + obj.SetAppVisibility(fernTestValueAppVisibility) + assert.Equal(t, fernTestValueAppVisibility, obj.AppVisibility) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStringConfig", func(t *testing.T) { + obj := &CatalogCustomAttributeDefinition{} + var fernTestValueStringConfig *CatalogCustomAttributeDefinitionStringConfig + obj.SetStringConfig(fernTestValueStringConfig) + assert.Equal(t, fernTestValueStringConfig, obj.StringConfig) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNumberConfig", func(t *testing.T) { + obj := &CatalogCustomAttributeDefinition{} + var fernTestValueNumberConfig *CatalogCustomAttributeDefinitionNumberConfig + obj.SetNumberConfig(fernTestValueNumberConfig) + assert.Equal(t, fernTestValueNumberConfig, obj.NumberConfig) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSelectionConfig", func(t *testing.T) { + obj := &CatalogCustomAttributeDefinition{} + var fernTestValueSelectionConfig *CatalogCustomAttributeDefinitionSelectionConfig + obj.SetSelectionConfig(fernTestValueSelectionConfig) + assert.Equal(t, fernTestValueSelectionConfig, obj.SelectionConfig) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttributeUsageCount", func(t *testing.T) { + obj := &CatalogCustomAttributeDefinition{} + var fernTestValueCustomAttributeUsageCount *int + obj.SetCustomAttributeUsageCount(fernTestValueCustomAttributeUsageCount) + assert.Equal(t, fernTestValueCustomAttributeUsageCount, obj.CustomAttributeUsageCount) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetKey", func(t *testing.T) { + obj := &CatalogCustomAttributeDefinition{} + var fernTestValueKey *string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogCustomAttributeDefinition(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + var expected CatalogCustomAttributeDefinitionType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + var expected string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetDescription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + var expected *string + obj.Description = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDescription(), "getter should return the property value") + }) + + t.Run("GetDescription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + obj.Description = nil + + // Act & Assert + assert.Nil(t, obj.GetDescription(), "getter should return nil when property is nil") + }) + + t.Run("GetDescription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDescription() // Should return zero value + }) + + t.Run("GetSourceApplication", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + var expected *SourceApplication + obj.SourceApplication = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSourceApplication(), "getter should return the property value") + }) + + t.Run("GetSourceApplication_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + obj.SourceApplication = nil + + // Act & Assert + assert.Nil(t, obj.GetSourceApplication(), "getter should return nil when property is nil") + }) + + t.Run("GetSourceApplication_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSourceApplication() // Should return zero value + }) + + t.Run("GetAllowedObjectTypes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + var expected []CatalogObjectType + obj.AllowedObjectTypes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAllowedObjectTypes(), "getter should return the property value") + }) + + t.Run("GetAllowedObjectTypes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + obj.AllowedObjectTypes = nil + + // Act & Assert + assert.Nil(t, obj.GetAllowedObjectTypes(), "getter should return nil when property is nil") + }) + + t.Run("GetAllowedObjectTypes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAllowedObjectTypes() // Should return zero value + }) + + t.Run("GetSellerVisibility", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + var expected *CatalogCustomAttributeDefinitionSellerVisibility + obj.SellerVisibility = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSellerVisibility(), "getter should return the property value") + }) + + t.Run("GetSellerVisibility_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + obj.SellerVisibility = nil + + // Act & Assert + assert.Nil(t, obj.GetSellerVisibility(), "getter should return nil when property is nil") + }) + + t.Run("GetSellerVisibility_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSellerVisibility() // Should return zero value + }) + + t.Run("GetAppVisibility", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + var expected *CatalogCustomAttributeDefinitionAppVisibility + obj.AppVisibility = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppVisibility(), "getter should return the property value") + }) + + t.Run("GetAppVisibility_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + obj.AppVisibility = nil + + // Act & Assert + assert.Nil(t, obj.GetAppVisibility(), "getter should return nil when property is nil") + }) + + t.Run("GetAppVisibility_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppVisibility() // Should return zero value + }) + + t.Run("GetStringConfig", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + var expected *CatalogCustomAttributeDefinitionStringConfig + obj.StringConfig = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStringConfig(), "getter should return the property value") + }) + + t.Run("GetStringConfig_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + obj.StringConfig = nil + + // Act & Assert + assert.Nil(t, obj.GetStringConfig(), "getter should return nil when property is nil") + }) + + t.Run("GetStringConfig_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStringConfig() // Should return zero value + }) + + t.Run("GetNumberConfig", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + var expected *CatalogCustomAttributeDefinitionNumberConfig + obj.NumberConfig = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNumberConfig(), "getter should return the property value") + }) + + t.Run("GetNumberConfig_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + obj.NumberConfig = nil + + // Act & Assert + assert.Nil(t, obj.GetNumberConfig(), "getter should return nil when property is nil") + }) + + t.Run("GetNumberConfig_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNumberConfig() // Should return zero value + }) + + t.Run("GetSelectionConfig", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + var expected *CatalogCustomAttributeDefinitionSelectionConfig + obj.SelectionConfig = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSelectionConfig(), "getter should return the property value") + }) + + t.Run("GetSelectionConfig_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + obj.SelectionConfig = nil + + // Act & Assert + assert.Nil(t, obj.GetSelectionConfig(), "getter should return nil when property is nil") + }) + + t.Run("GetSelectionConfig_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSelectionConfig() // Should return zero value + }) + + t.Run("GetCustomAttributeUsageCount", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + var expected *int + obj.CustomAttributeUsageCount = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeUsageCount(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeUsageCount_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + obj.CustomAttributeUsageCount = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeUsageCount(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeUsageCount_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeUsageCount() // Should return zero value + }) + + t.Run("GetKey", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + var expected *string + obj.Key = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetKey(), "getter should return the property value") + }) + + t.Run("GetKey_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + obj.Key = nil + + // Act & Assert + assert.Nil(t, obj.GetKey(), "getter should return nil when property is nil") + }) + + t.Run("GetKey_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetKey() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogCustomAttributeDefinition(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + var fernTestValueType CatalogCustomAttributeDefinitionType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + var fernTestValueName string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDescription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + var fernTestValueDescription *string + + // Act + obj.SetDescription(fernTestValueDescription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSourceApplication_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + var fernTestValueSourceApplication *SourceApplication + + // Act + obj.SetSourceApplication(fernTestValueSourceApplication) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAllowedObjectTypes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + var fernTestValueAllowedObjectTypes []CatalogObjectType + + // Act + obj.SetAllowedObjectTypes(fernTestValueAllowedObjectTypes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSellerVisibility_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + var fernTestValueSellerVisibility *CatalogCustomAttributeDefinitionSellerVisibility + + // Act + obj.SetSellerVisibility(fernTestValueSellerVisibility) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppVisibility_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + var fernTestValueAppVisibility *CatalogCustomAttributeDefinitionAppVisibility + + // Act + obj.SetAppVisibility(fernTestValueAppVisibility) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStringConfig_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + var fernTestValueStringConfig *CatalogCustomAttributeDefinitionStringConfig + + // Act + obj.SetStringConfig(fernTestValueStringConfig) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNumberConfig_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + var fernTestValueNumberConfig *CatalogCustomAttributeDefinitionNumberConfig + + // Act + obj.SetNumberConfig(fernTestValueNumberConfig) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSelectionConfig_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + var fernTestValueSelectionConfig *CatalogCustomAttributeDefinitionSelectionConfig + + // Act + obj.SetSelectionConfig(fernTestValueSelectionConfig) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttributeUsageCount_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + var fernTestValueCustomAttributeUsageCount *int + + // Act + obj.SetCustomAttributeUsageCount(fernTestValueCustomAttributeUsageCount) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + var fernTestValueKey *string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogCustomAttributeDefinitionNumberConfig(t *testing.T) { + t.Run("SetPrecision", func(t *testing.T) { + obj := &CatalogCustomAttributeDefinitionNumberConfig{} + var fernTestValuePrecision *int + obj.SetPrecision(fernTestValuePrecision) + assert.Equal(t, fernTestValuePrecision, obj.Precision) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogCustomAttributeDefinitionNumberConfig(t *testing.T) { + t.Run("GetPrecision", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinitionNumberConfig{} + var expected *int + obj.Precision = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPrecision(), "getter should return the property value") + }) + + t.Run("GetPrecision_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinitionNumberConfig{} + obj.Precision = nil + + // Act & Assert + assert.Nil(t, obj.GetPrecision(), "getter should return nil when property is nil") + }) + + t.Run("GetPrecision_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeDefinitionNumberConfig + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPrecision() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogCustomAttributeDefinitionNumberConfig(t *testing.T) { + t.Run("SetPrecision_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinitionNumberConfig{} + var fernTestValuePrecision *int + + // Act + obj.SetPrecision(fernTestValuePrecision) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogCustomAttributeDefinitionSelectionConfig(t *testing.T) { + t.Run("SetMaxAllowedSelections", func(t *testing.T) { + obj := &CatalogCustomAttributeDefinitionSelectionConfig{} + var fernTestValueMaxAllowedSelections *int + obj.SetMaxAllowedSelections(fernTestValueMaxAllowedSelections) + assert.Equal(t, fernTestValueMaxAllowedSelections, obj.MaxAllowedSelections) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAllowedSelections", func(t *testing.T) { + obj := &CatalogCustomAttributeDefinitionSelectionConfig{} + var fernTestValueAllowedSelections []*CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection + obj.SetAllowedSelections(fernTestValueAllowedSelections) + assert.Equal(t, fernTestValueAllowedSelections, obj.AllowedSelections) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogCustomAttributeDefinitionSelectionConfig(t *testing.T) { + t.Run("GetMaxAllowedSelections", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinitionSelectionConfig{} + var expected *int + obj.MaxAllowedSelections = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMaxAllowedSelections(), "getter should return the property value") + }) + + t.Run("GetMaxAllowedSelections_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinitionSelectionConfig{} + obj.MaxAllowedSelections = nil + + // Act & Assert + assert.Nil(t, obj.GetMaxAllowedSelections(), "getter should return nil when property is nil") + }) + + t.Run("GetMaxAllowedSelections_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeDefinitionSelectionConfig + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMaxAllowedSelections() // Should return zero value + }) + + t.Run("GetAllowedSelections", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinitionSelectionConfig{} + var expected []*CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection + obj.AllowedSelections = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAllowedSelections(), "getter should return the property value") + }) + + t.Run("GetAllowedSelections_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinitionSelectionConfig{} + obj.AllowedSelections = nil + + // Act & Assert + assert.Nil(t, obj.GetAllowedSelections(), "getter should return nil when property is nil") + }) + + t.Run("GetAllowedSelections_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeDefinitionSelectionConfig + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAllowedSelections() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogCustomAttributeDefinitionSelectionConfig(t *testing.T) { + t.Run("SetMaxAllowedSelections_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinitionSelectionConfig{} + var fernTestValueMaxAllowedSelections *int + + // Act + obj.SetMaxAllowedSelections(fernTestValueMaxAllowedSelections) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAllowedSelections_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinitionSelectionConfig{} + var fernTestValueAllowedSelections []*CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection + + // Act + obj.SetAllowedSelections(fernTestValueAllowedSelections) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection{} + var fernTestValueName string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection{} + var expected string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection{} + var fernTestValueName string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogCustomAttributeDefinitionStringConfig(t *testing.T) { + t.Run("SetEnforceUniqueness", func(t *testing.T) { + obj := &CatalogCustomAttributeDefinitionStringConfig{} + var fernTestValueEnforceUniqueness *bool + obj.SetEnforceUniqueness(fernTestValueEnforceUniqueness) + assert.Equal(t, fernTestValueEnforceUniqueness, obj.EnforceUniqueness) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogCustomAttributeDefinitionStringConfig(t *testing.T) { + t.Run("GetEnforceUniqueness", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinitionStringConfig{} + var expected *bool + obj.EnforceUniqueness = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEnforceUniqueness(), "getter should return the property value") + }) + + t.Run("GetEnforceUniqueness_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinitionStringConfig{} + obj.EnforceUniqueness = nil + + // Act & Assert + assert.Nil(t, obj.GetEnforceUniqueness(), "getter should return nil when property is nil") + }) + + t.Run("GetEnforceUniqueness_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeDefinitionStringConfig + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEnforceUniqueness() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogCustomAttributeDefinitionStringConfig(t *testing.T) { + t.Run("SetEnforceUniqueness_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinitionStringConfig{} + var fernTestValueEnforceUniqueness *bool + + // Act + obj.SetEnforceUniqueness(fernTestValueEnforceUniqueness) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogCustomAttributeValue(t *testing.T) { + t.Run("SetName", func(t *testing.T) { + obj := &CatalogCustomAttributeValue{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStringValue", func(t *testing.T) { + obj := &CatalogCustomAttributeValue{} + var fernTestValueStringValue *string + obj.SetStringValue(fernTestValueStringValue) + assert.Equal(t, fernTestValueStringValue, obj.StringValue) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttributeDefinitionID", func(t *testing.T) { + obj := &CatalogCustomAttributeValue{} + var fernTestValueCustomAttributeDefinitionID *string + obj.SetCustomAttributeDefinitionID(fernTestValueCustomAttributeDefinitionID) + assert.Equal(t, fernTestValueCustomAttributeDefinitionID, obj.CustomAttributeDefinitionID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CatalogCustomAttributeValue{} + var fernTestValueType *CatalogCustomAttributeDefinitionType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNumberValue", func(t *testing.T) { + obj := &CatalogCustomAttributeValue{} + var fernTestValueNumberValue *string + obj.SetNumberValue(fernTestValueNumberValue) + assert.Equal(t, fernTestValueNumberValue, obj.NumberValue) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBooleanValue", func(t *testing.T) { + obj := &CatalogCustomAttributeValue{} + var fernTestValueBooleanValue *bool + obj.SetBooleanValue(fernTestValueBooleanValue) + assert.Equal(t, fernTestValueBooleanValue, obj.BooleanValue) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSelectionUIDValues", func(t *testing.T) { + obj := &CatalogCustomAttributeValue{} + var fernTestValueSelectionUIDValues []string + obj.SetSelectionUIDValues(fernTestValueSelectionUIDValues) + assert.Equal(t, fernTestValueSelectionUIDValues, obj.SelectionUIDValues) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetKey", func(t *testing.T) { + obj := &CatalogCustomAttributeValue{} + var fernTestValueKey *string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogCustomAttributeValue(t *testing.T) { + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeValue{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeValue{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetStringValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeValue{} + var expected *string + obj.StringValue = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStringValue(), "getter should return the property value") + }) + + t.Run("GetStringValue_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeValue{} + obj.StringValue = nil + + // Act & Assert + assert.Nil(t, obj.GetStringValue(), "getter should return nil when property is nil") + }) + + t.Run("GetStringValue_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStringValue() // Should return zero value + }) + + t.Run("GetCustomAttributeDefinitionID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeValue{} + var expected *string + obj.CustomAttributeDefinitionID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeDefinitionID(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeDefinitionID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeValue{} + obj.CustomAttributeDefinitionID = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeDefinitionID(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeDefinitionID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeDefinitionID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeValue{} + var expected *CatalogCustomAttributeDefinitionType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeValue{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetNumberValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeValue{} + var expected *string + obj.NumberValue = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNumberValue(), "getter should return the property value") + }) + + t.Run("GetNumberValue_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeValue{} + obj.NumberValue = nil + + // Act & Assert + assert.Nil(t, obj.GetNumberValue(), "getter should return nil when property is nil") + }) + + t.Run("GetNumberValue_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNumberValue() // Should return zero value + }) + + t.Run("GetBooleanValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeValue{} + var expected *bool + obj.BooleanValue = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBooleanValue(), "getter should return the property value") + }) + + t.Run("GetBooleanValue_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeValue{} + obj.BooleanValue = nil + + // Act & Assert + assert.Nil(t, obj.GetBooleanValue(), "getter should return nil when property is nil") + }) + + t.Run("GetBooleanValue_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBooleanValue() // Should return zero value + }) + + t.Run("GetSelectionUIDValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeValue{} + var expected []string + obj.SelectionUIDValues = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSelectionUIDValues(), "getter should return the property value") + }) + + t.Run("GetSelectionUIDValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeValue{} + obj.SelectionUIDValues = nil + + // Act & Assert + assert.Nil(t, obj.GetSelectionUIDValues(), "getter should return nil when property is nil") + }) + + t.Run("GetSelectionUIDValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSelectionUIDValues() // Should return zero value + }) + + t.Run("GetKey", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeValue{} + var expected *string + obj.Key = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetKey(), "getter should return the property value") + }) + + t.Run("GetKey_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeValue{} + obj.Key = nil + + // Act & Assert + assert.Nil(t, obj.GetKey(), "getter should return nil when property is nil") + }) + + t.Run("GetKey_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetKey() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogCustomAttributeValue(t *testing.T) { + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeValue{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStringValue_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeValue{} + var fernTestValueStringValue *string + + // Act + obj.SetStringValue(fernTestValueStringValue) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttributeDefinitionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeValue{} + var fernTestValueCustomAttributeDefinitionID *string + + // Act + obj.SetCustomAttributeDefinitionID(fernTestValueCustomAttributeDefinitionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeValue{} + var fernTestValueType *CatalogCustomAttributeDefinitionType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNumberValue_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeValue{} + var fernTestValueNumberValue *string + + // Act + obj.SetNumberValue(fernTestValueNumberValue) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBooleanValue_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeValue{} + var fernTestValueBooleanValue *bool + + // Act + obj.SetBooleanValue(fernTestValueBooleanValue) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSelectionUIDValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeValue{} + var fernTestValueSelectionUIDValues []string + + // Act + obj.SetSelectionUIDValues(fernTestValueSelectionUIDValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeValue{} + var fernTestValueKey *string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogDiscount(t *testing.T) { + t.Run("SetName", func(t *testing.T) { + obj := &CatalogDiscount{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDiscountType", func(t *testing.T) { + obj := &CatalogDiscount{} + var fernTestValueDiscountType *CatalogDiscountType + obj.SetDiscountType(fernTestValueDiscountType) + assert.Equal(t, fernTestValueDiscountType, obj.DiscountType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPercentage", func(t *testing.T) { + obj := &CatalogDiscount{} + var fernTestValuePercentage *string + obj.SetPercentage(fernTestValuePercentage) + assert.Equal(t, fernTestValuePercentage, obj.Percentage) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &CatalogDiscount{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPinRequired", func(t *testing.T) { + obj := &CatalogDiscount{} + var fernTestValuePinRequired *bool + obj.SetPinRequired(fernTestValuePinRequired) + assert.Equal(t, fernTestValuePinRequired, obj.PinRequired) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLabelColor", func(t *testing.T) { + obj := &CatalogDiscount{} + var fernTestValueLabelColor *string + obj.SetLabelColor(fernTestValueLabelColor) + assert.Equal(t, fernTestValueLabelColor, obj.LabelColor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetModifyTaxBasis", func(t *testing.T) { + obj := &CatalogDiscount{} + var fernTestValueModifyTaxBasis *CatalogDiscountModifyTaxBasis + obj.SetModifyTaxBasis(fernTestValueModifyTaxBasis) + assert.Equal(t, fernTestValueModifyTaxBasis, obj.ModifyTaxBasis) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMaximumAmountMoney", func(t *testing.T) { + obj := &CatalogDiscount{} + var fernTestValueMaximumAmountMoney *Money + obj.SetMaximumAmountMoney(fernTestValueMaximumAmountMoney) + assert.Equal(t, fernTestValueMaximumAmountMoney, obj.MaximumAmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogDiscount(t *testing.T) { + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogDiscount{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogDiscount{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetDiscountType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogDiscount{} + var expected *CatalogDiscountType + obj.DiscountType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDiscountType(), "getter should return the property value") + }) + + t.Run("GetDiscountType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogDiscount{} + obj.DiscountType = nil + + // Act & Assert + assert.Nil(t, obj.GetDiscountType(), "getter should return nil when property is nil") + }) + + t.Run("GetDiscountType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDiscountType() // Should return zero value + }) + + t.Run("GetPercentage", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogDiscount{} + var expected *string + obj.Percentage = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPercentage(), "getter should return the property value") + }) + + t.Run("GetPercentage_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogDiscount{} + obj.Percentage = nil + + // Act & Assert + assert.Nil(t, obj.GetPercentage(), "getter should return nil when property is nil") + }) + + t.Run("GetPercentage_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPercentage() // Should return zero value + }) + + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogDiscount{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogDiscount{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + + t.Run("GetPinRequired", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogDiscount{} + var expected *bool + obj.PinRequired = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPinRequired(), "getter should return the property value") + }) + + t.Run("GetPinRequired_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogDiscount{} + obj.PinRequired = nil + + // Act & Assert + assert.Nil(t, obj.GetPinRequired(), "getter should return nil when property is nil") + }) + + t.Run("GetPinRequired_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPinRequired() // Should return zero value + }) + + t.Run("GetLabelColor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogDiscount{} + var expected *string + obj.LabelColor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLabelColor(), "getter should return the property value") + }) + + t.Run("GetLabelColor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogDiscount{} + obj.LabelColor = nil + + // Act & Assert + assert.Nil(t, obj.GetLabelColor(), "getter should return nil when property is nil") + }) + + t.Run("GetLabelColor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLabelColor() // Should return zero value + }) + + t.Run("GetModifyTaxBasis", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogDiscount{} + var expected *CatalogDiscountModifyTaxBasis + obj.ModifyTaxBasis = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetModifyTaxBasis(), "getter should return the property value") + }) + + t.Run("GetModifyTaxBasis_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogDiscount{} + obj.ModifyTaxBasis = nil + + // Act & Assert + assert.Nil(t, obj.GetModifyTaxBasis(), "getter should return nil when property is nil") + }) + + t.Run("GetModifyTaxBasis_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetModifyTaxBasis() // Should return zero value + }) + + t.Run("GetMaximumAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogDiscount{} + var expected *Money + obj.MaximumAmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMaximumAmountMoney(), "getter should return the property value") + }) + + t.Run("GetMaximumAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogDiscount{} + obj.MaximumAmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetMaximumAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetMaximumAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMaximumAmountMoney() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogDiscount(t *testing.T) { + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogDiscount{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDiscountType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogDiscount{} + var fernTestValueDiscountType *CatalogDiscountType + + // Act + obj.SetDiscountType(fernTestValueDiscountType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPercentage_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogDiscount{} + var fernTestValuePercentage *string + + // Act + obj.SetPercentage(fernTestValuePercentage) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogDiscount{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPinRequired_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogDiscount{} + var fernTestValuePinRequired *bool + + // Act + obj.SetPinRequired(fernTestValuePinRequired) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLabelColor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogDiscount{} + var fernTestValueLabelColor *string + + // Act + obj.SetLabelColor(fernTestValueLabelColor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetModifyTaxBasis_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogDiscount{} + var fernTestValueModifyTaxBasis *CatalogDiscountModifyTaxBasis + + // Act + obj.SetModifyTaxBasis(fernTestValueModifyTaxBasis) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMaximumAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogDiscount{} + var fernTestValueMaximumAmountMoney *Money + + // Act + obj.SetMaximumAmountMoney(fernTestValueMaximumAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogEcomSeoData(t *testing.T) { + t.Run("SetPageTitle", func(t *testing.T) { + obj := &CatalogEcomSeoData{} + var fernTestValuePageTitle *string + obj.SetPageTitle(fernTestValuePageTitle) + assert.Equal(t, fernTestValuePageTitle, obj.PageTitle) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPageDescription", func(t *testing.T) { + obj := &CatalogEcomSeoData{} + var fernTestValuePageDescription *string + obj.SetPageDescription(fernTestValuePageDescription) + assert.Equal(t, fernTestValuePageDescription, obj.PageDescription) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPermalink", func(t *testing.T) { + obj := &CatalogEcomSeoData{} + var fernTestValuePermalink *string + obj.SetPermalink(fernTestValuePermalink) + assert.Equal(t, fernTestValuePermalink, obj.Permalink) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogEcomSeoData(t *testing.T) { + t.Run("GetPageTitle", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogEcomSeoData{} + var expected *string + obj.PageTitle = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPageTitle(), "getter should return the property value") + }) + + t.Run("GetPageTitle_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogEcomSeoData{} + obj.PageTitle = nil + + // Act & Assert + assert.Nil(t, obj.GetPageTitle(), "getter should return nil when property is nil") + }) + + t.Run("GetPageTitle_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogEcomSeoData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPageTitle() // Should return zero value + }) + + t.Run("GetPageDescription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogEcomSeoData{} + var expected *string + obj.PageDescription = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPageDescription(), "getter should return the property value") + }) + + t.Run("GetPageDescription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogEcomSeoData{} + obj.PageDescription = nil + + // Act & Assert + assert.Nil(t, obj.GetPageDescription(), "getter should return nil when property is nil") + }) + + t.Run("GetPageDescription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogEcomSeoData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPageDescription() // Should return zero value + }) + + t.Run("GetPermalink", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogEcomSeoData{} + var expected *string + obj.Permalink = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPermalink(), "getter should return the property value") + }) + + t.Run("GetPermalink_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogEcomSeoData{} + obj.Permalink = nil + + // Act & Assert + assert.Nil(t, obj.GetPermalink(), "getter should return nil when property is nil") + }) + + t.Run("GetPermalink_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogEcomSeoData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPermalink() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogEcomSeoData(t *testing.T) { + t.Run("SetPageTitle_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogEcomSeoData{} + var fernTestValuePageTitle *string + + // Act + obj.SetPageTitle(fernTestValuePageTitle) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPageDescription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogEcomSeoData{} + var fernTestValuePageDescription *string + + // Act + obj.SetPageDescription(fernTestValuePageDescription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPermalink_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogEcomSeoData{} + var fernTestValuePermalink *string + + // Act + obj.SetPermalink(fernTestValuePermalink) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogIDMapping(t *testing.T) { + t.Run("SetClientObjectID", func(t *testing.T) { + obj := &CatalogIDMapping{} + var fernTestValueClientObjectID *string + obj.SetClientObjectID(fernTestValueClientObjectID) + assert.Equal(t, fernTestValueClientObjectID, obj.ClientObjectID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObjectID", func(t *testing.T) { + obj := &CatalogIDMapping{} + var fernTestValueObjectID *string + obj.SetObjectID(fernTestValueObjectID) + assert.Equal(t, fernTestValueObjectID, obj.ObjectID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogIDMapping(t *testing.T) { + t.Run("GetClientObjectID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogIDMapping{} + var expected *string + obj.ClientObjectID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetClientObjectID(), "getter should return the property value") + }) + + t.Run("GetClientObjectID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogIDMapping{} + obj.ClientObjectID = nil + + // Act & Assert + assert.Nil(t, obj.GetClientObjectID(), "getter should return nil when property is nil") + }) + + t.Run("GetClientObjectID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogIDMapping + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetClientObjectID() // Should return zero value + }) + + t.Run("GetObjectID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogIDMapping{} + var expected *string + obj.ObjectID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObjectID(), "getter should return the property value") + }) + + t.Run("GetObjectID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogIDMapping{} + obj.ObjectID = nil + + // Act & Assert + assert.Nil(t, obj.GetObjectID(), "getter should return nil when property is nil") + }) + + t.Run("GetObjectID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogIDMapping + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObjectID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogIDMapping(t *testing.T) { + t.Run("SetClientObjectID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogIDMapping{} + var fernTestValueClientObjectID *string + + // Act + obj.SetClientObjectID(fernTestValueClientObjectID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObjectID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogIDMapping{} + var fernTestValueObjectID *string + + // Act + obj.SetObjectID(fernTestValueObjectID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogImage(t *testing.T) { + t.Run("SetName", func(t *testing.T) { + obj := &CatalogImage{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetURL", func(t *testing.T) { + obj := &CatalogImage{} + var fernTestValueURL *string + obj.SetURL(fernTestValueURL) + assert.Equal(t, fernTestValueURL, obj.URL) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCaption", func(t *testing.T) { + obj := &CatalogImage{} + var fernTestValueCaption *string + obj.SetCaption(fernTestValueCaption) + assert.Equal(t, fernTestValueCaption, obj.Caption) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPhotoStudioOrderID", func(t *testing.T) { + obj := &CatalogImage{} + var fernTestValuePhotoStudioOrderID *string + obj.SetPhotoStudioOrderID(fernTestValuePhotoStudioOrderID) + assert.Equal(t, fernTestValuePhotoStudioOrderID, obj.PhotoStudioOrderID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogImage(t *testing.T) { + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogImage{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogImage{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogImage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetURL", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogImage{} + var expected *string + obj.URL = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetURL(), "getter should return the property value") + }) + + t.Run("GetURL_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogImage{} + obj.URL = nil + + // Act & Assert + assert.Nil(t, obj.GetURL(), "getter should return nil when property is nil") + }) + + t.Run("GetURL_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogImage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetURL() // Should return zero value + }) + + t.Run("GetCaption", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogImage{} + var expected *string + obj.Caption = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCaption(), "getter should return the property value") + }) + + t.Run("GetCaption_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogImage{} + obj.Caption = nil + + // Act & Assert + assert.Nil(t, obj.GetCaption(), "getter should return nil when property is nil") + }) + + t.Run("GetCaption_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogImage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCaption() // Should return zero value + }) + + t.Run("GetPhotoStudioOrderID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogImage{} + var expected *string + obj.PhotoStudioOrderID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPhotoStudioOrderID(), "getter should return the property value") + }) + + t.Run("GetPhotoStudioOrderID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogImage{} + obj.PhotoStudioOrderID = nil + + // Act & Assert + assert.Nil(t, obj.GetPhotoStudioOrderID(), "getter should return nil when property is nil") + }) + + t.Run("GetPhotoStudioOrderID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogImage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPhotoStudioOrderID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogImage(t *testing.T) { + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogImage{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetURL_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogImage{} + var fernTestValueURL *string + + // Act + obj.SetURL(fernTestValueURL) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCaption_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogImage{} + var fernTestValueCaption *string + + // Act + obj.SetCaption(fernTestValueCaption) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPhotoStudioOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogImage{} + var fernTestValuePhotoStudioOrderID *string + + // Act + obj.SetPhotoStudioOrderID(fernTestValuePhotoStudioOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogItem(t *testing.T) { + t.Run("SetName", func(t *testing.T) { + obj := &CatalogItem{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDescription", func(t *testing.T) { + obj := &CatalogItem{} + var fernTestValueDescription *string + obj.SetDescription(fernTestValueDescription) + assert.Equal(t, fernTestValueDescription, obj.Description) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAbbreviation", func(t *testing.T) { + obj := &CatalogItem{} + var fernTestValueAbbreviation *string + obj.SetAbbreviation(fernTestValueAbbreviation) + assert.Equal(t, fernTestValueAbbreviation, obj.Abbreviation) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLabelColor", func(t *testing.T) { + obj := &CatalogItem{} + var fernTestValueLabelColor *string + obj.SetLabelColor(fernTestValueLabelColor) + assert.Equal(t, fernTestValueLabelColor, obj.LabelColor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsTaxable", func(t *testing.T) { + obj := &CatalogItem{} + var fernTestValueIsTaxable *bool + obj.SetIsTaxable(fernTestValueIsTaxable) + assert.Equal(t, fernTestValueIsTaxable, obj.IsTaxable) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCategoryID", func(t *testing.T) { + obj := &CatalogItem{} + var fernTestValueCategoryID *string + obj.SetCategoryID(fernTestValueCategoryID) + assert.Equal(t, fernTestValueCategoryID, obj.CategoryID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBuyerFacingName", func(t *testing.T) { + obj := &CatalogItem{} + var fernTestValueBuyerFacingName *string + obj.SetBuyerFacingName(fernTestValueBuyerFacingName) + assert.Equal(t, fernTestValueBuyerFacingName, obj.BuyerFacingName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTaxIDs", func(t *testing.T) { + obj := &CatalogItem{} + var fernTestValueTaxIDs []string + obj.SetTaxIDs(fernTestValueTaxIDs) + assert.Equal(t, fernTestValueTaxIDs, obj.TaxIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetModifierListInfo", func(t *testing.T) { + obj := &CatalogItem{} + var fernTestValueModifierListInfo []*CatalogItemModifierListInfo + obj.SetModifierListInfo(fernTestValueModifierListInfo) + assert.Equal(t, fernTestValueModifierListInfo, obj.ModifierListInfo) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVariations", func(t *testing.T) { + obj := &CatalogItem{} + var fernTestValueVariations []*CatalogObject + obj.SetVariations(fernTestValueVariations) + assert.Equal(t, fernTestValueVariations, obj.Variations) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetProductType", func(t *testing.T) { + obj := &CatalogItem{} + var fernTestValueProductType *CatalogItemProductType + obj.SetProductType(fernTestValueProductType) + assert.Equal(t, fernTestValueProductType, obj.ProductType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSkipModifierScreen", func(t *testing.T) { + obj := &CatalogItem{} + var fernTestValueSkipModifierScreen *bool + obj.SetSkipModifierScreen(fernTestValueSkipModifierScreen) + assert.Equal(t, fernTestValueSkipModifierScreen, obj.SkipModifierScreen) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetItemOptions", func(t *testing.T) { + obj := &CatalogItem{} + var fernTestValueItemOptions []*CatalogItemOptionForItem + obj.SetItemOptions(fernTestValueItemOptions) + assert.Equal(t, fernTestValueItemOptions, obj.ItemOptions) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEcomURI", func(t *testing.T) { + obj := &CatalogItem{} + var fernTestValueEcomURI *string + obj.SetEcomURI(fernTestValueEcomURI) + assert.Equal(t, fernTestValueEcomURI, obj.EcomURI) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEcomImageURIs", func(t *testing.T) { + obj := &CatalogItem{} + var fernTestValueEcomImageURIs []string + obj.SetEcomImageURIs(fernTestValueEcomImageURIs) + assert.Equal(t, fernTestValueEcomImageURIs, obj.EcomImageURIs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImageIDs", func(t *testing.T) { + obj := &CatalogItem{} + var fernTestValueImageIDs []string + obj.SetImageIDs(fernTestValueImageIDs) + assert.Equal(t, fernTestValueImageIDs, obj.ImageIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSortName", func(t *testing.T) { + obj := &CatalogItem{} + var fernTestValueSortName *string + obj.SetSortName(fernTestValueSortName) + assert.Equal(t, fernTestValueSortName, obj.SortName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCategories", func(t *testing.T) { + obj := &CatalogItem{} + var fernTestValueCategories []*CatalogObjectCategory + obj.SetCategories(fernTestValueCategories) + assert.Equal(t, fernTestValueCategories, obj.Categories) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDescriptionHTML", func(t *testing.T) { + obj := &CatalogItem{} + var fernTestValueDescriptionHTML *string + obj.SetDescriptionHTML(fernTestValueDescriptionHTML) + assert.Equal(t, fernTestValueDescriptionHTML, obj.DescriptionHTML) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDescriptionPlaintext", func(t *testing.T) { + obj := &CatalogItem{} + var fernTestValueDescriptionPlaintext *string + obj.SetDescriptionPlaintext(fernTestValueDescriptionPlaintext) + assert.Equal(t, fernTestValueDescriptionPlaintext, obj.DescriptionPlaintext) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetKitchenName", func(t *testing.T) { + obj := &CatalogItem{} + var fernTestValueKitchenName *string + obj.SetKitchenName(fernTestValueKitchenName) + assert.Equal(t, fernTestValueKitchenName, obj.KitchenName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetChannels", func(t *testing.T) { + obj := &CatalogItem{} + var fernTestValueChannels []string + obj.SetChannels(fernTestValueChannels) + assert.Equal(t, fernTestValueChannels, obj.Channels) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsArchived", func(t *testing.T) { + obj := &CatalogItem{} + var fernTestValueIsArchived *bool + obj.SetIsArchived(fernTestValueIsArchived) + assert.Equal(t, fernTestValueIsArchived, obj.IsArchived) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEcomSeoData", func(t *testing.T) { + obj := &CatalogItem{} + var fernTestValueEcomSeoData *CatalogEcomSeoData + obj.SetEcomSeoData(fernTestValueEcomSeoData) + assert.Equal(t, fernTestValueEcomSeoData, obj.EcomSeoData) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFoodAndBeverageDetails", func(t *testing.T) { + obj := &CatalogItem{} + var fernTestValueFoodAndBeverageDetails *CatalogItemFoodAndBeverageDetails + obj.SetFoodAndBeverageDetails(fernTestValueFoodAndBeverageDetails) + assert.Equal(t, fernTestValueFoodAndBeverageDetails, obj.FoodAndBeverageDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReportingCategory", func(t *testing.T) { + obj := &CatalogItem{} + var fernTestValueReportingCategory *CatalogObjectCategory + obj.SetReportingCategory(fernTestValueReportingCategory) + assert.Equal(t, fernTestValueReportingCategory, obj.ReportingCategory) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsAlcoholic", func(t *testing.T) { + obj := &CatalogItem{} + var fernTestValueIsAlcoholic *bool + obj.SetIsAlcoholic(fernTestValueIsAlcoholic) + assert.Equal(t, fernTestValueIsAlcoholic, obj.IsAlcoholic) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogItem(t *testing.T) { + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetDescription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var expected *string + obj.Description = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDescription(), "getter should return the property value") + }) + + t.Run("GetDescription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + obj.Description = nil + + // Act & Assert + assert.Nil(t, obj.GetDescription(), "getter should return nil when property is nil") + }) + + t.Run("GetDescription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDescription() // Should return zero value + }) + + t.Run("GetAbbreviation", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var expected *string + obj.Abbreviation = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAbbreviation(), "getter should return the property value") + }) + + t.Run("GetAbbreviation_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + obj.Abbreviation = nil + + // Act & Assert + assert.Nil(t, obj.GetAbbreviation(), "getter should return nil when property is nil") + }) + + t.Run("GetAbbreviation_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAbbreviation() // Should return zero value + }) + + t.Run("GetLabelColor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var expected *string + obj.LabelColor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLabelColor(), "getter should return the property value") + }) + + t.Run("GetLabelColor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + obj.LabelColor = nil + + // Act & Assert + assert.Nil(t, obj.GetLabelColor(), "getter should return nil when property is nil") + }) + + t.Run("GetLabelColor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLabelColor() // Should return zero value + }) + + t.Run("GetIsTaxable", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var expected *bool + obj.IsTaxable = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsTaxable(), "getter should return the property value") + }) + + t.Run("GetIsTaxable_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + obj.IsTaxable = nil + + // Act & Assert + assert.Nil(t, obj.GetIsTaxable(), "getter should return nil when property is nil") + }) + + t.Run("GetIsTaxable_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsTaxable() // Should return zero value + }) + + t.Run("GetCategoryID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var expected *string + obj.CategoryID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCategoryID(), "getter should return the property value") + }) + + t.Run("GetCategoryID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + obj.CategoryID = nil + + // Act & Assert + assert.Nil(t, obj.GetCategoryID(), "getter should return nil when property is nil") + }) + + t.Run("GetCategoryID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCategoryID() // Should return zero value + }) + + t.Run("GetBuyerFacingName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var expected *string + obj.BuyerFacingName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBuyerFacingName(), "getter should return the property value") + }) + + t.Run("GetBuyerFacingName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + obj.BuyerFacingName = nil + + // Act & Assert + assert.Nil(t, obj.GetBuyerFacingName(), "getter should return nil when property is nil") + }) + + t.Run("GetBuyerFacingName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBuyerFacingName() // Should return zero value + }) + + t.Run("GetTaxIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var expected []string + obj.TaxIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTaxIDs(), "getter should return the property value") + }) + + t.Run("GetTaxIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + obj.TaxIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetTaxIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetTaxIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTaxIDs() // Should return zero value + }) + + t.Run("GetModifierListInfo", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var expected []*CatalogItemModifierListInfo + obj.ModifierListInfo = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetModifierListInfo(), "getter should return the property value") + }) + + t.Run("GetModifierListInfo_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + obj.ModifierListInfo = nil + + // Act & Assert + assert.Nil(t, obj.GetModifierListInfo(), "getter should return nil when property is nil") + }) + + t.Run("GetModifierListInfo_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetModifierListInfo() // Should return zero value + }) + + t.Run("GetVariations", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var expected []*CatalogObject + obj.Variations = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVariations(), "getter should return the property value") + }) + + t.Run("GetVariations_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + obj.Variations = nil + + // Act & Assert + assert.Nil(t, obj.GetVariations(), "getter should return nil when property is nil") + }) + + t.Run("GetVariations_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVariations() // Should return zero value + }) + + t.Run("GetProductType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var expected *CatalogItemProductType + obj.ProductType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetProductType(), "getter should return the property value") + }) + + t.Run("GetProductType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + obj.ProductType = nil + + // Act & Assert + assert.Nil(t, obj.GetProductType(), "getter should return nil when property is nil") + }) + + t.Run("GetProductType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetProductType() // Should return zero value + }) + + t.Run("GetSkipModifierScreen", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var expected *bool + obj.SkipModifierScreen = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSkipModifierScreen(), "getter should return the property value") + }) + + t.Run("GetSkipModifierScreen_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + obj.SkipModifierScreen = nil + + // Act & Assert + assert.Nil(t, obj.GetSkipModifierScreen(), "getter should return nil when property is nil") + }) + + t.Run("GetSkipModifierScreen_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSkipModifierScreen() // Should return zero value + }) + + t.Run("GetItemOptions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var expected []*CatalogItemOptionForItem + obj.ItemOptions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItemOptions(), "getter should return the property value") + }) + + t.Run("GetItemOptions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + obj.ItemOptions = nil + + // Act & Assert + assert.Nil(t, obj.GetItemOptions(), "getter should return nil when property is nil") + }) + + t.Run("GetItemOptions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItemOptions() // Should return zero value + }) + + t.Run("GetEcomURI", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var expected *string + obj.EcomURI = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEcomURI(), "getter should return the property value") + }) + + t.Run("GetEcomURI_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + obj.EcomURI = nil + + // Act & Assert + assert.Nil(t, obj.GetEcomURI(), "getter should return nil when property is nil") + }) + + t.Run("GetEcomURI_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEcomURI() // Should return zero value + }) + + t.Run("GetEcomImageURIs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var expected []string + obj.EcomImageURIs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEcomImageURIs(), "getter should return the property value") + }) + + t.Run("GetEcomImageURIs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + obj.EcomImageURIs = nil + + // Act & Assert + assert.Nil(t, obj.GetEcomImageURIs(), "getter should return nil when property is nil") + }) + + t.Run("GetEcomImageURIs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEcomImageURIs() // Should return zero value + }) + + t.Run("GetImageIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var expected []string + obj.ImageIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImageIDs(), "getter should return the property value") + }) + + t.Run("GetImageIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + obj.ImageIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetImageIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetImageIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImageIDs() // Should return zero value + }) + + t.Run("GetSortName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var expected *string + obj.SortName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSortName(), "getter should return the property value") + }) + + t.Run("GetSortName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + obj.SortName = nil + + // Act & Assert + assert.Nil(t, obj.GetSortName(), "getter should return nil when property is nil") + }) + + t.Run("GetSortName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSortName() // Should return zero value + }) + + t.Run("GetCategories", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var expected []*CatalogObjectCategory + obj.Categories = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCategories(), "getter should return the property value") + }) + + t.Run("GetCategories_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + obj.Categories = nil + + // Act & Assert + assert.Nil(t, obj.GetCategories(), "getter should return nil when property is nil") + }) + + t.Run("GetCategories_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCategories() // Should return zero value + }) + + t.Run("GetDescriptionHTML", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var expected *string + obj.DescriptionHTML = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDescriptionHTML(), "getter should return the property value") + }) + + t.Run("GetDescriptionHTML_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + obj.DescriptionHTML = nil + + // Act & Assert + assert.Nil(t, obj.GetDescriptionHTML(), "getter should return nil when property is nil") + }) + + t.Run("GetDescriptionHTML_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDescriptionHTML() // Should return zero value + }) + + t.Run("GetDescriptionPlaintext", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var expected *string + obj.DescriptionPlaintext = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDescriptionPlaintext(), "getter should return the property value") + }) + + t.Run("GetDescriptionPlaintext_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + obj.DescriptionPlaintext = nil + + // Act & Assert + assert.Nil(t, obj.GetDescriptionPlaintext(), "getter should return nil when property is nil") + }) + + t.Run("GetDescriptionPlaintext_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDescriptionPlaintext() // Should return zero value + }) + + t.Run("GetKitchenName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var expected *string + obj.KitchenName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetKitchenName(), "getter should return the property value") + }) + + t.Run("GetKitchenName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + obj.KitchenName = nil + + // Act & Assert + assert.Nil(t, obj.GetKitchenName(), "getter should return nil when property is nil") + }) + + t.Run("GetKitchenName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetKitchenName() // Should return zero value + }) + + t.Run("GetChannels", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var expected []string + obj.Channels = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetChannels(), "getter should return the property value") + }) + + t.Run("GetChannels_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + obj.Channels = nil + + // Act & Assert + assert.Nil(t, obj.GetChannels(), "getter should return nil when property is nil") + }) + + t.Run("GetChannels_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetChannels() // Should return zero value + }) + + t.Run("GetIsArchived", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var expected *bool + obj.IsArchived = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsArchived(), "getter should return the property value") + }) + + t.Run("GetIsArchived_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + obj.IsArchived = nil + + // Act & Assert + assert.Nil(t, obj.GetIsArchived(), "getter should return nil when property is nil") + }) + + t.Run("GetIsArchived_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsArchived() // Should return zero value + }) + + t.Run("GetEcomSeoData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var expected *CatalogEcomSeoData + obj.EcomSeoData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEcomSeoData(), "getter should return the property value") + }) + + t.Run("GetEcomSeoData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + obj.EcomSeoData = nil + + // Act & Assert + assert.Nil(t, obj.GetEcomSeoData(), "getter should return nil when property is nil") + }) + + t.Run("GetEcomSeoData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEcomSeoData() // Should return zero value + }) + + t.Run("GetFoodAndBeverageDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var expected *CatalogItemFoodAndBeverageDetails + obj.FoodAndBeverageDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFoodAndBeverageDetails(), "getter should return the property value") + }) + + t.Run("GetFoodAndBeverageDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + obj.FoodAndBeverageDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetFoodAndBeverageDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetFoodAndBeverageDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFoodAndBeverageDetails() // Should return zero value + }) + + t.Run("GetReportingCategory", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var expected *CatalogObjectCategory + obj.ReportingCategory = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReportingCategory(), "getter should return the property value") + }) + + t.Run("GetReportingCategory_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + obj.ReportingCategory = nil + + // Act & Assert + assert.Nil(t, obj.GetReportingCategory(), "getter should return nil when property is nil") + }) + + t.Run("GetReportingCategory_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReportingCategory() // Should return zero value + }) + + t.Run("GetIsAlcoholic", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var expected *bool + obj.IsAlcoholic = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsAlcoholic(), "getter should return the property value") + }) + + t.Run("GetIsAlcoholic_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + obj.IsAlcoholic = nil + + // Act & Assert + assert.Nil(t, obj.GetIsAlcoholic(), "getter should return nil when property is nil") + }) + + t.Run("GetIsAlcoholic_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsAlcoholic() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogItem(t *testing.T) { + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDescription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var fernTestValueDescription *string + + // Act + obj.SetDescription(fernTestValueDescription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAbbreviation_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var fernTestValueAbbreviation *string + + // Act + obj.SetAbbreviation(fernTestValueAbbreviation) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLabelColor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var fernTestValueLabelColor *string + + // Act + obj.SetLabelColor(fernTestValueLabelColor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsTaxable_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var fernTestValueIsTaxable *bool + + // Act + obj.SetIsTaxable(fernTestValueIsTaxable) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCategoryID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var fernTestValueCategoryID *string + + // Act + obj.SetCategoryID(fernTestValueCategoryID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBuyerFacingName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var fernTestValueBuyerFacingName *string + + // Act + obj.SetBuyerFacingName(fernTestValueBuyerFacingName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTaxIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var fernTestValueTaxIDs []string + + // Act + obj.SetTaxIDs(fernTestValueTaxIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetModifierListInfo_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var fernTestValueModifierListInfo []*CatalogItemModifierListInfo + + // Act + obj.SetModifierListInfo(fernTestValueModifierListInfo) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVariations_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var fernTestValueVariations []*CatalogObject + + // Act + obj.SetVariations(fernTestValueVariations) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetProductType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var fernTestValueProductType *CatalogItemProductType + + // Act + obj.SetProductType(fernTestValueProductType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSkipModifierScreen_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var fernTestValueSkipModifierScreen *bool + + // Act + obj.SetSkipModifierScreen(fernTestValueSkipModifierScreen) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetItemOptions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var fernTestValueItemOptions []*CatalogItemOptionForItem + + // Act + obj.SetItemOptions(fernTestValueItemOptions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEcomURI_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var fernTestValueEcomURI *string + + // Act + obj.SetEcomURI(fernTestValueEcomURI) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEcomImageURIs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var fernTestValueEcomImageURIs []string + + // Act + obj.SetEcomImageURIs(fernTestValueEcomImageURIs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImageIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var fernTestValueImageIDs []string + + // Act + obj.SetImageIDs(fernTestValueImageIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSortName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var fernTestValueSortName *string + + // Act + obj.SetSortName(fernTestValueSortName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCategories_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var fernTestValueCategories []*CatalogObjectCategory + + // Act + obj.SetCategories(fernTestValueCategories) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDescriptionHTML_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var fernTestValueDescriptionHTML *string + + // Act + obj.SetDescriptionHTML(fernTestValueDescriptionHTML) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDescriptionPlaintext_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var fernTestValueDescriptionPlaintext *string + + // Act + obj.SetDescriptionPlaintext(fernTestValueDescriptionPlaintext) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetKitchenName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var fernTestValueKitchenName *string + + // Act + obj.SetKitchenName(fernTestValueKitchenName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetChannels_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var fernTestValueChannels []string + + // Act + obj.SetChannels(fernTestValueChannels) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsArchived_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var fernTestValueIsArchived *bool + + // Act + obj.SetIsArchived(fernTestValueIsArchived) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEcomSeoData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var fernTestValueEcomSeoData *CatalogEcomSeoData + + // Act + obj.SetEcomSeoData(fernTestValueEcomSeoData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFoodAndBeverageDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var fernTestValueFoodAndBeverageDetails *CatalogItemFoodAndBeverageDetails + + // Act + obj.SetFoodAndBeverageDetails(fernTestValueFoodAndBeverageDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReportingCategory_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var fernTestValueReportingCategory *CatalogObjectCategory + + // Act + obj.SetReportingCategory(fernTestValueReportingCategory) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsAlcoholic_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + var fernTestValueIsAlcoholic *bool + + // Act + obj.SetIsAlcoholic(fernTestValueIsAlcoholic) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogItemFoodAndBeverageDetails(t *testing.T) { + t.Run("SetCalorieCount", func(t *testing.T) { + obj := &CatalogItemFoodAndBeverageDetails{} + var fernTestValueCalorieCount *int + obj.SetCalorieCount(fernTestValueCalorieCount) + assert.Equal(t, fernTestValueCalorieCount, obj.CalorieCount) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDietaryPreferences", func(t *testing.T) { + obj := &CatalogItemFoodAndBeverageDetails{} + var fernTestValueDietaryPreferences []*CatalogItemFoodAndBeverageDetailsDietaryPreference + obj.SetDietaryPreferences(fernTestValueDietaryPreferences) + assert.Equal(t, fernTestValueDietaryPreferences, obj.DietaryPreferences) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIngredients", func(t *testing.T) { + obj := &CatalogItemFoodAndBeverageDetails{} + var fernTestValueIngredients []*CatalogItemFoodAndBeverageDetailsIngredient + obj.SetIngredients(fernTestValueIngredients) + assert.Equal(t, fernTestValueIngredients, obj.Ingredients) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogItemFoodAndBeverageDetails(t *testing.T) { + t.Run("GetCalorieCount", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetails{} + var expected *int + obj.CalorieCount = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCalorieCount(), "getter should return the property value") + }) + + t.Run("GetCalorieCount_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetails{} + obj.CalorieCount = nil + + // Act & Assert + assert.Nil(t, obj.GetCalorieCount(), "getter should return nil when property is nil") + }) + + t.Run("GetCalorieCount_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemFoodAndBeverageDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCalorieCount() // Should return zero value + }) + + t.Run("GetDietaryPreferences", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetails{} + var expected []*CatalogItemFoodAndBeverageDetailsDietaryPreference + obj.DietaryPreferences = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDietaryPreferences(), "getter should return the property value") + }) + + t.Run("GetDietaryPreferences_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetails{} + obj.DietaryPreferences = nil + + // Act & Assert + assert.Nil(t, obj.GetDietaryPreferences(), "getter should return nil when property is nil") + }) + + t.Run("GetDietaryPreferences_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemFoodAndBeverageDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDietaryPreferences() // Should return zero value + }) + + t.Run("GetIngredients", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetails{} + var expected []*CatalogItemFoodAndBeverageDetailsIngredient + obj.Ingredients = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIngredients(), "getter should return the property value") + }) + + t.Run("GetIngredients_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetails{} + obj.Ingredients = nil + + // Act & Assert + assert.Nil(t, obj.GetIngredients(), "getter should return nil when property is nil") + }) + + t.Run("GetIngredients_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemFoodAndBeverageDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIngredients() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogItemFoodAndBeverageDetails(t *testing.T) { + t.Run("SetCalorieCount_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetails{} + var fernTestValueCalorieCount *int + + // Act + obj.SetCalorieCount(fernTestValueCalorieCount) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDietaryPreferences_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetails{} + var fernTestValueDietaryPreferences []*CatalogItemFoodAndBeverageDetailsDietaryPreference + + // Act + obj.SetDietaryPreferences(fernTestValueDietaryPreferences) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIngredients_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetails{} + var fernTestValueIngredients []*CatalogItemFoodAndBeverageDetailsIngredient + + // Act + obj.SetIngredients(fernTestValueIngredients) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogItemFoodAndBeverageDetailsDietaryPreference(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &CatalogItemFoodAndBeverageDetailsDietaryPreference{} + var fernTestValueType *CatalogItemFoodAndBeverageDetailsDietaryPreferenceType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStandardName", func(t *testing.T) { + obj := &CatalogItemFoodAndBeverageDetailsDietaryPreference{} + var fernTestValueStandardName *CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreference + obj.SetStandardName(fernTestValueStandardName) + assert.Equal(t, fernTestValueStandardName, obj.StandardName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomName", func(t *testing.T) { + obj := &CatalogItemFoodAndBeverageDetailsDietaryPreference{} + var fernTestValueCustomName *string + obj.SetCustomName(fernTestValueCustomName) + assert.Equal(t, fernTestValueCustomName, obj.CustomName) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogItemFoodAndBeverageDetailsDietaryPreference(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetailsDietaryPreference{} + var expected *CatalogItemFoodAndBeverageDetailsDietaryPreferenceType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetailsDietaryPreference{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemFoodAndBeverageDetailsDietaryPreference + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetStandardName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetailsDietaryPreference{} + var expected *CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreference + obj.StandardName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStandardName(), "getter should return the property value") + }) + + t.Run("GetStandardName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetailsDietaryPreference{} + obj.StandardName = nil + + // Act & Assert + assert.Nil(t, obj.GetStandardName(), "getter should return nil when property is nil") + }) + + t.Run("GetStandardName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemFoodAndBeverageDetailsDietaryPreference + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStandardName() // Should return zero value + }) + + t.Run("GetCustomName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetailsDietaryPreference{} + var expected *string + obj.CustomName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomName(), "getter should return the property value") + }) + + t.Run("GetCustomName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetailsDietaryPreference{} + obj.CustomName = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomName(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemFoodAndBeverageDetailsDietaryPreference + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomName() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogItemFoodAndBeverageDetailsDietaryPreference(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetailsDietaryPreference{} + var fernTestValueType *CatalogItemFoodAndBeverageDetailsDietaryPreferenceType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStandardName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetailsDietaryPreference{} + var fernTestValueStandardName *CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreference + + // Act + obj.SetStandardName(fernTestValueStandardName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetailsDietaryPreference{} + var fernTestValueCustomName *string + + // Act + obj.SetCustomName(fernTestValueCustomName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogItemFoodAndBeverageDetailsIngredient(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &CatalogItemFoodAndBeverageDetailsIngredient{} + var fernTestValueType *CatalogItemFoodAndBeverageDetailsDietaryPreferenceType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStandardName", func(t *testing.T) { + obj := &CatalogItemFoodAndBeverageDetailsIngredient{} + var fernTestValueStandardName *CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient + obj.SetStandardName(fernTestValueStandardName) + assert.Equal(t, fernTestValueStandardName, obj.StandardName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomName", func(t *testing.T) { + obj := &CatalogItemFoodAndBeverageDetailsIngredient{} + var fernTestValueCustomName *string + obj.SetCustomName(fernTestValueCustomName) + assert.Equal(t, fernTestValueCustomName, obj.CustomName) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogItemFoodAndBeverageDetailsIngredient(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetailsIngredient{} + var expected *CatalogItemFoodAndBeverageDetailsDietaryPreferenceType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetailsIngredient{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemFoodAndBeverageDetailsIngredient + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetStandardName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetailsIngredient{} + var expected *CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient + obj.StandardName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStandardName(), "getter should return the property value") + }) + + t.Run("GetStandardName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetailsIngredient{} + obj.StandardName = nil + + // Act & Assert + assert.Nil(t, obj.GetStandardName(), "getter should return nil when property is nil") + }) + + t.Run("GetStandardName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemFoodAndBeverageDetailsIngredient + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStandardName() // Should return zero value + }) + + t.Run("GetCustomName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetailsIngredient{} + var expected *string + obj.CustomName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomName(), "getter should return the property value") + }) + + t.Run("GetCustomName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetailsIngredient{} + obj.CustomName = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomName(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemFoodAndBeverageDetailsIngredient + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomName() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogItemFoodAndBeverageDetailsIngredient(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetailsIngredient{} + var fernTestValueType *CatalogItemFoodAndBeverageDetailsDietaryPreferenceType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStandardName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetailsIngredient{} + var fernTestValueStandardName *CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient + + // Act + obj.SetStandardName(fernTestValueStandardName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetailsIngredient{} + var fernTestValueCustomName *string + + // Act + obj.SetCustomName(fernTestValueCustomName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogItemModifierListInfo(t *testing.T) { + t.Run("SetModifierListID", func(t *testing.T) { + obj := &CatalogItemModifierListInfo{} + var fernTestValueModifierListID string + obj.SetModifierListID(fernTestValueModifierListID) + assert.Equal(t, fernTestValueModifierListID, obj.ModifierListID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetModifierOverrides", func(t *testing.T) { + obj := &CatalogItemModifierListInfo{} + var fernTestValueModifierOverrides []*CatalogModifierOverride + obj.SetModifierOverrides(fernTestValueModifierOverrides) + assert.Equal(t, fernTestValueModifierOverrides, obj.ModifierOverrides) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMinSelectedModifiers", func(t *testing.T) { + obj := &CatalogItemModifierListInfo{} + var fernTestValueMinSelectedModifiers *int + obj.SetMinSelectedModifiers(fernTestValueMinSelectedModifiers) + assert.Equal(t, fernTestValueMinSelectedModifiers, obj.MinSelectedModifiers) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMaxSelectedModifiers", func(t *testing.T) { + obj := &CatalogItemModifierListInfo{} + var fernTestValueMaxSelectedModifiers *int + obj.SetMaxSelectedModifiers(fernTestValueMaxSelectedModifiers) + assert.Equal(t, fernTestValueMaxSelectedModifiers, obj.MaxSelectedModifiers) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEnabled", func(t *testing.T) { + obj := &CatalogItemModifierListInfo{} + var fernTestValueEnabled *bool + obj.SetEnabled(fernTestValueEnabled) + assert.Equal(t, fernTestValueEnabled, obj.Enabled) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrdinal", func(t *testing.T) { + obj := &CatalogItemModifierListInfo{} + var fernTestValueOrdinal *int + obj.SetOrdinal(fernTestValueOrdinal) + assert.Equal(t, fernTestValueOrdinal, obj.Ordinal) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAllowQuantities", func(t *testing.T) { + obj := &CatalogItemModifierListInfo{} + var fernTestValueAllowQuantities *CatalogModifierToggleOverrideType + obj.SetAllowQuantities(fernTestValueAllowQuantities) + assert.Equal(t, fernTestValueAllowQuantities, obj.AllowQuantities) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsConversational", func(t *testing.T) { + obj := &CatalogItemModifierListInfo{} + var fernTestValueIsConversational *CatalogModifierToggleOverrideType + obj.SetIsConversational(fernTestValueIsConversational) + assert.Equal(t, fernTestValueIsConversational, obj.IsConversational) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetHiddenFromCustomerOverride", func(t *testing.T) { + obj := &CatalogItemModifierListInfo{} + var fernTestValueHiddenFromCustomerOverride *CatalogModifierToggleOverrideType + obj.SetHiddenFromCustomerOverride(fernTestValueHiddenFromCustomerOverride) + assert.Equal(t, fernTestValueHiddenFromCustomerOverride, obj.HiddenFromCustomerOverride) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogItemModifierListInfo(t *testing.T) { + t.Run("GetModifierListID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemModifierListInfo{} + var expected string + obj.ModifierListID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetModifierListID(), "getter should return the property value") + }) + + t.Run("GetModifierListID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemModifierListInfo + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetModifierListID() // Should return zero value + }) + + t.Run("GetModifierOverrides", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemModifierListInfo{} + var expected []*CatalogModifierOverride + obj.ModifierOverrides = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetModifierOverrides(), "getter should return the property value") + }) + + t.Run("GetModifierOverrides_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemModifierListInfo{} + obj.ModifierOverrides = nil + + // Act & Assert + assert.Nil(t, obj.GetModifierOverrides(), "getter should return nil when property is nil") + }) + + t.Run("GetModifierOverrides_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemModifierListInfo + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetModifierOverrides() // Should return zero value + }) + + t.Run("GetMinSelectedModifiers", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemModifierListInfo{} + var expected *int + obj.MinSelectedModifiers = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMinSelectedModifiers(), "getter should return the property value") + }) + + t.Run("GetMinSelectedModifiers_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemModifierListInfo{} + obj.MinSelectedModifiers = nil + + // Act & Assert + assert.Nil(t, obj.GetMinSelectedModifiers(), "getter should return nil when property is nil") + }) + + t.Run("GetMinSelectedModifiers_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemModifierListInfo + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMinSelectedModifiers() // Should return zero value + }) + + t.Run("GetMaxSelectedModifiers", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemModifierListInfo{} + var expected *int + obj.MaxSelectedModifiers = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMaxSelectedModifiers(), "getter should return the property value") + }) + + t.Run("GetMaxSelectedModifiers_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemModifierListInfo{} + obj.MaxSelectedModifiers = nil + + // Act & Assert + assert.Nil(t, obj.GetMaxSelectedModifiers(), "getter should return nil when property is nil") + }) + + t.Run("GetMaxSelectedModifiers_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemModifierListInfo + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMaxSelectedModifiers() // Should return zero value + }) + + t.Run("GetEnabled", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemModifierListInfo{} + var expected *bool + obj.Enabled = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEnabled(), "getter should return the property value") + }) + + t.Run("GetEnabled_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemModifierListInfo{} + obj.Enabled = nil + + // Act & Assert + assert.Nil(t, obj.GetEnabled(), "getter should return nil when property is nil") + }) + + t.Run("GetEnabled_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemModifierListInfo + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEnabled() // Should return zero value + }) + + t.Run("GetOrdinal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemModifierListInfo{} + var expected *int + obj.Ordinal = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrdinal(), "getter should return the property value") + }) + + t.Run("GetOrdinal_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemModifierListInfo{} + obj.Ordinal = nil + + // Act & Assert + assert.Nil(t, obj.GetOrdinal(), "getter should return nil when property is nil") + }) + + t.Run("GetOrdinal_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemModifierListInfo + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrdinal() // Should return zero value + }) + + t.Run("GetAllowQuantities", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemModifierListInfo{} + var expected *CatalogModifierToggleOverrideType + obj.AllowQuantities = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAllowQuantities(), "getter should return the property value") + }) + + t.Run("GetAllowQuantities_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemModifierListInfo{} + obj.AllowQuantities = nil + + // Act & Assert + assert.Nil(t, obj.GetAllowQuantities(), "getter should return nil when property is nil") + }) + + t.Run("GetAllowQuantities_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemModifierListInfo + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAllowQuantities() // Should return zero value + }) + + t.Run("GetIsConversational", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemModifierListInfo{} + var expected *CatalogModifierToggleOverrideType + obj.IsConversational = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsConversational(), "getter should return the property value") + }) + + t.Run("GetIsConversational_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemModifierListInfo{} + obj.IsConversational = nil + + // Act & Assert + assert.Nil(t, obj.GetIsConversational(), "getter should return nil when property is nil") + }) + + t.Run("GetIsConversational_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemModifierListInfo + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsConversational() // Should return zero value + }) + + t.Run("GetHiddenFromCustomerOverride", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemModifierListInfo{} + var expected *CatalogModifierToggleOverrideType + obj.HiddenFromCustomerOverride = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetHiddenFromCustomerOverride(), "getter should return the property value") + }) + + t.Run("GetHiddenFromCustomerOverride_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemModifierListInfo{} + obj.HiddenFromCustomerOverride = nil + + // Act & Assert + assert.Nil(t, obj.GetHiddenFromCustomerOverride(), "getter should return nil when property is nil") + }) + + t.Run("GetHiddenFromCustomerOverride_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemModifierListInfo + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetHiddenFromCustomerOverride() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogItemModifierListInfo(t *testing.T) { + t.Run("SetModifierListID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemModifierListInfo{} + var fernTestValueModifierListID string + + // Act + obj.SetModifierListID(fernTestValueModifierListID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetModifierOverrides_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemModifierListInfo{} + var fernTestValueModifierOverrides []*CatalogModifierOverride + + // Act + obj.SetModifierOverrides(fernTestValueModifierOverrides) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMinSelectedModifiers_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemModifierListInfo{} + var fernTestValueMinSelectedModifiers *int + + // Act + obj.SetMinSelectedModifiers(fernTestValueMinSelectedModifiers) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMaxSelectedModifiers_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemModifierListInfo{} + var fernTestValueMaxSelectedModifiers *int + + // Act + obj.SetMaxSelectedModifiers(fernTestValueMaxSelectedModifiers) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEnabled_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemModifierListInfo{} + var fernTestValueEnabled *bool + + // Act + obj.SetEnabled(fernTestValueEnabled) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrdinal_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemModifierListInfo{} + var fernTestValueOrdinal *int + + // Act + obj.SetOrdinal(fernTestValueOrdinal) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAllowQuantities_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemModifierListInfo{} + var fernTestValueAllowQuantities *CatalogModifierToggleOverrideType + + // Act + obj.SetAllowQuantities(fernTestValueAllowQuantities) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsConversational_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemModifierListInfo{} + var fernTestValueIsConversational *CatalogModifierToggleOverrideType + + // Act + obj.SetIsConversational(fernTestValueIsConversational) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetHiddenFromCustomerOverride_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemModifierListInfo{} + var fernTestValueHiddenFromCustomerOverride *CatalogModifierToggleOverrideType + + // Act + obj.SetHiddenFromCustomerOverride(fernTestValueHiddenFromCustomerOverride) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogItemOption(t *testing.T) { + t.Run("SetName", func(t *testing.T) { + obj := &CatalogItemOption{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDisplayName", func(t *testing.T) { + obj := &CatalogItemOption{} + var fernTestValueDisplayName *string + obj.SetDisplayName(fernTestValueDisplayName) + assert.Equal(t, fernTestValueDisplayName, obj.DisplayName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDescription", func(t *testing.T) { + obj := &CatalogItemOption{} + var fernTestValueDescription *string + obj.SetDescription(fernTestValueDescription) + assert.Equal(t, fernTestValueDescription, obj.Description) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetShowColors", func(t *testing.T) { + obj := &CatalogItemOption{} + var fernTestValueShowColors *bool + obj.SetShowColors(fernTestValueShowColors) + assert.Equal(t, fernTestValueShowColors, obj.ShowColors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetValues", func(t *testing.T) { + obj := &CatalogItemOption{} + var fernTestValueValues []*CatalogObject + obj.SetValues(fernTestValueValues) + assert.Equal(t, fernTestValueValues, obj.Values) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogItemOption(t *testing.T) { + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOption{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOption{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemOption + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetDisplayName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOption{} + var expected *string + obj.DisplayName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDisplayName(), "getter should return the property value") + }) + + t.Run("GetDisplayName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOption{} + obj.DisplayName = nil + + // Act & Assert + assert.Nil(t, obj.GetDisplayName(), "getter should return nil when property is nil") + }) + + t.Run("GetDisplayName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemOption + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDisplayName() // Should return zero value + }) + + t.Run("GetDescription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOption{} + var expected *string + obj.Description = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDescription(), "getter should return the property value") + }) + + t.Run("GetDescription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOption{} + obj.Description = nil + + // Act & Assert + assert.Nil(t, obj.GetDescription(), "getter should return nil when property is nil") + }) + + t.Run("GetDescription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemOption + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDescription() // Should return zero value + }) + + t.Run("GetShowColors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOption{} + var expected *bool + obj.ShowColors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetShowColors(), "getter should return the property value") + }) + + t.Run("GetShowColors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOption{} + obj.ShowColors = nil + + // Act & Assert + assert.Nil(t, obj.GetShowColors(), "getter should return nil when property is nil") + }) + + t.Run("GetShowColors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemOption + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetShowColors() // Should return zero value + }) + + t.Run("GetValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOption{} + var expected []*CatalogObject + obj.Values = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetValues(), "getter should return the property value") + }) + + t.Run("GetValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOption{} + obj.Values = nil + + // Act & Assert + assert.Nil(t, obj.GetValues(), "getter should return nil when property is nil") + }) + + t.Run("GetValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemOption + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetValues() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogItemOption(t *testing.T) { + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOption{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDisplayName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOption{} + var fernTestValueDisplayName *string + + // Act + obj.SetDisplayName(fernTestValueDisplayName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDescription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOption{} + var fernTestValueDescription *string + + // Act + obj.SetDescription(fernTestValueDescription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetShowColors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOption{} + var fernTestValueShowColors *bool + + // Act + obj.SetShowColors(fernTestValueShowColors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOption{} + var fernTestValueValues []*CatalogObject + + // Act + obj.SetValues(fernTestValueValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogItemOptionForItem(t *testing.T) { + t.Run("SetItemOptionID", func(t *testing.T) { + obj := &CatalogItemOptionForItem{} + var fernTestValueItemOptionID *string + obj.SetItemOptionID(fernTestValueItemOptionID) + assert.Equal(t, fernTestValueItemOptionID, obj.ItemOptionID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogItemOptionForItem(t *testing.T) { + t.Run("GetItemOptionID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOptionForItem{} + var expected *string + obj.ItemOptionID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItemOptionID(), "getter should return the property value") + }) + + t.Run("GetItemOptionID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOptionForItem{} + obj.ItemOptionID = nil + + // Act & Assert + assert.Nil(t, obj.GetItemOptionID(), "getter should return nil when property is nil") + }) + + t.Run("GetItemOptionID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemOptionForItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItemOptionID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogItemOptionForItem(t *testing.T) { + t.Run("SetItemOptionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOptionForItem{} + var fernTestValueItemOptionID *string + + // Act + obj.SetItemOptionID(fernTestValueItemOptionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogItemOptionValue(t *testing.T) { + t.Run("SetItemOptionID", func(t *testing.T) { + obj := &CatalogItemOptionValue{} + var fernTestValueItemOptionID *string + obj.SetItemOptionID(fernTestValueItemOptionID) + assert.Equal(t, fernTestValueItemOptionID, obj.ItemOptionID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &CatalogItemOptionValue{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDescription", func(t *testing.T) { + obj := &CatalogItemOptionValue{} + var fernTestValueDescription *string + obj.SetDescription(fernTestValueDescription) + assert.Equal(t, fernTestValueDescription, obj.Description) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetColor", func(t *testing.T) { + obj := &CatalogItemOptionValue{} + var fernTestValueColor *string + obj.SetColor(fernTestValueColor) + assert.Equal(t, fernTestValueColor, obj.Color) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrdinal", func(t *testing.T) { + obj := &CatalogItemOptionValue{} + var fernTestValueOrdinal *int + obj.SetOrdinal(fernTestValueOrdinal) + assert.Equal(t, fernTestValueOrdinal, obj.Ordinal) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogItemOptionValue(t *testing.T) { + t.Run("GetItemOptionID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOptionValue{} + var expected *string + obj.ItemOptionID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItemOptionID(), "getter should return the property value") + }) + + t.Run("GetItemOptionID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOptionValue{} + obj.ItemOptionID = nil + + // Act & Assert + assert.Nil(t, obj.GetItemOptionID(), "getter should return nil when property is nil") + }) + + t.Run("GetItemOptionID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemOptionValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItemOptionID() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOptionValue{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOptionValue{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemOptionValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetDescription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOptionValue{} + var expected *string + obj.Description = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDescription(), "getter should return the property value") + }) + + t.Run("GetDescription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOptionValue{} + obj.Description = nil + + // Act & Assert + assert.Nil(t, obj.GetDescription(), "getter should return nil when property is nil") + }) + + t.Run("GetDescription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemOptionValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDescription() // Should return zero value + }) + + t.Run("GetColor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOptionValue{} + var expected *string + obj.Color = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetColor(), "getter should return the property value") + }) + + t.Run("GetColor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOptionValue{} + obj.Color = nil + + // Act & Assert + assert.Nil(t, obj.GetColor(), "getter should return nil when property is nil") + }) + + t.Run("GetColor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemOptionValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetColor() // Should return zero value + }) + + t.Run("GetOrdinal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOptionValue{} + var expected *int + obj.Ordinal = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrdinal(), "getter should return the property value") + }) + + t.Run("GetOrdinal_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOptionValue{} + obj.Ordinal = nil + + // Act & Assert + assert.Nil(t, obj.GetOrdinal(), "getter should return nil when property is nil") + }) + + t.Run("GetOrdinal_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemOptionValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrdinal() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogItemOptionValue(t *testing.T) { + t.Run("SetItemOptionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOptionValue{} + var fernTestValueItemOptionID *string + + // Act + obj.SetItemOptionID(fernTestValueItemOptionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOptionValue{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDescription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOptionValue{} + var fernTestValueDescription *string + + // Act + obj.SetDescription(fernTestValueDescription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetColor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOptionValue{} + var fernTestValueColor *string + + // Act + obj.SetColor(fernTestValueColor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrdinal_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOptionValue{} + var fernTestValueOrdinal *int + + // Act + obj.SetOrdinal(fernTestValueOrdinal) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogItemOptionValueForItemVariation(t *testing.T) { + t.Run("SetItemOptionID", func(t *testing.T) { + obj := &CatalogItemOptionValueForItemVariation{} + var fernTestValueItemOptionID *string + obj.SetItemOptionID(fernTestValueItemOptionID) + assert.Equal(t, fernTestValueItemOptionID, obj.ItemOptionID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetItemOptionValueID", func(t *testing.T) { + obj := &CatalogItemOptionValueForItemVariation{} + var fernTestValueItemOptionValueID *string + obj.SetItemOptionValueID(fernTestValueItemOptionValueID) + assert.Equal(t, fernTestValueItemOptionValueID, obj.ItemOptionValueID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogItemOptionValueForItemVariation(t *testing.T) { + t.Run("GetItemOptionID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOptionValueForItemVariation{} + var expected *string + obj.ItemOptionID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItemOptionID(), "getter should return the property value") + }) + + t.Run("GetItemOptionID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOptionValueForItemVariation{} + obj.ItemOptionID = nil + + // Act & Assert + assert.Nil(t, obj.GetItemOptionID(), "getter should return nil when property is nil") + }) + + t.Run("GetItemOptionID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemOptionValueForItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItemOptionID() // Should return zero value + }) + + t.Run("GetItemOptionValueID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOptionValueForItemVariation{} + var expected *string + obj.ItemOptionValueID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItemOptionValueID(), "getter should return the property value") + }) + + t.Run("GetItemOptionValueID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOptionValueForItemVariation{} + obj.ItemOptionValueID = nil + + // Act & Assert + assert.Nil(t, obj.GetItemOptionValueID(), "getter should return nil when property is nil") + }) + + t.Run("GetItemOptionValueID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemOptionValueForItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItemOptionValueID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogItemOptionValueForItemVariation(t *testing.T) { + t.Run("SetItemOptionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOptionValueForItemVariation{} + var fernTestValueItemOptionID *string + + // Act + obj.SetItemOptionID(fernTestValueItemOptionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetItemOptionValueID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOptionValueForItemVariation{} + var fernTestValueItemOptionValueID *string + + // Act + obj.SetItemOptionValueID(fernTestValueItemOptionValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogItemVariation(t *testing.T) { + t.Run("SetItemID", func(t *testing.T) { + obj := &CatalogItemVariation{} + var fernTestValueItemID *string + obj.SetItemID(fernTestValueItemID) + assert.Equal(t, fernTestValueItemID, obj.ItemID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &CatalogItemVariation{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSku", func(t *testing.T) { + obj := &CatalogItemVariation{} + var fernTestValueSku *string + obj.SetSku(fernTestValueSku) + assert.Equal(t, fernTestValueSku, obj.Sku) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpc", func(t *testing.T) { + obj := &CatalogItemVariation{} + var fernTestValueUpc *string + obj.SetUpc(fernTestValueUpc) + assert.Equal(t, fernTestValueUpc, obj.Upc) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrdinal", func(t *testing.T) { + obj := &CatalogItemVariation{} + var fernTestValueOrdinal *int + obj.SetOrdinal(fernTestValueOrdinal) + assert.Equal(t, fernTestValueOrdinal, obj.Ordinal) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPricingType", func(t *testing.T) { + obj := &CatalogItemVariation{} + var fernTestValuePricingType *CatalogPricingType + obj.SetPricingType(fernTestValuePricingType) + assert.Equal(t, fernTestValuePricingType, obj.PricingType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPriceMoney", func(t *testing.T) { + obj := &CatalogItemVariation{} + var fernTestValuePriceMoney *Money + obj.SetPriceMoney(fernTestValuePriceMoney) + assert.Equal(t, fernTestValuePriceMoney, obj.PriceMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationOverrides", func(t *testing.T) { + obj := &CatalogItemVariation{} + var fernTestValueLocationOverrides []*ItemVariationLocationOverrides + obj.SetLocationOverrides(fernTestValueLocationOverrides) + assert.Equal(t, fernTestValueLocationOverrides, obj.LocationOverrides) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTrackInventory", func(t *testing.T) { + obj := &CatalogItemVariation{} + var fernTestValueTrackInventory *bool + obj.SetTrackInventory(fernTestValueTrackInventory) + assert.Equal(t, fernTestValueTrackInventory, obj.TrackInventory) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetInventoryAlertType", func(t *testing.T) { + obj := &CatalogItemVariation{} + var fernTestValueInventoryAlertType *InventoryAlertType + obj.SetInventoryAlertType(fernTestValueInventoryAlertType) + assert.Equal(t, fernTestValueInventoryAlertType, obj.InventoryAlertType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetInventoryAlertThreshold", func(t *testing.T) { + obj := &CatalogItemVariation{} + var fernTestValueInventoryAlertThreshold *int64 + obj.SetInventoryAlertThreshold(fernTestValueInventoryAlertThreshold) + assert.Equal(t, fernTestValueInventoryAlertThreshold, obj.InventoryAlertThreshold) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUserData", func(t *testing.T) { + obj := &CatalogItemVariation{} + var fernTestValueUserData *string + obj.SetUserData(fernTestValueUserData) + assert.Equal(t, fernTestValueUserData, obj.UserData) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetServiceDuration", func(t *testing.T) { + obj := &CatalogItemVariation{} + var fernTestValueServiceDuration *int64 + obj.SetServiceDuration(fernTestValueServiceDuration) + assert.Equal(t, fernTestValueServiceDuration, obj.ServiceDuration) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAvailableForBooking", func(t *testing.T) { + obj := &CatalogItemVariation{} + var fernTestValueAvailableForBooking *bool + obj.SetAvailableForBooking(fernTestValueAvailableForBooking) + assert.Equal(t, fernTestValueAvailableForBooking, obj.AvailableForBooking) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetItemOptionValues", func(t *testing.T) { + obj := &CatalogItemVariation{} + var fernTestValueItemOptionValues []*CatalogItemOptionValueForItemVariation + obj.SetItemOptionValues(fernTestValueItemOptionValues) + assert.Equal(t, fernTestValueItemOptionValues, obj.ItemOptionValues) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMeasurementUnitID", func(t *testing.T) { + obj := &CatalogItemVariation{} + var fernTestValueMeasurementUnitID *string + obj.SetMeasurementUnitID(fernTestValueMeasurementUnitID) + assert.Equal(t, fernTestValueMeasurementUnitID, obj.MeasurementUnitID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSellable", func(t *testing.T) { + obj := &CatalogItemVariation{} + var fernTestValueSellable *bool + obj.SetSellable(fernTestValueSellable) + assert.Equal(t, fernTestValueSellable, obj.Sellable) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStockable", func(t *testing.T) { + obj := &CatalogItemVariation{} + var fernTestValueStockable *bool + obj.SetStockable(fernTestValueStockable) + assert.Equal(t, fernTestValueStockable, obj.Stockable) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImageIDs", func(t *testing.T) { + obj := &CatalogItemVariation{} + var fernTestValueImageIDs []string + obj.SetImageIDs(fernTestValueImageIDs) + assert.Equal(t, fernTestValueImageIDs, obj.ImageIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTeamMemberIDs", func(t *testing.T) { + obj := &CatalogItemVariation{} + var fernTestValueTeamMemberIDs []string + obj.SetTeamMemberIDs(fernTestValueTeamMemberIDs) + assert.Equal(t, fernTestValueTeamMemberIDs, obj.TeamMemberIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStockableConversion", func(t *testing.T) { + obj := &CatalogItemVariation{} + var fernTestValueStockableConversion *CatalogStockConversion + obj.SetStockableConversion(fernTestValueStockableConversion) + assert.Equal(t, fernTestValueStockableConversion, obj.StockableConversion) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetKitchenName", func(t *testing.T) { + obj := &CatalogItemVariation{} + var fernTestValueKitchenName *string + obj.SetKitchenName(fernTestValueKitchenName) + assert.Equal(t, fernTestValueKitchenName, obj.KitchenName) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogItemVariation(t *testing.T) { + t.Run("GetItemID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var expected *string + obj.ItemID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItemID(), "getter should return the property value") + }) + + t.Run("GetItemID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + obj.ItemID = nil + + // Act & Assert + assert.Nil(t, obj.GetItemID(), "getter should return nil when property is nil") + }) + + t.Run("GetItemID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItemID() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetSku", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var expected *string + obj.Sku = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSku(), "getter should return the property value") + }) + + t.Run("GetSku_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + obj.Sku = nil + + // Act & Assert + assert.Nil(t, obj.GetSku(), "getter should return nil when property is nil") + }) + + t.Run("GetSku_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSku() // Should return zero value + }) + + t.Run("GetUpc", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var expected *string + obj.Upc = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpc(), "getter should return the property value") + }) + + t.Run("GetUpc_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + obj.Upc = nil + + // Act & Assert + assert.Nil(t, obj.GetUpc(), "getter should return nil when property is nil") + }) + + t.Run("GetUpc_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpc() // Should return zero value + }) + + t.Run("GetOrdinal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var expected *int + obj.Ordinal = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrdinal(), "getter should return the property value") + }) + + t.Run("GetOrdinal_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + obj.Ordinal = nil + + // Act & Assert + assert.Nil(t, obj.GetOrdinal(), "getter should return nil when property is nil") + }) + + t.Run("GetOrdinal_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrdinal() // Should return zero value + }) + + t.Run("GetPricingType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var expected *CatalogPricingType + obj.PricingType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPricingType(), "getter should return the property value") + }) + + t.Run("GetPricingType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + obj.PricingType = nil + + // Act & Assert + assert.Nil(t, obj.GetPricingType(), "getter should return nil when property is nil") + }) + + t.Run("GetPricingType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPricingType() // Should return zero value + }) + + t.Run("GetPriceMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var expected *Money + obj.PriceMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPriceMoney(), "getter should return the property value") + }) + + t.Run("GetPriceMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + obj.PriceMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetPriceMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetPriceMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPriceMoney() // Should return zero value + }) + + t.Run("GetLocationOverrides", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var expected []*ItemVariationLocationOverrides + obj.LocationOverrides = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationOverrides(), "getter should return the property value") + }) + + t.Run("GetLocationOverrides_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + obj.LocationOverrides = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationOverrides(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationOverrides_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationOverrides() // Should return zero value + }) + + t.Run("GetTrackInventory", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var expected *bool + obj.TrackInventory = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTrackInventory(), "getter should return the property value") + }) + + t.Run("GetTrackInventory_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + obj.TrackInventory = nil + + // Act & Assert + assert.Nil(t, obj.GetTrackInventory(), "getter should return nil when property is nil") + }) + + t.Run("GetTrackInventory_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTrackInventory() // Should return zero value + }) + + t.Run("GetInventoryAlertType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var expected *InventoryAlertType + obj.InventoryAlertType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInventoryAlertType(), "getter should return the property value") + }) + + t.Run("GetInventoryAlertType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + obj.InventoryAlertType = nil + + // Act & Assert + assert.Nil(t, obj.GetInventoryAlertType(), "getter should return nil when property is nil") + }) + + t.Run("GetInventoryAlertType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInventoryAlertType() // Should return zero value + }) + + t.Run("GetInventoryAlertThreshold", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var expected *int64 + obj.InventoryAlertThreshold = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInventoryAlertThreshold(), "getter should return the property value") + }) + + t.Run("GetInventoryAlertThreshold_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + obj.InventoryAlertThreshold = nil + + // Act & Assert + assert.Nil(t, obj.GetInventoryAlertThreshold(), "getter should return nil when property is nil") + }) + + t.Run("GetInventoryAlertThreshold_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInventoryAlertThreshold() // Should return zero value + }) + + t.Run("GetUserData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var expected *string + obj.UserData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUserData(), "getter should return the property value") + }) + + t.Run("GetUserData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + obj.UserData = nil + + // Act & Assert + assert.Nil(t, obj.GetUserData(), "getter should return nil when property is nil") + }) + + t.Run("GetUserData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUserData() // Should return zero value + }) + + t.Run("GetServiceDuration", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var expected *int64 + obj.ServiceDuration = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetServiceDuration(), "getter should return the property value") + }) + + t.Run("GetServiceDuration_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + obj.ServiceDuration = nil + + // Act & Assert + assert.Nil(t, obj.GetServiceDuration(), "getter should return nil when property is nil") + }) + + t.Run("GetServiceDuration_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetServiceDuration() // Should return zero value + }) + + t.Run("GetAvailableForBooking", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var expected *bool + obj.AvailableForBooking = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAvailableForBooking(), "getter should return the property value") + }) + + t.Run("GetAvailableForBooking_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + obj.AvailableForBooking = nil + + // Act & Assert + assert.Nil(t, obj.GetAvailableForBooking(), "getter should return nil when property is nil") + }) + + t.Run("GetAvailableForBooking_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAvailableForBooking() // Should return zero value + }) + + t.Run("GetItemOptionValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var expected []*CatalogItemOptionValueForItemVariation + obj.ItemOptionValues = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItemOptionValues(), "getter should return the property value") + }) + + t.Run("GetItemOptionValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + obj.ItemOptionValues = nil + + // Act & Assert + assert.Nil(t, obj.GetItemOptionValues(), "getter should return nil when property is nil") + }) + + t.Run("GetItemOptionValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItemOptionValues() // Should return zero value + }) + + t.Run("GetMeasurementUnitID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var expected *string + obj.MeasurementUnitID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMeasurementUnitID(), "getter should return the property value") + }) + + t.Run("GetMeasurementUnitID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + obj.MeasurementUnitID = nil + + // Act & Assert + assert.Nil(t, obj.GetMeasurementUnitID(), "getter should return nil when property is nil") + }) + + t.Run("GetMeasurementUnitID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMeasurementUnitID() // Should return zero value + }) + + t.Run("GetSellable", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var expected *bool + obj.Sellable = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSellable(), "getter should return the property value") + }) + + t.Run("GetSellable_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + obj.Sellable = nil + + // Act & Assert + assert.Nil(t, obj.GetSellable(), "getter should return nil when property is nil") + }) + + t.Run("GetSellable_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSellable() // Should return zero value + }) + + t.Run("GetStockable", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var expected *bool + obj.Stockable = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStockable(), "getter should return the property value") + }) + + t.Run("GetStockable_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + obj.Stockable = nil + + // Act & Assert + assert.Nil(t, obj.GetStockable(), "getter should return nil when property is nil") + }) + + t.Run("GetStockable_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStockable() // Should return zero value + }) + + t.Run("GetImageIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var expected []string + obj.ImageIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImageIDs(), "getter should return the property value") + }) + + t.Run("GetImageIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + obj.ImageIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetImageIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetImageIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImageIDs() // Should return zero value + }) + + t.Run("GetTeamMemberIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var expected []string + obj.TeamMemberIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMemberIDs(), "getter should return the property value") + }) + + t.Run("GetTeamMemberIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + obj.TeamMemberIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMemberIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMemberIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMemberIDs() // Should return zero value + }) + + t.Run("GetStockableConversion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var expected *CatalogStockConversion + obj.StockableConversion = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStockableConversion(), "getter should return the property value") + }) + + t.Run("GetStockableConversion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + obj.StockableConversion = nil + + // Act & Assert + assert.Nil(t, obj.GetStockableConversion(), "getter should return nil when property is nil") + }) + + t.Run("GetStockableConversion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStockableConversion() // Should return zero value + }) + + t.Run("GetKitchenName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var expected *string + obj.KitchenName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetKitchenName(), "getter should return the property value") + }) + + t.Run("GetKitchenName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + obj.KitchenName = nil + + // Act & Assert + assert.Nil(t, obj.GetKitchenName(), "getter should return nil when property is nil") + }) + + t.Run("GetKitchenName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetKitchenName() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogItemVariation(t *testing.T) { + t.Run("SetItemID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var fernTestValueItemID *string + + // Act + obj.SetItemID(fernTestValueItemID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSku_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var fernTestValueSku *string + + // Act + obj.SetSku(fernTestValueSku) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpc_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var fernTestValueUpc *string + + // Act + obj.SetUpc(fernTestValueUpc) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrdinal_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var fernTestValueOrdinal *int + + // Act + obj.SetOrdinal(fernTestValueOrdinal) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPricingType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var fernTestValuePricingType *CatalogPricingType + + // Act + obj.SetPricingType(fernTestValuePricingType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPriceMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var fernTestValuePriceMoney *Money + + // Act + obj.SetPriceMoney(fernTestValuePriceMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationOverrides_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var fernTestValueLocationOverrides []*ItemVariationLocationOverrides + + // Act + obj.SetLocationOverrides(fernTestValueLocationOverrides) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTrackInventory_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var fernTestValueTrackInventory *bool + + // Act + obj.SetTrackInventory(fernTestValueTrackInventory) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetInventoryAlertType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var fernTestValueInventoryAlertType *InventoryAlertType + + // Act + obj.SetInventoryAlertType(fernTestValueInventoryAlertType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetInventoryAlertThreshold_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var fernTestValueInventoryAlertThreshold *int64 + + // Act + obj.SetInventoryAlertThreshold(fernTestValueInventoryAlertThreshold) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUserData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var fernTestValueUserData *string + + // Act + obj.SetUserData(fernTestValueUserData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetServiceDuration_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var fernTestValueServiceDuration *int64 + + // Act + obj.SetServiceDuration(fernTestValueServiceDuration) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAvailableForBooking_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var fernTestValueAvailableForBooking *bool + + // Act + obj.SetAvailableForBooking(fernTestValueAvailableForBooking) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetItemOptionValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var fernTestValueItemOptionValues []*CatalogItemOptionValueForItemVariation + + // Act + obj.SetItemOptionValues(fernTestValueItemOptionValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMeasurementUnitID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var fernTestValueMeasurementUnitID *string + + // Act + obj.SetMeasurementUnitID(fernTestValueMeasurementUnitID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSellable_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var fernTestValueSellable *bool + + // Act + obj.SetSellable(fernTestValueSellable) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStockable_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var fernTestValueStockable *bool + + // Act + obj.SetStockable(fernTestValueStockable) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImageIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var fernTestValueImageIDs []string + + // Act + obj.SetImageIDs(fernTestValueImageIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTeamMemberIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var fernTestValueTeamMemberIDs []string + + // Act + obj.SetTeamMemberIDs(fernTestValueTeamMemberIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStockableConversion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var fernTestValueStockableConversion *CatalogStockConversion + + // Act + obj.SetStockableConversion(fernTestValueStockableConversion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetKitchenName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + var fernTestValueKitchenName *string + + // Act + obj.SetKitchenName(fernTestValueKitchenName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogMeasurementUnit(t *testing.T) { + t.Run("SetMeasurementUnit", func(t *testing.T) { + obj := &CatalogMeasurementUnit{} + var fernTestValueMeasurementUnit *MeasurementUnit + obj.SetMeasurementUnit(fernTestValueMeasurementUnit) + assert.Equal(t, fernTestValueMeasurementUnit, obj.MeasurementUnit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPrecision", func(t *testing.T) { + obj := &CatalogMeasurementUnit{} + var fernTestValuePrecision *int + obj.SetPrecision(fernTestValuePrecision) + assert.Equal(t, fernTestValuePrecision, obj.Precision) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogMeasurementUnit(t *testing.T) { + t.Run("GetMeasurementUnit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogMeasurementUnit{} + var expected *MeasurementUnit + obj.MeasurementUnit = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMeasurementUnit(), "getter should return the property value") + }) + + t.Run("GetMeasurementUnit_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogMeasurementUnit{} + obj.MeasurementUnit = nil + + // Act & Assert + assert.Nil(t, obj.GetMeasurementUnit(), "getter should return nil when property is nil") + }) + + t.Run("GetMeasurementUnit_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogMeasurementUnit + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMeasurementUnit() // Should return zero value + }) + + t.Run("GetPrecision", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogMeasurementUnit{} + var expected *int + obj.Precision = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPrecision(), "getter should return the property value") + }) + + t.Run("GetPrecision_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogMeasurementUnit{} + obj.Precision = nil + + // Act & Assert + assert.Nil(t, obj.GetPrecision(), "getter should return nil when property is nil") + }) + + t.Run("GetPrecision_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogMeasurementUnit + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPrecision() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogMeasurementUnit(t *testing.T) { + t.Run("SetMeasurementUnit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogMeasurementUnit{} + var fernTestValueMeasurementUnit *MeasurementUnit + + // Act + obj.SetMeasurementUnit(fernTestValueMeasurementUnit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPrecision_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogMeasurementUnit{} + var fernTestValuePrecision *int + + // Act + obj.SetPrecision(fernTestValuePrecision) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogModifier(t *testing.T) { + t.Run("SetName", func(t *testing.T) { + obj := &CatalogModifier{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPriceMoney", func(t *testing.T) { + obj := &CatalogModifier{} + var fernTestValuePriceMoney *Money + obj.SetPriceMoney(fernTestValuePriceMoney) + assert.Equal(t, fernTestValuePriceMoney, obj.PriceMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOnByDefault", func(t *testing.T) { + obj := &CatalogModifier{} + var fernTestValueOnByDefault *bool + obj.SetOnByDefault(fernTestValueOnByDefault) + assert.Equal(t, fernTestValueOnByDefault, obj.OnByDefault) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrdinal", func(t *testing.T) { + obj := &CatalogModifier{} + var fernTestValueOrdinal *int + obj.SetOrdinal(fernTestValueOrdinal) + assert.Equal(t, fernTestValueOrdinal, obj.Ordinal) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetModifierListID", func(t *testing.T) { + obj := &CatalogModifier{} + var fernTestValueModifierListID *string + obj.SetModifierListID(fernTestValueModifierListID) + assert.Equal(t, fernTestValueModifierListID, obj.ModifierListID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationOverrides", func(t *testing.T) { + obj := &CatalogModifier{} + var fernTestValueLocationOverrides []*ModifierLocationOverrides + obj.SetLocationOverrides(fernTestValueLocationOverrides) + assert.Equal(t, fernTestValueLocationOverrides, obj.LocationOverrides) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetKitchenName", func(t *testing.T) { + obj := &CatalogModifier{} + var fernTestValueKitchenName *string + obj.SetKitchenName(fernTestValueKitchenName) + assert.Equal(t, fernTestValueKitchenName, obj.KitchenName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImageID", func(t *testing.T) { + obj := &CatalogModifier{} + var fernTestValueImageID *string + obj.SetImageID(fernTestValueImageID) + assert.Equal(t, fernTestValueImageID, obj.ImageID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetHiddenOnline", func(t *testing.T) { + obj := &CatalogModifier{} + var fernTestValueHiddenOnline *bool + obj.SetHiddenOnline(fernTestValueHiddenOnline) + assert.Equal(t, fernTestValueHiddenOnline, obj.HiddenOnline) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogModifier(t *testing.T) { + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifier{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifier{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetPriceMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifier{} + var expected *Money + obj.PriceMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPriceMoney(), "getter should return the property value") + }) + + t.Run("GetPriceMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifier{} + obj.PriceMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetPriceMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetPriceMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPriceMoney() // Should return zero value + }) + + t.Run("GetOnByDefault", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifier{} + var expected *bool + obj.OnByDefault = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOnByDefault(), "getter should return the property value") + }) + + t.Run("GetOnByDefault_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifier{} + obj.OnByDefault = nil + + // Act & Assert + assert.Nil(t, obj.GetOnByDefault(), "getter should return nil when property is nil") + }) + + t.Run("GetOnByDefault_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOnByDefault() // Should return zero value + }) + + t.Run("GetOrdinal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifier{} + var expected *int + obj.Ordinal = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrdinal(), "getter should return the property value") + }) + + t.Run("GetOrdinal_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifier{} + obj.Ordinal = nil + + // Act & Assert + assert.Nil(t, obj.GetOrdinal(), "getter should return nil when property is nil") + }) + + t.Run("GetOrdinal_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrdinal() // Should return zero value + }) + + t.Run("GetModifierListID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifier{} + var expected *string + obj.ModifierListID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetModifierListID(), "getter should return the property value") + }) + + t.Run("GetModifierListID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifier{} + obj.ModifierListID = nil + + // Act & Assert + assert.Nil(t, obj.GetModifierListID(), "getter should return nil when property is nil") + }) + + t.Run("GetModifierListID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetModifierListID() // Should return zero value + }) + + t.Run("GetLocationOverrides", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifier{} + var expected []*ModifierLocationOverrides + obj.LocationOverrides = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationOverrides(), "getter should return the property value") + }) + + t.Run("GetLocationOverrides_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifier{} + obj.LocationOverrides = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationOverrides(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationOverrides_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationOverrides() // Should return zero value + }) + + t.Run("GetKitchenName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifier{} + var expected *string + obj.KitchenName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetKitchenName(), "getter should return the property value") + }) + + t.Run("GetKitchenName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifier{} + obj.KitchenName = nil + + // Act & Assert + assert.Nil(t, obj.GetKitchenName(), "getter should return nil when property is nil") + }) + + t.Run("GetKitchenName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetKitchenName() // Should return zero value + }) + + t.Run("GetImageID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifier{} + var expected *string + obj.ImageID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImageID(), "getter should return the property value") + }) + + t.Run("GetImageID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifier{} + obj.ImageID = nil + + // Act & Assert + assert.Nil(t, obj.GetImageID(), "getter should return nil when property is nil") + }) + + t.Run("GetImageID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImageID() // Should return zero value + }) + + t.Run("GetHiddenOnline", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifier{} + var expected *bool + obj.HiddenOnline = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetHiddenOnline(), "getter should return the property value") + }) + + t.Run("GetHiddenOnline_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifier{} + obj.HiddenOnline = nil + + // Act & Assert + assert.Nil(t, obj.GetHiddenOnline(), "getter should return nil when property is nil") + }) + + t.Run("GetHiddenOnline_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetHiddenOnline() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogModifier(t *testing.T) { + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifier{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPriceMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifier{} + var fernTestValuePriceMoney *Money + + // Act + obj.SetPriceMoney(fernTestValuePriceMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOnByDefault_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifier{} + var fernTestValueOnByDefault *bool + + // Act + obj.SetOnByDefault(fernTestValueOnByDefault) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrdinal_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifier{} + var fernTestValueOrdinal *int + + // Act + obj.SetOrdinal(fernTestValueOrdinal) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetModifierListID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifier{} + var fernTestValueModifierListID *string + + // Act + obj.SetModifierListID(fernTestValueModifierListID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationOverrides_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifier{} + var fernTestValueLocationOverrides []*ModifierLocationOverrides + + // Act + obj.SetLocationOverrides(fernTestValueLocationOverrides) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetKitchenName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifier{} + var fernTestValueKitchenName *string + + // Act + obj.SetKitchenName(fernTestValueKitchenName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImageID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifier{} + var fernTestValueImageID *string + + // Act + obj.SetImageID(fernTestValueImageID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetHiddenOnline_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifier{} + var fernTestValueHiddenOnline *bool + + // Act + obj.SetHiddenOnline(fernTestValueHiddenOnline) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogModifierList(t *testing.T) { + t.Run("SetName", func(t *testing.T) { + obj := &CatalogModifierList{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrdinal", func(t *testing.T) { + obj := &CatalogModifierList{} + var fernTestValueOrdinal *int + obj.SetOrdinal(fernTestValueOrdinal) + assert.Equal(t, fernTestValueOrdinal, obj.Ordinal) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSelectionType", func(t *testing.T) { + obj := &CatalogModifierList{} + var fernTestValueSelectionType *CatalogModifierListSelectionType + obj.SetSelectionType(fernTestValueSelectionType) + assert.Equal(t, fernTestValueSelectionType, obj.SelectionType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetModifiers", func(t *testing.T) { + obj := &CatalogModifierList{} + var fernTestValueModifiers []*CatalogObject + obj.SetModifiers(fernTestValueModifiers) + assert.Equal(t, fernTestValueModifiers, obj.Modifiers) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImageIDs", func(t *testing.T) { + obj := &CatalogModifierList{} + var fernTestValueImageIDs []string + obj.SetImageIDs(fernTestValueImageIDs) + assert.Equal(t, fernTestValueImageIDs, obj.ImageIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAllowQuantities", func(t *testing.T) { + obj := &CatalogModifierList{} + var fernTestValueAllowQuantities *bool + obj.SetAllowQuantities(fernTestValueAllowQuantities) + assert.Equal(t, fernTestValueAllowQuantities, obj.AllowQuantities) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsConversational", func(t *testing.T) { + obj := &CatalogModifierList{} + var fernTestValueIsConversational *bool + obj.SetIsConversational(fernTestValueIsConversational) + assert.Equal(t, fernTestValueIsConversational, obj.IsConversational) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetModifierType", func(t *testing.T) { + obj := &CatalogModifierList{} + var fernTestValueModifierType *CatalogModifierListModifierType + obj.SetModifierType(fernTestValueModifierType) + assert.Equal(t, fernTestValueModifierType, obj.ModifierType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMaxLength", func(t *testing.T) { + obj := &CatalogModifierList{} + var fernTestValueMaxLength *int + obj.SetMaxLength(fernTestValueMaxLength) + assert.Equal(t, fernTestValueMaxLength, obj.MaxLength) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTextRequired", func(t *testing.T) { + obj := &CatalogModifierList{} + var fernTestValueTextRequired *bool + obj.SetTextRequired(fernTestValueTextRequired) + assert.Equal(t, fernTestValueTextRequired, obj.TextRequired) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetInternalName", func(t *testing.T) { + obj := &CatalogModifierList{} + var fernTestValueInternalName *string + obj.SetInternalName(fernTestValueInternalName) + assert.Equal(t, fernTestValueInternalName, obj.InternalName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMinSelectedModifiers", func(t *testing.T) { + obj := &CatalogModifierList{} + var fernTestValueMinSelectedModifiers *int64 + obj.SetMinSelectedModifiers(fernTestValueMinSelectedModifiers) + assert.Equal(t, fernTestValueMinSelectedModifiers, obj.MinSelectedModifiers) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMaxSelectedModifiers", func(t *testing.T) { + obj := &CatalogModifierList{} + var fernTestValueMaxSelectedModifiers *int64 + obj.SetMaxSelectedModifiers(fernTestValueMaxSelectedModifiers) + assert.Equal(t, fernTestValueMaxSelectedModifiers, obj.MaxSelectedModifiers) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetHiddenFromCustomer", func(t *testing.T) { + obj := &CatalogModifierList{} + var fernTestValueHiddenFromCustomer *bool + obj.SetHiddenFromCustomer(fernTestValueHiddenFromCustomer) + assert.Equal(t, fernTestValueHiddenFromCustomer, obj.HiddenFromCustomer) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogModifierList(t *testing.T) { + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifierList + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetOrdinal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + var expected *int + obj.Ordinal = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrdinal(), "getter should return the property value") + }) + + t.Run("GetOrdinal_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + obj.Ordinal = nil + + // Act & Assert + assert.Nil(t, obj.GetOrdinal(), "getter should return nil when property is nil") + }) + + t.Run("GetOrdinal_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifierList + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrdinal() // Should return zero value + }) + + t.Run("GetSelectionType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + var expected *CatalogModifierListSelectionType + obj.SelectionType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSelectionType(), "getter should return the property value") + }) + + t.Run("GetSelectionType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + obj.SelectionType = nil + + // Act & Assert + assert.Nil(t, obj.GetSelectionType(), "getter should return nil when property is nil") + }) + + t.Run("GetSelectionType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifierList + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSelectionType() // Should return zero value + }) + + t.Run("GetModifiers", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + var expected []*CatalogObject + obj.Modifiers = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetModifiers(), "getter should return the property value") + }) + + t.Run("GetModifiers_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + obj.Modifiers = nil + + // Act & Assert + assert.Nil(t, obj.GetModifiers(), "getter should return nil when property is nil") + }) + + t.Run("GetModifiers_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifierList + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetModifiers() // Should return zero value + }) + + t.Run("GetImageIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + var expected []string + obj.ImageIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImageIDs(), "getter should return the property value") + }) + + t.Run("GetImageIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + obj.ImageIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetImageIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetImageIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifierList + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImageIDs() // Should return zero value + }) + + t.Run("GetAllowQuantities", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + var expected *bool + obj.AllowQuantities = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAllowQuantities(), "getter should return the property value") + }) + + t.Run("GetAllowQuantities_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + obj.AllowQuantities = nil + + // Act & Assert + assert.Nil(t, obj.GetAllowQuantities(), "getter should return nil when property is nil") + }) + + t.Run("GetAllowQuantities_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifierList + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAllowQuantities() // Should return zero value + }) + + t.Run("GetIsConversational", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + var expected *bool + obj.IsConversational = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsConversational(), "getter should return the property value") + }) + + t.Run("GetIsConversational_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + obj.IsConversational = nil + + // Act & Assert + assert.Nil(t, obj.GetIsConversational(), "getter should return nil when property is nil") + }) + + t.Run("GetIsConversational_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifierList + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsConversational() // Should return zero value + }) + + t.Run("GetModifierType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + var expected *CatalogModifierListModifierType + obj.ModifierType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetModifierType(), "getter should return the property value") + }) + + t.Run("GetModifierType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + obj.ModifierType = nil + + // Act & Assert + assert.Nil(t, obj.GetModifierType(), "getter should return nil when property is nil") + }) + + t.Run("GetModifierType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifierList + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetModifierType() // Should return zero value + }) + + t.Run("GetMaxLength", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + var expected *int + obj.MaxLength = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMaxLength(), "getter should return the property value") + }) + + t.Run("GetMaxLength_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + obj.MaxLength = nil + + // Act & Assert + assert.Nil(t, obj.GetMaxLength(), "getter should return nil when property is nil") + }) + + t.Run("GetMaxLength_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifierList + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMaxLength() // Should return zero value + }) + + t.Run("GetTextRequired", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + var expected *bool + obj.TextRequired = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTextRequired(), "getter should return the property value") + }) + + t.Run("GetTextRequired_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + obj.TextRequired = nil + + // Act & Assert + assert.Nil(t, obj.GetTextRequired(), "getter should return nil when property is nil") + }) + + t.Run("GetTextRequired_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifierList + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTextRequired() // Should return zero value + }) + + t.Run("GetInternalName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + var expected *string + obj.InternalName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInternalName(), "getter should return the property value") + }) + + t.Run("GetInternalName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + obj.InternalName = nil + + // Act & Assert + assert.Nil(t, obj.GetInternalName(), "getter should return nil when property is nil") + }) + + t.Run("GetInternalName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifierList + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInternalName() // Should return zero value + }) + + t.Run("GetMinSelectedModifiers", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + var expected *int64 + obj.MinSelectedModifiers = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMinSelectedModifiers(), "getter should return the property value") + }) + + t.Run("GetMinSelectedModifiers_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + obj.MinSelectedModifiers = nil + + // Act & Assert + assert.Nil(t, obj.GetMinSelectedModifiers(), "getter should return nil when property is nil") + }) + + t.Run("GetMinSelectedModifiers_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifierList + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMinSelectedModifiers() // Should return zero value + }) + + t.Run("GetMaxSelectedModifiers", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + var expected *int64 + obj.MaxSelectedModifiers = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMaxSelectedModifiers(), "getter should return the property value") + }) + + t.Run("GetMaxSelectedModifiers_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + obj.MaxSelectedModifiers = nil + + // Act & Assert + assert.Nil(t, obj.GetMaxSelectedModifiers(), "getter should return nil when property is nil") + }) + + t.Run("GetMaxSelectedModifiers_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifierList + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMaxSelectedModifiers() // Should return zero value + }) + + t.Run("GetHiddenFromCustomer", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + var expected *bool + obj.HiddenFromCustomer = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetHiddenFromCustomer(), "getter should return the property value") + }) + + t.Run("GetHiddenFromCustomer_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + obj.HiddenFromCustomer = nil + + // Act & Assert + assert.Nil(t, obj.GetHiddenFromCustomer(), "getter should return nil when property is nil") + }) + + t.Run("GetHiddenFromCustomer_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifierList + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetHiddenFromCustomer() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogModifierList(t *testing.T) { + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrdinal_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + var fernTestValueOrdinal *int + + // Act + obj.SetOrdinal(fernTestValueOrdinal) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSelectionType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + var fernTestValueSelectionType *CatalogModifierListSelectionType + + // Act + obj.SetSelectionType(fernTestValueSelectionType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetModifiers_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + var fernTestValueModifiers []*CatalogObject + + // Act + obj.SetModifiers(fernTestValueModifiers) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImageIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + var fernTestValueImageIDs []string + + // Act + obj.SetImageIDs(fernTestValueImageIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAllowQuantities_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + var fernTestValueAllowQuantities *bool + + // Act + obj.SetAllowQuantities(fernTestValueAllowQuantities) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsConversational_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + var fernTestValueIsConversational *bool + + // Act + obj.SetIsConversational(fernTestValueIsConversational) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetModifierType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + var fernTestValueModifierType *CatalogModifierListModifierType + + // Act + obj.SetModifierType(fernTestValueModifierType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMaxLength_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + var fernTestValueMaxLength *int + + // Act + obj.SetMaxLength(fernTestValueMaxLength) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTextRequired_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + var fernTestValueTextRequired *bool + + // Act + obj.SetTextRequired(fernTestValueTextRequired) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetInternalName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + var fernTestValueInternalName *string + + // Act + obj.SetInternalName(fernTestValueInternalName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMinSelectedModifiers_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + var fernTestValueMinSelectedModifiers *int64 + + // Act + obj.SetMinSelectedModifiers(fernTestValueMinSelectedModifiers) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMaxSelectedModifiers_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + var fernTestValueMaxSelectedModifiers *int64 + + // Act + obj.SetMaxSelectedModifiers(fernTestValueMaxSelectedModifiers) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetHiddenFromCustomer_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + var fernTestValueHiddenFromCustomer *bool + + // Act + obj.SetHiddenFromCustomer(fernTestValueHiddenFromCustomer) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogModifierOverride(t *testing.T) { + t.Run("SetModifierID", func(t *testing.T) { + obj := &CatalogModifierOverride{} + var fernTestValueModifierID string + obj.SetModifierID(fernTestValueModifierID) + assert.Equal(t, fernTestValueModifierID, obj.ModifierID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOnByDefault", func(t *testing.T) { + obj := &CatalogModifierOverride{} + var fernTestValueOnByDefault *bool + obj.SetOnByDefault(fernTestValueOnByDefault) + assert.Equal(t, fernTestValueOnByDefault, obj.OnByDefault) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetHiddenOnlineOverride", func(t *testing.T) { + obj := &CatalogModifierOverride{} + var fernTestValueHiddenOnlineOverride *CatalogModifierToggleOverrideType + obj.SetHiddenOnlineOverride(fernTestValueHiddenOnlineOverride) + assert.Equal(t, fernTestValueHiddenOnlineOverride, obj.HiddenOnlineOverride) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOnByDefaultOverride", func(t *testing.T) { + obj := &CatalogModifierOverride{} + var fernTestValueOnByDefaultOverride *CatalogModifierToggleOverrideType + obj.SetOnByDefaultOverride(fernTestValueOnByDefaultOverride) + assert.Equal(t, fernTestValueOnByDefaultOverride, obj.OnByDefaultOverride) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogModifierOverride(t *testing.T) { + t.Run("GetModifierID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierOverride{} + var expected string + obj.ModifierID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetModifierID(), "getter should return the property value") + }) + + t.Run("GetModifierID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifierOverride + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetModifierID() // Should return zero value + }) + + t.Run("GetOnByDefault", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierOverride{} + var expected *bool + obj.OnByDefault = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOnByDefault(), "getter should return the property value") + }) + + t.Run("GetOnByDefault_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierOverride{} + obj.OnByDefault = nil + + // Act & Assert + assert.Nil(t, obj.GetOnByDefault(), "getter should return nil when property is nil") + }) + + t.Run("GetOnByDefault_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifierOverride + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOnByDefault() // Should return zero value + }) + + t.Run("GetHiddenOnlineOverride", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierOverride{} + var expected *CatalogModifierToggleOverrideType + obj.HiddenOnlineOverride = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetHiddenOnlineOverride(), "getter should return the property value") + }) + + t.Run("GetHiddenOnlineOverride_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierOverride{} + obj.HiddenOnlineOverride = nil + + // Act & Assert + assert.Nil(t, obj.GetHiddenOnlineOverride(), "getter should return nil when property is nil") + }) + + t.Run("GetHiddenOnlineOverride_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifierOverride + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetHiddenOnlineOverride() // Should return zero value + }) + + t.Run("GetOnByDefaultOverride", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierOverride{} + var expected *CatalogModifierToggleOverrideType + obj.OnByDefaultOverride = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOnByDefaultOverride(), "getter should return the property value") + }) + + t.Run("GetOnByDefaultOverride_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierOverride{} + obj.OnByDefaultOverride = nil + + // Act & Assert + assert.Nil(t, obj.GetOnByDefaultOverride(), "getter should return nil when property is nil") + }) + + t.Run("GetOnByDefaultOverride_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifierOverride + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOnByDefaultOverride() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogModifierOverride(t *testing.T) { + t.Run("SetModifierID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierOverride{} + var fernTestValueModifierID string + + // Act + obj.SetModifierID(fernTestValueModifierID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOnByDefault_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierOverride{} + var fernTestValueOnByDefault *bool + + // Act + obj.SetOnByDefault(fernTestValueOnByDefault) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetHiddenOnlineOverride_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierOverride{} + var fernTestValueHiddenOnlineOverride *CatalogModifierToggleOverrideType + + // Act + obj.SetHiddenOnlineOverride(fernTestValueHiddenOnlineOverride) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOnByDefaultOverride_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierOverride{} + var fernTestValueOnByDefaultOverride *CatalogModifierToggleOverrideType + + // Act + obj.SetOnByDefaultOverride(fernTestValueOnByDefaultOverride) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestGettersCatalogObject(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + var expected string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetItem", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + var expected *CatalogObjectItem + obj.Item = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItem(), "getter should return the property value") + }) + + t.Run("GetItem_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + obj.Item = nil + + // Act & Assert + assert.Nil(t, obj.GetItem(), "getter should return nil when property is nil") + }) + + t.Run("GetItem_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItem() // Should return zero value + }) + + t.Run("GetImage", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + var expected *CatalogObjectImage + obj.Image = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImage(), "getter should return the property value") + }) + + t.Run("GetImage_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + obj.Image = nil + + // Act & Assert + assert.Nil(t, obj.GetImage(), "getter should return nil when property is nil") + }) + + t.Run("GetImage_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImage() // Should return zero value + }) + + t.Run("GetCategory", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + var expected *CatalogObjectCategory + obj.Category = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCategory(), "getter should return the property value") + }) + + t.Run("GetCategory_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + obj.Category = nil + + // Act & Assert + assert.Nil(t, obj.GetCategory(), "getter should return nil when property is nil") + }) + + t.Run("GetCategory_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCategory() // Should return zero value + }) + + t.Run("GetItemVariation", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + var expected *CatalogObjectItemVariation + obj.ItemVariation = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItemVariation(), "getter should return the property value") + }) + + t.Run("GetItemVariation_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + obj.ItemVariation = nil + + // Act & Assert + assert.Nil(t, obj.GetItemVariation(), "getter should return nil when property is nil") + }) + + t.Run("GetItemVariation_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItemVariation() // Should return zero value + }) + + t.Run("GetTax", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + var expected *CatalogObjectTax + obj.Tax = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTax(), "getter should return the property value") + }) + + t.Run("GetTax_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + obj.Tax = nil + + // Act & Assert + assert.Nil(t, obj.GetTax(), "getter should return nil when property is nil") + }) + + t.Run("GetTax_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTax() // Should return zero value + }) + + t.Run("GetDiscount", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + var expected *CatalogObjectDiscount + obj.Discount = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDiscount(), "getter should return the property value") + }) + + t.Run("GetDiscount_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + obj.Discount = nil + + // Act & Assert + assert.Nil(t, obj.GetDiscount(), "getter should return nil when property is nil") + }) + + t.Run("GetDiscount_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDiscount() // Should return zero value + }) + + t.Run("GetModifierList", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + var expected *CatalogObjectModifierList + obj.ModifierList = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetModifierList(), "getter should return the property value") + }) + + t.Run("GetModifierList_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + obj.ModifierList = nil + + // Act & Assert + assert.Nil(t, obj.GetModifierList(), "getter should return nil when property is nil") + }) + + t.Run("GetModifierList_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetModifierList() // Should return zero value + }) + + t.Run("GetModifier", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + var expected *CatalogObjectModifier + obj.Modifier = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetModifier(), "getter should return the property value") + }) + + t.Run("GetModifier_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + obj.Modifier = nil + + // Act & Assert + assert.Nil(t, obj.GetModifier(), "getter should return nil when property is nil") + }) + + t.Run("GetModifier_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetModifier() // Should return zero value + }) + + t.Run("GetPricingRule", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + var expected *CatalogObjectPricingRule + obj.PricingRule = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPricingRule(), "getter should return the property value") + }) + + t.Run("GetPricingRule_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + obj.PricingRule = nil + + // Act & Assert + assert.Nil(t, obj.GetPricingRule(), "getter should return nil when property is nil") + }) + + t.Run("GetPricingRule_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPricingRule() // Should return zero value + }) + + t.Run("GetProductSet", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + var expected *CatalogObjectProductSet + obj.ProductSet = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetProductSet(), "getter should return the property value") + }) + + t.Run("GetProductSet_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + obj.ProductSet = nil + + // Act & Assert + assert.Nil(t, obj.GetProductSet(), "getter should return nil when property is nil") + }) + + t.Run("GetProductSet_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetProductSet() // Should return zero value + }) + + t.Run("GetTimePeriod", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + var expected *CatalogObjectTimePeriod + obj.TimePeriod = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTimePeriod(), "getter should return the property value") + }) + + t.Run("GetTimePeriod_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + obj.TimePeriod = nil + + // Act & Assert + assert.Nil(t, obj.GetTimePeriod(), "getter should return nil when property is nil") + }) + + t.Run("GetTimePeriod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTimePeriod() // Should return zero value + }) + + t.Run("GetMeasurementUnit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + var expected *CatalogObjectMeasurementUnit + obj.MeasurementUnit = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMeasurementUnit(), "getter should return the property value") + }) + + t.Run("GetMeasurementUnit_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + obj.MeasurementUnit = nil + + // Act & Assert + assert.Nil(t, obj.GetMeasurementUnit(), "getter should return nil when property is nil") + }) + + t.Run("GetMeasurementUnit_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMeasurementUnit() // Should return zero value + }) + + t.Run("GetSubscriptionPlanVariation", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + var expected *CatalogObjectSubscriptionPlanVariation + obj.SubscriptionPlanVariation = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscriptionPlanVariation(), "getter should return the property value") + }) + + t.Run("GetSubscriptionPlanVariation_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + obj.SubscriptionPlanVariation = nil + + // Act & Assert + assert.Nil(t, obj.GetSubscriptionPlanVariation(), "getter should return nil when property is nil") + }) + + t.Run("GetSubscriptionPlanVariation_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscriptionPlanVariation() // Should return zero value + }) + + t.Run("GetItemOption", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + var expected *CatalogObjectItemOption + obj.ItemOption = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItemOption(), "getter should return the property value") + }) + + t.Run("GetItemOption_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + obj.ItemOption = nil + + // Act & Assert + assert.Nil(t, obj.GetItemOption(), "getter should return nil when property is nil") + }) + + t.Run("GetItemOption_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItemOption() // Should return zero value + }) + + t.Run("GetItemOptionVal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + var expected *CatalogObjectItemOptionValue + obj.ItemOptionVal = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItemOptionVal(), "getter should return the property value") + }) + + t.Run("GetItemOptionVal_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + obj.ItemOptionVal = nil + + // Act & Assert + assert.Nil(t, obj.GetItemOptionVal(), "getter should return nil when property is nil") + }) + + t.Run("GetItemOptionVal_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItemOptionVal() // Should return zero value + }) + + t.Run("GetCustomAttributeDefinition", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + var expected *CatalogObjectCustomAttributeDefinition + obj.CustomAttributeDefinition = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeDefinition(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeDefinition_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + obj.CustomAttributeDefinition = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeDefinition(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeDefinition_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeDefinition() // Should return zero value + }) + + t.Run("GetQuickAmountsSettings", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + var expected *CatalogObjectQuickAmountsSettings + obj.QuickAmountsSettings = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQuickAmountsSettings(), "getter should return the property value") + }) + + t.Run("GetQuickAmountsSettings_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + obj.QuickAmountsSettings = nil + + // Act & Assert + assert.Nil(t, obj.GetQuickAmountsSettings(), "getter should return nil when property is nil") + }) + + t.Run("GetQuickAmountsSettings_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQuickAmountsSettings() // Should return zero value + }) + + t.Run("GetSubscriptionPlan", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + var expected *CatalogObjectSubscriptionPlan + obj.SubscriptionPlan = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscriptionPlan(), "getter should return the property value") + }) + + t.Run("GetSubscriptionPlan_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + obj.SubscriptionPlan = nil + + // Act & Assert + assert.Nil(t, obj.GetSubscriptionPlan(), "getter should return nil when property is nil") + }) + + t.Run("GetSubscriptionPlan_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscriptionPlan() // Should return zero value + }) + + t.Run("GetAvailabilityPeriod", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + var expected *CatalogObjectAvailabilityPeriod + obj.AvailabilityPeriod = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAvailabilityPeriod(), "getter should return the property value") + }) + + t.Run("GetAvailabilityPeriod_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObject{} + obj.AvailabilityPeriod = nil + + // Act & Assert + assert.Nil(t, obj.GetAvailabilityPeriod(), "getter should return nil when property is nil") + }) + + t.Run("GetAvailabilityPeriod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAvailabilityPeriod() // Should return zero value + }) + +} + +func TestSettersCatalogObjectAvailabilityPeriod(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &CatalogObjectAvailabilityPeriod{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CatalogObjectAvailabilityPeriod{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &CatalogObjectAvailabilityPeriod{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsDeleted", func(t *testing.T) { + obj := &CatalogObjectAvailabilityPeriod{} + var fernTestValueIsDeleted *bool + obj.SetIsDeleted(fernTestValueIsDeleted) + assert.Equal(t, fernTestValueIsDeleted, obj.IsDeleted) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttributeValues", func(t *testing.T) { + obj := &CatalogObjectAvailabilityPeriod{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + assert.Equal(t, fernTestValueCustomAttributeValues, obj.CustomAttributeValues) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogV1IDs", func(t *testing.T) { + obj := &CatalogObjectAvailabilityPeriod{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + assert.Equal(t, fernTestValueCatalogV1IDs, obj.CatalogV1IDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtAllLocations", func(t *testing.T) { + obj := &CatalogObjectAvailabilityPeriod{} + var fernTestValuePresentAtAllLocations *bool + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + assert.Equal(t, fernTestValuePresentAtAllLocations, obj.PresentAtAllLocations) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectAvailabilityPeriod{} + var fernTestValuePresentAtLocationIDs []string + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + assert.Equal(t, fernTestValuePresentAtLocationIDs, obj.PresentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAbsentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectAvailabilityPeriod{} + var fernTestValueAbsentAtLocationIDs []string + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + assert.Equal(t, fernTestValueAbsentAtLocationIDs, obj.AbsentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImageID", func(t *testing.T) { + obj := &CatalogObjectAvailabilityPeriod{} + var fernTestValueImageID *string + obj.SetImageID(fernTestValueImageID) + assert.Equal(t, fernTestValueImageID, obj.ImageID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAvailabilityPeriodData", func(t *testing.T) { + obj := &CatalogObjectAvailabilityPeriod{} + var fernTestValueAvailabilityPeriodData *CatalogAvailabilityPeriod + obj.SetAvailabilityPeriodData(fernTestValueAvailabilityPeriodData) + assert.Equal(t, fernTestValueAvailabilityPeriodData, obj.AvailabilityPeriodData) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogObjectAvailabilityPeriod(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + var expected string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectAvailabilityPeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectAvailabilityPeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + var expected *int64 + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectAvailabilityPeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetIsDeleted", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + var expected *bool + obj.IsDeleted = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsDeleted(), "getter should return the property value") + }) + + t.Run("GetIsDeleted_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + obj.IsDeleted = nil + + // Act & Assert + assert.Nil(t, obj.GetIsDeleted(), "getter should return nil when property is nil") + }) + + t.Run("GetIsDeleted_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectAvailabilityPeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsDeleted() // Should return zero value + }) + + t.Run("GetCustomAttributeValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + var expected map[string]*CatalogCustomAttributeValue + obj.CustomAttributeValues = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeValues(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + obj.CustomAttributeValues = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeValues(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectAvailabilityPeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeValues() // Should return zero value + }) + + t.Run("GetCatalogV1IDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + var expected []*CatalogV1ID + obj.CatalogV1IDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogV1IDs(), "getter should return the property value") + }) + + t.Run("GetCatalogV1IDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + obj.CatalogV1IDs = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogV1IDs(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogV1IDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectAvailabilityPeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogV1IDs() // Should return zero value + }) + + t.Run("GetPresentAtAllLocations", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + var expected *bool + obj.PresentAtAllLocations = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtAllLocations(), "getter should return the property value") + }) + + t.Run("GetPresentAtAllLocations_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + obj.PresentAtAllLocations = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtAllLocations(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtAllLocations_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectAvailabilityPeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtAllLocations() // Should return zero value + }) + + t.Run("GetPresentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + var expected []string + obj.PresentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetPresentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + obj.PresentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectAvailabilityPeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtLocationIDs() // Should return zero value + }) + + t.Run("GetAbsentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + var expected []string + obj.AbsentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAbsentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetAbsentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + obj.AbsentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetAbsentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetAbsentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectAvailabilityPeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAbsentAtLocationIDs() // Should return zero value + }) + + t.Run("GetImageID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + var expected *string + obj.ImageID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImageID(), "getter should return the property value") + }) + + t.Run("GetImageID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + obj.ImageID = nil + + // Act & Assert + assert.Nil(t, obj.GetImageID(), "getter should return nil when property is nil") + }) + + t.Run("GetImageID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectAvailabilityPeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImageID() // Should return zero value + }) + + t.Run("GetAvailabilityPeriodData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + var expected *CatalogAvailabilityPeriod + obj.AvailabilityPeriodData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAvailabilityPeriodData(), "getter should return the property value") + }) + + t.Run("GetAvailabilityPeriodData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + obj.AvailabilityPeriodData = nil + + // Act & Assert + assert.Nil(t, obj.GetAvailabilityPeriodData(), "getter should return nil when property is nil") + }) + + t.Run("GetAvailabilityPeriodData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectAvailabilityPeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAvailabilityPeriodData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogObjectAvailabilityPeriod(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsDeleted_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + var fernTestValueIsDeleted *bool + + // Act + obj.SetIsDeleted(fernTestValueIsDeleted) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttributeValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + + // Act + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogV1IDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + + // Act + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtAllLocations_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + var fernTestValuePresentAtAllLocations *bool + + // Act + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + var fernTestValuePresentAtLocationIDs []string + + // Act + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAbsentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + var fernTestValueAbsentAtLocationIDs []string + + // Act + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImageID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + var fernTestValueImageID *string + + // Act + obj.SetImageID(fernTestValueImageID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAvailabilityPeriodData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + var fernTestValueAvailabilityPeriodData *CatalogAvailabilityPeriod + + // Act + obj.SetAvailabilityPeriodData(fernTestValueAvailabilityPeriodData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogObjectBase(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &CatalogObjectBase{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CatalogObjectBase{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &CatalogObjectBase{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsDeleted", func(t *testing.T) { + obj := &CatalogObjectBase{} + var fernTestValueIsDeleted *bool + obj.SetIsDeleted(fernTestValueIsDeleted) + assert.Equal(t, fernTestValueIsDeleted, obj.IsDeleted) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttributeValues", func(t *testing.T) { + obj := &CatalogObjectBase{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + assert.Equal(t, fernTestValueCustomAttributeValues, obj.CustomAttributeValues) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogV1IDs", func(t *testing.T) { + obj := &CatalogObjectBase{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + assert.Equal(t, fernTestValueCatalogV1IDs, obj.CatalogV1IDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtAllLocations", func(t *testing.T) { + obj := &CatalogObjectBase{} + var fernTestValuePresentAtAllLocations *bool + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + assert.Equal(t, fernTestValuePresentAtAllLocations, obj.PresentAtAllLocations) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectBase{} + var fernTestValuePresentAtLocationIDs []string + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + assert.Equal(t, fernTestValuePresentAtLocationIDs, obj.PresentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAbsentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectBase{} + var fernTestValueAbsentAtLocationIDs []string + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + assert.Equal(t, fernTestValueAbsentAtLocationIDs, obj.AbsentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImageID", func(t *testing.T) { + obj := &CatalogObjectBase{} + var fernTestValueImageID *string + obj.SetImageID(fernTestValueImageID) + assert.Equal(t, fernTestValueImageID, obj.ImageID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogObjectBase(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + var expected string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectBase + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectBase + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + var expected *int64 + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectBase + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetIsDeleted", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + var expected *bool + obj.IsDeleted = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsDeleted(), "getter should return the property value") + }) + + t.Run("GetIsDeleted_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + obj.IsDeleted = nil + + // Act & Assert + assert.Nil(t, obj.GetIsDeleted(), "getter should return nil when property is nil") + }) + + t.Run("GetIsDeleted_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectBase + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsDeleted() // Should return zero value + }) + + t.Run("GetCustomAttributeValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + var expected map[string]*CatalogCustomAttributeValue + obj.CustomAttributeValues = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeValues(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + obj.CustomAttributeValues = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeValues(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectBase + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeValues() // Should return zero value + }) + + t.Run("GetCatalogV1IDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + var expected []*CatalogV1ID + obj.CatalogV1IDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogV1IDs(), "getter should return the property value") + }) + + t.Run("GetCatalogV1IDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + obj.CatalogV1IDs = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogV1IDs(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogV1IDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectBase + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogV1IDs() // Should return zero value + }) + + t.Run("GetPresentAtAllLocations", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + var expected *bool + obj.PresentAtAllLocations = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtAllLocations(), "getter should return the property value") + }) + + t.Run("GetPresentAtAllLocations_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + obj.PresentAtAllLocations = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtAllLocations(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtAllLocations_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectBase + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtAllLocations() // Should return zero value + }) + + t.Run("GetPresentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + var expected []string + obj.PresentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetPresentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + obj.PresentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectBase + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtLocationIDs() // Should return zero value + }) + + t.Run("GetAbsentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + var expected []string + obj.AbsentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAbsentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetAbsentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + obj.AbsentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetAbsentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetAbsentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectBase + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAbsentAtLocationIDs() // Should return zero value + }) + + t.Run("GetImageID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + var expected *string + obj.ImageID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImageID(), "getter should return the property value") + }) + + t.Run("GetImageID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + obj.ImageID = nil + + // Act & Assert + assert.Nil(t, obj.GetImageID(), "getter should return nil when property is nil") + }) + + t.Run("GetImageID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectBase + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImageID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogObjectBase(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsDeleted_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + var fernTestValueIsDeleted *bool + + // Act + obj.SetIsDeleted(fernTestValueIsDeleted) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttributeValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + + // Act + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogV1IDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + + // Act + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtAllLocations_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + var fernTestValuePresentAtAllLocations *bool + + // Act + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + var fernTestValuePresentAtLocationIDs []string + + // Act + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAbsentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + var fernTestValueAbsentAtLocationIDs []string + + // Act + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImageID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + var fernTestValueImageID *string + + // Act + obj.SetImageID(fernTestValueImageID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogObjectCategory(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &CatalogObjectCategory{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrdinal", func(t *testing.T) { + obj := &CatalogObjectCategory{} + var fernTestValueOrdinal *int64 + obj.SetOrdinal(fernTestValueOrdinal) + assert.Equal(t, fernTestValueOrdinal, obj.Ordinal) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCategoryData", func(t *testing.T) { + obj := &CatalogObjectCategory{} + var fernTestValueCategoryData *CatalogCategory + obj.SetCategoryData(fernTestValueCategoryData) + assert.Equal(t, fernTestValueCategoryData, obj.CategoryData) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CatalogObjectCategory{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &CatalogObjectCategory{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsDeleted", func(t *testing.T) { + obj := &CatalogObjectCategory{} + var fernTestValueIsDeleted *bool + obj.SetIsDeleted(fernTestValueIsDeleted) + assert.Equal(t, fernTestValueIsDeleted, obj.IsDeleted) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttributeValues", func(t *testing.T) { + obj := &CatalogObjectCategory{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + assert.Equal(t, fernTestValueCustomAttributeValues, obj.CustomAttributeValues) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogV1IDs", func(t *testing.T) { + obj := &CatalogObjectCategory{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + assert.Equal(t, fernTestValueCatalogV1IDs, obj.CatalogV1IDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtAllLocations", func(t *testing.T) { + obj := &CatalogObjectCategory{} + var fernTestValuePresentAtAllLocations *bool + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + assert.Equal(t, fernTestValuePresentAtAllLocations, obj.PresentAtAllLocations) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectCategory{} + var fernTestValuePresentAtLocationIDs []string + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + assert.Equal(t, fernTestValuePresentAtLocationIDs, obj.PresentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAbsentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectCategory{} + var fernTestValueAbsentAtLocationIDs []string + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + assert.Equal(t, fernTestValueAbsentAtLocationIDs, obj.AbsentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImageID", func(t *testing.T) { + obj := &CatalogObjectCategory{} + var fernTestValueImageID *string + obj.SetImageID(fernTestValueImageID) + assert.Equal(t, fernTestValueImageID, obj.ImageID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogObjectCategory(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectCategory + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetOrdinal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + var expected *int64 + obj.Ordinal = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrdinal(), "getter should return the property value") + }) + + t.Run("GetOrdinal_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + obj.Ordinal = nil + + // Act & Assert + assert.Nil(t, obj.GetOrdinal(), "getter should return nil when property is nil") + }) + + t.Run("GetOrdinal_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectCategory + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrdinal() // Should return zero value + }) + + t.Run("GetCategoryData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + var expected *CatalogCategory + obj.CategoryData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCategoryData(), "getter should return the property value") + }) + + t.Run("GetCategoryData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + obj.CategoryData = nil + + // Act & Assert + assert.Nil(t, obj.GetCategoryData(), "getter should return nil when property is nil") + }) + + t.Run("GetCategoryData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectCategory + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCategoryData() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectCategory + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + var expected *int64 + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectCategory + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetIsDeleted", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + var expected *bool + obj.IsDeleted = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsDeleted(), "getter should return the property value") + }) + + t.Run("GetIsDeleted_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + obj.IsDeleted = nil + + // Act & Assert + assert.Nil(t, obj.GetIsDeleted(), "getter should return nil when property is nil") + }) + + t.Run("GetIsDeleted_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectCategory + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsDeleted() // Should return zero value + }) + + t.Run("GetCustomAttributeValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + var expected map[string]*CatalogCustomAttributeValue + obj.CustomAttributeValues = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeValues(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + obj.CustomAttributeValues = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeValues(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectCategory + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeValues() // Should return zero value + }) + + t.Run("GetCatalogV1IDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + var expected []*CatalogV1ID + obj.CatalogV1IDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogV1IDs(), "getter should return the property value") + }) + + t.Run("GetCatalogV1IDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + obj.CatalogV1IDs = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogV1IDs(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogV1IDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectCategory + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogV1IDs() // Should return zero value + }) + + t.Run("GetPresentAtAllLocations", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + var expected *bool + obj.PresentAtAllLocations = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtAllLocations(), "getter should return the property value") + }) + + t.Run("GetPresentAtAllLocations_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + obj.PresentAtAllLocations = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtAllLocations(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtAllLocations_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectCategory + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtAllLocations() // Should return zero value + }) + + t.Run("GetPresentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + var expected []string + obj.PresentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetPresentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + obj.PresentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectCategory + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtLocationIDs() // Should return zero value + }) + + t.Run("GetAbsentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + var expected []string + obj.AbsentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAbsentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetAbsentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + obj.AbsentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetAbsentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetAbsentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectCategory + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAbsentAtLocationIDs() // Should return zero value + }) + + t.Run("GetImageID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + var expected *string + obj.ImageID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImageID(), "getter should return the property value") + }) + + t.Run("GetImageID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + obj.ImageID = nil + + // Act & Assert + assert.Nil(t, obj.GetImageID(), "getter should return nil when property is nil") + }) + + t.Run("GetImageID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectCategory + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImageID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogObjectCategory(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrdinal_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + var fernTestValueOrdinal *int64 + + // Act + obj.SetOrdinal(fernTestValueOrdinal) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCategoryData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + var fernTestValueCategoryData *CatalogCategory + + // Act + obj.SetCategoryData(fernTestValueCategoryData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsDeleted_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + var fernTestValueIsDeleted *bool + + // Act + obj.SetIsDeleted(fernTestValueIsDeleted) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttributeValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + + // Act + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogV1IDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + + // Act + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtAllLocations_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + var fernTestValuePresentAtAllLocations *bool + + // Act + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + var fernTestValuePresentAtLocationIDs []string + + // Act + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAbsentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + var fernTestValueAbsentAtLocationIDs []string + + // Act + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImageID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + var fernTestValueImageID *string + + // Act + obj.SetImageID(fernTestValueImageID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogObjectCustomAttributeDefinition(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &CatalogObjectCustomAttributeDefinition{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CatalogObjectCustomAttributeDefinition{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &CatalogObjectCustomAttributeDefinition{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsDeleted", func(t *testing.T) { + obj := &CatalogObjectCustomAttributeDefinition{} + var fernTestValueIsDeleted *bool + obj.SetIsDeleted(fernTestValueIsDeleted) + assert.Equal(t, fernTestValueIsDeleted, obj.IsDeleted) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttributeValues", func(t *testing.T) { + obj := &CatalogObjectCustomAttributeDefinition{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + assert.Equal(t, fernTestValueCustomAttributeValues, obj.CustomAttributeValues) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogV1IDs", func(t *testing.T) { + obj := &CatalogObjectCustomAttributeDefinition{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + assert.Equal(t, fernTestValueCatalogV1IDs, obj.CatalogV1IDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtAllLocations", func(t *testing.T) { + obj := &CatalogObjectCustomAttributeDefinition{} + var fernTestValuePresentAtAllLocations *bool + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + assert.Equal(t, fernTestValuePresentAtAllLocations, obj.PresentAtAllLocations) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectCustomAttributeDefinition{} + var fernTestValuePresentAtLocationIDs []string + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + assert.Equal(t, fernTestValuePresentAtLocationIDs, obj.PresentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAbsentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectCustomAttributeDefinition{} + var fernTestValueAbsentAtLocationIDs []string + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + assert.Equal(t, fernTestValueAbsentAtLocationIDs, obj.AbsentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImageID", func(t *testing.T) { + obj := &CatalogObjectCustomAttributeDefinition{} + var fernTestValueImageID *string + obj.SetImageID(fernTestValueImageID) + assert.Equal(t, fernTestValueImageID, obj.ImageID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttributeDefinitionData", func(t *testing.T) { + obj := &CatalogObjectCustomAttributeDefinition{} + var fernTestValueCustomAttributeDefinitionData *CatalogCustomAttributeDefinition + obj.SetCustomAttributeDefinitionData(fernTestValueCustomAttributeDefinitionData) + assert.Equal(t, fernTestValueCustomAttributeDefinitionData, obj.CustomAttributeDefinitionData) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogObjectCustomAttributeDefinition(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + var expected string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectCustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectCustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + var expected *int64 + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectCustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetIsDeleted", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + var expected *bool + obj.IsDeleted = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsDeleted(), "getter should return the property value") + }) + + t.Run("GetIsDeleted_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + obj.IsDeleted = nil + + // Act & Assert + assert.Nil(t, obj.GetIsDeleted(), "getter should return nil when property is nil") + }) + + t.Run("GetIsDeleted_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectCustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsDeleted() // Should return zero value + }) + + t.Run("GetCustomAttributeValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + var expected map[string]*CatalogCustomAttributeValue + obj.CustomAttributeValues = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeValues(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + obj.CustomAttributeValues = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeValues(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectCustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeValues() // Should return zero value + }) + + t.Run("GetCatalogV1IDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + var expected []*CatalogV1ID + obj.CatalogV1IDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogV1IDs(), "getter should return the property value") + }) + + t.Run("GetCatalogV1IDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + obj.CatalogV1IDs = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogV1IDs(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogV1IDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectCustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogV1IDs() // Should return zero value + }) + + t.Run("GetPresentAtAllLocations", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + var expected *bool + obj.PresentAtAllLocations = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtAllLocations(), "getter should return the property value") + }) + + t.Run("GetPresentAtAllLocations_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + obj.PresentAtAllLocations = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtAllLocations(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtAllLocations_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectCustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtAllLocations() // Should return zero value + }) + + t.Run("GetPresentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + var expected []string + obj.PresentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetPresentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + obj.PresentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectCustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtLocationIDs() // Should return zero value + }) + + t.Run("GetAbsentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + var expected []string + obj.AbsentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAbsentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetAbsentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + obj.AbsentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetAbsentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetAbsentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectCustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAbsentAtLocationIDs() // Should return zero value + }) + + t.Run("GetImageID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + var expected *string + obj.ImageID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImageID(), "getter should return the property value") + }) + + t.Run("GetImageID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + obj.ImageID = nil + + // Act & Assert + assert.Nil(t, obj.GetImageID(), "getter should return nil when property is nil") + }) + + t.Run("GetImageID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectCustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImageID() // Should return zero value + }) + + t.Run("GetCustomAttributeDefinitionData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + var expected *CatalogCustomAttributeDefinition + obj.CustomAttributeDefinitionData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeDefinitionData(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeDefinitionData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + obj.CustomAttributeDefinitionData = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeDefinitionData(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeDefinitionData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectCustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeDefinitionData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogObjectCustomAttributeDefinition(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsDeleted_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + var fernTestValueIsDeleted *bool + + // Act + obj.SetIsDeleted(fernTestValueIsDeleted) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttributeValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + + // Act + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogV1IDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + + // Act + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtAllLocations_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + var fernTestValuePresentAtAllLocations *bool + + // Act + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + var fernTestValuePresentAtLocationIDs []string + + // Act + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAbsentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + var fernTestValueAbsentAtLocationIDs []string + + // Act + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImageID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + var fernTestValueImageID *string + + // Act + obj.SetImageID(fernTestValueImageID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttributeDefinitionData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + var fernTestValueCustomAttributeDefinitionData *CatalogCustomAttributeDefinition + + // Act + obj.SetCustomAttributeDefinitionData(fernTestValueCustomAttributeDefinitionData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogObjectDiscount(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &CatalogObjectDiscount{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CatalogObjectDiscount{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &CatalogObjectDiscount{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsDeleted", func(t *testing.T) { + obj := &CatalogObjectDiscount{} + var fernTestValueIsDeleted *bool + obj.SetIsDeleted(fernTestValueIsDeleted) + assert.Equal(t, fernTestValueIsDeleted, obj.IsDeleted) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttributeValues", func(t *testing.T) { + obj := &CatalogObjectDiscount{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + assert.Equal(t, fernTestValueCustomAttributeValues, obj.CustomAttributeValues) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogV1IDs", func(t *testing.T) { + obj := &CatalogObjectDiscount{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + assert.Equal(t, fernTestValueCatalogV1IDs, obj.CatalogV1IDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtAllLocations", func(t *testing.T) { + obj := &CatalogObjectDiscount{} + var fernTestValuePresentAtAllLocations *bool + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + assert.Equal(t, fernTestValuePresentAtAllLocations, obj.PresentAtAllLocations) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectDiscount{} + var fernTestValuePresentAtLocationIDs []string + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + assert.Equal(t, fernTestValuePresentAtLocationIDs, obj.PresentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAbsentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectDiscount{} + var fernTestValueAbsentAtLocationIDs []string + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + assert.Equal(t, fernTestValueAbsentAtLocationIDs, obj.AbsentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImageID", func(t *testing.T) { + obj := &CatalogObjectDiscount{} + var fernTestValueImageID *string + obj.SetImageID(fernTestValueImageID) + assert.Equal(t, fernTestValueImageID, obj.ImageID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDiscountData", func(t *testing.T) { + obj := &CatalogObjectDiscount{} + var fernTestValueDiscountData *CatalogDiscount + obj.SetDiscountData(fernTestValueDiscountData) + assert.Equal(t, fernTestValueDiscountData, obj.DiscountData) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogObjectDiscount(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + var expected string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + var expected *int64 + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetIsDeleted", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + var expected *bool + obj.IsDeleted = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsDeleted(), "getter should return the property value") + }) + + t.Run("GetIsDeleted_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + obj.IsDeleted = nil + + // Act & Assert + assert.Nil(t, obj.GetIsDeleted(), "getter should return nil when property is nil") + }) + + t.Run("GetIsDeleted_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsDeleted() // Should return zero value + }) + + t.Run("GetCustomAttributeValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + var expected map[string]*CatalogCustomAttributeValue + obj.CustomAttributeValues = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeValues(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + obj.CustomAttributeValues = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeValues(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeValues() // Should return zero value + }) + + t.Run("GetCatalogV1IDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + var expected []*CatalogV1ID + obj.CatalogV1IDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogV1IDs(), "getter should return the property value") + }) + + t.Run("GetCatalogV1IDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + obj.CatalogV1IDs = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogV1IDs(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogV1IDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogV1IDs() // Should return zero value + }) + + t.Run("GetPresentAtAllLocations", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + var expected *bool + obj.PresentAtAllLocations = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtAllLocations(), "getter should return the property value") + }) + + t.Run("GetPresentAtAllLocations_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + obj.PresentAtAllLocations = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtAllLocations(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtAllLocations_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtAllLocations() // Should return zero value + }) + + t.Run("GetPresentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + var expected []string + obj.PresentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetPresentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + obj.PresentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtLocationIDs() // Should return zero value + }) + + t.Run("GetAbsentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + var expected []string + obj.AbsentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAbsentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetAbsentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + obj.AbsentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetAbsentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetAbsentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAbsentAtLocationIDs() // Should return zero value + }) + + t.Run("GetImageID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + var expected *string + obj.ImageID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImageID(), "getter should return the property value") + }) + + t.Run("GetImageID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + obj.ImageID = nil + + // Act & Assert + assert.Nil(t, obj.GetImageID(), "getter should return nil when property is nil") + }) + + t.Run("GetImageID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImageID() // Should return zero value + }) + + t.Run("GetDiscountData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + var expected *CatalogDiscount + obj.DiscountData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDiscountData(), "getter should return the property value") + }) + + t.Run("GetDiscountData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + obj.DiscountData = nil + + // Act & Assert + assert.Nil(t, obj.GetDiscountData(), "getter should return nil when property is nil") + }) + + t.Run("GetDiscountData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDiscountData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogObjectDiscount(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsDeleted_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + var fernTestValueIsDeleted *bool + + // Act + obj.SetIsDeleted(fernTestValueIsDeleted) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttributeValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + + // Act + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogV1IDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + + // Act + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtAllLocations_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + var fernTestValuePresentAtAllLocations *bool + + // Act + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + var fernTestValuePresentAtLocationIDs []string + + // Act + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAbsentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + var fernTestValueAbsentAtLocationIDs []string + + // Act + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImageID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + var fernTestValueImageID *string + + // Act + obj.SetImageID(fernTestValueImageID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDiscountData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + var fernTestValueDiscountData *CatalogDiscount + + // Act + obj.SetDiscountData(fernTestValueDiscountData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogObjectImage(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &CatalogObjectImage{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CatalogObjectImage{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &CatalogObjectImage{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsDeleted", func(t *testing.T) { + obj := &CatalogObjectImage{} + var fernTestValueIsDeleted *bool + obj.SetIsDeleted(fernTestValueIsDeleted) + assert.Equal(t, fernTestValueIsDeleted, obj.IsDeleted) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttributeValues", func(t *testing.T) { + obj := &CatalogObjectImage{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + assert.Equal(t, fernTestValueCustomAttributeValues, obj.CustomAttributeValues) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogV1IDs", func(t *testing.T) { + obj := &CatalogObjectImage{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + assert.Equal(t, fernTestValueCatalogV1IDs, obj.CatalogV1IDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtAllLocations", func(t *testing.T) { + obj := &CatalogObjectImage{} + var fernTestValuePresentAtAllLocations *bool + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + assert.Equal(t, fernTestValuePresentAtAllLocations, obj.PresentAtAllLocations) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectImage{} + var fernTestValuePresentAtLocationIDs []string + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + assert.Equal(t, fernTestValuePresentAtLocationIDs, obj.PresentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAbsentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectImage{} + var fernTestValueAbsentAtLocationIDs []string + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + assert.Equal(t, fernTestValueAbsentAtLocationIDs, obj.AbsentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImageID", func(t *testing.T) { + obj := &CatalogObjectImage{} + var fernTestValueImageID *string + obj.SetImageID(fernTestValueImageID) + assert.Equal(t, fernTestValueImageID, obj.ImageID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImageData", func(t *testing.T) { + obj := &CatalogObjectImage{} + var fernTestValueImageData *CatalogImage + obj.SetImageData(fernTestValueImageData) + assert.Equal(t, fernTestValueImageData, obj.ImageData) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogObjectImage(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + var expected string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectImage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectImage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + var expected *int64 + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectImage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetIsDeleted", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + var expected *bool + obj.IsDeleted = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsDeleted(), "getter should return the property value") + }) + + t.Run("GetIsDeleted_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + obj.IsDeleted = nil + + // Act & Assert + assert.Nil(t, obj.GetIsDeleted(), "getter should return nil when property is nil") + }) + + t.Run("GetIsDeleted_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectImage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsDeleted() // Should return zero value + }) + + t.Run("GetCustomAttributeValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + var expected map[string]*CatalogCustomAttributeValue + obj.CustomAttributeValues = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeValues(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + obj.CustomAttributeValues = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeValues(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectImage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeValues() // Should return zero value + }) + + t.Run("GetCatalogV1IDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + var expected []*CatalogV1ID + obj.CatalogV1IDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogV1IDs(), "getter should return the property value") + }) + + t.Run("GetCatalogV1IDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + obj.CatalogV1IDs = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogV1IDs(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogV1IDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectImage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogV1IDs() // Should return zero value + }) + + t.Run("GetPresentAtAllLocations", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + var expected *bool + obj.PresentAtAllLocations = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtAllLocations(), "getter should return the property value") + }) + + t.Run("GetPresentAtAllLocations_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + obj.PresentAtAllLocations = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtAllLocations(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtAllLocations_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectImage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtAllLocations() // Should return zero value + }) + + t.Run("GetPresentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + var expected []string + obj.PresentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetPresentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + obj.PresentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectImage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtLocationIDs() // Should return zero value + }) + + t.Run("GetAbsentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + var expected []string + obj.AbsentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAbsentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetAbsentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + obj.AbsentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetAbsentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetAbsentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectImage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAbsentAtLocationIDs() // Should return zero value + }) + + t.Run("GetImageID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + var expected *string + obj.ImageID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImageID(), "getter should return the property value") + }) + + t.Run("GetImageID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + obj.ImageID = nil + + // Act & Assert + assert.Nil(t, obj.GetImageID(), "getter should return nil when property is nil") + }) + + t.Run("GetImageID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectImage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImageID() // Should return zero value + }) + + t.Run("GetImageData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + var expected *CatalogImage + obj.ImageData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImageData(), "getter should return the property value") + }) + + t.Run("GetImageData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + obj.ImageData = nil + + // Act & Assert + assert.Nil(t, obj.GetImageData(), "getter should return nil when property is nil") + }) + + t.Run("GetImageData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectImage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImageData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogObjectImage(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsDeleted_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + var fernTestValueIsDeleted *bool + + // Act + obj.SetIsDeleted(fernTestValueIsDeleted) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttributeValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + + // Act + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogV1IDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + + // Act + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtAllLocations_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + var fernTestValuePresentAtAllLocations *bool + + // Act + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + var fernTestValuePresentAtLocationIDs []string + + // Act + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAbsentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + var fernTestValueAbsentAtLocationIDs []string + + // Act + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImageID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + var fernTestValueImageID *string + + // Act + obj.SetImageID(fernTestValueImageID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImageData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + var fernTestValueImageData *CatalogImage + + // Act + obj.SetImageData(fernTestValueImageData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogObjectItem(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &CatalogObjectItem{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CatalogObjectItem{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &CatalogObjectItem{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsDeleted", func(t *testing.T) { + obj := &CatalogObjectItem{} + var fernTestValueIsDeleted *bool + obj.SetIsDeleted(fernTestValueIsDeleted) + assert.Equal(t, fernTestValueIsDeleted, obj.IsDeleted) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttributeValues", func(t *testing.T) { + obj := &CatalogObjectItem{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + assert.Equal(t, fernTestValueCustomAttributeValues, obj.CustomAttributeValues) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogV1IDs", func(t *testing.T) { + obj := &CatalogObjectItem{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + assert.Equal(t, fernTestValueCatalogV1IDs, obj.CatalogV1IDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtAllLocations", func(t *testing.T) { + obj := &CatalogObjectItem{} + var fernTestValuePresentAtAllLocations *bool + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + assert.Equal(t, fernTestValuePresentAtAllLocations, obj.PresentAtAllLocations) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectItem{} + var fernTestValuePresentAtLocationIDs []string + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + assert.Equal(t, fernTestValuePresentAtLocationIDs, obj.PresentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAbsentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectItem{} + var fernTestValueAbsentAtLocationIDs []string + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + assert.Equal(t, fernTestValueAbsentAtLocationIDs, obj.AbsentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImageID", func(t *testing.T) { + obj := &CatalogObjectItem{} + var fernTestValueImageID *string + obj.SetImageID(fernTestValueImageID) + assert.Equal(t, fernTestValueImageID, obj.ImageID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetItemData", func(t *testing.T) { + obj := &CatalogObjectItem{} + var fernTestValueItemData *CatalogItem + obj.SetItemData(fernTestValueItemData) + assert.Equal(t, fernTestValueItemData, obj.ItemData) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogObjectItem(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + var expected string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + var expected *int64 + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetIsDeleted", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + var expected *bool + obj.IsDeleted = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsDeleted(), "getter should return the property value") + }) + + t.Run("GetIsDeleted_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + obj.IsDeleted = nil + + // Act & Assert + assert.Nil(t, obj.GetIsDeleted(), "getter should return nil when property is nil") + }) + + t.Run("GetIsDeleted_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsDeleted() // Should return zero value + }) + + t.Run("GetCustomAttributeValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + var expected map[string]*CatalogCustomAttributeValue + obj.CustomAttributeValues = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeValues(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + obj.CustomAttributeValues = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeValues(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeValues() // Should return zero value + }) + + t.Run("GetCatalogV1IDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + var expected []*CatalogV1ID + obj.CatalogV1IDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogV1IDs(), "getter should return the property value") + }) + + t.Run("GetCatalogV1IDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + obj.CatalogV1IDs = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogV1IDs(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogV1IDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogV1IDs() // Should return zero value + }) + + t.Run("GetPresentAtAllLocations", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + var expected *bool + obj.PresentAtAllLocations = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtAllLocations(), "getter should return the property value") + }) + + t.Run("GetPresentAtAllLocations_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + obj.PresentAtAllLocations = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtAllLocations(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtAllLocations_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtAllLocations() // Should return zero value + }) + + t.Run("GetPresentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + var expected []string + obj.PresentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetPresentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + obj.PresentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtLocationIDs() // Should return zero value + }) + + t.Run("GetAbsentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + var expected []string + obj.AbsentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAbsentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetAbsentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + obj.AbsentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetAbsentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetAbsentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAbsentAtLocationIDs() // Should return zero value + }) + + t.Run("GetImageID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + var expected *string + obj.ImageID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImageID(), "getter should return the property value") + }) + + t.Run("GetImageID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + obj.ImageID = nil + + // Act & Assert + assert.Nil(t, obj.GetImageID(), "getter should return nil when property is nil") + }) + + t.Run("GetImageID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImageID() // Should return zero value + }) + + t.Run("GetItemData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + var expected *CatalogItem + obj.ItemData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItemData(), "getter should return the property value") + }) + + t.Run("GetItemData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + obj.ItemData = nil + + // Act & Assert + assert.Nil(t, obj.GetItemData(), "getter should return nil when property is nil") + }) + + t.Run("GetItemData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItemData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogObjectItem(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsDeleted_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + var fernTestValueIsDeleted *bool + + // Act + obj.SetIsDeleted(fernTestValueIsDeleted) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttributeValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + + // Act + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogV1IDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + + // Act + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtAllLocations_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + var fernTestValuePresentAtAllLocations *bool + + // Act + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + var fernTestValuePresentAtLocationIDs []string + + // Act + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAbsentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + var fernTestValueAbsentAtLocationIDs []string + + // Act + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImageID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + var fernTestValueImageID *string + + // Act + obj.SetImageID(fernTestValueImageID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetItemData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + var fernTestValueItemData *CatalogItem + + // Act + obj.SetItemData(fernTestValueItemData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogObjectItemOption(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &CatalogObjectItemOption{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CatalogObjectItemOption{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &CatalogObjectItemOption{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsDeleted", func(t *testing.T) { + obj := &CatalogObjectItemOption{} + var fernTestValueIsDeleted *bool + obj.SetIsDeleted(fernTestValueIsDeleted) + assert.Equal(t, fernTestValueIsDeleted, obj.IsDeleted) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttributeValues", func(t *testing.T) { + obj := &CatalogObjectItemOption{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + assert.Equal(t, fernTestValueCustomAttributeValues, obj.CustomAttributeValues) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogV1IDs", func(t *testing.T) { + obj := &CatalogObjectItemOption{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + assert.Equal(t, fernTestValueCatalogV1IDs, obj.CatalogV1IDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtAllLocations", func(t *testing.T) { + obj := &CatalogObjectItemOption{} + var fernTestValuePresentAtAllLocations *bool + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + assert.Equal(t, fernTestValuePresentAtAllLocations, obj.PresentAtAllLocations) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectItemOption{} + var fernTestValuePresentAtLocationIDs []string + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + assert.Equal(t, fernTestValuePresentAtLocationIDs, obj.PresentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAbsentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectItemOption{} + var fernTestValueAbsentAtLocationIDs []string + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + assert.Equal(t, fernTestValueAbsentAtLocationIDs, obj.AbsentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImageID", func(t *testing.T) { + obj := &CatalogObjectItemOption{} + var fernTestValueImageID *string + obj.SetImageID(fernTestValueImageID) + assert.Equal(t, fernTestValueImageID, obj.ImageID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetItemOptionData", func(t *testing.T) { + obj := &CatalogObjectItemOption{} + var fernTestValueItemOptionData *CatalogItemOption + obj.SetItemOptionData(fernTestValueItemOptionData) + assert.Equal(t, fernTestValueItemOptionData, obj.ItemOptionData) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogObjectItemOption(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + var expected string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemOption + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemOption + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + var expected *int64 + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemOption + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetIsDeleted", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + var expected *bool + obj.IsDeleted = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsDeleted(), "getter should return the property value") + }) + + t.Run("GetIsDeleted_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + obj.IsDeleted = nil + + // Act & Assert + assert.Nil(t, obj.GetIsDeleted(), "getter should return nil when property is nil") + }) + + t.Run("GetIsDeleted_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemOption + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsDeleted() // Should return zero value + }) + + t.Run("GetCustomAttributeValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + var expected map[string]*CatalogCustomAttributeValue + obj.CustomAttributeValues = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeValues(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + obj.CustomAttributeValues = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeValues(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemOption + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeValues() // Should return zero value + }) + + t.Run("GetCatalogV1IDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + var expected []*CatalogV1ID + obj.CatalogV1IDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogV1IDs(), "getter should return the property value") + }) + + t.Run("GetCatalogV1IDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + obj.CatalogV1IDs = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogV1IDs(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogV1IDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemOption + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogV1IDs() // Should return zero value + }) + + t.Run("GetPresentAtAllLocations", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + var expected *bool + obj.PresentAtAllLocations = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtAllLocations(), "getter should return the property value") + }) + + t.Run("GetPresentAtAllLocations_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + obj.PresentAtAllLocations = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtAllLocations(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtAllLocations_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemOption + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtAllLocations() // Should return zero value + }) + + t.Run("GetPresentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + var expected []string + obj.PresentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetPresentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + obj.PresentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemOption + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtLocationIDs() // Should return zero value + }) + + t.Run("GetAbsentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + var expected []string + obj.AbsentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAbsentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetAbsentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + obj.AbsentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetAbsentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetAbsentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemOption + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAbsentAtLocationIDs() // Should return zero value + }) + + t.Run("GetImageID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + var expected *string + obj.ImageID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImageID(), "getter should return the property value") + }) + + t.Run("GetImageID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + obj.ImageID = nil + + // Act & Assert + assert.Nil(t, obj.GetImageID(), "getter should return nil when property is nil") + }) + + t.Run("GetImageID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemOption + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImageID() // Should return zero value + }) + + t.Run("GetItemOptionData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + var expected *CatalogItemOption + obj.ItemOptionData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItemOptionData(), "getter should return the property value") + }) + + t.Run("GetItemOptionData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + obj.ItemOptionData = nil + + // Act & Assert + assert.Nil(t, obj.GetItemOptionData(), "getter should return nil when property is nil") + }) + + t.Run("GetItemOptionData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemOption + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItemOptionData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogObjectItemOption(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsDeleted_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + var fernTestValueIsDeleted *bool + + // Act + obj.SetIsDeleted(fernTestValueIsDeleted) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttributeValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + + // Act + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogV1IDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + + // Act + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtAllLocations_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + var fernTestValuePresentAtAllLocations *bool + + // Act + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + var fernTestValuePresentAtLocationIDs []string + + // Act + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAbsentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + var fernTestValueAbsentAtLocationIDs []string + + // Act + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImageID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + var fernTestValueImageID *string + + // Act + obj.SetImageID(fernTestValueImageID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetItemOptionData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + var fernTestValueItemOptionData *CatalogItemOption + + // Act + obj.SetItemOptionData(fernTestValueItemOptionData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogObjectItemOptionValue(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &CatalogObjectItemOptionValue{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CatalogObjectItemOptionValue{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &CatalogObjectItemOptionValue{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsDeleted", func(t *testing.T) { + obj := &CatalogObjectItemOptionValue{} + var fernTestValueIsDeleted *bool + obj.SetIsDeleted(fernTestValueIsDeleted) + assert.Equal(t, fernTestValueIsDeleted, obj.IsDeleted) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttributeValues", func(t *testing.T) { + obj := &CatalogObjectItemOptionValue{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + assert.Equal(t, fernTestValueCustomAttributeValues, obj.CustomAttributeValues) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogV1IDs", func(t *testing.T) { + obj := &CatalogObjectItemOptionValue{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + assert.Equal(t, fernTestValueCatalogV1IDs, obj.CatalogV1IDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtAllLocations", func(t *testing.T) { + obj := &CatalogObjectItemOptionValue{} + var fernTestValuePresentAtAllLocations *bool + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + assert.Equal(t, fernTestValuePresentAtAllLocations, obj.PresentAtAllLocations) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectItemOptionValue{} + var fernTestValuePresentAtLocationIDs []string + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + assert.Equal(t, fernTestValuePresentAtLocationIDs, obj.PresentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAbsentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectItemOptionValue{} + var fernTestValueAbsentAtLocationIDs []string + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + assert.Equal(t, fernTestValueAbsentAtLocationIDs, obj.AbsentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImageID", func(t *testing.T) { + obj := &CatalogObjectItemOptionValue{} + var fernTestValueImageID *string + obj.SetImageID(fernTestValueImageID) + assert.Equal(t, fernTestValueImageID, obj.ImageID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetItemOptionValueData", func(t *testing.T) { + obj := &CatalogObjectItemOptionValue{} + var fernTestValueItemOptionValueData *CatalogItemOptionValue + obj.SetItemOptionValueData(fernTestValueItemOptionValueData) + assert.Equal(t, fernTestValueItemOptionValueData, obj.ItemOptionValueData) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogObjectItemOptionValue(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + var expected string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemOptionValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemOptionValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + var expected *int64 + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemOptionValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetIsDeleted", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + var expected *bool + obj.IsDeleted = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsDeleted(), "getter should return the property value") + }) + + t.Run("GetIsDeleted_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + obj.IsDeleted = nil + + // Act & Assert + assert.Nil(t, obj.GetIsDeleted(), "getter should return nil when property is nil") + }) + + t.Run("GetIsDeleted_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemOptionValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsDeleted() // Should return zero value + }) + + t.Run("GetCustomAttributeValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + var expected map[string]*CatalogCustomAttributeValue + obj.CustomAttributeValues = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeValues(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + obj.CustomAttributeValues = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeValues(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemOptionValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeValues() // Should return zero value + }) + + t.Run("GetCatalogV1IDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + var expected []*CatalogV1ID + obj.CatalogV1IDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogV1IDs(), "getter should return the property value") + }) + + t.Run("GetCatalogV1IDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + obj.CatalogV1IDs = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogV1IDs(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogV1IDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemOptionValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogV1IDs() // Should return zero value + }) + + t.Run("GetPresentAtAllLocations", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + var expected *bool + obj.PresentAtAllLocations = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtAllLocations(), "getter should return the property value") + }) + + t.Run("GetPresentAtAllLocations_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + obj.PresentAtAllLocations = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtAllLocations(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtAllLocations_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemOptionValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtAllLocations() // Should return zero value + }) + + t.Run("GetPresentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + var expected []string + obj.PresentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetPresentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + obj.PresentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemOptionValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtLocationIDs() // Should return zero value + }) + + t.Run("GetAbsentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + var expected []string + obj.AbsentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAbsentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetAbsentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + obj.AbsentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetAbsentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetAbsentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemOptionValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAbsentAtLocationIDs() // Should return zero value + }) + + t.Run("GetImageID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + var expected *string + obj.ImageID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImageID(), "getter should return the property value") + }) + + t.Run("GetImageID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + obj.ImageID = nil + + // Act & Assert + assert.Nil(t, obj.GetImageID(), "getter should return nil when property is nil") + }) + + t.Run("GetImageID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemOptionValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImageID() // Should return zero value + }) + + t.Run("GetItemOptionValueData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + var expected *CatalogItemOptionValue + obj.ItemOptionValueData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItemOptionValueData(), "getter should return the property value") + }) + + t.Run("GetItemOptionValueData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + obj.ItemOptionValueData = nil + + // Act & Assert + assert.Nil(t, obj.GetItemOptionValueData(), "getter should return nil when property is nil") + }) + + t.Run("GetItemOptionValueData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemOptionValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItemOptionValueData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogObjectItemOptionValue(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsDeleted_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + var fernTestValueIsDeleted *bool + + // Act + obj.SetIsDeleted(fernTestValueIsDeleted) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttributeValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + + // Act + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogV1IDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + + // Act + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtAllLocations_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + var fernTestValuePresentAtAllLocations *bool + + // Act + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + var fernTestValuePresentAtLocationIDs []string + + // Act + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAbsentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + var fernTestValueAbsentAtLocationIDs []string + + // Act + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImageID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + var fernTestValueImageID *string + + // Act + obj.SetImageID(fernTestValueImageID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetItemOptionValueData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + var fernTestValueItemOptionValueData *CatalogItemOptionValue + + // Act + obj.SetItemOptionValueData(fernTestValueItemOptionValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogObjectItemVariation(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &CatalogObjectItemVariation{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CatalogObjectItemVariation{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &CatalogObjectItemVariation{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsDeleted", func(t *testing.T) { + obj := &CatalogObjectItemVariation{} + var fernTestValueIsDeleted *bool + obj.SetIsDeleted(fernTestValueIsDeleted) + assert.Equal(t, fernTestValueIsDeleted, obj.IsDeleted) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttributeValues", func(t *testing.T) { + obj := &CatalogObjectItemVariation{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + assert.Equal(t, fernTestValueCustomAttributeValues, obj.CustomAttributeValues) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogV1IDs", func(t *testing.T) { + obj := &CatalogObjectItemVariation{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + assert.Equal(t, fernTestValueCatalogV1IDs, obj.CatalogV1IDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtAllLocations", func(t *testing.T) { + obj := &CatalogObjectItemVariation{} + var fernTestValuePresentAtAllLocations *bool + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + assert.Equal(t, fernTestValuePresentAtAllLocations, obj.PresentAtAllLocations) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectItemVariation{} + var fernTestValuePresentAtLocationIDs []string + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + assert.Equal(t, fernTestValuePresentAtLocationIDs, obj.PresentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAbsentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectItemVariation{} + var fernTestValueAbsentAtLocationIDs []string + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + assert.Equal(t, fernTestValueAbsentAtLocationIDs, obj.AbsentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImageID", func(t *testing.T) { + obj := &CatalogObjectItemVariation{} + var fernTestValueImageID *string + obj.SetImageID(fernTestValueImageID) + assert.Equal(t, fernTestValueImageID, obj.ImageID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetItemVariationData", func(t *testing.T) { + obj := &CatalogObjectItemVariation{} + var fernTestValueItemVariationData *CatalogItemVariation + obj.SetItemVariationData(fernTestValueItemVariationData) + assert.Equal(t, fernTestValueItemVariationData, obj.ItemVariationData) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogObjectItemVariation(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + var expected string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + var expected *int64 + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetIsDeleted", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + var expected *bool + obj.IsDeleted = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsDeleted(), "getter should return the property value") + }) + + t.Run("GetIsDeleted_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + obj.IsDeleted = nil + + // Act & Assert + assert.Nil(t, obj.GetIsDeleted(), "getter should return nil when property is nil") + }) + + t.Run("GetIsDeleted_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsDeleted() // Should return zero value + }) + + t.Run("GetCustomAttributeValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + var expected map[string]*CatalogCustomAttributeValue + obj.CustomAttributeValues = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeValues(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + obj.CustomAttributeValues = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeValues(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeValues() // Should return zero value + }) + + t.Run("GetCatalogV1IDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + var expected []*CatalogV1ID + obj.CatalogV1IDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogV1IDs(), "getter should return the property value") + }) + + t.Run("GetCatalogV1IDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + obj.CatalogV1IDs = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogV1IDs(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogV1IDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogV1IDs() // Should return zero value + }) + + t.Run("GetPresentAtAllLocations", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + var expected *bool + obj.PresentAtAllLocations = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtAllLocations(), "getter should return the property value") + }) + + t.Run("GetPresentAtAllLocations_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + obj.PresentAtAllLocations = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtAllLocations(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtAllLocations_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtAllLocations() // Should return zero value + }) + + t.Run("GetPresentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + var expected []string + obj.PresentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetPresentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + obj.PresentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtLocationIDs() // Should return zero value + }) + + t.Run("GetAbsentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + var expected []string + obj.AbsentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAbsentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetAbsentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + obj.AbsentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetAbsentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetAbsentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAbsentAtLocationIDs() // Should return zero value + }) + + t.Run("GetImageID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + var expected *string + obj.ImageID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImageID(), "getter should return the property value") + }) + + t.Run("GetImageID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + obj.ImageID = nil + + // Act & Assert + assert.Nil(t, obj.GetImageID(), "getter should return nil when property is nil") + }) + + t.Run("GetImageID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImageID() // Should return zero value + }) + + t.Run("GetItemVariationData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + var expected *CatalogItemVariation + obj.ItemVariationData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItemVariationData(), "getter should return the property value") + }) + + t.Run("GetItemVariationData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + obj.ItemVariationData = nil + + // Act & Assert + assert.Nil(t, obj.GetItemVariationData(), "getter should return nil when property is nil") + }) + + t.Run("GetItemVariationData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItemVariationData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogObjectItemVariation(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsDeleted_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + var fernTestValueIsDeleted *bool + + // Act + obj.SetIsDeleted(fernTestValueIsDeleted) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttributeValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + + // Act + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogV1IDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + + // Act + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtAllLocations_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + var fernTestValuePresentAtAllLocations *bool + + // Act + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + var fernTestValuePresentAtLocationIDs []string + + // Act + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAbsentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + var fernTestValueAbsentAtLocationIDs []string + + // Act + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImageID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + var fernTestValueImageID *string + + // Act + obj.SetImageID(fernTestValueImageID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetItemVariationData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + var fernTestValueItemVariationData *CatalogItemVariation + + // Act + obj.SetItemVariationData(fernTestValueItemVariationData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogObjectMeasurementUnit(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &CatalogObjectMeasurementUnit{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CatalogObjectMeasurementUnit{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &CatalogObjectMeasurementUnit{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsDeleted", func(t *testing.T) { + obj := &CatalogObjectMeasurementUnit{} + var fernTestValueIsDeleted *bool + obj.SetIsDeleted(fernTestValueIsDeleted) + assert.Equal(t, fernTestValueIsDeleted, obj.IsDeleted) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttributeValues", func(t *testing.T) { + obj := &CatalogObjectMeasurementUnit{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + assert.Equal(t, fernTestValueCustomAttributeValues, obj.CustomAttributeValues) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogV1IDs", func(t *testing.T) { + obj := &CatalogObjectMeasurementUnit{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + assert.Equal(t, fernTestValueCatalogV1IDs, obj.CatalogV1IDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtAllLocations", func(t *testing.T) { + obj := &CatalogObjectMeasurementUnit{} + var fernTestValuePresentAtAllLocations *bool + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + assert.Equal(t, fernTestValuePresentAtAllLocations, obj.PresentAtAllLocations) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectMeasurementUnit{} + var fernTestValuePresentAtLocationIDs []string + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + assert.Equal(t, fernTestValuePresentAtLocationIDs, obj.PresentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAbsentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectMeasurementUnit{} + var fernTestValueAbsentAtLocationIDs []string + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + assert.Equal(t, fernTestValueAbsentAtLocationIDs, obj.AbsentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImageID", func(t *testing.T) { + obj := &CatalogObjectMeasurementUnit{} + var fernTestValueImageID *string + obj.SetImageID(fernTestValueImageID) + assert.Equal(t, fernTestValueImageID, obj.ImageID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMeasurementUnitData", func(t *testing.T) { + obj := &CatalogObjectMeasurementUnit{} + var fernTestValueMeasurementUnitData *CatalogMeasurementUnit + obj.SetMeasurementUnitData(fernTestValueMeasurementUnitData) + assert.Equal(t, fernTestValueMeasurementUnitData, obj.MeasurementUnitData) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogObjectMeasurementUnit(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + var expected string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectMeasurementUnit + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectMeasurementUnit + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + var expected *int64 + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectMeasurementUnit + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetIsDeleted", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + var expected *bool + obj.IsDeleted = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsDeleted(), "getter should return the property value") + }) + + t.Run("GetIsDeleted_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + obj.IsDeleted = nil + + // Act & Assert + assert.Nil(t, obj.GetIsDeleted(), "getter should return nil when property is nil") + }) + + t.Run("GetIsDeleted_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectMeasurementUnit + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsDeleted() // Should return zero value + }) + + t.Run("GetCustomAttributeValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + var expected map[string]*CatalogCustomAttributeValue + obj.CustomAttributeValues = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeValues(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + obj.CustomAttributeValues = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeValues(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectMeasurementUnit + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeValues() // Should return zero value + }) + + t.Run("GetCatalogV1IDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + var expected []*CatalogV1ID + obj.CatalogV1IDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogV1IDs(), "getter should return the property value") + }) + + t.Run("GetCatalogV1IDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + obj.CatalogV1IDs = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogV1IDs(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogV1IDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectMeasurementUnit + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogV1IDs() // Should return zero value + }) + + t.Run("GetPresentAtAllLocations", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + var expected *bool + obj.PresentAtAllLocations = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtAllLocations(), "getter should return the property value") + }) + + t.Run("GetPresentAtAllLocations_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + obj.PresentAtAllLocations = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtAllLocations(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtAllLocations_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectMeasurementUnit + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtAllLocations() // Should return zero value + }) + + t.Run("GetPresentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + var expected []string + obj.PresentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetPresentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + obj.PresentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectMeasurementUnit + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtLocationIDs() // Should return zero value + }) + + t.Run("GetAbsentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + var expected []string + obj.AbsentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAbsentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetAbsentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + obj.AbsentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetAbsentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetAbsentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectMeasurementUnit + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAbsentAtLocationIDs() // Should return zero value + }) + + t.Run("GetImageID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + var expected *string + obj.ImageID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImageID(), "getter should return the property value") + }) + + t.Run("GetImageID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + obj.ImageID = nil + + // Act & Assert + assert.Nil(t, obj.GetImageID(), "getter should return nil when property is nil") + }) + + t.Run("GetImageID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectMeasurementUnit + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImageID() // Should return zero value + }) + + t.Run("GetMeasurementUnitData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + var expected *CatalogMeasurementUnit + obj.MeasurementUnitData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMeasurementUnitData(), "getter should return the property value") + }) + + t.Run("GetMeasurementUnitData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + obj.MeasurementUnitData = nil + + // Act & Assert + assert.Nil(t, obj.GetMeasurementUnitData(), "getter should return nil when property is nil") + }) + + t.Run("GetMeasurementUnitData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectMeasurementUnit + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMeasurementUnitData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogObjectMeasurementUnit(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsDeleted_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + var fernTestValueIsDeleted *bool + + // Act + obj.SetIsDeleted(fernTestValueIsDeleted) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttributeValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + + // Act + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogV1IDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + + // Act + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtAllLocations_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + var fernTestValuePresentAtAllLocations *bool + + // Act + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + var fernTestValuePresentAtLocationIDs []string + + // Act + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAbsentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + var fernTestValueAbsentAtLocationIDs []string + + // Act + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImageID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + var fernTestValueImageID *string + + // Act + obj.SetImageID(fernTestValueImageID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMeasurementUnitData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + var fernTestValueMeasurementUnitData *CatalogMeasurementUnit + + // Act + obj.SetMeasurementUnitData(fernTestValueMeasurementUnitData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogObjectModifier(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &CatalogObjectModifier{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CatalogObjectModifier{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &CatalogObjectModifier{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsDeleted", func(t *testing.T) { + obj := &CatalogObjectModifier{} + var fernTestValueIsDeleted *bool + obj.SetIsDeleted(fernTestValueIsDeleted) + assert.Equal(t, fernTestValueIsDeleted, obj.IsDeleted) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttributeValues", func(t *testing.T) { + obj := &CatalogObjectModifier{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + assert.Equal(t, fernTestValueCustomAttributeValues, obj.CustomAttributeValues) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogV1IDs", func(t *testing.T) { + obj := &CatalogObjectModifier{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + assert.Equal(t, fernTestValueCatalogV1IDs, obj.CatalogV1IDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtAllLocations", func(t *testing.T) { + obj := &CatalogObjectModifier{} + var fernTestValuePresentAtAllLocations *bool + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + assert.Equal(t, fernTestValuePresentAtAllLocations, obj.PresentAtAllLocations) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectModifier{} + var fernTestValuePresentAtLocationIDs []string + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + assert.Equal(t, fernTestValuePresentAtLocationIDs, obj.PresentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAbsentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectModifier{} + var fernTestValueAbsentAtLocationIDs []string + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + assert.Equal(t, fernTestValueAbsentAtLocationIDs, obj.AbsentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImageID", func(t *testing.T) { + obj := &CatalogObjectModifier{} + var fernTestValueImageID *string + obj.SetImageID(fernTestValueImageID) + assert.Equal(t, fernTestValueImageID, obj.ImageID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetModifierData", func(t *testing.T) { + obj := &CatalogObjectModifier{} + var fernTestValueModifierData *CatalogModifier + obj.SetModifierData(fernTestValueModifierData) + assert.Equal(t, fernTestValueModifierData, obj.ModifierData) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogObjectModifier(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + var expected string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + var expected *int64 + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetIsDeleted", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + var expected *bool + obj.IsDeleted = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsDeleted(), "getter should return the property value") + }) + + t.Run("GetIsDeleted_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + obj.IsDeleted = nil + + // Act & Assert + assert.Nil(t, obj.GetIsDeleted(), "getter should return nil when property is nil") + }) + + t.Run("GetIsDeleted_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsDeleted() // Should return zero value + }) + + t.Run("GetCustomAttributeValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + var expected map[string]*CatalogCustomAttributeValue + obj.CustomAttributeValues = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeValues(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + obj.CustomAttributeValues = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeValues(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeValues() // Should return zero value + }) + + t.Run("GetCatalogV1IDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + var expected []*CatalogV1ID + obj.CatalogV1IDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogV1IDs(), "getter should return the property value") + }) + + t.Run("GetCatalogV1IDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + obj.CatalogV1IDs = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogV1IDs(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogV1IDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogV1IDs() // Should return zero value + }) + + t.Run("GetPresentAtAllLocations", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + var expected *bool + obj.PresentAtAllLocations = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtAllLocations(), "getter should return the property value") + }) + + t.Run("GetPresentAtAllLocations_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + obj.PresentAtAllLocations = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtAllLocations(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtAllLocations_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtAllLocations() // Should return zero value + }) + + t.Run("GetPresentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + var expected []string + obj.PresentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetPresentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + obj.PresentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtLocationIDs() // Should return zero value + }) + + t.Run("GetAbsentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + var expected []string + obj.AbsentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAbsentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetAbsentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + obj.AbsentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetAbsentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetAbsentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAbsentAtLocationIDs() // Should return zero value + }) + + t.Run("GetImageID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + var expected *string + obj.ImageID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImageID(), "getter should return the property value") + }) + + t.Run("GetImageID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + obj.ImageID = nil + + // Act & Assert + assert.Nil(t, obj.GetImageID(), "getter should return nil when property is nil") + }) + + t.Run("GetImageID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImageID() // Should return zero value + }) + + t.Run("GetModifierData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + var expected *CatalogModifier + obj.ModifierData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetModifierData(), "getter should return the property value") + }) + + t.Run("GetModifierData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + obj.ModifierData = nil + + // Act & Assert + assert.Nil(t, obj.GetModifierData(), "getter should return nil when property is nil") + }) + + t.Run("GetModifierData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetModifierData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogObjectModifier(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsDeleted_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + var fernTestValueIsDeleted *bool + + // Act + obj.SetIsDeleted(fernTestValueIsDeleted) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttributeValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + + // Act + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogV1IDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + + // Act + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtAllLocations_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + var fernTestValuePresentAtAllLocations *bool + + // Act + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + var fernTestValuePresentAtLocationIDs []string + + // Act + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAbsentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + var fernTestValueAbsentAtLocationIDs []string + + // Act + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImageID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + var fernTestValueImageID *string + + // Act + obj.SetImageID(fernTestValueImageID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetModifierData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + var fernTestValueModifierData *CatalogModifier + + // Act + obj.SetModifierData(fernTestValueModifierData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogObjectModifierList(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &CatalogObjectModifierList{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CatalogObjectModifierList{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &CatalogObjectModifierList{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsDeleted", func(t *testing.T) { + obj := &CatalogObjectModifierList{} + var fernTestValueIsDeleted *bool + obj.SetIsDeleted(fernTestValueIsDeleted) + assert.Equal(t, fernTestValueIsDeleted, obj.IsDeleted) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttributeValues", func(t *testing.T) { + obj := &CatalogObjectModifierList{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + assert.Equal(t, fernTestValueCustomAttributeValues, obj.CustomAttributeValues) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogV1IDs", func(t *testing.T) { + obj := &CatalogObjectModifierList{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + assert.Equal(t, fernTestValueCatalogV1IDs, obj.CatalogV1IDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtAllLocations", func(t *testing.T) { + obj := &CatalogObjectModifierList{} + var fernTestValuePresentAtAllLocations *bool + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + assert.Equal(t, fernTestValuePresentAtAllLocations, obj.PresentAtAllLocations) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectModifierList{} + var fernTestValuePresentAtLocationIDs []string + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + assert.Equal(t, fernTestValuePresentAtLocationIDs, obj.PresentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAbsentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectModifierList{} + var fernTestValueAbsentAtLocationIDs []string + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + assert.Equal(t, fernTestValueAbsentAtLocationIDs, obj.AbsentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImageID", func(t *testing.T) { + obj := &CatalogObjectModifierList{} + var fernTestValueImageID *string + obj.SetImageID(fernTestValueImageID) + assert.Equal(t, fernTestValueImageID, obj.ImageID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetModifierListData", func(t *testing.T) { + obj := &CatalogObjectModifierList{} + var fernTestValueModifierListData *CatalogModifierList + obj.SetModifierListData(fernTestValueModifierListData) + assert.Equal(t, fernTestValueModifierListData, obj.ModifierListData) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogObjectModifierList(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + var expected string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectModifierList + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectModifierList + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + var expected *int64 + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectModifierList + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetIsDeleted", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + var expected *bool + obj.IsDeleted = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsDeleted(), "getter should return the property value") + }) + + t.Run("GetIsDeleted_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + obj.IsDeleted = nil + + // Act & Assert + assert.Nil(t, obj.GetIsDeleted(), "getter should return nil when property is nil") + }) + + t.Run("GetIsDeleted_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectModifierList + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsDeleted() // Should return zero value + }) + + t.Run("GetCustomAttributeValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + var expected map[string]*CatalogCustomAttributeValue + obj.CustomAttributeValues = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeValues(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + obj.CustomAttributeValues = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeValues(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectModifierList + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeValues() // Should return zero value + }) + + t.Run("GetCatalogV1IDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + var expected []*CatalogV1ID + obj.CatalogV1IDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogV1IDs(), "getter should return the property value") + }) + + t.Run("GetCatalogV1IDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + obj.CatalogV1IDs = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogV1IDs(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogV1IDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectModifierList + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogV1IDs() // Should return zero value + }) + + t.Run("GetPresentAtAllLocations", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + var expected *bool + obj.PresentAtAllLocations = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtAllLocations(), "getter should return the property value") + }) + + t.Run("GetPresentAtAllLocations_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + obj.PresentAtAllLocations = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtAllLocations(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtAllLocations_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectModifierList + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtAllLocations() // Should return zero value + }) + + t.Run("GetPresentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + var expected []string + obj.PresentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetPresentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + obj.PresentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectModifierList + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtLocationIDs() // Should return zero value + }) + + t.Run("GetAbsentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + var expected []string + obj.AbsentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAbsentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetAbsentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + obj.AbsentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetAbsentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetAbsentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectModifierList + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAbsentAtLocationIDs() // Should return zero value + }) + + t.Run("GetImageID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + var expected *string + obj.ImageID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImageID(), "getter should return the property value") + }) + + t.Run("GetImageID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + obj.ImageID = nil + + // Act & Assert + assert.Nil(t, obj.GetImageID(), "getter should return nil when property is nil") + }) + + t.Run("GetImageID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectModifierList + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImageID() // Should return zero value + }) + + t.Run("GetModifierListData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + var expected *CatalogModifierList + obj.ModifierListData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetModifierListData(), "getter should return the property value") + }) + + t.Run("GetModifierListData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + obj.ModifierListData = nil + + // Act & Assert + assert.Nil(t, obj.GetModifierListData(), "getter should return nil when property is nil") + }) + + t.Run("GetModifierListData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectModifierList + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetModifierListData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogObjectModifierList(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsDeleted_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + var fernTestValueIsDeleted *bool + + // Act + obj.SetIsDeleted(fernTestValueIsDeleted) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttributeValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + + // Act + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogV1IDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + + // Act + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtAllLocations_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + var fernTestValuePresentAtAllLocations *bool + + // Act + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + var fernTestValuePresentAtLocationIDs []string + + // Act + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAbsentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + var fernTestValueAbsentAtLocationIDs []string + + // Act + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImageID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + var fernTestValueImageID *string + + // Act + obj.SetImageID(fernTestValueImageID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetModifierListData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + var fernTestValueModifierListData *CatalogModifierList + + // Act + obj.SetModifierListData(fernTestValueModifierListData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogObjectPricingRule(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &CatalogObjectPricingRule{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CatalogObjectPricingRule{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &CatalogObjectPricingRule{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsDeleted", func(t *testing.T) { + obj := &CatalogObjectPricingRule{} + var fernTestValueIsDeleted *bool + obj.SetIsDeleted(fernTestValueIsDeleted) + assert.Equal(t, fernTestValueIsDeleted, obj.IsDeleted) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttributeValues", func(t *testing.T) { + obj := &CatalogObjectPricingRule{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + assert.Equal(t, fernTestValueCustomAttributeValues, obj.CustomAttributeValues) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogV1IDs", func(t *testing.T) { + obj := &CatalogObjectPricingRule{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + assert.Equal(t, fernTestValueCatalogV1IDs, obj.CatalogV1IDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtAllLocations", func(t *testing.T) { + obj := &CatalogObjectPricingRule{} + var fernTestValuePresentAtAllLocations *bool + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + assert.Equal(t, fernTestValuePresentAtAllLocations, obj.PresentAtAllLocations) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectPricingRule{} + var fernTestValuePresentAtLocationIDs []string + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + assert.Equal(t, fernTestValuePresentAtLocationIDs, obj.PresentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAbsentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectPricingRule{} + var fernTestValueAbsentAtLocationIDs []string + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + assert.Equal(t, fernTestValueAbsentAtLocationIDs, obj.AbsentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImageID", func(t *testing.T) { + obj := &CatalogObjectPricingRule{} + var fernTestValueImageID *string + obj.SetImageID(fernTestValueImageID) + assert.Equal(t, fernTestValueImageID, obj.ImageID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPricingRuleData", func(t *testing.T) { + obj := &CatalogObjectPricingRule{} + var fernTestValuePricingRuleData *CatalogPricingRule + obj.SetPricingRuleData(fernTestValuePricingRuleData) + assert.Equal(t, fernTestValuePricingRuleData, obj.PricingRuleData) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogObjectPricingRule(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + var expected string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectPricingRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectPricingRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + var expected *int64 + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectPricingRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetIsDeleted", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + var expected *bool + obj.IsDeleted = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsDeleted(), "getter should return the property value") + }) + + t.Run("GetIsDeleted_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + obj.IsDeleted = nil + + // Act & Assert + assert.Nil(t, obj.GetIsDeleted(), "getter should return nil when property is nil") + }) + + t.Run("GetIsDeleted_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectPricingRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsDeleted() // Should return zero value + }) + + t.Run("GetCustomAttributeValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + var expected map[string]*CatalogCustomAttributeValue + obj.CustomAttributeValues = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeValues(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + obj.CustomAttributeValues = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeValues(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectPricingRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeValues() // Should return zero value + }) + + t.Run("GetCatalogV1IDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + var expected []*CatalogV1ID + obj.CatalogV1IDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogV1IDs(), "getter should return the property value") + }) + + t.Run("GetCatalogV1IDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + obj.CatalogV1IDs = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogV1IDs(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogV1IDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectPricingRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogV1IDs() // Should return zero value + }) + + t.Run("GetPresentAtAllLocations", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + var expected *bool + obj.PresentAtAllLocations = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtAllLocations(), "getter should return the property value") + }) + + t.Run("GetPresentAtAllLocations_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + obj.PresentAtAllLocations = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtAllLocations(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtAllLocations_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectPricingRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtAllLocations() // Should return zero value + }) + + t.Run("GetPresentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + var expected []string + obj.PresentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetPresentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + obj.PresentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectPricingRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtLocationIDs() // Should return zero value + }) + + t.Run("GetAbsentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + var expected []string + obj.AbsentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAbsentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetAbsentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + obj.AbsentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetAbsentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetAbsentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectPricingRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAbsentAtLocationIDs() // Should return zero value + }) + + t.Run("GetImageID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + var expected *string + obj.ImageID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImageID(), "getter should return the property value") + }) + + t.Run("GetImageID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + obj.ImageID = nil + + // Act & Assert + assert.Nil(t, obj.GetImageID(), "getter should return nil when property is nil") + }) + + t.Run("GetImageID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectPricingRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImageID() // Should return zero value + }) + + t.Run("GetPricingRuleData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + var expected *CatalogPricingRule + obj.PricingRuleData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPricingRuleData(), "getter should return the property value") + }) + + t.Run("GetPricingRuleData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + obj.PricingRuleData = nil + + // Act & Assert + assert.Nil(t, obj.GetPricingRuleData(), "getter should return nil when property is nil") + }) + + t.Run("GetPricingRuleData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectPricingRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPricingRuleData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogObjectPricingRule(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsDeleted_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + var fernTestValueIsDeleted *bool + + // Act + obj.SetIsDeleted(fernTestValueIsDeleted) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttributeValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + + // Act + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogV1IDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + + // Act + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtAllLocations_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + var fernTestValuePresentAtAllLocations *bool + + // Act + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + var fernTestValuePresentAtLocationIDs []string + + // Act + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAbsentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + var fernTestValueAbsentAtLocationIDs []string + + // Act + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImageID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + var fernTestValueImageID *string + + // Act + obj.SetImageID(fernTestValueImageID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPricingRuleData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + var fernTestValuePricingRuleData *CatalogPricingRule + + // Act + obj.SetPricingRuleData(fernTestValuePricingRuleData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogObjectProductSet(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &CatalogObjectProductSet{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CatalogObjectProductSet{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &CatalogObjectProductSet{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsDeleted", func(t *testing.T) { + obj := &CatalogObjectProductSet{} + var fernTestValueIsDeleted *bool + obj.SetIsDeleted(fernTestValueIsDeleted) + assert.Equal(t, fernTestValueIsDeleted, obj.IsDeleted) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttributeValues", func(t *testing.T) { + obj := &CatalogObjectProductSet{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + assert.Equal(t, fernTestValueCustomAttributeValues, obj.CustomAttributeValues) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogV1IDs", func(t *testing.T) { + obj := &CatalogObjectProductSet{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + assert.Equal(t, fernTestValueCatalogV1IDs, obj.CatalogV1IDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtAllLocations", func(t *testing.T) { + obj := &CatalogObjectProductSet{} + var fernTestValuePresentAtAllLocations *bool + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + assert.Equal(t, fernTestValuePresentAtAllLocations, obj.PresentAtAllLocations) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectProductSet{} + var fernTestValuePresentAtLocationIDs []string + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + assert.Equal(t, fernTestValuePresentAtLocationIDs, obj.PresentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAbsentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectProductSet{} + var fernTestValueAbsentAtLocationIDs []string + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + assert.Equal(t, fernTestValueAbsentAtLocationIDs, obj.AbsentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImageID", func(t *testing.T) { + obj := &CatalogObjectProductSet{} + var fernTestValueImageID *string + obj.SetImageID(fernTestValueImageID) + assert.Equal(t, fernTestValueImageID, obj.ImageID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetProductSetData", func(t *testing.T) { + obj := &CatalogObjectProductSet{} + var fernTestValueProductSetData *CatalogProductSet + obj.SetProductSetData(fernTestValueProductSetData) + assert.Equal(t, fernTestValueProductSetData, obj.ProductSetData) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogObjectProductSet(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + var expected string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectProductSet + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectProductSet + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + var expected *int64 + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectProductSet + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetIsDeleted", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + var expected *bool + obj.IsDeleted = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsDeleted(), "getter should return the property value") + }) + + t.Run("GetIsDeleted_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + obj.IsDeleted = nil + + // Act & Assert + assert.Nil(t, obj.GetIsDeleted(), "getter should return nil when property is nil") + }) + + t.Run("GetIsDeleted_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectProductSet + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsDeleted() // Should return zero value + }) + + t.Run("GetCustomAttributeValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + var expected map[string]*CatalogCustomAttributeValue + obj.CustomAttributeValues = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeValues(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + obj.CustomAttributeValues = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeValues(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectProductSet + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeValues() // Should return zero value + }) + + t.Run("GetCatalogV1IDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + var expected []*CatalogV1ID + obj.CatalogV1IDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogV1IDs(), "getter should return the property value") + }) + + t.Run("GetCatalogV1IDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + obj.CatalogV1IDs = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogV1IDs(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogV1IDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectProductSet + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogV1IDs() // Should return zero value + }) + + t.Run("GetPresentAtAllLocations", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + var expected *bool + obj.PresentAtAllLocations = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtAllLocations(), "getter should return the property value") + }) + + t.Run("GetPresentAtAllLocations_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + obj.PresentAtAllLocations = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtAllLocations(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtAllLocations_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectProductSet + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtAllLocations() // Should return zero value + }) + + t.Run("GetPresentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + var expected []string + obj.PresentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetPresentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + obj.PresentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectProductSet + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtLocationIDs() // Should return zero value + }) + + t.Run("GetAbsentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + var expected []string + obj.AbsentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAbsentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetAbsentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + obj.AbsentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetAbsentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetAbsentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectProductSet + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAbsentAtLocationIDs() // Should return zero value + }) + + t.Run("GetImageID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + var expected *string + obj.ImageID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImageID(), "getter should return the property value") + }) + + t.Run("GetImageID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + obj.ImageID = nil + + // Act & Assert + assert.Nil(t, obj.GetImageID(), "getter should return nil when property is nil") + }) + + t.Run("GetImageID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectProductSet + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImageID() // Should return zero value + }) + + t.Run("GetProductSetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + var expected *CatalogProductSet + obj.ProductSetData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetProductSetData(), "getter should return the property value") + }) + + t.Run("GetProductSetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + obj.ProductSetData = nil + + // Act & Assert + assert.Nil(t, obj.GetProductSetData(), "getter should return nil when property is nil") + }) + + t.Run("GetProductSetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectProductSet + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetProductSetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogObjectProductSet(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsDeleted_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + var fernTestValueIsDeleted *bool + + // Act + obj.SetIsDeleted(fernTestValueIsDeleted) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttributeValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + + // Act + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogV1IDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + + // Act + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtAllLocations_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + var fernTestValuePresentAtAllLocations *bool + + // Act + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + var fernTestValuePresentAtLocationIDs []string + + // Act + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAbsentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + var fernTestValueAbsentAtLocationIDs []string + + // Act + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImageID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + var fernTestValueImageID *string + + // Act + obj.SetImageID(fernTestValueImageID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetProductSetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + var fernTestValueProductSetData *CatalogProductSet + + // Act + obj.SetProductSetData(fernTestValueProductSetData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogObjectQuickAmountsSettings(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &CatalogObjectQuickAmountsSettings{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CatalogObjectQuickAmountsSettings{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &CatalogObjectQuickAmountsSettings{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsDeleted", func(t *testing.T) { + obj := &CatalogObjectQuickAmountsSettings{} + var fernTestValueIsDeleted *bool + obj.SetIsDeleted(fernTestValueIsDeleted) + assert.Equal(t, fernTestValueIsDeleted, obj.IsDeleted) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttributeValues", func(t *testing.T) { + obj := &CatalogObjectQuickAmountsSettings{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + assert.Equal(t, fernTestValueCustomAttributeValues, obj.CustomAttributeValues) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogV1IDs", func(t *testing.T) { + obj := &CatalogObjectQuickAmountsSettings{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + assert.Equal(t, fernTestValueCatalogV1IDs, obj.CatalogV1IDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtAllLocations", func(t *testing.T) { + obj := &CatalogObjectQuickAmountsSettings{} + var fernTestValuePresentAtAllLocations *bool + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + assert.Equal(t, fernTestValuePresentAtAllLocations, obj.PresentAtAllLocations) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectQuickAmountsSettings{} + var fernTestValuePresentAtLocationIDs []string + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + assert.Equal(t, fernTestValuePresentAtLocationIDs, obj.PresentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAbsentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectQuickAmountsSettings{} + var fernTestValueAbsentAtLocationIDs []string + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + assert.Equal(t, fernTestValueAbsentAtLocationIDs, obj.AbsentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImageID", func(t *testing.T) { + obj := &CatalogObjectQuickAmountsSettings{} + var fernTestValueImageID *string + obj.SetImageID(fernTestValueImageID) + assert.Equal(t, fernTestValueImageID, obj.ImageID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuickAmountsSettingsData", func(t *testing.T) { + obj := &CatalogObjectQuickAmountsSettings{} + var fernTestValueQuickAmountsSettingsData *CatalogQuickAmountsSettings + obj.SetQuickAmountsSettingsData(fernTestValueQuickAmountsSettingsData) + assert.Equal(t, fernTestValueQuickAmountsSettingsData, obj.QuickAmountsSettingsData) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogObjectQuickAmountsSettings(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + var expected string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectQuickAmountsSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectQuickAmountsSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + var expected *int64 + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectQuickAmountsSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetIsDeleted", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + var expected *bool + obj.IsDeleted = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsDeleted(), "getter should return the property value") + }) + + t.Run("GetIsDeleted_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + obj.IsDeleted = nil + + // Act & Assert + assert.Nil(t, obj.GetIsDeleted(), "getter should return nil when property is nil") + }) + + t.Run("GetIsDeleted_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectQuickAmountsSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsDeleted() // Should return zero value + }) + + t.Run("GetCustomAttributeValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + var expected map[string]*CatalogCustomAttributeValue + obj.CustomAttributeValues = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeValues(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + obj.CustomAttributeValues = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeValues(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectQuickAmountsSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeValues() // Should return zero value + }) + + t.Run("GetCatalogV1IDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + var expected []*CatalogV1ID + obj.CatalogV1IDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogV1IDs(), "getter should return the property value") + }) + + t.Run("GetCatalogV1IDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + obj.CatalogV1IDs = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogV1IDs(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogV1IDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectQuickAmountsSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogV1IDs() // Should return zero value + }) + + t.Run("GetPresentAtAllLocations", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + var expected *bool + obj.PresentAtAllLocations = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtAllLocations(), "getter should return the property value") + }) + + t.Run("GetPresentAtAllLocations_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + obj.PresentAtAllLocations = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtAllLocations(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtAllLocations_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectQuickAmountsSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtAllLocations() // Should return zero value + }) + + t.Run("GetPresentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + var expected []string + obj.PresentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetPresentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + obj.PresentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectQuickAmountsSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtLocationIDs() // Should return zero value + }) + + t.Run("GetAbsentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + var expected []string + obj.AbsentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAbsentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetAbsentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + obj.AbsentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetAbsentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetAbsentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectQuickAmountsSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAbsentAtLocationIDs() // Should return zero value + }) + + t.Run("GetImageID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + var expected *string + obj.ImageID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImageID(), "getter should return the property value") + }) + + t.Run("GetImageID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + obj.ImageID = nil + + // Act & Assert + assert.Nil(t, obj.GetImageID(), "getter should return nil when property is nil") + }) + + t.Run("GetImageID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectQuickAmountsSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImageID() // Should return zero value + }) + + t.Run("GetQuickAmountsSettingsData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + var expected *CatalogQuickAmountsSettings + obj.QuickAmountsSettingsData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQuickAmountsSettingsData(), "getter should return the property value") + }) + + t.Run("GetQuickAmountsSettingsData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + obj.QuickAmountsSettingsData = nil + + // Act & Assert + assert.Nil(t, obj.GetQuickAmountsSettingsData(), "getter should return nil when property is nil") + }) + + t.Run("GetQuickAmountsSettingsData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectQuickAmountsSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQuickAmountsSettingsData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogObjectQuickAmountsSettings(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsDeleted_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + var fernTestValueIsDeleted *bool + + // Act + obj.SetIsDeleted(fernTestValueIsDeleted) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttributeValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + + // Act + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogV1IDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + + // Act + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtAllLocations_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + var fernTestValuePresentAtAllLocations *bool + + // Act + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + var fernTestValuePresentAtLocationIDs []string + + // Act + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAbsentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + var fernTestValueAbsentAtLocationIDs []string + + // Act + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImageID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + var fernTestValueImageID *string + + // Act + obj.SetImageID(fernTestValueImageID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuickAmountsSettingsData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + var fernTestValueQuickAmountsSettingsData *CatalogQuickAmountsSettings + + // Act + obj.SetQuickAmountsSettingsData(fernTestValueQuickAmountsSettingsData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogObjectReference(t *testing.T) { + t.Run("SetObjectID", func(t *testing.T) { + obj := &CatalogObjectReference{} + var fernTestValueObjectID *string + obj.SetObjectID(fernTestValueObjectID) + assert.Equal(t, fernTestValueObjectID, obj.ObjectID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogVersion", func(t *testing.T) { + obj := &CatalogObjectReference{} + var fernTestValueCatalogVersion *int64 + obj.SetCatalogVersion(fernTestValueCatalogVersion) + assert.Equal(t, fernTestValueCatalogVersion, obj.CatalogVersion) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogObjectReference(t *testing.T) { + t.Run("GetObjectID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectReference{} + var expected *string + obj.ObjectID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObjectID(), "getter should return the property value") + }) + + t.Run("GetObjectID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectReference{} + obj.ObjectID = nil + + // Act & Assert + assert.Nil(t, obj.GetObjectID(), "getter should return nil when property is nil") + }) + + t.Run("GetObjectID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectReference + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObjectID() // Should return zero value + }) + + t.Run("GetCatalogVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectReference{} + var expected *int64 + obj.CatalogVersion = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogVersion(), "getter should return the property value") + }) + + t.Run("GetCatalogVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectReference{} + obj.CatalogVersion = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectReference + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogVersion() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogObjectReference(t *testing.T) { + t.Run("SetObjectID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectReference{} + var fernTestValueObjectID *string + + // Act + obj.SetObjectID(fernTestValueObjectID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectReference{} + var fernTestValueCatalogVersion *int64 + + // Act + obj.SetCatalogVersion(fernTestValueCatalogVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogObjectSubscriptionPlan(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &CatalogObjectSubscriptionPlan{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CatalogObjectSubscriptionPlan{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &CatalogObjectSubscriptionPlan{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsDeleted", func(t *testing.T) { + obj := &CatalogObjectSubscriptionPlan{} + var fernTestValueIsDeleted *bool + obj.SetIsDeleted(fernTestValueIsDeleted) + assert.Equal(t, fernTestValueIsDeleted, obj.IsDeleted) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttributeValues", func(t *testing.T) { + obj := &CatalogObjectSubscriptionPlan{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + assert.Equal(t, fernTestValueCustomAttributeValues, obj.CustomAttributeValues) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogV1IDs", func(t *testing.T) { + obj := &CatalogObjectSubscriptionPlan{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + assert.Equal(t, fernTestValueCatalogV1IDs, obj.CatalogV1IDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtAllLocations", func(t *testing.T) { + obj := &CatalogObjectSubscriptionPlan{} + var fernTestValuePresentAtAllLocations *bool + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + assert.Equal(t, fernTestValuePresentAtAllLocations, obj.PresentAtAllLocations) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectSubscriptionPlan{} + var fernTestValuePresentAtLocationIDs []string + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + assert.Equal(t, fernTestValuePresentAtLocationIDs, obj.PresentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAbsentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectSubscriptionPlan{} + var fernTestValueAbsentAtLocationIDs []string + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + assert.Equal(t, fernTestValueAbsentAtLocationIDs, obj.AbsentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImageID", func(t *testing.T) { + obj := &CatalogObjectSubscriptionPlan{} + var fernTestValueImageID *string + obj.SetImageID(fernTestValueImageID) + assert.Equal(t, fernTestValueImageID, obj.ImageID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSubscriptionPlanData", func(t *testing.T) { + obj := &CatalogObjectSubscriptionPlan{} + var fernTestValueSubscriptionPlanData *CatalogSubscriptionPlan + obj.SetSubscriptionPlanData(fernTestValueSubscriptionPlanData) + assert.Equal(t, fernTestValueSubscriptionPlanData, obj.SubscriptionPlanData) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogObjectSubscriptionPlan(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + var expected string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectSubscriptionPlan + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectSubscriptionPlan + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + var expected *int64 + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectSubscriptionPlan + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetIsDeleted", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + var expected *bool + obj.IsDeleted = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsDeleted(), "getter should return the property value") + }) + + t.Run("GetIsDeleted_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + obj.IsDeleted = nil + + // Act & Assert + assert.Nil(t, obj.GetIsDeleted(), "getter should return nil when property is nil") + }) + + t.Run("GetIsDeleted_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectSubscriptionPlan + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsDeleted() // Should return zero value + }) + + t.Run("GetCustomAttributeValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + var expected map[string]*CatalogCustomAttributeValue + obj.CustomAttributeValues = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeValues(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + obj.CustomAttributeValues = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeValues(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectSubscriptionPlan + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeValues() // Should return zero value + }) + + t.Run("GetCatalogV1IDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + var expected []*CatalogV1ID + obj.CatalogV1IDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogV1IDs(), "getter should return the property value") + }) + + t.Run("GetCatalogV1IDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + obj.CatalogV1IDs = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogV1IDs(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogV1IDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectSubscriptionPlan + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogV1IDs() // Should return zero value + }) + + t.Run("GetPresentAtAllLocations", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + var expected *bool + obj.PresentAtAllLocations = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtAllLocations(), "getter should return the property value") + }) + + t.Run("GetPresentAtAllLocations_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + obj.PresentAtAllLocations = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtAllLocations(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtAllLocations_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectSubscriptionPlan + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtAllLocations() // Should return zero value + }) + + t.Run("GetPresentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + var expected []string + obj.PresentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetPresentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + obj.PresentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectSubscriptionPlan + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtLocationIDs() // Should return zero value + }) + + t.Run("GetAbsentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + var expected []string + obj.AbsentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAbsentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetAbsentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + obj.AbsentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetAbsentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetAbsentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectSubscriptionPlan + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAbsentAtLocationIDs() // Should return zero value + }) + + t.Run("GetImageID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + var expected *string + obj.ImageID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImageID(), "getter should return the property value") + }) + + t.Run("GetImageID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + obj.ImageID = nil + + // Act & Assert + assert.Nil(t, obj.GetImageID(), "getter should return nil when property is nil") + }) + + t.Run("GetImageID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectSubscriptionPlan + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImageID() // Should return zero value + }) + + t.Run("GetSubscriptionPlanData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + var expected *CatalogSubscriptionPlan + obj.SubscriptionPlanData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscriptionPlanData(), "getter should return the property value") + }) + + t.Run("GetSubscriptionPlanData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + obj.SubscriptionPlanData = nil + + // Act & Assert + assert.Nil(t, obj.GetSubscriptionPlanData(), "getter should return nil when property is nil") + }) + + t.Run("GetSubscriptionPlanData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectSubscriptionPlan + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscriptionPlanData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogObjectSubscriptionPlan(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsDeleted_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + var fernTestValueIsDeleted *bool + + // Act + obj.SetIsDeleted(fernTestValueIsDeleted) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttributeValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + + // Act + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogV1IDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + + // Act + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtAllLocations_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + var fernTestValuePresentAtAllLocations *bool + + // Act + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + var fernTestValuePresentAtLocationIDs []string + + // Act + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAbsentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + var fernTestValueAbsentAtLocationIDs []string + + // Act + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImageID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + var fernTestValueImageID *string + + // Act + obj.SetImageID(fernTestValueImageID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSubscriptionPlanData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + var fernTestValueSubscriptionPlanData *CatalogSubscriptionPlan + + // Act + obj.SetSubscriptionPlanData(fernTestValueSubscriptionPlanData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogObjectSubscriptionPlanVariation(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &CatalogObjectSubscriptionPlanVariation{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CatalogObjectSubscriptionPlanVariation{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &CatalogObjectSubscriptionPlanVariation{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsDeleted", func(t *testing.T) { + obj := &CatalogObjectSubscriptionPlanVariation{} + var fernTestValueIsDeleted *bool + obj.SetIsDeleted(fernTestValueIsDeleted) + assert.Equal(t, fernTestValueIsDeleted, obj.IsDeleted) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttributeValues", func(t *testing.T) { + obj := &CatalogObjectSubscriptionPlanVariation{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + assert.Equal(t, fernTestValueCustomAttributeValues, obj.CustomAttributeValues) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogV1IDs", func(t *testing.T) { + obj := &CatalogObjectSubscriptionPlanVariation{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + assert.Equal(t, fernTestValueCatalogV1IDs, obj.CatalogV1IDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtAllLocations", func(t *testing.T) { + obj := &CatalogObjectSubscriptionPlanVariation{} + var fernTestValuePresentAtAllLocations *bool + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + assert.Equal(t, fernTestValuePresentAtAllLocations, obj.PresentAtAllLocations) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectSubscriptionPlanVariation{} + var fernTestValuePresentAtLocationIDs []string + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + assert.Equal(t, fernTestValuePresentAtLocationIDs, obj.PresentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAbsentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectSubscriptionPlanVariation{} + var fernTestValueAbsentAtLocationIDs []string + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + assert.Equal(t, fernTestValueAbsentAtLocationIDs, obj.AbsentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImageID", func(t *testing.T) { + obj := &CatalogObjectSubscriptionPlanVariation{} + var fernTestValueImageID *string + obj.SetImageID(fernTestValueImageID) + assert.Equal(t, fernTestValueImageID, obj.ImageID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSubscriptionPlanVariationData", func(t *testing.T) { + obj := &CatalogObjectSubscriptionPlanVariation{} + var fernTestValueSubscriptionPlanVariationData *CatalogSubscriptionPlanVariation + obj.SetSubscriptionPlanVariationData(fernTestValueSubscriptionPlanVariationData) + assert.Equal(t, fernTestValueSubscriptionPlanVariationData, obj.SubscriptionPlanVariationData) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogObjectSubscriptionPlanVariation(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + var expected string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectSubscriptionPlanVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectSubscriptionPlanVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + var expected *int64 + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectSubscriptionPlanVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetIsDeleted", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + var expected *bool + obj.IsDeleted = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsDeleted(), "getter should return the property value") + }) + + t.Run("GetIsDeleted_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + obj.IsDeleted = nil + + // Act & Assert + assert.Nil(t, obj.GetIsDeleted(), "getter should return nil when property is nil") + }) + + t.Run("GetIsDeleted_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectSubscriptionPlanVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsDeleted() // Should return zero value + }) + + t.Run("GetCustomAttributeValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + var expected map[string]*CatalogCustomAttributeValue + obj.CustomAttributeValues = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeValues(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + obj.CustomAttributeValues = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeValues(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectSubscriptionPlanVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeValues() // Should return zero value + }) + + t.Run("GetCatalogV1IDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + var expected []*CatalogV1ID + obj.CatalogV1IDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogV1IDs(), "getter should return the property value") + }) + + t.Run("GetCatalogV1IDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + obj.CatalogV1IDs = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogV1IDs(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogV1IDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectSubscriptionPlanVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogV1IDs() // Should return zero value + }) + + t.Run("GetPresentAtAllLocations", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + var expected *bool + obj.PresentAtAllLocations = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtAllLocations(), "getter should return the property value") + }) + + t.Run("GetPresentAtAllLocations_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + obj.PresentAtAllLocations = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtAllLocations(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtAllLocations_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectSubscriptionPlanVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtAllLocations() // Should return zero value + }) + + t.Run("GetPresentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + var expected []string + obj.PresentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetPresentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + obj.PresentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectSubscriptionPlanVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtLocationIDs() // Should return zero value + }) + + t.Run("GetAbsentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + var expected []string + obj.AbsentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAbsentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetAbsentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + obj.AbsentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetAbsentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetAbsentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectSubscriptionPlanVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAbsentAtLocationIDs() // Should return zero value + }) + + t.Run("GetImageID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + var expected *string + obj.ImageID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImageID(), "getter should return the property value") + }) + + t.Run("GetImageID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + obj.ImageID = nil + + // Act & Assert + assert.Nil(t, obj.GetImageID(), "getter should return nil when property is nil") + }) + + t.Run("GetImageID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectSubscriptionPlanVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImageID() // Should return zero value + }) + + t.Run("GetSubscriptionPlanVariationData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + var expected *CatalogSubscriptionPlanVariation + obj.SubscriptionPlanVariationData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscriptionPlanVariationData(), "getter should return the property value") + }) + + t.Run("GetSubscriptionPlanVariationData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + obj.SubscriptionPlanVariationData = nil + + // Act & Assert + assert.Nil(t, obj.GetSubscriptionPlanVariationData(), "getter should return nil when property is nil") + }) + + t.Run("GetSubscriptionPlanVariationData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectSubscriptionPlanVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscriptionPlanVariationData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogObjectSubscriptionPlanVariation(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsDeleted_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + var fernTestValueIsDeleted *bool + + // Act + obj.SetIsDeleted(fernTestValueIsDeleted) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttributeValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + + // Act + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogV1IDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + + // Act + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtAllLocations_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + var fernTestValuePresentAtAllLocations *bool + + // Act + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + var fernTestValuePresentAtLocationIDs []string + + // Act + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAbsentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + var fernTestValueAbsentAtLocationIDs []string + + // Act + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImageID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + var fernTestValueImageID *string + + // Act + obj.SetImageID(fernTestValueImageID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSubscriptionPlanVariationData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + var fernTestValueSubscriptionPlanVariationData *CatalogSubscriptionPlanVariation + + // Act + obj.SetSubscriptionPlanVariationData(fernTestValueSubscriptionPlanVariationData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogObjectTax(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &CatalogObjectTax{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CatalogObjectTax{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &CatalogObjectTax{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsDeleted", func(t *testing.T) { + obj := &CatalogObjectTax{} + var fernTestValueIsDeleted *bool + obj.SetIsDeleted(fernTestValueIsDeleted) + assert.Equal(t, fernTestValueIsDeleted, obj.IsDeleted) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttributeValues", func(t *testing.T) { + obj := &CatalogObjectTax{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + assert.Equal(t, fernTestValueCustomAttributeValues, obj.CustomAttributeValues) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogV1IDs", func(t *testing.T) { + obj := &CatalogObjectTax{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + assert.Equal(t, fernTestValueCatalogV1IDs, obj.CatalogV1IDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtAllLocations", func(t *testing.T) { + obj := &CatalogObjectTax{} + var fernTestValuePresentAtAllLocations *bool + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + assert.Equal(t, fernTestValuePresentAtAllLocations, obj.PresentAtAllLocations) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectTax{} + var fernTestValuePresentAtLocationIDs []string + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + assert.Equal(t, fernTestValuePresentAtLocationIDs, obj.PresentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAbsentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectTax{} + var fernTestValueAbsentAtLocationIDs []string + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + assert.Equal(t, fernTestValueAbsentAtLocationIDs, obj.AbsentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImageID", func(t *testing.T) { + obj := &CatalogObjectTax{} + var fernTestValueImageID *string + obj.SetImageID(fernTestValueImageID) + assert.Equal(t, fernTestValueImageID, obj.ImageID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTaxData", func(t *testing.T) { + obj := &CatalogObjectTax{} + var fernTestValueTaxData *CatalogTax + obj.SetTaxData(fernTestValueTaxData) + assert.Equal(t, fernTestValueTaxData, obj.TaxData) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogObjectTax(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + var expected string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + var expected *int64 + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetIsDeleted", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + var expected *bool + obj.IsDeleted = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsDeleted(), "getter should return the property value") + }) + + t.Run("GetIsDeleted_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + obj.IsDeleted = nil + + // Act & Assert + assert.Nil(t, obj.GetIsDeleted(), "getter should return nil when property is nil") + }) + + t.Run("GetIsDeleted_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsDeleted() // Should return zero value + }) + + t.Run("GetCustomAttributeValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + var expected map[string]*CatalogCustomAttributeValue + obj.CustomAttributeValues = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeValues(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + obj.CustomAttributeValues = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeValues(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeValues() // Should return zero value + }) + + t.Run("GetCatalogV1IDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + var expected []*CatalogV1ID + obj.CatalogV1IDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogV1IDs(), "getter should return the property value") + }) + + t.Run("GetCatalogV1IDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + obj.CatalogV1IDs = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogV1IDs(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogV1IDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogV1IDs() // Should return zero value + }) + + t.Run("GetPresentAtAllLocations", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + var expected *bool + obj.PresentAtAllLocations = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtAllLocations(), "getter should return the property value") + }) + + t.Run("GetPresentAtAllLocations_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + obj.PresentAtAllLocations = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtAllLocations(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtAllLocations_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtAllLocations() // Should return zero value + }) + + t.Run("GetPresentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + var expected []string + obj.PresentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetPresentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + obj.PresentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtLocationIDs() // Should return zero value + }) + + t.Run("GetAbsentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + var expected []string + obj.AbsentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAbsentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetAbsentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + obj.AbsentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetAbsentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetAbsentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAbsentAtLocationIDs() // Should return zero value + }) + + t.Run("GetImageID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + var expected *string + obj.ImageID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImageID(), "getter should return the property value") + }) + + t.Run("GetImageID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + obj.ImageID = nil + + // Act & Assert + assert.Nil(t, obj.GetImageID(), "getter should return nil when property is nil") + }) + + t.Run("GetImageID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImageID() // Should return zero value + }) + + t.Run("GetTaxData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + var expected *CatalogTax + obj.TaxData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTaxData(), "getter should return the property value") + }) + + t.Run("GetTaxData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + obj.TaxData = nil + + // Act & Assert + assert.Nil(t, obj.GetTaxData(), "getter should return nil when property is nil") + }) + + t.Run("GetTaxData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTaxData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogObjectTax(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsDeleted_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + var fernTestValueIsDeleted *bool + + // Act + obj.SetIsDeleted(fernTestValueIsDeleted) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttributeValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + + // Act + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogV1IDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + + // Act + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtAllLocations_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + var fernTestValuePresentAtAllLocations *bool + + // Act + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + var fernTestValuePresentAtLocationIDs []string + + // Act + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAbsentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + var fernTestValueAbsentAtLocationIDs []string + + // Act + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImageID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + var fernTestValueImageID *string + + // Act + obj.SetImageID(fernTestValueImageID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTaxData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + var fernTestValueTaxData *CatalogTax + + // Act + obj.SetTaxData(fernTestValueTaxData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogObjectTimePeriod(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &CatalogObjectTimePeriod{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CatalogObjectTimePeriod{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &CatalogObjectTimePeriod{} + var fernTestValueVersion *int64 + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsDeleted", func(t *testing.T) { + obj := &CatalogObjectTimePeriod{} + var fernTestValueIsDeleted *bool + obj.SetIsDeleted(fernTestValueIsDeleted) + assert.Equal(t, fernTestValueIsDeleted, obj.IsDeleted) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomAttributeValues", func(t *testing.T) { + obj := &CatalogObjectTimePeriod{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + assert.Equal(t, fernTestValueCustomAttributeValues, obj.CustomAttributeValues) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogV1IDs", func(t *testing.T) { + obj := &CatalogObjectTimePeriod{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + assert.Equal(t, fernTestValueCatalogV1IDs, obj.CatalogV1IDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtAllLocations", func(t *testing.T) { + obj := &CatalogObjectTimePeriod{} + var fernTestValuePresentAtAllLocations *bool + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + assert.Equal(t, fernTestValuePresentAtAllLocations, obj.PresentAtAllLocations) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPresentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectTimePeriod{} + var fernTestValuePresentAtLocationIDs []string + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + assert.Equal(t, fernTestValuePresentAtLocationIDs, obj.PresentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAbsentAtLocationIDs", func(t *testing.T) { + obj := &CatalogObjectTimePeriod{} + var fernTestValueAbsentAtLocationIDs []string + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + assert.Equal(t, fernTestValueAbsentAtLocationIDs, obj.AbsentAtLocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImageID", func(t *testing.T) { + obj := &CatalogObjectTimePeriod{} + var fernTestValueImageID *string + obj.SetImageID(fernTestValueImageID) + assert.Equal(t, fernTestValueImageID, obj.ImageID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTimePeriodData", func(t *testing.T) { + obj := &CatalogObjectTimePeriod{} + var fernTestValueTimePeriodData *CatalogTimePeriod + obj.SetTimePeriodData(fernTestValueTimePeriodData) + assert.Equal(t, fernTestValueTimePeriodData, obj.TimePeriodData) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogObjectTimePeriod(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + var expected string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectTimePeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectTimePeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + var expected *int64 + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectTimePeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetIsDeleted", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + var expected *bool + obj.IsDeleted = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsDeleted(), "getter should return the property value") + }) + + t.Run("GetIsDeleted_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + obj.IsDeleted = nil + + // Act & Assert + assert.Nil(t, obj.GetIsDeleted(), "getter should return nil when property is nil") + }) + + t.Run("GetIsDeleted_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectTimePeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsDeleted() // Should return zero value + }) + + t.Run("GetCustomAttributeValues", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + var expected map[string]*CatalogCustomAttributeValue + obj.CustomAttributeValues = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeValues(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeValues_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + obj.CustomAttributeValues = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeValues(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeValues_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectTimePeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeValues() // Should return zero value + }) + + t.Run("GetCatalogV1IDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + var expected []*CatalogV1ID + obj.CatalogV1IDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogV1IDs(), "getter should return the property value") + }) + + t.Run("GetCatalogV1IDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + obj.CatalogV1IDs = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogV1IDs(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogV1IDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectTimePeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogV1IDs() // Should return zero value + }) + + t.Run("GetPresentAtAllLocations", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + var expected *bool + obj.PresentAtAllLocations = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtAllLocations(), "getter should return the property value") + }) + + t.Run("GetPresentAtAllLocations_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + obj.PresentAtAllLocations = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtAllLocations(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtAllLocations_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectTimePeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtAllLocations() // Should return zero value + }) + + t.Run("GetPresentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + var expected []string + obj.PresentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPresentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetPresentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + obj.PresentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetPresentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetPresentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectTimePeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPresentAtLocationIDs() // Should return zero value + }) + + t.Run("GetAbsentAtLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + var expected []string + obj.AbsentAtLocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAbsentAtLocationIDs(), "getter should return the property value") + }) + + t.Run("GetAbsentAtLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + obj.AbsentAtLocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetAbsentAtLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetAbsentAtLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectTimePeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAbsentAtLocationIDs() // Should return zero value + }) + + t.Run("GetImageID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + var expected *string + obj.ImageID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImageID(), "getter should return the property value") + }) + + t.Run("GetImageID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + obj.ImageID = nil + + // Act & Assert + assert.Nil(t, obj.GetImageID(), "getter should return nil when property is nil") + }) + + t.Run("GetImageID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectTimePeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImageID() // Should return zero value + }) + + t.Run("GetTimePeriodData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + var expected *CatalogTimePeriod + obj.TimePeriodData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTimePeriodData(), "getter should return the property value") + }) + + t.Run("GetTimePeriodData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + obj.TimePeriodData = nil + + // Act & Assert + assert.Nil(t, obj.GetTimePeriodData(), "getter should return nil when property is nil") + }) + + t.Run("GetTimePeriodData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectTimePeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTimePeriodData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogObjectTimePeriod(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + var fernTestValueVersion *int64 + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsDeleted_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + var fernTestValueIsDeleted *bool + + // Act + obj.SetIsDeleted(fernTestValueIsDeleted) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomAttributeValues_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + var fernTestValueCustomAttributeValues map[string]*CatalogCustomAttributeValue + + // Act + obj.SetCustomAttributeValues(fernTestValueCustomAttributeValues) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogV1IDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + var fernTestValueCatalogV1IDs []*CatalogV1ID + + // Act + obj.SetCatalogV1IDs(fernTestValueCatalogV1IDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtAllLocations_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + var fernTestValuePresentAtAllLocations *bool + + // Act + obj.SetPresentAtAllLocations(fernTestValuePresentAtAllLocations) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPresentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + var fernTestValuePresentAtLocationIDs []string + + // Act + obj.SetPresentAtLocationIDs(fernTestValuePresentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAbsentAtLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + var fernTestValueAbsentAtLocationIDs []string + + // Act + obj.SetAbsentAtLocationIDs(fernTestValueAbsentAtLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImageID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + var fernTestValueImageID *string + + // Act + obj.SetImageID(fernTestValueImageID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTimePeriodData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + var fernTestValueTimePeriodData *CatalogTimePeriod + + // Act + obj.SetTimePeriodData(fernTestValueTimePeriodData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogPricingRule(t *testing.T) { + t.Run("SetName", func(t *testing.T) { + obj := &CatalogPricingRule{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTimePeriodIDs", func(t *testing.T) { + obj := &CatalogPricingRule{} + var fernTestValueTimePeriodIDs []string + obj.SetTimePeriodIDs(fernTestValueTimePeriodIDs) + assert.Equal(t, fernTestValueTimePeriodIDs, obj.TimePeriodIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDiscountID", func(t *testing.T) { + obj := &CatalogPricingRule{} + var fernTestValueDiscountID *string + obj.SetDiscountID(fernTestValueDiscountID) + assert.Equal(t, fernTestValueDiscountID, obj.DiscountID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMatchProductsID", func(t *testing.T) { + obj := &CatalogPricingRule{} + var fernTestValueMatchProductsID *string + obj.SetMatchProductsID(fernTestValueMatchProductsID) + assert.Equal(t, fernTestValueMatchProductsID, obj.MatchProductsID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetApplyProductsID", func(t *testing.T) { + obj := &CatalogPricingRule{} + var fernTestValueApplyProductsID *string + obj.SetApplyProductsID(fernTestValueApplyProductsID) + assert.Equal(t, fernTestValueApplyProductsID, obj.ApplyProductsID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExcludeProductsID", func(t *testing.T) { + obj := &CatalogPricingRule{} + var fernTestValueExcludeProductsID *string + obj.SetExcludeProductsID(fernTestValueExcludeProductsID) + assert.Equal(t, fernTestValueExcludeProductsID, obj.ExcludeProductsID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetValidFromDate", func(t *testing.T) { + obj := &CatalogPricingRule{} + var fernTestValueValidFromDate *string + obj.SetValidFromDate(fernTestValueValidFromDate) + assert.Equal(t, fernTestValueValidFromDate, obj.ValidFromDate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetValidFromLocalTime", func(t *testing.T) { + obj := &CatalogPricingRule{} + var fernTestValueValidFromLocalTime *string + obj.SetValidFromLocalTime(fernTestValueValidFromLocalTime) + assert.Equal(t, fernTestValueValidFromLocalTime, obj.ValidFromLocalTime) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetValidUntilDate", func(t *testing.T) { + obj := &CatalogPricingRule{} + var fernTestValueValidUntilDate *string + obj.SetValidUntilDate(fernTestValueValidUntilDate) + assert.Equal(t, fernTestValueValidUntilDate, obj.ValidUntilDate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetValidUntilLocalTime", func(t *testing.T) { + obj := &CatalogPricingRule{} + var fernTestValueValidUntilLocalTime *string + obj.SetValidUntilLocalTime(fernTestValueValidUntilLocalTime) + assert.Equal(t, fernTestValueValidUntilLocalTime, obj.ValidUntilLocalTime) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExcludeStrategy", func(t *testing.T) { + obj := &CatalogPricingRule{} + var fernTestValueExcludeStrategy *ExcludeStrategy + obj.SetExcludeStrategy(fernTestValueExcludeStrategy) + assert.Equal(t, fernTestValueExcludeStrategy, obj.ExcludeStrategy) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMinimumOrderSubtotalMoney", func(t *testing.T) { + obj := &CatalogPricingRule{} + var fernTestValueMinimumOrderSubtotalMoney *Money + obj.SetMinimumOrderSubtotalMoney(fernTestValueMinimumOrderSubtotalMoney) + assert.Equal(t, fernTestValueMinimumOrderSubtotalMoney, obj.MinimumOrderSubtotalMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerGroupIDsAny", func(t *testing.T) { + obj := &CatalogPricingRule{} + var fernTestValueCustomerGroupIDsAny []string + obj.SetCustomerGroupIDsAny(fernTestValueCustomerGroupIDsAny) + assert.Equal(t, fernTestValueCustomerGroupIDsAny, obj.CustomerGroupIDsAny) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogPricingRule(t *testing.T) { + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogPricingRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetTimePeriodIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + var expected []string + obj.TimePeriodIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTimePeriodIDs(), "getter should return the property value") + }) + + t.Run("GetTimePeriodIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + obj.TimePeriodIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetTimePeriodIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetTimePeriodIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogPricingRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTimePeriodIDs() // Should return zero value + }) + + t.Run("GetDiscountID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + var expected *string + obj.DiscountID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDiscountID(), "getter should return the property value") + }) + + t.Run("GetDiscountID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + obj.DiscountID = nil + + // Act & Assert + assert.Nil(t, obj.GetDiscountID(), "getter should return nil when property is nil") + }) + + t.Run("GetDiscountID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogPricingRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDiscountID() // Should return zero value + }) + + t.Run("GetMatchProductsID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + var expected *string + obj.MatchProductsID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMatchProductsID(), "getter should return the property value") + }) + + t.Run("GetMatchProductsID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + obj.MatchProductsID = nil + + // Act & Assert + assert.Nil(t, obj.GetMatchProductsID(), "getter should return nil when property is nil") + }) + + t.Run("GetMatchProductsID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogPricingRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMatchProductsID() // Should return zero value + }) + + t.Run("GetApplyProductsID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + var expected *string + obj.ApplyProductsID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetApplyProductsID(), "getter should return the property value") + }) + + t.Run("GetApplyProductsID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + obj.ApplyProductsID = nil + + // Act & Assert + assert.Nil(t, obj.GetApplyProductsID(), "getter should return nil when property is nil") + }) + + t.Run("GetApplyProductsID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogPricingRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetApplyProductsID() // Should return zero value + }) + + t.Run("GetExcludeProductsID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + var expected *string + obj.ExcludeProductsID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExcludeProductsID(), "getter should return the property value") + }) + + t.Run("GetExcludeProductsID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + obj.ExcludeProductsID = nil + + // Act & Assert + assert.Nil(t, obj.GetExcludeProductsID(), "getter should return nil when property is nil") + }) + + t.Run("GetExcludeProductsID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogPricingRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExcludeProductsID() // Should return zero value + }) + + t.Run("GetValidFromDate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + var expected *string + obj.ValidFromDate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetValidFromDate(), "getter should return the property value") + }) + + t.Run("GetValidFromDate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + obj.ValidFromDate = nil + + // Act & Assert + assert.Nil(t, obj.GetValidFromDate(), "getter should return nil when property is nil") + }) + + t.Run("GetValidFromDate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogPricingRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetValidFromDate() // Should return zero value + }) + + t.Run("GetValidFromLocalTime", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + var expected *string + obj.ValidFromLocalTime = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetValidFromLocalTime(), "getter should return the property value") + }) + + t.Run("GetValidFromLocalTime_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + obj.ValidFromLocalTime = nil + + // Act & Assert + assert.Nil(t, obj.GetValidFromLocalTime(), "getter should return nil when property is nil") + }) + + t.Run("GetValidFromLocalTime_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogPricingRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetValidFromLocalTime() // Should return zero value + }) + + t.Run("GetValidUntilDate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + var expected *string + obj.ValidUntilDate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetValidUntilDate(), "getter should return the property value") + }) + + t.Run("GetValidUntilDate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + obj.ValidUntilDate = nil + + // Act & Assert + assert.Nil(t, obj.GetValidUntilDate(), "getter should return nil when property is nil") + }) + + t.Run("GetValidUntilDate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogPricingRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetValidUntilDate() // Should return zero value + }) + + t.Run("GetValidUntilLocalTime", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + var expected *string + obj.ValidUntilLocalTime = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetValidUntilLocalTime(), "getter should return the property value") + }) + + t.Run("GetValidUntilLocalTime_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + obj.ValidUntilLocalTime = nil + + // Act & Assert + assert.Nil(t, obj.GetValidUntilLocalTime(), "getter should return nil when property is nil") + }) + + t.Run("GetValidUntilLocalTime_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogPricingRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetValidUntilLocalTime() // Should return zero value + }) + + t.Run("GetExcludeStrategy", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + var expected *ExcludeStrategy + obj.ExcludeStrategy = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExcludeStrategy(), "getter should return the property value") + }) + + t.Run("GetExcludeStrategy_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + obj.ExcludeStrategy = nil + + // Act & Assert + assert.Nil(t, obj.GetExcludeStrategy(), "getter should return nil when property is nil") + }) + + t.Run("GetExcludeStrategy_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogPricingRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExcludeStrategy() // Should return zero value + }) + + t.Run("GetMinimumOrderSubtotalMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + var expected *Money + obj.MinimumOrderSubtotalMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMinimumOrderSubtotalMoney(), "getter should return the property value") + }) + + t.Run("GetMinimumOrderSubtotalMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + obj.MinimumOrderSubtotalMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetMinimumOrderSubtotalMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetMinimumOrderSubtotalMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogPricingRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMinimumOrderSubtotalMoney() // Should return zero value + }) + + t.Run("GetCustomerGroupIDsAny", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + var expected []string + obj.CustomerGroupIDsAny = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomerGroupIDsAny(), "getter should return the property value") + }) + + t.Run("GetCustomerGroupIDsAny_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + obj.CustomerGroupIDsAny = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomerGroupIDsAny(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomerGroupIDsAny_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogPricingRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomerGroupIDsAny() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogPricingRule(t *testing.T) { + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTimePeriodIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + var fernTestValueTimePeriodIDs []string + + // Act + obj.SetTimePeriodIDs(fernTestValueTimePeriodIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDiscountID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + var fernTestValueDiscountID *string + + // Act + obj.SetDiscountID(fernTestValueDiscountID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMatchProductsID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + var fernTestValueMatchProductsID *string + + // Act + obj.SetMatchProductsID(fernTestValueMatchProductsID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetApplyProductsID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + var fernTestValueApplyProductsID *string + + // Act + obj.SetApplyProductsID(fernTestValueApplyProductsID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExcludeProductsID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + var fernTestValueExcludeProductsID *string + + // Act + obj.SetExcludeProductsID(fernTestValueExcludeProductsID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetValidFromDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + var fernTestValueValidFromDate *string + + // Act + obj.SetValidFromDate(fernTestValueValidFromDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetValidFromLocalTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + var fernTestValueValidFromLocalTime *string + + // Act + obj.SetValidFromLocalTime(fernTestValueValidFromLocalTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetValidUntilDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + var fernTestValueValidUntilDate *string + + // Act + obj.SetValidUntilDate(fernTestValueValidUntilDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetValidUntilLocalTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + var fernTestValueValidUntilLocalTime *string + + // Act + obj.SetValidUntilLocalTime(fernTestValueValidUntilLocalTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExcludeStrategy_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + var fernTestValueExcludeStrategy *ExcludeStrategy + + // Act + obj.SetExcludeStrategy(fernTestValueExcludeStrategy) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMinimumOrderSubtotalMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + var fernTestValueMinimumOrderSubtotalMoney *Money + + // Act + obj.SetMinimumOrderSubtotalMoney(fernTestValueMinimumOrderSubtotalMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerGroupIDsAny_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + var fernTestValueCustomerGroupIDsAny []string + + // Act + obj.SetCustomerGroupIDsAny(fernTestValueCustomerGroupIDsAny) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogProductSet(t *testing.T) { + t.Run("SetName", func(t *testing.T) { + obj := &CatalogProductSet{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetProductIDsAny", func(t *testing.T) { + obj := &CatalogProductSet{} + var fernTestValueProductIDsAny []string + obj.SetProductIDsAny(fernTestValueProductIDsAny) + assert.Equal(t, fernTestValueProductIDsAny, obj.ProductIDsAny) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetProductIDsAll", func(t *testing.T) { + obj := &CatalogProductSet{} + var fernTestValueProductIDsAll []string + obj.SetProductIDsAll(fernTestValueProductIDsAll) + assert.Equal(t, fernTestValueProductIDsAll, obj.ProductIDsAll) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuantityExact", func(t *testing.T) { + obj := &CatalogProductSet{} + var fernTestValueQuantityExact *int64 + obj.SetQuantityExact(fernTestValueQuantityExact) + assert.Equal(t, fernTestValueQuantityExact, obj.QuantityExact) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuantityMin", func(t *testing.T) { + obj := &CatalogProductSet{} + var fernTestValueQuantityMin *int64 + obj.SetQuantityMin(fernTestValueQuantityMin) + assert.Equal(t, fernTestValueQuantityMin, obj.QuantityMin) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuantityMax", func(t *testing.T) { + obj := &CatalogProductSet{} + var fernTestValueQuantityMax *int64 + obj.SetQuantityMax(fernTestValueQuantityMax) + assert.Equal(t, fernTestValueQuantityMax, obj.QuantityMax) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAllProducts", func(t *testing.T) { + obj := &CatalogProductSet{} + var fernTestValueAllProducts *bool + obj.SetAllProducts(fernTestValueAllProducts) + assert.Equal(t, fernTestValueAllProducts, obj.AllProducts) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogProductSet(t *testing.T) { + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogProductSet{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogProductSet{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogProductSet + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetProductIDsAny", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogProductSet{} + var expected []string + obj.ProductIDsAny = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetProductIDsAny(), "getter should return the property value") + }) + + t.Run("GetProductIDsAny_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogProductSet{} + obj.ProductIDsAny = nil + + // Act & Assert + assert.Nil(t, obj.GetProductIDsAny(), "getter should return nil when property is nil") + }) + + t.Run("GetProductIDsAny_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogProductSet + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetProductIDsAny() // Should return zero value + }) + + t.Run("GetProductIDsAll", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogProductSet{} + var expected []string + obj.ProductIDsAll = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetProductIDsAll(), "getter should return the property value") + }) + + t.Run("GetProductIDsAll_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogProductSet{} + obj.ProductIDsAll = nil + + // Act & Assert + assert.Nil(t, obj.GetProductIDsAll(), "getter should return nil when property is nil") + }) + + t.Run("GetProductIDsAll_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogProductSet + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetProductIDsAll() // Should return zero value + }) + + t.Run("GetQuantityExact", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogProductSet{} + var expected *int64 + obj.QuantityExact = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQuantityExact(), "getter should return the property value") + }) + + t.Run("GetQuantityExact_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogProductSet{} + obj.QuantityExact = nil + + // Act & Assert + assert.Nil(t, obj.GetQuantityExact(), "getter should return nil when property is nil") + }) + + t.Run("GetQuantityExact_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogProductSet + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQuantityExact() // Should return zero value + }) + + t.Run("GetQuantityMin", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogProductSet{} + var expected *int64 + obj.QuantityMin = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQuantityMin(), "getter should return the property value") + }) + + t.Run("GetQuantityMin_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogProductSet{} + obj.QuantityMin = nil + + // Act & Assert + assert.Nil(t, obj.GetQuantityMin(), "getter should return nil when property is nil") + }) + + t.Run("GetQuantityMin_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogProductSet + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQuantityMin() // Should return zero value + }) + + t.Run("GetQuantityMax", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogProductSet{} + var expected *int64 + obj.QuantityMax = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQuantityMax(), "getter should return the property value") + }) + + t.Run("GetQuantityMax_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogProductSet{} + obj.QuantityMax = nil + + // Act & Assert + assert.Nil(t, obj.GetQuantityMax(), "getter should return nil when property is nil") + }) + + t.Run("GetQuantityMax_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogProductSet + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQuantityMax() // Should return zero value + }) + + t.Run("GetAllProducts", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogProductSet{} + var expected *bool + obj.AllProducts = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAllProducts(), "getter should return the property value") + }) + + t.Run("GetAllProducts_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogProductSet{} + obj.AllProducts = nil + + // Act & Assert + assert.Nil(t, obj.GetAllProducts(), "getter should return nil when property is nil") + }) + + t.Run("GetAllProducts_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogProductSet + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAllProducts() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogProductSet(t *testing.T) { + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogProductSet{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetProductIDsAny_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogProductSet{} + var fernTestValueProductIDsAny []string + + // Act + obj.SetProductIDsAny(fernTestValueProductIDsAny) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetProductIDsAll_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogProductSet{} + var fernTestValueProductIDsAll []string + + // Act + obj.SetProductIDsAll(fernTestValueProductIDsAll) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuantityExact_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogProductSet{} + var fernTestValueQuantityExact *int64 + + // Act + obj.SetQuantityExact(fernTestValueQuantityExact) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuantityMin_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogProductSet{} + var fernTestValueQuantityMin *int64 + + // Act + obj.SetQuantityMin(fernTestValueQuantityMin) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuantityMax_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogProductSet{} + var fernTestValueQuantityMax *int64 + + // Act + obj.SetQuantityMax(fernTestValueQuantityMax) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAllProducts_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogProductSet{} + var fernTestValueAllProducts *bool + + // Act + obj.SetAllProducts(fernTestValueAllProducts) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogQuickAmount(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &CatalogQuickAmount{} + var fernTestValueType CatalogQuickAmountType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAmount", func(t *testing.T) { + obj := &CatalogQuickAmount{} + var fernTestValueAmount *Money + obj.SetAmount(fernTestValueAmount) + assert.Equal(t, fernTestValueAmount, obj.Amount) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetScore", func(t *testing.T) { + obj := &CatalogQuickAmount{} + var fernTestValueScore *int64 + obj.SetScore(fernTestValueScore) + assert.Equal(t, fernTestValueScore, obj.Score) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrdinal", func(t *testing.T) { + obj := &CatalogQuickAmount{} + var fernTestValueOrdinal *int64 + obj.SetOrdinal(fernTestValueOrdinal) + assert.Equal(t, fernTestValueOrdinal, obj.Ordinal) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogQuickAmount(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuickAmount{} + var expected CatalogQuickAmountType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuickAmount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetAmount", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuickAmount{} + var expected *Money + obj.Amount = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmount(), "getter should return the property value") + }) + + t.Run("GetAmount_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuickAmount{} + obj.Amount = nil + + // Act & Assert + assert.Nil(t, obj.GetAmount(), "getter should return nil when property is nil") + }) + + t.Run("GetAmount_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuickAmount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmount() // Should return zero value + }) + + t.Run("GetScore", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuickAmount{} + var expected *int64 + obj.Score = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetScore(), "getter should return the property value") + }) + + t.Run("GetScore_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuickAmount{} + obj.Score = nil + + // Act & Assert + assert.Nil(t, obj.GetScore(), "getter should return nil when property is nil") + }) + + t.Run("GetScore_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuickAmount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetScore() // Should return zero value + }) + + t.Run("GetOrdinal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuickAmount{} + var expected *int64 + obj.Ordinal = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrdinal(), "getter should return the property value") + }) + + t.Run("GetOrdinal_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuickAmount{} + obj.Ordinal = nil + + // Act & Assert + assert.Nil(t, obj.GetOrdinal(), "getter should return nil when property is nil") + }) + + t.Run("GetOrdinal_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuickAmount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrdinal() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogQuickAmount(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuickAmount{} + var fernTestValueType CatalogQuickAmountType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAmount_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuickAmount{} + var fernTestValueAmount *Money + + // Act + obj.SetAmount(fernTestValueAmount) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetScore_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuickAmount{} + var fernTestValueScore *int64 + + // Act + obj.SetScore(fernTestValueScore) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrdinal_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuickAmount{} + var fernTestValueOrdinal *int64 + + // Act + obj.SetOrdinal(fernTestValueOrdinal) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogQuickAmountsSettings(t *testing.T) { + t.Run("SetOption", func(t *testing.T) { + obj := &CatalogQuickAmountsSettings{} + var fernTestValueOption CatalogQuickAmountsSettingsOption + obj.SetOption(fernTestValueOption) + assert.Equal(t, fernTestValueOption, obj.Option) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEligibleForAutoAmounts", func(t *testing.T) { + obj := &CatalogQuickAmountsSettings{} + var fernTestValueEligibleForAutoAmounts *bool + obj.SetEligibleForAutoAmounts(fernTestValueEligibleForAutoAmounts) + assert.Equal(t, fernTestValueEligibleForAutoAmounts, obj.EligibleForAutoAmounts) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAmounts", func(t *testing.T) { + obj := &CatalogQuickAmountsSettings{} + var fernTestValueAmounts []*CatalogQuickAmount + obj.SetAmounts(fernTestValueAmounts) + assert.Equal(t, fernTestValueAmounts, obj.Amounts) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogQuickAmountsSettings(t *testing.T) { + t.Run("GetOption", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuickAmountsSettings{} + var expected CatalogQuickAmountsSettingsOption + obj.Option = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOption(), "getter should return the property value") + }) + + t.Run("GetOption_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuickAmountsSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOption() // Should return zero value + }) + + t.Run("GetEligibleForAutoAmounts", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuickAmountsSettings{} + var expected *bool + obj.EligibleForAutoAmounts = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEligibleForAutoAmounts(), "getter should return the property value") + }) + + t.Run("GetEligibleForAutoAmounts_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuickAmountsSettings{} + obj.EligibleForAutoAmounts = nil + + // Act & Assert + assert.Nil(t, obj.GetEligibleForAutoAmounts(), "getter should return nil when property is nil") + }) + + t.Run("GetEligibleForAutoAmounts_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuickAmountsSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEligibleForAutoAmounts() // Should return zero value + }) + + t.Run("GetAmounts", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuickAmountsSettings{} + var expected []*CatalogQuickAmount + obj.Amounts = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmounts(), "getter should return the property value") + }) + + t.Run("GetAmounts_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuickAmountsSettings{} + obj.Amounts = nil + + // Act & Assert + assert.Nil(t, obj.GetAmounts(), "getter should return nil when property is nil") + }) + + t.Run("GetAmounts_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuickAmountsSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmounts() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogQuickAmountsSettings(t *testing.T) { + t.Run("SetOption_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuickAmountsSettings{} + var fernTestValueOption CatalogQuickAmountsSettingsOption + + // Act + obj.SetOption(fernTestValueOption) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEligibleForAutoAmounts_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuickAmountsSettings{} + var fernTestValueEligibleForAutoAmounts *bool + + // Act + obj.SetEligibleForAutoAmounts(fernTestValueEligibleForAutoAmounts) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAmounts_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuickAmountsSettings{} + var fernTestValueAmounts []*CatalogQuickAmount + + // Act + obj.SetAmounts(fernTestValueAmounts) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogStockConversion(t *testing.T) { + t.Run("SetStockableItemVariationID", func(t *testing.T) { + obj := &CatalogStockConversion{} + var fernTestValueStockableItemVariationID string + obj.SetStockableItemVariationID(fernTestValueStockableItemVariationID) + assert.Equal(t, fernTestValueStockableItemVariationID, obj.StockableItemVariationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStockableQuantity", func(t *testing.T) { + obj := &CatalogStockConversion{} + var fernTestValueStockableQuantity string + obj.SetStockableQuantity(fernTestValueStockableQuantity) + assert.Equal(t, fernTestValueStockableQuantity, obj.StockableQuantity) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNonstockableQuantity", func(t *testing.T) { + obj := &CatalogStockConversion{} + var fernTestValueNonstockableQuantity string + obj.SetNonstockableQuantity(fernTestValueNonstockableQuantity) + assert.Equal(t, fernTestValueNonstockableQuantity, obj.NonstockableQuantity) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogStockConversion(t *testing.T) { + t.Run("GetStockableItemVariationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogStockConversion{} + var expected string + obj.StockableItemVariationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStockableItemVariationID(), "getter should return the property value") + }) + + t.Run("GetStockableItemVariationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogStockConversion + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStockableItemVariationID() // Should return zero value + }) + + t.Run("GetStockableQuantity", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogStockConversion{} + var expected string + obj.StockableQuantity = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStockableQuantity(), "getter should return the property value") + }) + + t.Run("GetStockableQuantity_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogStockConversion + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStockableQuantity() // Should return zero value + }) + + t.Run("GetNonstockableQuantity", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogStockConversion{} + var expected string + obj.NonstockableQuantity = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNonstockableQuantity(), "getter should return the property value") + }) + + t.Run("GetNonstockableQuantity_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogStockConversion + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNonstockableQuantity() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogStockConversion(t *testing.T) { + t.Run("SetStockableItemVariationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogStockConversion{} + var fernTestValueStockableItemVariationID string + + // Act + obj.SetStockableItemVariationID(fernTestValueStockableItemVariationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStockableQuantity_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogStockConversion{} + var fernTestValueStockableQuantity string + + // Act + obj.SetStockableQuantity(fernTestValueStockableQuantity) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNonstockableQuantity_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogStockConversion{} + var fernTestValueNonstockableQuantity string + + // Act + obj.SetNonstockableQuantity(fernTestValueNonstockableQuantity) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogSubscriptionPlan(t *testing.T) { + t.Run("SetName", func(t *testing.T) { + obj := &CatalogSubscriptionPlan{} + var fernTestValueName string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPhases", func(t *testing.T) { + obj := &CatalogSubscriptionPlan{} + var fernTestValuePhases []*SubscriptionPhase + obj.SetPhases(fernTestValuePhases) + assert.Equal(t, fernTestValuePhases, obj.Phases) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSubscriptionPlanVariations", func(t *testing.T) { + obj := &CatalogSubscriptionPlan{} + var fernTestValueSubscriptionPlanVariations []*CatalogObject + obj.SetSubscriptionPlanVariations(fernTestValueSubscriptionPlanVariations) + assert.Equal(t, fernTestValueSubscriptionPlanVariations, obj.SubscriptionPlanVariations) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEligibleItemIDs", func(t *testing.T) { + obj := &CatalogSubscriptionPlan{} + var fernTestValueEligibleItemIDs []string + obj.SetEligibleItemIDs(fernTestValueEligibleItemIDs) + assert.Equal(t, fernTestValueEligibleItemIDs, obj.EligibleItemIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEligibleCategoryIDs", func(t *testing.T) { + obj := &CatalogSubscriptionPlan{} + var fernTestValueEligibleCategoryIDs []string + obj.SetEligibleCategoryIDs(fernTestValueEligibleCategoryIDs) + assert.Equal(t, fernTestValueEligibleCategoryIDs, obj.EligibleCategoryIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAllItems", func(t *testing.T) { + obj := &CatalogSubscriptionPlan{} + var fernTestValueAllItems *bool + obj.SetAllItems(fernTestValueAllItems) + assert.Equal(t, fernTestValueAllItems, obj.AllItems) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogSubscriptionPlan(t *testing.T) { + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlan{} + var expected string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogSubscriptionPlan + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetPhases", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlan{} + var expected []*SubscriptionPhase + obj.Phases = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPhases(), "getter should return the property value") + }) + + t.Run("GetPhases_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlan{} + obj.Phases = nil + + // Act & Assert + assert.Nil(t, obj.GetPhases(), "getter should return nil when property is nil") + }) + + t.Run("GetPhases_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogSubscriptionPlan + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPhases() // Should return zero value + }) + + t.Run("GetSubscriptionPlanVariations", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlan{} + var expected []*CatalogObject + obj.SubscriptionPlanVariations = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscriptionPlanVariations(), "getter should return the property value") + }) + + t.Run("GetSubscriptionPlanVariations_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlan{} + obj.SubscriptionPlanVariations = nil + + // Act & Assert + assert.Nil(t, obj.GetSubscriptionPlanVariations(), "getter should return nil when property is nil") + }) + + t.Run("GetSubscriptionPlanVariations_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogSubscriptionPlan + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscriptionPlanVariations() // Should return zero value + }) + + t.Run("GetEligibleItemIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlan{} + var expected []string + obj.EligibleItemIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEligibleItemIDs(), "getter should return the property value") + }) + + t.Run("GetEligibleItemIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlan{} + obj.EligibleItemIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetEligibleItemIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetEligibleItemIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogSubscriptionPlan + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEligibleItemIDs() // Should return zero value + }) + + t.Run("GetEligibleCategoryIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlan{} + var expected []string + obj.EligibleCategoryIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEligibleCategoryIDs(), "getter should return the property value") + }) + + t.Run("GetEligibleCategoryIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlan{} + obj.EligibleCategoryIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetEligibleCategoryIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetEligibleCategoryIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogSubscriptionPlan + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEligibleCategoryIDs() // Should return zero value + }) + + t.Run("GetAllItems", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlan{} + var expected *bool + obj.AllItems = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAllItems(), "getter should return the property value") + }) + + t.Run("GetAllItems_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlan{} + obj.AllItems = nil + + // Act & Assert + assert.Nil(t, obj.GetAllItems(), "getter should return nil when property is nil") + }) + + t.Run("GetAllItems_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogSubscriptionPlan + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAllItems() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogSubscriptionPlan(t *testing.T) { + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlan{} + var fernTestValueName string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPhases_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlan{} + var fernTestValuePhases []*SubscriptionPhase + + // Act + obj.SetPhases(fernTestValuePhases) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSubscriptionPlanVariations_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlan{} + var fernTestValueSubscriptionPlanVariations []*CatalogObject + + // Act + obj.SetSubscriptionPlanVariations(fernTestValueSubscriptionPlanVariations) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEligibleItemIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlan{} + var fernTestValueEligibleItemIDs []string + + // Act + obj.SetEligibleItemIDs(fernTestValueEligibleItemIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEligibleCategoryIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlan{} + var fernTestValueEligibleCategoryIDs []string + + // Act + obj.SetEligibleCategoryIDs(fernTestValueEligibleCategoryIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAllItems_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlan{} + var fernTestValueAllItems *bool + + // Act + obj.SetAllItems(fernTestValueAllItems) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogSubscriptionPlanVariation(t *testing.T) { + t.Run("SetName", func(t *testing.T) { + obj := &CatalogSubscriptionPlanVariation{} + var fernTestValueName string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPhases", func(t *testing.T) { + obj := &CatalogSubscriptionPlanVariation{} + var fernTestValuePhases []*SubscriptionPhase + obj.SetPhases(fernTestValuePhases) + assert.Equal(t, fernTestValuePhases, obj.Phases) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSubscriptionPlanID", func(t *testing.T) { + obj := &CatalogSubscriptionPlanVariation{} + var fernTestValueSubscriptionPlanID *string + obj.SetSubscriptionPlanID(fernTestValueSubscriptionPlanID) + assert.Equal(t, fernTestValueSubscriptionPlanID, obj.SubscriptionPlanID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMonthlyBillingAnchorDate", func(t *testing.T) { + obj := &CatalogSubscriptionPlanVariation{} + var fernTestValueMonthlyBillingAnchorDate *int64 + obj.SetMonthlyBillingAnchorDate(fernTestValueMonthlyBillingAnchorDate) + assert.Equal(t, fernTestValueMonthlyBillingAnchorDate, obj.MonthlyBillingAnchorDate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCanProrate", func(t *testing.T) { + obj := &CatalogSubscriptionPlanVariation{} + var fernTestValueCanProrate *bool + obj.SetCanProrate(fernTestValueCanProrate) + assert.Equal(t, fernTestValueCanProrate, obj.CanProrate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSuccessorPlanVariationID", func(t *testing.T) { + obj := &CatalogSubscriptionPlanVariation{} + var fernTestValueSuccessorPlanVariationID *string + obj.SetSuccessorPlanVariationID(fernTestValueSuccessorPlanVariationID) + assert.Equal(t, fernTestValueSuccessorPlanVariationID, obj.SuccessorPlanVariationID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogSubscriptionPlanVariation(t *testing.T) { + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlanVariation{} + var expected string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogSubscriptionPlanVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetPhases", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlanVariation{} + var expected []*SubscriptionPhase + obj.Phases = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPhases(), "getter should return the property value") + }) + + t.Run("GetPhases_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlanVariation{} + obj.Phases = nil + + // Act & Assert + assert.Nil(t, obj.GetPhases(), "getter should return nil when property is nil") + }) + + t.Run("GetPhases_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogSubscriptionPlanVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPhases() // Should return zero value + }) + + t.Run("GetSubscriptionPlanID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlanVariation{} + var expected *string + obj.SubscriptionPlanID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscriptionPlanID(), "getter should return the property value") + }) + + t.Run("GetSubscriptionPlanID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlanVariation{} + obj.SubscriptionPlanID = nil + + // Act & Assert + assert.Nil(t, obj.GetSubscriptionPlanID(), "getter should return nil when property is nil") + }) + + t.Run("GetSubscriptionPlanID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogSubscriptionPlanVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscriptionPlanID() // Should return zero value + }) + + t.Run("GetMonthlyBillingAnchorDate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlanVariation{} + var expected *int64 + obj.MonthlyBillingAnchorDate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMonthlyBillingAnchorDate(), "getter should return the property value") + }) + + t.Run("GetMonthlyBillingAnchorDate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlanVariation{} + obj.MonthlyBillingAnchorDate = nil + + // Act & Assert + assert.Nil(t, obj.GetMonthlyBillingAnchorDate(), "getter should return nil when property is nil") + }) + + t.Run("GetMonthlyBillingAnchorDate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogSubscriptionPlanVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMonthlyBillingAnchorDate() // Should return zero value + }) + + t.Run("GetCanProrate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlanVariation{} + var expected *bool + obj.CanProrate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCanProrate(), "getter should return the property value") + }) + + t.Run("GetCanProrate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlanVariation{} + obj.CanProrate = nil + + // Act & Assert + assert.Nil(t, obj.GetCanProrate(), "getter should return nil when property is nil") + }) + + t.Run("GetCanProrate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogSubscriptionPlanVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCanProrate() // Should return zero value + }) + + t.Run("GetSuccessorPlanVariationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlanVariation{} + var expected *string + obj.SuccessorPlanVariationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSuccessorPlanVariationID(), "getter should return the property value") + }) + + t.Run("GetSuccessorPlanVariationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlanVariation{} + obj.SuccessorPlanVariationID = nil + + // Act & Assert + assert.Nil(t, obj.GetSuccessorPlanVariationID(), "getter should return nil when property is nil") + }) + + t.Run("GetSuccessorPlanVariationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogSubscriptionPlanVariation + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSuccessorPlanVariationID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogSubscriptionPlanVariation(t *testing.T) { + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlanVariation{} + var fernTestValueName string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPhases_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlanVariation{} + var fernTestValuePhases []*SubscriptionPhase + + // Act + obj.SetPhases(fernTestValuePhases) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSubscriptionPlanID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlanVariation{} + var fernTestValueSubscriptionPlanID *string + + // Act + obj.SetSubscriptionPlanID(fernTestValueSubscriptionPlanID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMonthlyBillingAnchorDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlanVariation{} + var fernTestValueMonthlyBillingAnchorDate *int64 + + // Act + obj.SetMonthlyBillingAnchorDate(fernTestValueMonthlyBillingAnchorDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCanProrate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlanVariation{} + var fernTestValueCanProrate *bool + + // Act + obj.SetCanProrate(fernTestValueCanProrate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSuccessorPlanVariationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlanVariation{} + var fernTestValueSuccessorPlanVariationID *string + + // Act + obj.SetSuccessorPlanVariationID(fernTestValueSuccessorPlanVariationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogTax(t *testing.T) { + t.Run("SetName", func(t *testing.T) { + obj := &CatalogTax{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCalculationPhase", func(t *testing.T) { + obj := &CatalogTax{} + var fernTestValueCalculationPhase *TaxCalculationPhase + obj.SetCalculationPhase(fernTestValueCalculationPhase) + assert.Equal(t, fernTestValueCalculationPhase, obj.CalculationPhase) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetInclusionType", func(t *testing.T) { + obj := &CatalogTax{} + var fernTestValueInclusionType *TaxInclusionType + obj.SetInclusionType(fernTestValueInclusionType) + assert.Equal(t, fernTestValueInclusionType, obj.InclusionType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPercentage", func(t *testing.T) { + obj := &CatalogTax{} + var fernTestValuePercentage *string + obj.SetPercentage(fernTestValuePercentage) + assert.Equal(t, fernTestValuePercentage, obj.Percentage) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppliesToCustomAmounts", func(t *testing.T) { + obj := &CatalogTax{} + var fernTestValueAppliesToCustomAmounts *bool + obj.SetAppliesToCustomAmounts(fernTestValueAppliesToCustomAmounts) + assert.Equal(t, fernTestValueAppliesToCustomAmounts, obj.AppliesToCustomAmounts) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEnabled", func(t *testing.T) { + obj := &CatalogTax{} + var fernTestValueEnabled *bool + obj.SetEnabled(fernTestValueEnabled) + assert.Equal(t, fernTestValueEnabled, obj.Enabled) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppliesToProductSetID", func(t *testing.T) { + obj := &CatalogTax{} + var fernTestValueAppliesToProductSetID *string + obj.SetAppliesToProductSetID(fernTestValueAppliesToProductSetID) + assert.Equal(t, fernTestValueAppliesToProductSetID, obj.AppliesToProductSetID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogTax(t *testing.T) { + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogTax{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogTax{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetCalculationPhase", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogTax{} + var expected *TaxCalculationPhase + obj.CalculationPhase = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCalculationPhase(), "getter should return the property value") + }) + + t.Run("GetCalculationPhase_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogTax{} + obj.CalculationPhase = nil + + // Act & Assert + assert.Nil(t, obj.GetCalculationPhase(), "getter should return nil when property is nil") + }) + + t.Run("GetCalculationPhase_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCalculationPhase() // Should return zero value + }) + + t.Run("GetInclusionType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogTax{} + var expected *TaxInclusionType + obj.InclusionType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInclusionType(), "getter should return the property value") + }) + + t.Run("GetInclusionType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogTax{} + obj.InclusionType = nil + + // Act & Assert + assert.Nil(t, obj.GetInclusionType(), "getter should return nil when property is nil") + }) + + t.Run("GetInclusionType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInclusionType() // Should return zero value + }) + + t.Run("GetPercentage", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogTax{} + var expected *string + obj.Percentage = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPercentage(), "getter should return the property value") + }) + + t.Run("GetPercentage_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogTax{} + obj.Percentage = nil + + // Act & Assert + assert.Nil(t, obj.GetPercentage(), "getter should return nil when property is nil") + }) + + t.Run("GetPercentage_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPercentage() // Should return zero value + }) + + t.Run("GetAppliesToCustomAmounts", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogTax{} + var expected *bool + obj.AppliesToCustomAmounts = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppliesToCustomAmounts(), "getter should return the property value") + }) + + t.Run("GetAppliesToCustomAmounts_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogTax{} + obj.AppliesToCustomAmounts = nil + + // Act & Assert + assert.Nil(t, obj.GetAppliesToCustomAmounts(), "getter should return nil when property is nil") + }) + + t.Run("GetAppliesToCustomAmounts_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppliesToCustomAmounts() // Should return zero value + }) + + t.Run("GetEnabled", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogTax{} + var expected *bool + obj.Enabled = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEnabled(), "getter should return the property value") + }) + + t.Run("GetEnabled_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogTax{} + obj.Enabled = nil + + // Act & Assert + assert.Nil(t, obj.GetEnabled(), "getter should return nil when property is nil") + }) + + t.Run("GetEnabled_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEnabled() // Should return zero value + }) + + t.Run("GetAppliesToProductSetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogTax{} + var expected *string + obj.AppliesToProductSetID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppliesToProductSetID(), "getter should return the property value") + }) + + t.Run("GetAppliesToProductSetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogTax{} + obj.AppliesToProductSetID = nil + + // Act & Assert + assert.Nil(t, obj.GetAppliesToProductSetID(), "getter should return nil when property is nil") + }) + + t.Run("GetAppliesToProductSetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppliesToProductSetID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogTax(t *testing.T) { + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogTax{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCalculationPhase_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogTax{} + var fernTestValueCalculationPhase *TaxCalculationPhase + + // Act + obj.SetCalculationPhase(fernTestValueCalculationPhase) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetInclusionType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogTax{} + var fernTestValueInclusionType *TaxInclusionType + + // Act + obj.SetInclusionType(fernTestValueInclusionType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPercentage_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogTax{} + var fernTestValuePercentage *string + + // Act + obj.SetPercentage(fernTestValuePercentage) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppliesToCustomAmounts_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogTax{} + var fernTestValueAppliesToCustomAmounts *bool + + // Act + obj.SetAppliesToCustomAmounts(fernTestValueAppliesToCustomAmounts) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEnabled_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogTax{} + var fernTestValueEnabled *bool + + // Act + obj.SetEnabled(fernTestValueEnabled) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppliesToProductSetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogTax{} + var fernTestValueAppliesToProductSetID *string + + // Act + obj.SetAppliesToProductSetID(fernTestValueAppliesToProductSetID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogTimePeriod(t *testing.T) { + t.Run("SetEvent", func(t *testing.T) { + obj := &CatalogTimePeriod{} + var fernTestValueEvent *string + obj.SetEvent(fernTestValueEvent) + assert.Equal(t, fernTestValueEvent, obj.Event) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogTimePeriod(t *testing.T) { + t.Run("GetEvent", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogTimePeriod{} + var expected *string + obj.Event = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEvent(), "getter should return the property value") + }) + + t.Run("GetEvent_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogTimePeriod{} + obj.Event = nil + + // Act & Assert + assert.Nil(t, obj.GetEvent(), "getter should return nil when property is nil") + }) + + t.Run("GetEvent_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogTimePeriod + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEvent() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogTimePeriod(t *testing.T) { + t.Run("SetEvent_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogTimePeriod{} + var fernTestValueEvent *string + + // Act + obj.SetEvent(fernTestValueEvent) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogV1ID(t *testing.T) { + t.Run("SetCatalogV1ID", func(t *testing.T) { + obj := &CatalogV1ID{} + var fernTestValueCatalogV1ID *string + obj.SetCatalogV1ID(fernTestValueCatalogV1ID) + assert.Equal(t, fernTestValueCatalogV1ID, obj.CatalogV1ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &CatalogV1ID{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogV1ID(t *testing.T) { + t.Run("GetCatalogV1ID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogV1ID{} + var expected *string + obj.CatalogV1ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogV1ID(), "getter should return the property value") + }) + + t.Run("GetCatalogV1ID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogV1ID{} + obj.CatalogV1ID = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogV1ID(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogV1ID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogV1ID + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogV1ID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogV1ID{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogV1ID{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogV1ID + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogV1ID(t *testing.T) { + t.Run("SetCatalogV1ID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogV1ID{} + var fernTestValueCatalogV1ID *string + + // Act + obj.SetCatalogV1ID(fernTestValueCatalogV1ID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogV1ID{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogVersionUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CatalogVersionUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CatalogVersionUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CatalogVersionUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CatalogVersionUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CatalogVersionUpdatedEvent{} + var fernTestValueData *CatalogVersionUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogVersionUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogVersionUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogVersionUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogVersionUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogVersionUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEvent{} + var expected *CatalogVersionUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogVersionUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogVersionUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEvent{} + var fernTestValueData *CatalogVersionUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogVersionUpdatedEventCatalogVersion(t *testing.T) { + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CatalogVersionUpdatedEventCatalogVersion{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogVersionUpdatedEventCatalogVersion(t *testing.T) { + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEventCatalogVersion{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEventCatalogVersion{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogVersionUpdatedEventCatalogVersion + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogVersionUpdatedEventCatalogVersion(t *testing.T) { + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEventCatalogVersion{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogVersionUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &CatalogVersionUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &CatalogVersionUpdatedEventData{} + var fernTestValueObject *CatalogVersionUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogVersionUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogVersionUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEventData{} + var expected *CatalogVersionUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogVersionUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogVersionUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEventData{} + var fernTestValueObject *CatalogVersionUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCatalogVersionUpdatedEventObject(t *testing.T) { + t.Run("SetCatalogVersion", func(t *testing.T) { + obj := &CatalogVersionUpdatedEventObject{} + var fernTestValueCatalogVersion *CatalogVersionUpdatedEventCatalogVersion + obj.SetCatalogVersion(fernTestValueCatalogVersion) + assert.Equal(t, fernTestValueCatalogVersion, obj.CatalogVersion) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCatalogVersionUpdatedEventObject(t *testing.T) { + t.Run("GetCatalogVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEventObject{} + var expected *CatalogVersionUpdatedEventCatalogVersion + obj.CatalogVersion = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogVersion(), "getter should return the property value") + }) + + t.Run("GetCatalogVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEventObject{} + obj.CatalogVersion = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogVersionUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogVersion() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCatalogVersionUpdatedEventObject(t *testing.T) { + t.Run("SetCatalogVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEventObject{} + var fernTestValueCatalogVersion *CatalogVersionUpdatedEventCatalogVersion + + // Act + obj.SetCatalogVersion(fernTestValueCatalogVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCategoryPathToRootNode(t *testing.T) { + t.Run("SetCategoryID", func(t *testing.T) { + obj := &CategoryPathToRootNode{} + var fernTestValueCategoryID *string + obj.SetCategoryID(fernTestValueCategoryID) + assert.Equal(t, fernTestValueCategoryID, obj.CategoryID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCategoryName", func(t *testing.T) { + obj := &CategoryPathToRootNode{} + var fernTestValueCategoryName *string + obj.SetCategoryName(fernTestValueCategoryName) + assert.Equal(t, fernTestValueCategoryName, obj.CategoryName) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCategoryPathToRootNode(t *testing.T) { + t.Run("GetCategoryID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CategoryPathToRootNode{} + var expected *string + obj.CategoryID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCategoryID(), "getter should return the property value") + }) + + t.Run("GetCategoryID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CategoryPathToRootNode{} + obj.CategoryID = nil + + // Act & Assert + assert.Nil(t, obj.GetCategoryID(), "getter should return nil when property is nil") + }) + + t.Run("GetCategoryID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CategoryPathToRootNode + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCategoryID() // Should return zero value + }) + + t.Run("GetCategoryName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CategoryPathToRootNode{} + var expected *string + obj.CategoryName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCategoryName(), "getter should return the property value") + }) + + t.Run("GetCategoryName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CategoryPathToRootNode{} + obj.CategoryName = nil + + // Act & Assert + assert.Nil(t, obj.GetCategoryName(), "getter should return nil when property is nil") + }) + + t.Run("GetCategoryName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CategoryPathToRootNode + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCategoryName() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCategoryPathToRootNode(t *testing.T) { + t.Run("SetCategoryID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CategoryPathToRootNode{} + var fernTestValueCategoryID *string + + // Act + obj.SetCategoryID(fernTestValueCategoryID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCategoryName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CategoryPathToRootNode{} + var fernTestValueCategoryName *string + + // Act + obj.SetCategoryName(fernTestValueCategoryName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCheckoutOptions(t *testing.T) { + t.Run("SetAllowTipping", func(t *testing.T) { + obj := &CheckoutOptions{} + var fernTestValueAllowTipping *bool + obj.SetAllowTipping(fernTestValueAllowTipping) + assert.Equal(t, fernTestValueAllowTipping, obj.AllowTipping) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomFields", func(t *testing.T) { + obj := &CheckoutOptions{} + var fernTestValueCustomFields []*CustomField + obj.SetCustomFields(fernTestValueCustomFields) + assert.Equal(t, fernTestValueCustomFields, obj.CustomFields) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSubscriptionPlanID", func(t *testing.T) { + obj := &CheckoutOptions{} + var fernTestValueSubscriptionPlanID *string + obj.SetSubscriptionPlanID(fernTestValueSubscriptionPlanID) + assert.Equal(t, fernTestValueSubscriptionPlanID, obj.SubscriptionPlanID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRedirectURL", func(t *testing.T) { + obj := &CheckoutOptions{} + var fernTestValueRedirectURL *string + obj.SetRedirectURL(fernTestValueRedirectURL) + assert.Equal(t, fernTestValueRedirectURL, obj.RedirectURL) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMerchantSupportEmail", func(t *testing.T) { + obj := &CheckoutOptions{} + var fernTestValueMerchantSupportEmail *string + obj.SetMerchantSupportEmail(fernTestValueMerchantSupportEmail) + assert.Equal(t, fernTestValueMerchantSupportEmail, obj.MerchantSupportEmail) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAskForShippingAddress", func(t *testing.T) { + obj := &CheckoutOptions{} + var fernTestValueAskForShippingAddress *bool + obj.SetAskForShippingAddress(fernTestValueAskForShippingAddress) + assert.Equal(t, fernTestValueAskForShippingAddress, obj.AskForShippingAddress) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAcceptedPaymentMethods", func(t *testing.T) { + obj := &CheckoutOptions{} + var fernTestValueAcceptedPaymentMethods *AcceptedPaymentMethods + obj.SetAcceptedPaymentMethods(fernTestValueAcceptedPaymentMethods) + assert.Equal(t, fernTestValueAcceptedPaymentMethods, obj.AcceptedPaymentMethods) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppFeeMoney", func(t *testing.T) { + obj := &CheckoutOptions{} + var fernTestValueAppFeeMoney *Money + obj.SetAppFeeMoney(fernTestValueAppFeeMoney) + assert.Equal(t, fernTestValueAppFeeMoney, obj.AppFeeMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetShippingFee", func(t *testing.T) { + obj := &CheckoutOptions{} + var fernTestValueShippingFee *ShippingFee + obj.SetShippingFee(fernTestValueShippingFee) + assert.Equal(t, fernTestValueShippingFee, obj.ShippingFee) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEnableCoupon", func(t *testing.T) { + obj := &CheckoutOptions{} + var fernTestValueEnableCoupon *bool + obj.SetEnableCoupon(fernTestValueEnableCoupon) + assert.Equal(t, fernTestValueEnableCoupon, obj.EnableCoupon) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEnableLoyalty", func(t *testing.T) { + obj := &CheckoutOptions{} + var fernTestValueEnableLoyalty *bool + obj.SetEnableLoyalty(fernTestValueEnableLoyalty) + assert.Equal(t, fernTestValueEnableLoyalty, obj.EnableLoyalty) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCheckoutOptions(t *testing.T) { + t.Run("GetAllowTipping", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + var expected *bool + obj.AllowTipping = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAllowTipping(), "getter should return the property value") + }) + + t.Run("GetAllowTipping_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + obj.AllowTipping = nil + + // Act & Assert + assert.Nil(t, obj.GetAllowTipping(), "getter should return nil when property is nil") + }) + + t.Run("GetAllowTipping_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAllowTipping() // Should return zero value + }) + + t.Run("GetCustomFields", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + var expected []*CustomField + obj.CustomFields = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomFields(), "getter should return the property value") + }) + + t.Run("GetCustomFields_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + obj.CustomFields = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomFields(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomFields_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomFields() // Should return zero value + }) + + t.Run("GetSubscriptionPlanID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + var expected *string + obj.SubscriptionPlanID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscriptionPlanID(), "getter should return the property value") + }) + + t.Run("GetSubscriptionPlanID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + obj.SubscriptionPlanID = nil + + // Act & Assert + assert.Nil(t, obj.GetSubscriptionPlanID(), "getter should return nil when property is nil") + }) + + t.Run("GetSubscriptionPlanID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscriptionPlanID() // Should return zero value + }) + + t.Run("GetRedirectURL", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + var expected *string + obj.RedirectURL = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRedirectURL(), "getter should return the property value") + }) + + t.Run("GetRedirectURL_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + obj.RedirectURL = nil + + // Act & Assert + assert.Nil(t, obj.GetRedirectURL(), "getter should return nil when property is nil") + }) + + t.Run("GetRedirectURL_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRedirectURL() // Should return zero value + }) + + t.Run("GetMerchantSupportEmail", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + var expected *string + obj.MerchantSupportEmail = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantSupportEmail(), "getter should return the property value") + }) + + t.Run("GetMerchantSupportEmail_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + obj.MerchantSupportEmail = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantSupportEmail(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantSupportEmail_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantSupportEmail() // Should return zero value + }) + + t.Run("GetAskForShippingAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + var expected *bool + obj.AskForShippingAddress = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAskForShippingAddress(), "getter should return the property value") + }) + + t.Run("GetAskForShippingAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + obj.AskForShippingAddress = nil + + // Act & Assert + assert.Nil(t, obj.GetAskForShippingAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetAskForShippingAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAskForShippingAddress() // Should return zero value + }) + + t.Run("GetAcceptedPaymentMethods", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + var expected *AcceptedPaymentMethods + obj.AcceptedPaymentMethods = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAcceptedPaymentMethods(), "getter should return the property value") + }) + + t.Run("GetAcceptedPaymentMethods_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + obj.AcceptedPaymentMethods = nil + + // Act & Assert + assert.Nil(t, obj.GetAcceptedPaymentMethods(), "getter should return nil when property is nil") + }) + + t.Run("GetAcceptedPaymentMethods_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAcceptedPaymentMethods() // Should return zero value + }) + + t.Run("GetAppFeeMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + var expected *Money + obj.AppFeeMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppFeeMoney(), "getter should return the property value") + }) + + t.Run("GetAppFeeMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + obj.AppFeeMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAppFeeMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAppFeeMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppFeeMoney() // Should return zero value + }) + + t.Run("GetShippingFee", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + var expected *ShippingFee + obj.ShippingFee = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetShippingFee(), "getter should return the property value") + }) + + t.Run("GetShippingFee_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + obj.ShippingFee = nil + + // Act & Assert + assert.Nil(t, obj.GetShippingFee(), "getter should return nil when property is nil") + }) + + t.Run("GetShippingFee_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetShippingFee() // Should return zero value + }) + + t.Run("GetEnableCoupon", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + var expected *bool + obj.EnableCoupon = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEnableCoupon(), "getter should return the property value") + }) + + t.Run("GetEnableCoupon_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + obj.EnableCoupon = nil + + // Act & Assert + assert.Nil(t, obj.GetEnableCoupon(), "getter should return nil when property is nil") + }) + + t.Run("GetEnableCoupon_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEnableCoupon() // Should return zero value + }) + + t.Run("GetEnableLoyalty", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + var expected *bool + obj.EnableLoyalty = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEnableLoyalty(), "getter should return the property value") + }) + + t.Run("GetEnableLoyalty_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + obj.EnableLoyalty = nil + + // Act & Assert + assert.Nil(t, obj.GetEnableLoyalty(), "getter should return nil when property is nil") + }) + + t.Run("GetEnableLoyalty_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEnableLoyalty() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCheckoutOptions(t *testing.T) { + t.Run("SetAllowTipping_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + var fernTestValueAllowTipping *bool + + // Act + obj.SetAllowTipping(fernTestValueAllowTipping) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomFields_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + var fernTestValueCustomFields []*CustomField + + // Act + obj.SetCustomFields(fernTestValueCustomFields) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSubscriptionPlanID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + var fernTestValueSubscriptionPlanID *string + + // Act + obj.SetSubscriptionPlanID(fernTestValueSubscriptionPlanID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRedirectURL_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + var fernTestValueRedirectURL *string + + // Act + obj.SetRedirectURL(fernTestValueRedirectURL) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMerchantSupportEmail_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + var fernTestValueMerchantSupportEmail *string + + // Act + obj.SetMerchantSupportEmail(fernTestValueMerchantSupportEmail) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAskForShippingAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + var fernTestValueAskForShippingAddress *bool + + // Act + obj.SetAskForShippingAddress(fernTestValueAskForShippingAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAcceptedPaymentMethods_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + var fernTestValueAcceptedPaymentMethods *AcceptedPaymentMethods + + // Act + obj.SetAcceptedPaymentMethods(fernTestValueAcceptedPaymentMethods) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppFeeMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + var fernTestValueAppFeeMoney *Money + + // Act + obj.SetAppFeeMoney(fernTestValueAppFeeMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetShippingFee_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + var fernTestValueShippingFee *ShippingFee + + // Act + obj.SetShippingFee(fernTestValueShippingFee) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEnableCoupon_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + var fernTestValueEnableCoupon *bool + + // Act + obj.SetEnableCoupon(fernTestValueEnableCoupon) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEnableLoyalty_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + var fernTestValueEnableLoyalty *bool + + // Act + obj.SetEnableLoyalty(fernTestValueEnableLoyalty) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCollectedData(t *testing.T) { + t.Run("SetInputText", func(t *testing.T) { + obj := &CollectedData{} + var fernTestValueInputText *string + obj.SetInputText(fernTestValueInputText) + assert.Equal(t, fernTestValueInputText, obj.InputText) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCollectedData(t *testing.T) { + t.Run("GetInputText", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CollectedData{} + var expected *string + obj.InputText = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInputText(), "getter should return the property value") + }) + + t.Run("GetInputText_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CollectedData{} + obj.InputText = nil + + // Act & Assert + assert.Nil(t, obj.GetInputText(), "getter should return nil when property is nil") + }) + + t.Run("GetInputText_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CollectedData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInputText() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCollectedData(t *testing.T) { + t.Run("SetInputText_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CollectedData{} + var fernTestValueInputText *string + + // Act + obj.SetInputText(fernTestValueInputText) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersConfirmationDecision(t *testing.T) { + t.Run("SetHasAgreed", func(t *testing.T) { + obj := &ConfirmationDecision{} + var fernTestValueHasAgreed *bool + obj.SetHasAgreed(fernTestValueHasAgreed) + assert.Equal(t, fernTestValueHasAgreed, obj.HasAgreed) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersConfirmationDecision(t *testing.T) { + t.Run("GetHasAgreed", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ConfirmationDecision{} + var expected *bool + obj.HasAgreed = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetHasAgreed(), "getter should return the property value") + }) + + t.Run("GetHasAgreed_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ConfirmationDecision{} + obj.HasAgreed = nil + + // Act & Assert + assert.Nil(t, obj.GetHasAgreed(), "getter should return nil when property is nil") + }) + + t.Run("GetHasAgreed_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ConfirmationDecision + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetHasAgreed() // Should return zero value + }) + +} + +func TestSettersMarkExplicitConfirmationDecision(t *testing.T) { + t.Run("SetHasAgreed_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ConfirmationDecision{} + var fernTestValueHasAgreed *bool + + // Act + obj.SetHasAgreed(fernTestValueHasAgreed) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersConfirmationOptions(t *testing.T) { + t.Run("SetTitle", func(t *testing.T) { + obj := &ConfirmationOptions{} + var fernTestValueTitle string + obj.SetTitle(fernTestValueTitle) + assert.Equal(t, fernTestValueTitle, obj.Title) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBody", func(t *testing.T) { + obj := &ConfirmationOptions{} + var fernTestValueBody string + obj.SetBody(fernTestValueBody) + assert.Equal(t, fernTestValueBody, obj.Body) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAgreeButtonText", func(t *testing.T) { + obj := &ConfirmationOptions{} + var fernTestValueAgreeButtonText string + obj.SetAgreeButtonText(fernTestValueAgreeButtonText) + assert.Equal(t, fernTestValueAgreeButtonText, obj.AgreeButtonText) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDisagreeButtonText", func(t *testing.T) { + obj := &ConfirmationOptions{} + var fernTestValueDisagreeButtonText *string + obj.SetDisagreeButtonText(fernTestValueDisagreeButtonText) + assert.Equal(t, fernTestValueDisagreeButtonText, obj.DisagreeButtonText) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDecision", func(t *testing.T) { + obj := &ConfirmationOptions{} + var fernTestValueDecision *ConfirmationDecision + obj.SetDecision(fernTestValueDecision) + assert.Equal(t, fernTestValueDecision, obj.Decision) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersConfirmationOptions(t *testing.T) { + t.Run("GetTitle", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ConfirmationOptions{} + var expected string + obj.Title = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTitle(), "getter should return the property value") + }) + + t.Run("GetTitle_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ConfirmationOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTitle() // Should return zero value + }) + + t.Run("GetBody", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ConfirmationOptions{} + var expected string + obj.Body = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBody(), "getter should return the property value") + }) + + t.Run("GetBody_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ConfirmationOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBody() // Should return zero value + }) + + t.Run("GetAgreeButtonText", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ConfirmationOptions{} + var expected string + obj.AgreeButtonText = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAgreeButtonText(), "getter should return the property value") + }) + + t.Run("GetAgreeButtonText_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ConfirmationOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAgreeButtonText() // Should return zero value + }) + + t.Run("GetDisagreeButtonText", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ConfirmationOptions{} + var expected *string + obj.DisagreeButtonText = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDisagreeButtonText(), "getter should return the property value") + }) + + t.Run("GetDisagreeButtonText_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ConfirmationOptions{} + obj.DisagreeButtonText = nil + + // Act & Assert + assert.Nil(t, obj.GetDisagreeButtonText(), "getter should return nil when property is nil") + }) + + t.Run("GetDisagreeButtonText_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ConfirmationOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDisagreeButtonText() // Should return zero value + }) + + t.Run("GetDecision", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ConfirmationOptions{} + var expected *ConfirmationDecision + obj.Decision = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDecision(), "getter should return the property value") + }) + + t.Run("GetDecision_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ConfirmationOptions{} + obj.Decision = nil + + // Act & Assert + assert.Nil(t, obj.GetDecision(), "getter should return nil when property is nil") + }) + + t.Run("GetDecision_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ConfirmationOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDecision() // Should return zero value + }) + +} + +func TestSettersMarkExplicitConfirmationOptions(t *testing.T) { + t.Run("SetTitle_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ConfirmationOptions{} + var fernTestValueTitle string + + // Act + obj.SetTitle(fernTestValueTitle) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBody_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ConfirmationOptions{} + var fernTestValueBody string + + // Act + obj.SetBody(fernTestValueBody) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAgreeButtonText_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ConfirmationOptions{} + var fernTestValueAgreeButtonText string + + // Act + obj.SetAgreeButtonText(fernTestValueAgreeButtonText) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDisagreeButtonText_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ConfirmationOptions{} + var fernTestValueDisagreeButtonText *string + + // Act + obj.SetDisagreeButtonText(fernTestValueDisagreeButtonText) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDecision_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ConfirmationOptions{} + var fernTestValueDecision *ConfirmationDecision + + // Act + obj.SetDecision(fernTestValueDecision) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateBookingCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition", func(t *testing.T) { + obj := &CreateBookingCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + assert.Equal(t, fernTestValueCustomAttributeDefinition, obj.CustomAttributeDefinition) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateBookingCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateBookingCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetCustomAttributeDefinition", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBookingCustomAttributeDefinitionResponse{} + var expected *CustomAttributeDefinition + obj.CustomAttributeDefinition = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeDefinition(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeDefinition_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBookingCustomAttributeDefinitionResponse{} + obj.CustomAttributeDefinition = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeDefinition(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeDefinition_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateBookingCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeDefinition() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBookingCustomAttributeDefinitionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBookingCustomAttributeDefinitionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateBookingCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateBookingCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBookingCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + + // Act + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBookingCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateBreakTypeResponse(t *testing.T) { + t.Run("SetBreakType", func(t *testing.T) { + obj := &CreateBreakTypeResponse{} + var fernTestValueBreakType *BreakType + obj.SetBreakType(fernTestValueBreakType) + assert.Equal(t, fernTestValueBreakType, obj.BreakType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateBreakTypeResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateBreakTypeResponse(t *testing.T) { + t.Run("GetBreakType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBreakTypeResponse{} + var expected *BreakType + obj.BreakType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBreakType(), "getter should return the property value") + }) + + t.Run("GetBreakType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBreakTypeResponse{} + obj.BreakType = nil + + // Act & Assert + assert.Nil(t, obj.GetBreakType(), "getter should return nil when property is nil") + }) + + t.Run("GetBreakType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateBreakTypeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBreakType() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBreakTypeResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBreakTypeResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateBreakTypeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateBreakTypeResponse(t *testing.T) { + t.Run("SetBreakType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBreakTypeResponse{} + var fernTestValueBreakType *BreakType + + // Act + obj.SetBreakType(fernTestValueBreakType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBreakTypeResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateCatalogImageRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateCatalogImageRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObjectID", func(t *testing.T) { + obj := &CreateCatalogImageRequest{} + var fernTestValueObjectID *string + obj.SetObjectID(fernTestValueObjectID) + assert.Equal(t, fernTestValueObjectID, obj.ObjectID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImage", func(t *testing.T) { + obj := &CreateCatalogImageRequest{} + var fernTestValueImage *CatalogObject + obj.SetImage(fernTestValueImage) + assert.Equal(t, fernTestValueImage, obj.Image) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsPrimary", func(t *testing.T) { + obj := &CreateCatalogImageRequest{} + var fernTestValueIsPrimary *bool + obj.SetIsPrimary(fernTestValueIsPrimary) + assert.Equal(t, fernTestValueIsPrimary, obj.IsPrimary) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateCatalogImageRequest(t *testing.T) { + t.Run("GetIdempotencyKey", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCatalogImageRequest{} + var expected string + obj.IdempotencyKey = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIdempotencyKey(), "getter should return the property value") + }) + + t.Run("GetIdempotencyKey_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCatalogImageRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIdempotencyKey() // Should return zero value + }) + + t.Run("GetObjectID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCatalogImageRequest{} + var expected *string + obj.ObjectID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObjectID(), "getter should return the property value") + }) + + t.Run("GetObjectID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCatalogImageRequest{} + obj.ObjectID = nil + + // Act & Assert + assert.Nil(t, obj.GetObjectID(), "getter should return nil when property is nil") + }) + + t.Run("GetObjectID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCatalogImageRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObjectID() // Should return zero value + }) + + t.Run("GetImage", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCatalogImageRequest{} + var expected *CatalogObject + obj.Image = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImage(), "getter should return the property value") + }) + + t.Run("GetImage_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCatalogImageRequest{} + obj.Image = nil + + // Act & Assert + assert.Nil(t, obj.GetImage(), "getter should return nil when property is nil") + }) + + t.Run("GetImage_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCatalogImageRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImage() // Should return zero value + }) + + t.Run("GetIsPrimary", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCatalogImageRequest{} + var expected *bool + obj.IsPrimary = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsPrimary(), "getter should return the property value") + }) + + t.Run("GetIsPrimary_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCatalogImageRequest{} + obj.IsPrimary = nil + + // Act & Assert + assert.Nil(t, obj.GetIsPrimary(), "getter should return nil when property is nil") + }) + + t.Run("GetIsPrimary_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCatalogImageRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsPrimary() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateCatalogImageRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCatalogImageRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObjectID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCatalogImageRequest{} + var fernTestValueObjectID *string + + // Act + obj.SetObjectID(fernTestValueObjectID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImage_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCatalogImageRequest{} + var fernTestValueImage *CatalogObject + + // Act + obj.SetImage(fernTestValueImage) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsPrimary_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCatalogImageRequest{} + var fernTestValueIsPrimary *bool + + // Act + obj.SetIsPrimary(fernTestValueIsPrimary) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateCatalogImageResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateCatalogImageResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImage", func(t *testing.T) { + obj := &CreateCatalogImageResponse{} + var fernTestValueImage *CatalogObject + obj.SetImage(fernTestValueImage) + assert.Equal(t, fernTestValueImage, obj.Image) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateCatalogImageResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCatalogImageResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCatalogImageResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCatalogImageResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetImage", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCatalogImageResponse{} + var expected *CatalogObject + obj.Image = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImage(), "getter should return the property value") + }) + + t.Run("GetImage_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCatalogImageResponse{} + obj.Image = nil + + // Act & Assert + assert.Nil(t, obj.GetImage(), "getter should return nil when property is nil") + }) + + t.Run("GetImage_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCatalogImageResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImage() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateCatalogImageResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCatalogImageResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImage_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCatalogImageResponse{} + var fernTestValueImage *CatalogObject + + // Act + obj.SetImage(fernTestValueImage) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateCustomerCardResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateCustomerCardResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCard", func(t *testing.T) { + obj := &CreateCustomerCardResponse{} + var fernTestValueCard *Card + obj.SetCard(fernTestValueCard) + assert.Equal(t, fernTestValueCard, obj.Card) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateCustomerCardResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerCardResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerCardResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCustomerCardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetCard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerCardResponse{} + var expected *Card + obj.Card = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCard(), "getter should return the property value") + }) + + t.Run("GetCard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerCardResponse{} + obj.Card = nil + + // Act & Assert + assert.Nil(t, obj.GetCard(), "getter should return nil when property is nil") + }) + + t.Run("GetCard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCustomerCardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCard() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateCustomerCardResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerCardResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerCardResponse{} + var fernTestValueCard *Card + + // Act + obj.SetCard(fernTestValueCard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateCustomerCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition", func(t *testing.T) { + obj := &CreateCustomerCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + assert.Equal(t, fernTestValueCustomAttributeDefinition, obj.CustomAttributeDefinition) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateCustomerCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateCustomerCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetCustomAttributeDefinition", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerCustomAttributeDefinitionResponse{} + var expected *CustomAttributeDefinition + obj.CustomAttributeDefinition = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeDefinition(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeDefinition_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerCustomAttributeDefinitionResponse{} + obj.CustomAttributeDefinition = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeDefinition(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeDefinition_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCustomerCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeDefinition() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerCustomAttributeDefinitionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerCustomAttributeDefinitionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCustomerCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateCustomerCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + + // Act + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateCustomerGroupResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateCustomerGroupResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGroup", func(t *testing.T) { + obj := &CreateCustomerGroupResponse{} + var fernTestValueGroup *CustomerGroup + obj.SetGroup(fernTestValueGroup) + assert.Equal(t, fernTestValueGroup, obj.Group) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateCustomerGroupResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerGroupResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerGroupResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCustomerGroupResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetGroup", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerGroupResponse{} + var expected *CustomerGroup + obj.Group = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGroup(), "getter should return the property value") + }) + + t.Run("GetGroup_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerGroupResponse{} + obj.Group = nil + + // Act & Assert + assert.Nil(t, obj.GetGroup(), "getter should return nil when property is nil") + }) + + t.Run("GetGroup_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCustomerGroupResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGroup() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateCustomerGroupResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerGroupResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGroup_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerGroupResponse{} + var fernTestValueGroup *CustomerGroup + + // Act + obj.SetGroup(fernTestValueGroup) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateDeviceCodeResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateDeviceCodeResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeviceCode", func(t *testing.T) { + obj := &CreateDeviceCodeResponse{} + var fernTestValueDeviceCode *DeviceCode + obj.SetDeviceCode(fernTestValueDeviceCode) + assert.Equal(t, fernTestValueDeviceCode, obj.DeviceCode) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateDeviceCodeResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDeviceCodeResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDeviceCodeResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateDeviceCodeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetDeviceCode", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDeviceCodeResponse{} + var expected *DeviceCode + obj.DeviceCode = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeviceCode(), "getter should return the property value") + }) + + t.Run("GetDeviceCode_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDeviceCodeResponse{} + obj.DeviceCode = nil + + // Act & Assert + assert.Nil(t, obj.GetDeviceCode(), "getter should return nil when property is nil") + }) + + t.Run("GetDeviceCode_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateDeviceCodeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeviceCode() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateDeviceCodeResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDeviceCodeResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeviceCode_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDeviceCodeResponse{} + var fernTestValueDeviceCode *DeviceCode + + // Act + obj.SetDeviceCode(fernTestValueDeviceCode) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateGiftCardActivityResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateGiftCardActivityResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGiftCardActivity", func(t *testing.T) { + obj := &CreateGiftCardActivityResponse{} + var fernTestValueGiftCardActivity *GiftCardActivity + obj.SetGiftCardActivity(fernTestValueGiftCardActivity) + assert.Equal(t, fernTestValueGiftCardActivity, obj.GiftCardActivity) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateGiftCardActivityResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateGiftCardActivityResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateGiftCardActivityResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateGiftCardActivityResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetGiftCardActivity", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateGiftCardActivityResponse{} + var expected *GiftCardActivity + obj.GiftCardActivity = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGiftCardActivity(), "getter should return the property value") + }) + + t.Run("GetGiftCardActivity_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateGiftCardActivityResponse{} + obj.GiftCardActivity = nil + + // Act & Assert + assert.Nil(t, obj.GetGiftCardActivity(), "getter should return nil when property is nil") + }) + + t.Run("GetGiftCardActivity_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateGiftCardActivityResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGiftCardActivity() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateGiftCardActivityResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateGiftCardActivityResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGiftCardActivity_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateGiftCardActivityResponse{} + var fernTestValueGiftCardActivity *GiftCardActivity + + // Act + obj.SetGiftCardActivity(fernTestValueGiftCardActivity) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateLocationCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition", func(t *testing.T) { + obj := &CreateLocationCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + assert.Equal(t, fernTestValueCustomAttributeDefinition, obj.CustomAttributeDefinition) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateLocationCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateLocationCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetCustomAttributeDefinition", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLocationCustomAttributeDefinitionResponse{} + var expected *CustomAttributeDefinition + obj.CustomAttributeDefinition = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeDefinition(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeDefinition_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLocationCustomAttributeDefinitionResponse{} + obj.CustomAttributeDefinition = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeDefinition(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeDefinition_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateLocationCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeDefinition() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLocationCustomAttributeDefinitionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLocationCustomAttributeDefinitionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateLocationCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateLocationCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLocationCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + + // Act + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLocationCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateLoyaltyAccountResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateLoyaltyAccountResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLoyaltyAccount", func(t *testing.T) { + obj := &CreateLoyaltyAccountResponse{} + var fernTestValueLoyaltyAccount *LoyaltyAccount + obj.SetLoyaltyAccount(fernTestValueLoyaltyAccount) + assert.Equal(t, fernTestValueLoyaltyAccount, obj.LoyaltyAccount) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateLoyaltyAccountResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLoyaltyAccountResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLoyaltyAccountResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateLoyaltyAccountResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetLoyaltyAccount", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLoyaltyAccountResponse{} + var expected *LoyaltyAccount + obj.LoyaltyAccount = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyAccount(), "getter should return the property value") + }) + + t.Run("GetLoyaltyAccount_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLoyaltyAccountResponse{} + obj.LoyaltyAccount = nil + + // Act & Assert + assert.Nil(t, obj.GetLoyaltyAccount(), "getter should return nil when property is nil") + }) + + t.Run("GetLoyaltyAccount_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateLoyaltyAccountResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyAccount() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateLoyaltyAccountResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLoyaltyAccountResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLoyaltyAccount_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLoyaltyAccountResponse{} + var fernTestValueLoyaltyAccount *LoyaltyAccount + + // Act + obj.SetLoyaltyAccount(fernTestValueLoyaltyAccount) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateLoyaltyPromotionResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateLoyaltyPromotionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLoyaltyPromotion", func(t *testing.T) { + obj := &CreateLoyaltyPromotionResponse{} + var fernTestValueLoyaltyPromotion *LoyaltyPromotion + obj.SetLoyaltyPromotion(fernTestValueLoyaltyPromotion) + assert.Equal(t, fernTestValueLoyaltyPromotion, obj.LoyaltyPromotion) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateLoyaltyPromotionResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLoyaltyPromotionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLoyaltyPromotionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateLoyaltyPromotionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetLoyaltyPromotion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLoyaltyPromotionResponse{} + var expected *LoyaltyPromotion + obj.LoyaltyPromotion = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyPromotion(), "getter should return the property value") + }) + + t.Run("GetLoyaltyPromotion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLoyaltyPromotionResponse{} + obj.LoyaltyPromotion = nil + + // Act & Assert + assert.Nil(t, obj.GetLoyaltyPromotion(), "getter should return nil when property is nil") + }) + + t.Run("GetLoyaltyPromotion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateLoyaltyPromotionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyPromotion() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateLoyaltyPromotionResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLoyaltyPromotionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLoyaltyPromotion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLoyaltyPromotionResponse{} + var fernTestValueLoyaltyPromotion *LoyaltyPromotion + + // Act + obj.SetLoyaltyPromotion(fernTestValueLoyaltyPromotion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateLoyaltyRewardResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateLoyaltyRewardResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReward", func(t *testing.T) { + obj := &CreateLoyaltyRewardResponse{} + var fernTestValueReward *LoyaltyReward + obj.SetReward(fernTestValueReward) + assert.Equal(t, fernTestValueReward, obj.Reward) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateLoyaltyRewardResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLoyaltyRewardResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLoyaltyRewardResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateLoyaltyRewardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetReward", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLoyaltyRewardResponse{} + var expected *LoyaltyReward + obj.Reward = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReward(), "getter should return the property value") + }) + + t.Run("GetReward_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLoyaltyRewardResponse{} + obj.Reward = nil + + // Act & Assert + assert.Nil(t, obj.GetReward(), "getter should return nil when property is nil") + }) + + t.Run("GetReward_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateLoyaltyRewardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReward() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateLoyaltyRewardResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLoyaltyRewardResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReward_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLoyaltyRewardResponse{} + var fernTestValueReward *LoyaltyReward + + // Act + obj.SetReward(fernTestValueReward) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateMerchantCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition", func(t *testing.T) { + obj := &CreateMerchantCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + assert.Equal(t, fernTestValueCustomAttributeDefinition, obj.CustomAttributeDefinition) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateMerchantCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateMerchantCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetCustomAttributeDefinition", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateMerchantCustomAttributeDefinitionResponse{} + var expected *CustomAttributeDefinition + obj.CustomAttributeDefinition = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeDefinition(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeDefinition_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateMerchantCustomAttributeDefinitionResponse{} + obj.CustomAttributeDefinition = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeDefinition(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeDefinition_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateMerchantCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeDefinition() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateMerchantCustomAttributeDefinitionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateMerchantCustomAttributeDefinitionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateMerchantCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateMerchantCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateMerchantCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + + // Act + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateMerchantCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateOrderCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition", func(t *testing.T) { + obj := &CreateOrderCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + assert.Equal(t, fernTestValueCustomAttributeDefinition, obj.CustomAttributeDefinition) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateOrderCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateOrderCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetCustomAttributeDefinition", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateOrderCustomAttributeDefinitionResponse{} + var expected *CustomAttributeDefinition + obj.CustomAttributeDefinition = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeDefinition(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeDefinition_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateOrderCustomAttributeDefinitionResponse{} + obj.CustomAttributeDefinition = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeDefinition(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeDefinition_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateOrderCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeDefinition() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateOrderCustomAttributeDefinitionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateOrderCustomAttributeDefinitionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateOrderCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateOrderCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateOrderCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + + // Act + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateOrderCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateOrderRequest(t *testing.T) { + t.Run("SetOrder", func(t *testing.T) { + obj := &CreateOrderRequest{} + var fernTestValueOrder *Order + obj.SetOrder(fernTestValueOrder) + assert.Equal(t, fernTestValueOrder, obj.Order) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateOrderRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateOrderRequest(t *testing.T) { + t.Run("GetOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateOrderRequest{} + var expected *Order + obj.Order = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrder(), "getter should return the property value") + }) + + t.Run("GetOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateOrderRequest{} + obj.Order = nil + + // Act & Assert + assert.Nil(t, obj.GetOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateOrderRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrder() // Should return zero value + }) + + t.Run("GetIdempotencyKey", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateOrderRequest{} + var expected *string + obj.IdempotencyKey = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIdempotencyKey(), "getter should return the property value") + }) + + t.Run("GetIdempotencyKey_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateOrderRequest{} + obj.IdempotencyKey = nil + + // Act & Assert + assert.Nil(t, obj.GetIdempotencyKey(), "getter should return nil when property is nil") + }) + + t.Run("GetIdempotencyKey_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateOrderRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIdempotencyKey() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateOrderRequest(t *testing.T) { + t.Run("SetOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateOrderRequest{} + var fernTestValueOrder *Order + + // Act + obj.SetOrder(fernTestValueOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateOrderRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreatePaymentLinkResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CreatePaymentLinkResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPaymentLink", func(t *testing.T) { + obj := &CreatePaymentLinkResponse{} + var fernTestValuePaymentLink *PaymentLink + obj.SetPaymentLink(fernTestValuePaymentLink) + assert.Equal(t, fernTestValuePaymentLink, obj.PaymentLink) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRelatedResources", func(t *testing.T) { + obj := &CreatePaymentLinkResponse{} + var fernTestValueRelatedResources *PaymentLinkRelatedResources + obj.SetRelatedResources(fernTestValueRelatedResources) + assert.Equal(t, fernTestValueRelatedResources, obj.RelatedResources) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreatePaymentLinkResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentLinkResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentLinkResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreatePaymentLinkResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetPaymentLink", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentLinkResponse{} + var expected *PaymentLink + obj.PaymentLink = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentLink(), "getter should return the property value") + }) + + t.Run("GetPaymentLink_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentLinkResponse{} + obj.PaymentLink = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentLink(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentLink_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreatePaymentLinkResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentLink() // Should return zero value + }) + + t.Run("GetRelatedResources", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentLinkResponse{} + var expected *PaymentLinkRelatedResources + obj.RelatedResources = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRelatedResources(), "getter should return the property value") + }) + + t.Run("GetRelatedResources_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentLinkResponse{} + obj.RelatedResources = nil + + // Act & Assert + assert.Nil(t, obj.GetRelatedResources(), "getter should return nil when property is nil") + }) + + t.Run("GetRelatedResources_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreatePaymentLinkResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRelatedResources() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreatePaymentLinkResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentLinkResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPaymentLink_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentLinkResponse{} + var fernTestValuePaymentLink *PaymentLink + + // Act + obj.SetPaymentLink(fernTestValuePaymentLink) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRelatedResources_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentLinkResponse{} + var fernTestValueRelatedResources *PaymentLinkRelatedResources + + // Act + obj.SetRelatedResources(fernTestValueRelatedResources) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateShiftResponse(t *testing.T) { + t.Run("SetShift", func(t *testing.T) { + obj := &CreateShiftResponse{} + var fernTestValueShift *Shift + obj.SetShift(fernTestValueShift) + assert.Equal(t, fernTestValueShift, obj.Shift) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateShiftResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateShiftResponse(t *testing.T) { + t.Run("GetShift", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateShiftResponse{} + var expected *Shift + obj.Shift = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetShift(), "getter should return the property value") + }) + + t.Run("GetShift_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateShiftResponse{} + obj.Shift = nil + + // Act & Assert + assert.Nil(t, obj.GetShift(), "getter should return nil when property is nil") + }) + + t.Run("GetShift_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateShiftResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetShift() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateShiftResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateShiftResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateShiftResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateShiftResponse(t *testing.T) { + t.Run("SetShift_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateShiftResponse{} + var fernTestValueShift *Shift + + // Act + obj.SetShift(fernTestValueShift) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateShiftResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateTerminalActionResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateTerminalActionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAction", func(t *testing.T) { + obj := &CreateTerminalActionResponse{} + var fernTestValueAction *TerminalAction + obj.SetAction(fernTestValueAction) + assert.Equal(t, fernTestValueAction, obj.Action) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateTerminalActionResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTerminalActionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTerminalActionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTerminalActionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetAction", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTerminalActionResponse{} + var expected *TerminalAction + obj.Action = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAction(), "getter should return the property value") + }) + + t.Run("GetAction_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTerminalActionResponse{} + obj.Action = nil + + // Act & Assert + assert.Nil(t, obj.GetAction(), "getter should return nil when property is nil") + }) + + t.Run("GetAction_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTerminalActionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAction() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateTerminalActionResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTerminalActionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAction_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTerminalActionResponse{} + var fernTestValueAction *TerminalAction + + // Act + obj.SetAction(fernTestValueAction) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateTerminalCheckoutResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateTerminalCheckoutResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCheckout", func(t *testing.T) { + obj := &CreateTerminalCheckoutResponse{} + var fernTestValueCheckout *TerminalCheckout + obj.SetCheckout(fernTestValueCheckout) + assert.Equal(t, fernTestValueCheckout, obj.Checkout) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateTerminalCheckoutResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTerminalCheckoutResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTerminalCheckoutResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTerminalCheckoutResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetCheckout", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTerminalCheckoutResponse{} + var expected *TerminalCheckout + obj.Checkout = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCheckout(), "getter should return the property value") + }) + + t.Run("GetCheckout_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTerminalCheckoutResponse{} + obj.Checkout = nil + + // Act & Assert + assert.Nil(t, obj.GetCheckout(), "getter should return nil when property is nil") + }) + + t.Run("GetCheckout_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTerminalCheckoutResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCheckout() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateTerminalCheckoutResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTerminalCheckoutResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCheckout_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTerminalCheckoutResponse{} + var fernTestValueCheckout *TerminalCheckout + + // Act + obj.SetCheckout(fernTestValueCheckout) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateTerminalRefundResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateTerminalRefundResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRefund", func(t *testing.T) { + obj := &CreateTerminalRefundResponse{} + var fernTestValueRefund *TerminalRefund + obj.SetRefund(fernTestValueRefund) + assert.Equal(t, fernTestValueRefund, obj.Refund) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateTerminalRefundResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTerminalRefundResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTerminalRefundResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTerminalRefundResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetRefund", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTerminalRefundResponse{} + var expected *TerminalRefund + obj.Refund = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRefund(), "getter should return the property value") + }) + + t.Run("GetRefund_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTerminalRefundResponse{} + obj.Refund = nil + + // Act & Assert + assert.Nil(t, obj.GetRefund(), "getter should return nil when property is nil") + }) + + t.Run("GetRefund_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTerminalRefundResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRefund() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateTerminalRefundResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTerminalRefundResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRefund_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTerminalRefundResponse{} + var fernTestValueRefund *TerminalRefund + + // Act + obj.SetRefund(fernTestValueRefund) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateWebhookSubscriptionResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateWebhookSubscriptionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSubscription", func(t *testing.T) { + obj := &CreateWebhookSubscriptionResponse{} + var fernTestValueSubscription *WebhookSubscription + obj.SetSubscription(fernTestValueSubscription) + assert.Equal(t, fernTestValueSubscription, obj.Subscription) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateWebhookSubscriptionResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateWebhookSubscriptionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateWebhookSubscriptionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateWebhookSubscriptionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetSubscription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateWebhookSubscriptionResponse{} + var expected *WebhookSubscription + obj.Subscription = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscription(), "getter should return the property value") + }) + + t.Run("GetSubscription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateWebhookSubscriptionResponse{} + obj.Subscription = nil + + // Act & Assert + assert.Nil(t, obj.GetSubscription(), "getter should return nil when property is nil") + }) + + t.Run("GetSubscription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateWebhookSubscriptionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscription() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateWebhookSubscriptionResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateWebhookSubscriptionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSubscription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateWebhookSubscriptionResponse{} + var fernTestValueSubscription *WebhookSubscription + + // Act + obj.SetSubscription(fernTestValueSubscription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomAttribute(t *testing.T) { + t.Run("SetKey", func(t *testing.T) { + obj := &CustomAttribute{} + var fernTestValueKey *string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetValue", func(t *testing.T) { + obj := &CustomAttribute{} + var fernTestValueValue interface{} + obj.SetValue(fernTestValueValue) + assert.Equal(t, fernTestValueValue, obj.Value) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &CustomAttribute{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVisibility", func(t *testing.T) { + obj := &CustomAttribute{} + var fernTestValueVisibility *CustomAttributeDefinitionVisibility + obj.SetVisibility(fernTestValueVisibility) + assert.Equal(t, fernTestValueVisibility, obj.Visibility) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDefinition", func(t *testing.T) { + obj := &CustomAttribute{} + var fernTestValueDefinition *CustomAttributeDefinition + obj.SetDefinition(fernTestValueDefinition) + assert.Equal(t, fernTestValueDefinition, obj.Definition) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CustomAttribute{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CustomAttribute{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomAttribute(t *testing.T) { + t.Run("GetKey", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttribute{} + var expected *string + obj.Key = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetKey(), "getter should return the property value") + }) + + t.Run("GetKey_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttribute{} + obj.Key = nil + + // Act & Assert + assert.Nil(t, obj.GetKey(), "getter should return nil when property is nil") + }) + + t.Run("GetKey_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttribute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetKey() // Should return zero value + }) + + t.Run("GetValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttribute{} + var expected interface{} + obj.Value = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetValue(), "getter should return the property value") + }) + + t.Run("GetValue_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttribute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetValue() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttribute{} + var expected *int + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttribute{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttribute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetVisibility", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttribute{} + var expected *CustomAttributeDefinitionVisibility + obj.Visibility = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVisibility(), "getter should return the property value") + }) + + t.Run("GetVisibility_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttribute{} + obj.Visibility = nil + + // Act & Assert + assert.Nil(t, obj.GetVisibility(), "getter should return nil when property is nil") + }) + + t.Run("GetVisibility_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttribute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVisibility() // Should return zero value + }) + + t.Run("GetDefinition", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttribute{} + var expected *CustomAttributeDefinition + obj.Definition = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDefinition(), "getter should return the property value") + }) + + t.Run("GetDefinition_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttribute{} + obj.Definition = nil + + // Act & Assert + assert.Nil(t, obj.GetDefinition(), "getter should return nil when property is nil") + }) + + t.Run("GetDefinition_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttribute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDefinition() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttribute{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttribute{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttribute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttribute{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttribute{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttribute + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomAttribute(t *testing.T) { + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttribute{} + var fernTestValueKey *string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetValue_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttribute{} + var fernTestValueValue interface{} + + // Act + obj.SetValue(fernTestValueValue) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttribute{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVisibility_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttribute{} + var fernTestValueVisibility *CustomAttributeDefinitionVisibility + + // Act + obj.SetVisibility(fernTestValueVisibility) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDefinition_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttribute{} + var fernTestValueDefinition *CustomAttributeDefinition + + // Act + obj.SetDefinition(fernTestValueDefinition) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttribute{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttribute{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomAttributeDefinition(t *testing.T) { + t.Run("SetKey", func(t *testing.T) { + obj := &CustomAttributeDefinition{} + var fernTestValueKey *string + obj.SetKey(fernTestValueKey) + assert.Equal(t, fernTestValueKey, obj.Key) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSchema", func(t *testing.T) { + obj := &CustomAttributeDefinition{} + var fernTestValueSchema map[string]interface{} + obj.SetSchema(fernTestValueSchema) + assert.Equal(t, fernTestValueSchema, obj.Schema) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &CustomAttributeDefinition{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDescription", func(t *testing.T) { + obj := &CustomAttributeDefinition{} + var fernTestValueDescription *string + obj.SetDescription(fernTestValueDescription) + assert.Equal(t, fernTestValueDescription, obj.Description) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVisibility", func(t *testing.T) { + obj := &CustomAttributeDefinition{} + var fernTestValueVisibility *CustomAttributeDefinitionVisibility + obj.SetVisibility(fernTestValueVisibility) + assert.Equal(t, fernTestValueVisibility, obj.Visibility) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &CustomAttributeDefinition{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CustomAttributeDefinition{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CustomAttributeDefinition{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomAttributeDefinition(t *testing.T) { + t.Run("GetKey", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinition{} + var expected *string + obj.Key = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetKey(), "getter should return the property value") + }) + + t.Run("GetKey_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinition{} + obj.Key = nil + + // Act & Assert + assert.Nil(t, obj.GetKey(), "getter should return nil when property is nil") + }) + + t.Run("GetKey_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetKey() // Should return zero value + }) + + t.Run("GetSchema", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinition{} + var expected map[string]interface{} + obj.Schema = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSchema(), "getter should return the property value") + }) + + t.Run("GetSchema_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinition{} + obj.Schema = nil + + // Act & Assert + assert.Nil(t, obj.GetSchema(), "getter should return nil when property is nil") + }) + + t.Run("GetSchema_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSchema() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinition{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinition{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetDescription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinition{} + var expected *string + obj.Description = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDescription(), "getter should return the property value") + }) + + t.Run("GetDescription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinition{} + obj.Description = nil + + // Act & Assert + assert.Nil(t, obj.GetDescription(), "getter should return nil when property is nil") + }) + + t.Run("GetDescription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDescription() // Should return zero value + }) + + t.Run("GetVisibility", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinition{} + var expected *CustomAttributeDefinitionVisibility + obj.Visibility = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVisibility(), "getter should return the property value") + }) + + t.Run("GetVisibility_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinition{} + obj.Visibility = nil + + // Act & Assert + assert.Nil(t, obj.GetVisibility(), "getter should return nil when property is nil") + }) + + t.Run("GetVisibility_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVisibility() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinition{} + var expected *int + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinition{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinition{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinition{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinition{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinition{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeDefinition + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomAttributeDefinition(t *testing.T) { + t.Run("SetKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinition{} + var fernTestValueKey *string + + // Act + obj.SetKey(fernTestValueKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSchema_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinition{} + var fernTestValueSchema map[string]interface{} + + // Act + obj.SetSchema(fernTestValueSchema) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinition{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDescription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinition{} + var fernTestValueDescription *string + + // Act + obj.SetDescription(fernTestValueDescription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVisibility_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinition{} + var fernTestValueVisibility *CustomAttributeDefinitionVisibility + + // Act + obj.SetVisibility(fernTestValueVisibility) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinition{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinition{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinition{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomAttributeDefinitionEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &CustomAttributeDefinitionEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &CustomAttributeDefinitionEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &CustomAttributeDefinitionEventData{} + var fernTestValueObject *CustomAttributeDefinitionEventDataObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomAttributeDefinitionEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinitionEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinitionEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeDefinitionEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinitionEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinitionEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeDefinitionEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinitionEventData{} + var expected *CustomAttributeDefinitionEventDataObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinitionEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeDefinitionEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomAttributeDefinitionEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinitionEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinitionEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinitionEventData{} + var fernTestValueObject *CustomAttributeDefinitionEventDataObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomAttributeDefinitionEventDataObject(t *testing.T) { + t.Run("SetCustomAttributeDefinition", func(t *testing.T) { + obj := &CustomAttributeDefinitionEventDataObject{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + assert.Equal(t, fernTestValueCustomAttributeDefinition, obj.CustomAttributeDefinition) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomAttributeDefinitionEventDataObject(t *testing.T) { + t.Run("GetCustomAttributeDefinition", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinitionEventDataObject{} + var expected *CustomAttributeDefinition + obj.CustomAttributeDefinition = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeDefinition(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeDefinition_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinitionEventDataObject{} + obj.CustomAttributeDefinition = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeDefinition(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeDefinition_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeDefinitionEventDataObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeDefinition() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomAttributeDefinitionEventDataObject(t *testing.T) { + t.Run("SetCustomAttributeDefinition_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinitionEventDataObject{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + + // Act + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomAttributeEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &CustomAttributeEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &CustomAttributeEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &CustomAttributeEventData{} + var fernTestValueObject *CustomAttributeEventDataObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomAttributeEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeEventData{} + var expected *CustomAttributeEventDataObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomAttributeEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeEventData{} + var fernTestValueObject *CustomAttributeEventDataObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomAttributeEventDataObject(t *testing.T) { + t.Run("SetCustomAttribute", func(t *testing.T) { + obj := &CustomAttributeEventDataObject{} + var fernTestValueCustomAttribute *CustomAttribute + obj.SetCustomAttribute(fernTestValueCustomAttribute) + assert.Equal(t, fernTestValueCustomAttribute, obj.CustomAttribute) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomAttributeEventDataObject(t *testing.T) { + t.Run("GetCustomAttribute", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeEventDataObject{} + var expected *CustomAttribute + obj.CustomAttribute = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttribute(), "getter should return the property value") + }) + + t.Run("GetCustomAttribute_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeEventDataObject{} + obj.CustomAttribute = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttribute(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttribute_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeEventDataObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttribute() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomAttributeEventDataObject(t *testing.T) { + t.Run("SetCustomAttribute_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeEventDataObject{} + var fernTestValueCustomAttribute *CustomAttribute + + // Act + obj.SetCustomAttribute(fernTestValueCustomAttribute) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomField(t *testing.T) { + t.Run("SetTitle", func(t *testing.T) { + obj := &CustomField{} + var fernTestValueTitle string + obj.SetTitle(fernTestValueTitle) + assert.Equal(t, fernTestValueTitle, obj.Title) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomField(t *testing.T) { + t.Run("GetTitle", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomField{} + var expected string + obj.Title = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTitle(), "getter should return the property value") + }) + + t.Run("GetTitle_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomField + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTitle() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomField(t *testing.T) { + t.Run("SetTitle_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomField{} + var fernTestValueTitle string + + // Act + obj.SetTitle(fernTestValueTitle) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CustomerCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CustomerCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CustomerCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CustomerCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CustomerCreatedEvent{} + var fernTestValueData *CustomerCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEvent{} + var expected *CustomerCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEvent{} + var fernTestValueData *CustomerCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &CustomerCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &CustomerCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &CustomerCreatedEventData{} + var fernTestValueObject *CustomerCreatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEventData{} + var expected *CustomerCreatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEventData{} + var fernTestValueObject *CustomerCreatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCreatedEventEventContext(t *testing.T) { + t.Run("SetMerge", func(t *testing.T) { + obj := &CustomerCreatedEventEventContext{} + var fernTestValueMerge *CustomerCreatedEventEventContextMerge + obj.SetMerge(fernTestValueMerge) + assert.Equal(t, fernTestValueMerge, obj.Merge) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCreatedEventEventContext(t *testing.T) { + t.Run("GetMerge", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEventEventContext{} + var expected *CustomerCreatedEventEventContextMerge + obj.Merge = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerge(), "getter should return the property value") + }) + + t.Run("GetMerge_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEventEventContext{} + obj.Merge = nil + + // Act & Assert + assert.Nil(t, obj.GetMerge(), "getter should return nil when property is nil") + }) + + t.Run("GetMerge_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCreatedEventEventContext + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerge() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCreatedEventEventContext(t *testing.T) { + t.Run("SetMerge_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEventEventContext{} + var fernTestValueMerge *CustomerCreatedEventEventContextMerge + + // Act + obj.SetMerge(fernTestValueMerge) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCreatedEventEventContextMerge(t *testing.T) { + t.Run("SetFromCustomerIDs", func(t *testing.T) { + obj := &CustomerCreatedEventEventContextMerge{} + var fernTestValueFromCustomerIDs []string + obj.SetFromCustomerIDs(fernTestValueFromCustomerIDs) + assert.Equal(t, fernTestValueFromCustomerIDs, obj.FromCustomerIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetToCustomerID", func(t *testing.T) { + obj := &CustomerCreatedEventEventContextMerge{} + var fernTestValueToCustomerID *string + obj.SetToCustomerID(fernTestValueToCustomerID) + assert.Equal(t, fernTestValueToCustomerID, obj.ToCustomerID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCreatedEventEventContextMerge(t *testing.T) { + t.Run("GetFromCustomerIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEventEventContextMerge{} + var expected []string + obj.FromCustomerIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFromCustomerIDs(), "getter should return the property value") + }) + + t.Run("GetFromCustomerIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEventEventContextMerge{} + obj.FromCustomerIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetFromCustomerIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetFromCustomerIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCreatedEventEventContextMerge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFromCustomerIDs() // Should return zero value + }) + + t.Run("GetToCustomerID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEventEventContextMerge{} + var expected *string + obj.ToCustomerID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetToCustomerID(), "getter should return the property value") + }) + + t.Run("GetToCustomerID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEventEventContextMerge{} + obj.ToCustomerID = nil + + // Act & Assert + assert.Nil(t, obj.GetToCustomerID(), "getter should return nil when property is nil") + }) + + t.Run("GetToCustomerID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCreatedEventEventContextMerge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetToCustomerID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCreatedEventEventContextMerge(t *testing.T) { + t.Run("SetFromCustomerIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEventEventContextMerge{} + var fernTestValueFromCustomerIDs []string + + // Act + obj.SetFromCustomerIDs(fernTestValueFromCustomerIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetToCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEventEventContextMerge{} + var fernTestValueToCustomerID *string + + // Act + obj.SetToCustomerID(fernTestValueToCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCreatedEventObject(t *testing.T) { + t.Run("SetCustomer", func(t *testing.T) { + obj := &CustomerCreatedEventObject{} + var fernTestValueCustomer *Customer + obj.SetCustomer(fernTestValueCustomer) + assert.Equal(t, fernTestValueCustomer, obj.Customer) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventContext", func(t *testing.T) { + obj := &CustomerCreatedEventObject{} + var fernTestValueEventContext *CustomerCreatedEventEventContext + obj.SetEventContext(fernTestValueEventContext) + assert.Equal(t, fernTestValueEventContext, obj.EventContext) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCreatedEventObject(t *testing.T) { + t.Run("GetCustomer", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEventObject{} + var expected *Customer + obj.Customer = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomer(), "getter should return the property value") + }) + + t.Run("GetCustomer_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEventObject{} + obj.Customer = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomer(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomer_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCreatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomer() // Should return zero value + }) + + t.Run("GetEventContext", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEventObject{} + var expected *CustomerCreatedEventEventContext + obj.EventContext = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventContext(), "getter should return the property value") + }) + + t.Run("GetEventContext_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEventObject{} + obj.EventContext = nil + + // Act & Assert + assert.Nil(t, obj.GetEventContext(), "getter should return nil when property is nil") + }) + + t.Run("GetEventContext_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCreatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventContext() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCreatedEventObject(t *testing.T) { + t.Run("SetCustomer_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEventObject{} + var fernTestValueCustomer *Customer + + // Act + obj.SetCustomer(fernTestValueCustomer) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventContext_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEventObject{} + var fernTestValueEventContext *CustomerCreatedEventEventContext + + // Act + obj.SetEventContext(fernTestValueEventContext) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCustomAttributeDefinitionCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionCreatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCustomAttributeDefinitionCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCustomAttributeDefinitionCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCustomAttributeDefinitionCreatedPublicEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionCreatedPublicEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionCreatedPublicEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionCreatedPublicEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionCreatedPublicEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionCreatedPublicEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCustomAttributeDefinitionCreatedPublicEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedPublicEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedPublicEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionCreatedPublicEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedPublicEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedPublicEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionCreatedPublicEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedPublicEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedPublicEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionCreatedPublicEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedPublicEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedPublicEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionCreatedPublicEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedPublicEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedPublicEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionCreatedPublicEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCustomAttributeDefinitionCreatedPublicEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedPublicEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedPublicEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedPublicEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedPublicEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedPublicEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCustomAttributeDefinitionDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionDeletedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCustomAttributeDefinitionDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCustomAttributeDefinitionDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCustomAttributeDefinitionDeletedPublicEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionDeletedPublicEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionDeletedPublicEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionDeletedPublicEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionDeletedPublicEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionDeletedPublicEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCustomAttributeDefinitionDeletedPublicEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedPublicEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedPublicEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionDeletedPublicEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedPublicEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedPublicEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionDeletedPublicEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedPublicEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedPublicEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionDeletedPublicEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedPublicEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedPublicEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionDeletedPublicEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedPublicEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedPublicEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionDeletedPublicEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCustomAttributeDefinitionDeletedPublicEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedPublicEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedPublicEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedPublicEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedPublicEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedPublicEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionOwnedCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionOwnedCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionOwnedCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionOwnedCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedCreatedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionOwnedCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedDeletedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedUpdatedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCustomAttributeDefinitionUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionUpdatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCustomAttributeDefinitionUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCustomAttributeDefinitionUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCustomAttributeDefinitionUpdatedPublicEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionUpdatedPublicEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionUpdatedPublicEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionUpdatedPublicEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionUpdatedPublicEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionUpdatedPublicEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCustomAttributeDefinitionUpdatedPublicEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedPublicEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedPublicEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionUpdatedPublicEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedPublicEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedPublicEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionUpdatedPublicEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedPublicEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedPublicEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionUpdatedPublicEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedPublicEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedPublicEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionUpdatedPublicEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedPublicEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedPublicEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionUpdatedPublicEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCustomAttributeDefinitionUpdatedPublicEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedPublicEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedPublicEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedPublicEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedPublicEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedPublicEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionVisibleCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionVisibleCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionVisibleCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionVisibleCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleCreatedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionVisibleCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleDeletedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CustomerCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleUpdatedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCustomAttributeDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CustomerCustomAttributeDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CustomerCustomAttributeDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CustomerCustomAttributeDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CustomerCustomAttributeDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CustomerCustomAttributeDeletedEvent{} + var fernTestValueData *CustomAttributeEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCustomAttributeDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedEvent{} + var expected *CustomAttributeEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCustomAttributeDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedEvent{} + var fernTestValueData *CustomAttributeEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCustomAttributeDeletedPublicEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CustomerCustomAttributeDeletedPublicEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CustomerCustomAttributeDeletedPublicEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CustomerCustomAttributeDeletedPublicEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CustomerCustomAttributeDeletedPublicEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CustomerCustomAttributeDeletedPublicEvent{} + var fernTestValueData *CustomAttributeEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCustomAttributeDeletedPublicEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedPublicEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedPublicEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDeletedPublicEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedPublicEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedPublicEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDeletedPublicEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedPublicEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedPublicEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDeletedPublicEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedPublicEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedPublicEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDeletedPublicEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedPublicEvent{} + var expected *CustomAttributeEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedPublicEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDeletedPublicEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCustomAttributeDeletedPublicEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedPublicEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedPublicEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedPublicEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedPublicEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedPublicEvent{} + var fernTestValueData *CustomAttributeEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CustomerCustomAttributeOwnedDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CustomerCustomAttributeOwnedDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CustomerCustomAttributeOwnedDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CustomerCustomAttributeOwnedDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CustomerCustomAttributeOwnedDeletedEvent{} + var fernTestValueData *CustomAttributeEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedDeletedEvent{} + var expected *CustomAttributeEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedDeletedEvent{} + var fernTestValueData *CustomAttributeEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CustomerCustomAttributeOwnedUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CustomerCustomAttributeOwnedUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CustomerCustomAttributeOwnedUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CustomerCustomAttributeOwnedUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CustomerCustomAttributeOwnedUpdatedEvent{} + var fernTestValueData *CustomAttributeEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedUpdatedEvent{} + var expected *CustomAttributeEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedUpdatedEvent{} + var fernTestValueData *CustomAttributeEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCustomAttributeUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CustomerCustomAttributeUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CustomerCustomAttributeUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CustomerCustomAttributeUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CustomerCustomAttributeUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CustomerCustomAttributeUpdatedEvent{} + var fernTestValueData *CustomAttributeEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCustomAttributeUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedEvent{} + var expected *CustomAttributeEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCustomAttributeUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedEvent{} + var fernTestValueData *CustomAttributeEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCustomAttributeUpdatedPublicEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CustomerCustomAttributeUpdatedPublicEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CustomerCustomAttributeUpdatedPublicEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CustomerCustomAttributeUpdatedPublicEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CustomerCustomAttributeUpdatedPublicEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CustomerCustomAttributeUpdatedPublicEvent{} + var fernTestValueData *CustomAttributeEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCustomAttributeUpdatedPublicEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedPublicEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedPublicEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeUpdatedPublicEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedPublicEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedPublicEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeUpdatedPublicEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedPublicEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedPublicEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeUpdatedPublicEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedPublicEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedPublicEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeUpdatedPublicEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedPublicEvent{} + var expected *CustomAttributeEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedPublicEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeUpdatedPublicEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCustomAttributeUpdatedPublicEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedPublicEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedPublicEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedPublicEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedPublicEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedPublicEvent{} + var fernTestValueData *CustomAttributeEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CustomerCustomAttributeVisibleDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CustomerCustomAttributeVisibleDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CustomerCustomAttributeVisibleDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CustomerCustomAttributeVisibleDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CustomerCustomAttributeVisibleDeletedEvent{} + var fernTestValueData *CustomAttributeEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleDeletedEvent{} + var expected *CustomAttributeEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleDeletedEvent{} + var fernTestValueData *CustomAttributeEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CustomerCustomAttributeVisibleUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CustomerCustomAttributeVisibleUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CustomerCustomAttributeVisibleUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CustomerCustomAttributeVisibleUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CustomerCustomAttributeVisibleUpdatedEvent{} + var fernTestValueData *CustomAttributeEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleUpdatedEvent{} + var expected *CustomAttributeEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleUpdatedEvent{} + var fernTestValueData *CustomAttributeEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CustomerDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CustomerDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CustomerDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CustomerDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CustomerDeletedEvent{} + var fernTestValueData *CustomerDeletedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEvent{} + var expected *CustomerDeletedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEvent{} + var fernTestValueData *CustomerDeletedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerDeletedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &CustomerDeletedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &CustomerDeletedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &CustomerDeletedEventData{} + var fernTestValueObject *CustomerDeletedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerDeletedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerDeletedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerDeletedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEventData{} + var expected *CustomerDeletedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerDeletedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerDeletedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEventData{} + var fernTestValueObject *CustomerDeletedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerDeletedEventEventContext(t *testing.T) { + t.Run("SetMerge", func(t *testing.T) { + obj := &CustomerDeletedEventEventContext{} + var fernTestValueMerge *CustomerDeletedEventEventContextMerge + obj.SetMerge(fernTestValueMerge) + assert.Equal(t, fernTestValueMerge, obj.Merge) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerDeletedEventEventContext(t *testing.T) { + t.Run("GetMerge", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEventEventContext{} + var expected *CustomerDeletedEventEventContextMerge + obj.Merge = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerge(), "getter should return the property value") + }) + + t.Run("GetMerge_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEventEventContext{} + obj.Merge = nil + + // Act & Assert + assert.Nil(t, obj.GetMerge(), "getter should return nil when property is nil") + }) + + t.Run("GetMerge_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerDeletedEventEventContext + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerge() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerDeletedEventEventContext(t *testing.T) { + t.Run("SetMerge_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEventEventContext{} + var fernTestValueMerge *CustomerDeletedEventEventContextMerge + + // Act + obj.SetMerge(fernTestValueMerge) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerDeletedEventEventContextMerge(t *testing.T) { + t.Run("SetFromCustomerIDs", func(t *testing.T) { + obj := &CustomerDeletedEventEventContextMerge{} + var fernTestValueFromCustomerIDs []string + obj.SetFromCustomerIDs(fernTestValueFromCustomerIDs) + assert.Equal(t, fernTestValueFromCustomerIDs, obj.FromCustomerIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetToCustomerID", func(t *testing.T) { + obj := &CustomerDeletedEventEventContextMerge{} + var fernTestValueToCustomerID *string + obj.SetToCustomerID(fernTestValueToCustomerID) + assert.Equal(t, fernTestValueToCustomerID, obj.ToCustomerID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerDeletedEventEventContextMerge(t *testing.T) { + t.Run("GetFromCustomerIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEventEventContextMerge{} + var expected []string + obj.FromCustomerIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFromCustomerIDs(), "getter should return the property value") + }) + + t.Run("GetFromCustomerIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEventEventContextMerge{} + obj.FromCustomerIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetFromCustomerIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetFromCustomerIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerDeletedEventEventContextMerge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFromCustomerIDs() // Should return zero value + }) + + t.Run("GetToCustomerID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEventEventContextMerge{} + var expected *string + obj.ToCustomerID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetToCustomerID(), "getter should return the property value") + }) + + t.Run("GetToCustomerID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEventEventContextMerge{} + obj.ToCustomerID = nil + + // Act & Assert + assert.Nil(t, obj.GetToCustomerID(), "getter should return nil when property is nil") + }) + + t.Run("GetToCustomerID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerDeletedEventEventContextMerge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetToCustomerID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerDeletedEventEventContextMerge(t *testing.T) { + t.Run("SetFromCustomerIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEventEventContextMerge{} + var fernTestValueFromCustomerIDs []string + + // Act + obj.SetFromCustomerIDs(fernTestValueFromCustomerIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetToCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEventEventContextMerge{} + var fernTestValueToCustomerID *string + + // Act + obj.SetToCustomerID(fernTestValueToCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerDeletedEventObject(t *testing.T) { + t.Run("SetCustomer", func(t *testing.T) { + obj := &CustomerDeletedEventObject{} + var fernTestValueCustomer *Customer + obj.SetCustomer(fernTestValueCustomer) + assert.Equal(t, fernTestValueCustomer, obj.Customer) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventContext", func(t *testing.T) { + obj := &CustomerDeletedEventObject{} + var fernTestValueEventContext *CustomerDeletedEventEventContext + obj.SetEventContext(fernTestValueEventContext) + assert.Equal(t, fernTestValueEventContext, obj.EventContext) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerDeletedEventObject(t *testing.T) { + t.Run("GetCustomer", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEventObject{} + var expected *Customer + obj.Customer = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomer(), "getter should return the property value") + }) + + t.Run("GetCustomer_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEventObject{} + obj.Customer = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomer(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomer_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerDeletedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomer() // Should return zero value + }) + + t.Run("GetEventContext", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEventObject{} + var expected *CustomerDeletedEventEventContext + obj.EventContext = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventContext(), "getter should return the property value") + }) + + t.Run("GetEventContext_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEventObject{} + obj.EventContext = nil + + // Act & Assert + assert.Nil(t, obj.GetEventContext(), "getter should return nil when property is nil") + }) + + t.Run("GetEventContext_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerDeletedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventContext() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerDeletedEventObject(t *testing.T) { + t.Run("SetCustomer_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEventObject{} + var fernTestValueCustomer *Customer + + // Act + obj.SetCustomer(fernTestValueCustomer) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventContext_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEventObject{} + var fernTestValueEventContext *CustomerDeletedEventEventContext + + // Act + obj.SetEventContext(fernTestValueEventContext) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerGroup(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &CustomerGroup{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &CustomerGroup{} + var fernTestValueName string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CustomerGroup{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CustomerGroup{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerGroup(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerGroup{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerGroup{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerGroup + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerGroup{} + var expected string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerGroup + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerGroup{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerGroup{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerGroup + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerGroup{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerGroup{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerGroup + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerGroup(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerGroup{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerGroup{} + var fernTestValueName string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerGroup{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerGroup{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerSegment(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &CustomerSegment{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &CustomerSegment{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CustomerSegment{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &CustomerSegment{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerSegment(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerSegment{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerSegment{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerSegment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerSegment{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerSegment{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerSegment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerSegment{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerSegment{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerSegment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerSegment{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerSegment{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerSegment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerSegment(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerSegment{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerSegment{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerSegment{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerSegment{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &CustomerUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &CustomerUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &CustomerUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &CustomerUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &CustomerUpdatedEvent{} + var fernTestValueData *CustomerUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEvent{} + var expected *CustomerUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEvent{} + var fernTestValueData *CustomerUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &CustomerUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &CustomerUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &CustomerUpdatedEventData{} + var fernTestValueObject *CustomerUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEventData{} + var expected *CustomerUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEventData{} + var fernTestValueObject *CustomerUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCustomerUpdatedEventObject(t *testing.T) { + t.Run("SetCustomer", func(t *testing.T) { + obj := &CustomerUpdatedEventObject{} + var fernTestValueCustomer *Customer + obj.SetCustomer(fernTestValueCustomer) + assert.Equal(t, fernTestValueCustomer, obj.Customer) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCustomerUpdatedEventObject(t *testing.T) { + t.Run("GetCustomer", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEventObject{} + var expected *Customer + obj.Customer = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomer(), "getter should return the property value") + }) + + t.Run("GetCustomer_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEventObject{} + obj.Customer = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomer(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomer_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomer() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCustomerUpdatedEventObject(t *testing.T) { + t.Run("SetCustomer_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEventObject{} + var fernTestValueCustomer *Customer + + // Act + obj.SetCustomer(fernTestValueCustomer) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDataCollectionOptions(t *testing.T) { + t.Run("SetTitle", func(t *testing.T) { + obj := &DataCollectionOptions{} + var fernTestValueTitle string + obj.SetTitle(fernTestValueTitle) + assert.Equal(t, fernTestValueTitle, obj.Title) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBody", func(t *testing.T) { + obj := &DataCollectionOptions{} + var fernTestValueBody string + obj.SetBody(fernTestValueBody) + assert.Equal(t, fernTestValueBody, obj.Body) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetInputType", func(t *testing.T) { + obj := &DataCollectionOptions{} + var fernTestValueInputType DataCollectionOptionsInputType + obj.SetInputType(fernTestValueInputType) + assert.Equal(t, fernTestValueInputType, obj.InputType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCollectedData", func(t *testing.T) { + obj := &DataCollectionOptions{} + var fernTestValueCollectedData *CollectedData + obj.SetCollectedData(fernTestValueCollectedData) + assert.Equal(t, fernTestValueCollectedData, obj.CollectedData) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDataCollectionOptions(t *testing.T) { + t.Run("GetTitle", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DataCollectionOptions{} + var expected string + obj.Title = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTitle(), "getter should return the property value") + }) + + t.Run("GetTitle_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DataCollectionOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTitle() // Should return zero value + }) + + t.Run("GetBody", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DataCollectionOptions{} + var expected string + obj.Body = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBody(), "getter should return the property value") + }) + + t.Run("GetBody_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DataCollectionOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBody() // Should return zero value + }) + + t.Run("GetInputType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DataCollectionOptions{} + var expected DataCollectionOptionsInputType + obj.InputType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInputType(), "getter should return the property value") + }) + + t.Run("GetInputType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DataCollectionOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInputType() // Should return zero value + }) + + t.Run("GetCollectedData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DataCollectionOptions{} + var expected *CollectedData + obj.CollectedData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCollectedData(), "getter should return the property value") + }) + + t.Run("GetCollectedData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DataCollectionOptions{} + obj.CollectedData = nil + + // Act & Assert + assert.Nil(t, obj.GetCollectedData(), "getter should return nil when property is nil") + }) + + t.Run("GetCollectedData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DataCollectionOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCollectedData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDataCollectionOptions(t *testing.T) { + t.Run("SetTitle_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DataCollectionOptions{} + var fernTestValueTitle string + + // Act + obj.SetTitle(fernTestValueTitle) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBody_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DataCollectionOptions{} + var fernTestValueBody string + + // Act + obj.SetBody(fernTestValueBody) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetInputType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DataCollectionOptions{} + var fernTestValueInputType DataCollectionOptionsInputType + + // Act + obj.SetInputType(fernTestValueInputType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCollectedData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DataCollectionOptions{} + var fernTestValueCollectedData *CollectedData + + // Act + obj.SetCollectedData(fernTestValueCollectedData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDateRange(t *testing.T) { + t.Run("SetStartDate", func(t *testing.T) { + obj := &DateRange{} + var fernTestValueStartDate *string + obj.SetStartDate(fernTestValueStartDate) + assert.Equal(t, fernTestValueStartDate, obj.StartDate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEndDate", func(t *testing.T) { + obj := &DateRange{} + var fernTestValueEndDate *string + obj.SetEndDate(fernTestValueEndDate) + assert.Equal(t, fernTestValueEndDate, obj.EndDate) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDateRange(t *testing.T) { + t.Run("GetStartDate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DateRange{} + var expected *string + obj.StartDate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStartDate(), "getter should return the property value") + }) + + t.Run("GetStartDate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DateRange{} + obj.StartDate = nil + + // Act & Assert + assert.Nil(t, obj.GetStartDate(), "getter should return nil when property is nil") + }) + + t.Run("GetStartDate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DateRange + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStartDate() // Should return zero value + }) + + t.Run("GetEndDate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DateRange{} + var expected *string + obj.EndDate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEndDate(), "getter should return the property value") + }) + + t.Run("GetEndDate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DateRange{} + obj.EndDate = nil + + // Act & Assert + assert.Nil(t, obj.GetEndDate(), "getter should return nil when property is nil") + }) + + t.Run("GetEndDate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DateRange + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEndDate() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDateRange(t *testing.T) { + t.Run("SetStartDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DateRange{} + var fernTestValueStartDate *string + + // Act + obj.SetStartDate(fernTestValueStartDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEndDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DateRange{} + var fernTestValueEndDate *string + + // Act + obj.SetEndDate(fernTestValueEndDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteBookingCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DeleteBookingCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeleteBookingCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteBookingCustomAttributeDefinitionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteBookingCustomAttributeDefinitionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteBookingCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeleteBookingCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteBookingCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteBookingCustomAttributeResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DeleteBookingCustomAttributeResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeleteBookingCustomAttributeResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteBookingCustomAttributeResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteBookingCustomAttributeResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteBookingCustomAttributeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeleteBookingCustomAttributeResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteBookingCustomAttributeResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteBreakTypeResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DeleteBreakTypeResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeleteBreakTypeResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteBreakTypeResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteBreakTypeResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteBreakTypeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeleteBreakTypeResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteBreakTypeResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteCatalogObjectResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DeleteCatalogObjectResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeletedObjectIDs", func(t *testing.T) { + obj := &DeleteCatalogObjectResponse{} + var fernTestValueDeletedObjectIDs []string + obj.SetDeletedObjectIDs(fernTestValueDeletedObjectIDs) + assert.Equal(t, fernTestValueDeletedObjectIDs, obj.DeletedObjectIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeletedAt", func(t *testing.T) { + obj := &DeleteCatalogObjectResponse{} + var fernTestValueDeletedAt *string + obj.SetDeletedAt(fernTestValueDeletedAt) + assert.Equal(t, fernTestValueDeletedAt, obj.DeletedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeleteCatalogObjectResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCatalogObjectResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCatalogObjectResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteCatalogObjectResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetDeletedObjectIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCatalogObjectResponse{} + var expected []string + obj.DeletedObjectIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeletedObjectIDs(), "getter should return the property value") + }) + + t.Run("GetDeletedObjectIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCatalogObjectResponse{} + obj.DeletedObjectIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetDeletedObjectIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetDeletedObjectIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteCatalogObjectResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeletedObjectIDs() // Should return zero value + }) + + t.Run("GetDeletedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCatalogObjectResponse{} + var expected *string + obj.DeletedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeletedAt(), "getter should return the property value") + }) + + t.Run("GetDeletedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCatalogObjectResponse{} + obj.DeletedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetDeletedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetDeletedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteCatalogObjectResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeletedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeleteCatalogObjectResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCatalogObjectResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeletedObjectIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCatalogObjectResponse{} + var fernTestValueDeletedObjectIDs []string + + // Act + obj.SetDeletedObjectIDs(fernTestValueDeletedObjectIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeletedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCatalogObjectResponse{} + var fernTestValueDeletedAt *string + + // Act + obj.SetDeletedAt(fernTestValueDeletedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteCustomerCardResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DeleteCustomerCardResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeleteCustomerCardResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomerCardResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomerCardResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteCustomerCardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeleteCustomerCardResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomerCardResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteCustomerCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DeleteCustomerCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeleteCustomerCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomerCustomAttributeDefinitionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomerCustomAttributeDefinitionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteCustomerCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeleteCustomerCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomerCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteCustomerCustomAttributeResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DeleteCustomerCustomAttributeResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeleteCustomerCustomAttributeResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomerCustomAttributeResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomerCustomAttributeResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteCustomerCustomAttributeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeleteCustomerCustomAttributeResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomerCustomAttributeResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteCustomerGroupResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DeleteCustomerGroupResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeleteCustomerGroupResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomerGroupResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomerGroupResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteCustomerGroupResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeleteCustomerGroupResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomerGroupResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteDisputeEvidenceResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DeleteDisputeEvidenceResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeleteDisputeEvidenceResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteDisputeEvidenceResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteDisputeEvidenceResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteDisputeEvidenceResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeleteDisputeEvidenceResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteDisputeEvidenceResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteLocationCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DeleteLocationCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeleteLocationCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteLocationCustomAttributeDefinitionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteLocationCustomAttributeDefinitionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteLocationCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeleteLocationCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteLocationCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteLocationCustomAttributeResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DeleteLocationCustomAttributeResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeleteLocationCustomAttributeResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteLocationCustomAttributeResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteLocationCustomAttributeResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteLocationCustomAttributeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeleteLocationCustomAttributeResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteLocationCustomAttributeResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteLoyaltyRewardResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DeleteLoyaltyRewardResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeleteLoyaltyRewardResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteLoyaltyRewardResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteLoyaltyRewardResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteLoyaltyRewardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeleteLoyaltyRewardResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteLoyaltyRewardResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteMerchantCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DeleteMerchantCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeleteMerchantCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteMerchantCustomAttributeDefinitionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteMerchantCustomAttributeDefinitionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteMerchantCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeleteMerchantCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteMerchantCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteMerchantCustomAttributeResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DeleteMerchantCustomAttributeResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeleteMerchantCustomAttributeResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteMerchantCustomAttributeResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteMerchantCustomAttributeResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteMerchantCustomAttributeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeleteMerchantCustomAttributeResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteMerchantCustomAttributeResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteOrderCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DeleteOrderCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeleteOrderCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteOrderCustomAttributeDefinitionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteOrderCustomAttributeDefinitionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteOrderCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeleteOrderCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteOrderCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteOrderCustomAttributeResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DeleteOrderCustomAttributeResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeleteOrderCustomAttributeResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteOrderCustomAttributeResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteOrderCustomAttributeResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteOrderCustomAttributeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeleteOrderCustomAttributeResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteOrderCustomAttributeResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeletePaymentLinkResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DeletePaymentLinkResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &DeletePaymentLinkResponse{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCancelledOrderID", func(t *testing.T) { + obj := &DeletePaymentLinkResponse{} + var fernTestValueCancelledOrderID *string + obj.SetCancelledOrderID(fernTestValueCancelledOrderID) + assert.Equal(t, fernTestValueCancelledOrderID, obj.CancelledOrderID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeletePaymentLinkResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeletePaymentLinkResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeletePaymentLinkResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeletePaymentLinkResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeletePaymentLinkResponse{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeletePaymentLinkResponse{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeletePaymentLinkResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetCancelledOrderID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeletePaymentLinkResponse{} + var expected *string + obj.CancelledOrderID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCancelledOrderID(), "getter should return the property value") + }) + + t.Run("GetCancelledOrderID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeletePaymentLinkResponse{} + obj.CancelledOrderID = nil + + // Act & Assert + assert.Nil(t, obj.GetCancelledOrderID(), "getter should return nil when property is nil") + }) + + t.Run("GetCancelledOrderID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeletePaymentLinkResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCancelledOrderID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeletePaymentLinkResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeletePaymentLinkResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeletePaymentLinkResponse{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCancelledOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeletePaymentLinkResponse{} + var fernTestValueCancelledOrderID *string + + // Act + obj.SetCancelledOrderID(fernTestValueCancelledOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteShiftResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DeleteShiftResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeleteShiftResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteShiftResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteShiftResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteShiftResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeleteShiftResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteShiftResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteWebhookSubscriptionResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &DeleteWebhookSubscriptionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeleteWebhookSubscriptionResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteWebhookSubscriptionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteWebhookSubscriptionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteWebhookSubscriptionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeleteWebhookSubscriptionResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteWebhookSubscriptionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeviceCheckoutOptions(t *testing.T) { + t.Run("SetDeviceID", func(t *testing.T) { + obj := &DeviceCheckoutOptions{} + var fernTestValueDeviceID string + obj.SetDeviceID(fernTestValueDeviceID) + assert.Equal(t, fernTestValueDeviceID, obj.DeviceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSkipReceiptScreen", func(t *testing.T) { + obj := &DeviceCheckoutOptions{} + var fernTestValueSkipReceiptScreen *bool + obj.SetSkipReceiptScreen(fernTestValueSkipReceiptScreen) + assert.Equal(t, fernTestValueSkipReceiptScreen, obj.SkipReceiptScreen) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCollectSignature", func(t *testing.T) { + obj := &DeviceCheckoutOptions{} + var fernTestValueCollectSignature *bool + obj.SetCollectSignature(fernTestValueCollectSignature) + assert.Equal(t, fernTestValueCollectSignature, obj.CollectSignature) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTipSettings", func(t *testing.T) { + obj := &DeviceCheckoutOptions{} + var fernTestValueTipSettings *TipSettings + obj.SetTipSettings(fernTestValueTipSettings) + assert.Equal(t, fernTestValueTipSettings, obj.TipSettings) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetShowItemizedCart", func(t *testing.T) { + obj := &DeviceCheckoutOptions{} + var fernTestValueShowItemizedCart *bool + obj.SetShowItemizedCart(fernTestValueShowItemizedCart) + assert.Equal(t, fernTestValueShowItemizedCart, obj.ShowItemizedCart) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAllowAutoCardSurcharge", func(t *testing.T) { + obj := &DeviceCheckoutOptions{} + var fernTestValueAllowAutoCardSurcharge *bool + obj.SetAllowAutoCardSurcharge(fernTestValueAllowAutoCardSurcharge) + assert.Equal(t, fernTestValueAllowAutoCardSurcharge, obj.AllowAutoCardSurcharge) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeviceCheckoutOptions(t *testing.T) { + t.Run("GetDeviceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCheckoutOptions{} + var expected string + obj.DeviceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeviceID(), "getter should return the property value") + }) + + t.Run("GetDeviceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCheckoutOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeviceID() // Should return zero value + }) + + t.Run("GetSkipReceiptScreen", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCheckoutOptions{} + var expected *bool + obj.SkipReceiptScreen = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSkipReceiptScreen(), "getter should return the property value") + }) + + t.Run("GetSkipReceiptScreen_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCheckoutOptions{} + obj.SkipReceiptScreen = nil + + // Act & Assert + assert.Nil(t, obj.GetSkipReceiptScreen(), "getter should return nil when property is nil") + }) + + t.Run("GetSkipReceiptScreen_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCheckoutOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSkipReceiptScreen() // Should return zero value + }) + + t.Run("GetCollectSignature", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCheckoutOptions{} + var expected *bool + obj.CollectSignature = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCollectSignature(), "getter should return the property value") + }) + + t.Run("GetCollectSignature_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCheckoutOptions{} + obj.CollectSignature = nil + + // Act & Assert + assert.Nil(t, obj.GetCollectSignature(), "getter should return nil when property is nil") + }) + + t.Run("GetCollectSignature_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCheckoutOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCollectSignature() // Should return zero value + }) + + t.Run("GetTipSettings", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCheckoutOptions{} + var expected *TipSettings + obj.TipSettings = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTipSettings(), "getter should return the property value") + }) + + t.Run("GetTipSettings_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCheckoutOptions{} + obj.TipSettings = nil + + // Act & Assert + assert.Nil(t, obj.GetTipSettings(), "getter should return nil when property is nil") + }) + + t.Run("GetTipSettings_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCheckoutOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTipSettings() // Should return zero value + }) + + t.Run("GetShowItemizedCart", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCheckoutOptions{} + var expected *bool + obj.ShowItemizedCart = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetShowItemizedCart(), "getter should return the property value") + }) + + t.Run("GetShowItemizedCart_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCheckoutOptions{} + obj.ShowItemizedCart = nil + + // Act & Assert + assert.Nil(t, obj.GetShowItemizedCart(), "getter should return nil when property is nil") + }) + + t.Run("GetShowItemizedCart_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCheckoutOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetShowItemizedCart() // Should return zero value + }) + + t.Run("GetAllowAutoCardSurcharge", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCheckoutOptions{} + var expected *bool + obj.AllowAutoCardSurcharge = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAllowAutoCardSurcharge(), "getter should return the property value") + }) + + t.Run("GetAllowAutoCardSurcharge_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCheckoutOptions{} + obj.AllowAutoCardSurcharge = nil + + // Act & Assert + assert.Nil(t, obj.GetAllowAutoCardSurcharge(), "getter should return nil when property is nil") + }) + + t.Run("GetAllowAutoCardSurcharge_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCheckoutOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAllowAutoCardSurcharge() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeviceCheckoutOptions(t *testing.T) { + t.Run("SetDeviceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCheckoutOptions{} + var fernTestValueDeviceID string + + // Act + obj.SetDeviceID(fernTestValueDeviceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSkipReceiptScreen_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCheckoutOptions{} + var fernTestValueSkipReceiptScreen *bool + + // Act + obj.SetSkipReceiptScreen(fernTestValueSkipReceiptScreen) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCollectSignature_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCheckoutOptions{} + var fernTestValueCollectSignature *bool + + // Act + obj.SetCollectSignature(fernTestValueCollectSignature) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTipSettings_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCheckoutOptions{} + var fernTestValueTipSettings *TipSettings + + // Act + obj.SetTipSettings(fernTestValueTipSettings) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetShowItemizedCart_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCheckoutOptions{} + var fernTestValueShowItemizedCart *bool + + // Act + obj.SetShowItemizedCart(fernTestValueShowItemizedCart) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAllowAutoCardSurcharge_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCheckoutOptions{} + var fernTestValueAllowAutoCardSurcharge *bool + + // Act + obj.SetAllowAutoCardSurcharge(fernTestValueAllowAutoCardSurcharge) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeviceCode(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &DeviceCode{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &DeviceCode{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCode", func(t *testing.T) { + obj := &DeviceCode{} + var fernTestValueCode *string + obj.SetCode(fernTestValueCode) + assert.Equal(t, fernTestValueCode, obj.Code) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeviceID", func(t *testing.T) { + obj := &DeviceCode{} + var fernTestValueDeviceID *string + obj.SetDeviceID(fernTestValueDeviceID) + assert.Equal(t, fernTestValueDeviceID, obj.DeviceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &DeviceCode{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &DeviceCode{} + var fernTestValueStatus *DeviceCodeStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPairBy", func(t *testing.T) { + obj := &DeviceCode{} + var fernTestValuePairBy *string + obj.SetPairBy(fernTestValuePairBy) + assert.Equal(t, fernTestValuePairBy, obj.PairBy) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &DeviceCode{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatusChangedAt", func(t *testing.T) { + obj := &DeviceCode{} + var fernTestValueStatusChangedAt *string + obj.SetStatusChangedAt(fernTestValueStatusChangedAt) + assert.Equal(t, fernTestValueStatusChangedAt, obj.StatusChangedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPairedAt", func(t *testing.T) { + obj := &DeviceCode{} + var fernTestValuePairedAt *string + obj.SetPairedAt(fernTestValuePairedAt) + assert.Equal(t, fernTestValuePairedAt, obj.PairedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeviceCode(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCode + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCode + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetCode", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + var expected *string + obj.Code = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCode(), "getter should return the property value") + }) + + t.Run("GetCode_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + obj.Code = nil + + // Act & Assert + assert.Nil(t, obj.GetCode(), "getter should return nil when property is nil") + }) + + t.Run("GetCode_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCode + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCode() // Should return zero value + }) + + t.Run("GetDeviceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + var expected *string + obj.DeviceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeviceID(), "getter should return the property value") + }) + + t.Run("GetDeviceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + obj.DeviceID = nil + + // Act & Assert + assert.Nil(t, obj.GetDeviceID(), "getter should return nil when property is nil") + }) + + t.Run("GetDeviceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCode + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeviceID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCode + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + var expected *DeviceCodeStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCode + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetPairBy", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + var expected *string + obj.PairBy = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPairBy(), "getter should return the property value") + }) + + t.Run("GetPairBy_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + obj.PairBy = nil + + // Act & Assert + assert.Nil(t, obj.GetPairBy(), "getter should return nil when property is nil") + }) + + t.Run("GetPairBy_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCode + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPairBy() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCode + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetStatusChangedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + var expected *string + obj.StatusChangedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatusChangedAt(), "getter should return the property value") + }) + + t.Run("GetStatusChangedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + obj.StatusChangedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetStatusChangedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetStatusChangedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCode + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatusChangedAt() // Should return zero value + }) + + t.Run("GetPairedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + var expected *string + obj.PairedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPairedAt(), "getter should return the property value") + }) + + t.Run("GetPairedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + obj.PairedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetPairedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetPairedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCode + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPairedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeviceCode(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCode_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + var fernTestValueCode *string + + // Act + obj.SetCode(fernTestValueCode) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeviceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + var fernTestValueDeviceID *string + + // Act + obj.SetDeviceID(fernTestValueDeviceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + var fernTestValueStatus *DeviceCodeStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPairBy_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + var fernTestValuePairBy *string + + // Act + obj.SetPairBy(fernTestValuePairBy) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatusChangedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + var fernTestValueStatusChangedAt *string + + // Act + obj.SetStatusChangedAt(fernTestValueStatusChangedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPairedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + var fernTestValuePairedAt *string + + // Act + obj.SetPairedAt(fernTestValuePairedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeviceCodePairedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &DeviceCodePairedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &DeviceCodePairedEvent{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &DeviceCodePairedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &DeviceCodePairedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &DeviceCodePairedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &DeviceCodePairedEvent{} + var fernTestValueData *DeviceCodePairedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeviceCodePairedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCodePairedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEvent{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEvent{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCodePairedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCodePairedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCodePairedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCodePairedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEvent{} + var expected *DeviceCodePairedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCodePairedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeviceCodePairedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEvent{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEvent{} + var fernTestValueData *DeviceCodePairedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeviceCodePairedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &DeviceCodePairedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &DeviceCodePairedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &DeviceCodePairedEventData{} + var fernTestValueObject *DeviceCodePairedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeviceCodePairedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCodePairedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCodePairedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEventData{} + var expected *DeviceCodePairedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCodePairedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeviceCodePairedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEventData{} + var fernTestValueObject *DeviceCodePairedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeviceCodePairedEventObject(t *testing.T) { + t.Run("SetDeviceCode", func(t *testing.T) { + obj := &DeviceCodePairedEventObject{} + var fernTestValueDeviceCode *DeviceCode + obj.SetDeviceCode(fernTestValueDeviceCode) + assert.Equal(t, fernTestValueDeviceCode, obj.DeviceCode) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeviceCodePairedEventObject(t *testing.T) { + t.Run("GetDeviceCode", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEventObject{} + var expected *DeviceCode + obj.DeviceCode = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeviceCode(), "getter should return the property value") + }) + + t.Run("GetDeviceCode_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEventObject{} + obj.DeviceCode = nil + + // Act & Assert + assert.Nil(t, obj.GetDeviceCode(), "getter should return nil when property is nil") + }) + + t.Run("GetDeviceCode_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCodePairedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeviceCode() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeviceCodePairedEventObject(t *testing.T) { + t.Run("SetDeviceCode_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEventObject{} + var fernTestValueDeviceCode *DeviceCode + + // Act + obj.SetDeviceCode(fernTestValueDeviceCode) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeviceCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &DeviceCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &DeviceCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &DeviceCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &DeviceCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &DeviceCreatedEvent{} + var fernTestValueData *DeviceCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeviceCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEvent{} + var expected *DeviceCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeviceCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEvent{} + var fernTestValueData *DeviceCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeviceCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &DeviceCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &DeviceCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &DeviceCreatedEventData{} + var fernTestValueObject *DeviceCreatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeviceCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEventData{} + var expected *DeviceCreatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeviceCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEventData{} + var fernTestValueObject *DeviceCreatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeviceCreatedEventObject(t *testing.T) { + t.Run("SetDevice", func(t *testing.T) { + obj := &DeviceCreatedEventObject{} + var fernTestValueDevice *Device + obj.SetDevice(fernTestValueDevice) + assert.Equal(t, fernTestValueDevice, obj.Device) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeviceCreatedEventObject(t *testing.T) { + t.Run("GetDevice", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEventObject{} + var expected *Device + obj.Device = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDevice(), "getter should return the property value") + }) + + t.Run("GetDevice_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEventObject{} + obj.Device = nil + + // Act & Assert + assert.Nil(t, obj.GetDevice(), "getter should return nil when property is nil") + }) + + t.Run("GetDevice_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCreatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDevice() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeviceCreatedEventObject(t *testing.T) { + t.Run("SetDevice_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEventObject{} + var fernTestValueDevice *Device + + // Act + obj.SetDevice(fernTestValueDevice) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeviceMetadata(t *testing.T) { + t.Run("SetBatteryPercentage", func(t *testing.T) { + obj := &DeviceMetadata{} + var fernTestValueBatteryPercentage *string + obj.SetBatteryPercentage(fernTestValueBatteryPercentage) + assert.Equal(t, fernTestValueBatteryPercentage, obj.BatteryPercentage) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetChargingState", func(t *testing.T) { + obj := &DeviceMetadata{} + var fernTestValueChargingState *string + obj.SetChargingState(fernTestValueChargingState) + assert.Equal(t, fernTestValueChargingState, obj.ChargingState) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &DeviceMetadata{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMerchantID", func(t *testing.T) { + obj := &DeviceMetadata{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNetworkConnectionType", func(t *testing.T) { + obj := &DeviceMetadata{} + var fernTestValueNetworkConnectionType *string + obj.SetNetworkConnectionType(fernTestValueNetworkConnectionType) + assert.Equal(t, fernTestValueNetworkConnectionType, obj.NetworkConnectionType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPaymentRegion", func(t *testing.T) { + obj := &DeviceMetadata{} + var fernTestValuePaymentRegion *string + obj.SetPaymentRegion(fernTestValuePaymentRegion) + assert.Equal(t, fernTestValuePaymentRegion, obj.PaymentRegion) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSerialNumber", func(t *testing.T) { + obj := &DeviceMetadata{} + var fernTestValueSerialNumber *string + obj.SetSerialNumber(fernTestValueSerialNumber) + assert.Equal(t, fernTestValueSerialNumber, obj.SerialNumber) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOsVersion", func(t *testing.T) { + obj := &DeviceMetadata{} + var fernTestValueOsVersion *string + obj.SetOsVersion(fernTestValueOsVersion) + assert.Equal(t, fernTestValueOsVersion, obj.OsVersion) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppVersion", func(t *testing.T) { + obj := &DeviceMetadata{} + var fernTestValueAppVersion *string + obj.SetAppVersion(fernTestValueAppVersion) + assert.Equal(t, fernTestValueAppVersion, obj.AppVersion) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetWifiNetworkName", func(t *testing.T) { + obj := &DeviceMetadata{} + var fernTestValueWifiNetworkName *string + obj.SetWifiNetworkName(fernTestValueWifiNetworkName) + assert.Equal(t, fernTestValueWifiNetworkName, obj.WifiNetworkName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetWifiNetworkStrength", func(t *testing.T) { + obj := &DeviceMetadata{} + var fernTestValueWifiNetworkStrength *string + obj.SetWifiNetworkStrength(fernTestValueWifiNetworkStrength) + assert.Equal(t, fernTestValueWifiNetworkStrength, obj.WifiNetworkStrength) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIPAddress", func(t *testing.T) { + obj := &DeviceMetadata{} + var fernTestValueIPAddress *string + obj.SetIPAddress(fernTestValueIPAddress) + assert.Equal(t, fernTestValueIPAddress, obj.IPAddress) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDeviceMetadata(t *testing.T) { + t.Run("GetBatteryPercentage", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + var expected *string + obj.BatteryPercentage = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBatteryPercentage(), "getter should return the property value") + }) + + t.Run("GetBatteryPercentage_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + obj.BatteryPercentage = nil + + // Act & Assert + assert.Nil(t, obj.GetBatteryPercentage(), "getter should return nil when property is nil") + }) + + t.Run("GetBatteryPercentage_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceMetadata + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBatteryPercentage() // Should return zero value + }) + + t.Run("GetChargingState", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + var expected *string + obj.ChargingState = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetChargingState(), "getter should return the property value") + }) + + t.Run("GetChargingState_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + obj.ChargingState = nil + + // Act & Assert + assert.Nil(t, obj.GetChargingState(), "getter should return nil when property is nil") + }) + + t.Run("GetChargingState_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceMetadata + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetChargingState() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceMetadata + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceMetadata + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetNetworkConnectionType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + var expected *string + obj.NetworkConnectionType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNetworkConnectionType(), "getter should return the property value") + }) + + t.Run("GetNetworkConnectionType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + obj.NetworkConnectionType = nil + + // Act & Assert + assert.Nil(t, obj.GetNetworkConnectionType(), "getter should return nil when property is nil") + }) + + t.Run("GetNetworkConnectionType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceMetadata + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNetworkConnectionType() // Should return zero value + }) + + t.Run("GetPaymentRegion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + var expected *string + obj.PaymentRegion = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentRegion(), "getter should return the property value") + }) + + t.Run("GetPaymentRegion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + obj.PaymentRegion = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentRegion(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentRegion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceMetadata + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentRegion() // Should return zero value + }) + + t.Run("GetSerialNumber", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + var expected *string + obj.SerialNumber = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSerialNumber(), "getter should return the property value") + }) + + t.Run("GetSerialNumber_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + obj.SerialNumber = nil + + // Act & Assert + assert.Nil(t, obj.GetSerialNumber(), "getter should return nil when property is nil") + }) + + t.Run("GetSerialNumber_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceMetadata + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSerialNumber() // Should return zero value + }) + + t.Run("GetOsVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + var expected *string + obj.OsVersion = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOsVersion(), "getter should return the property value") + }) + + t.Run("GetOsVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + obj.OsVersion = nil + + // Act & Assert + assert.Nil(t, obj.GetOsVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetOsVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceMetadata + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOsVersion() // Should return zero value + }) + + t.Run("GetAppVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + var expected *string + obj.AppVersion = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppVersion(), "getter should return the property value") + }) + + t.Run("GetAppVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + obj.AppVersion = nil + + // Act & Assert + assert.Nil(t, obj.GetAppVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetAppVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceMetadata + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppVersion() // Should return zero value + }) + + t.Run("GetWifiNetworkName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + var expected *string + obj.WifiNetworkName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetWifiNetworkName(), "getter should return the property value") + }) + + t.Run("GetWifiNetworkName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + obj.WifiNetworkName = nil + + // Act & Assert + assert.Nil(t, obj.GetWifiNetworkName(), "getter should return nil when property is nil") + }) + + t.Run("GetWifiNetworkName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceMetadata + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetWifiNetworkName() // Should return zero value + }) + + t.Run("GetWifiNetworkStrength", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + var expected *string + obj.WifiNetworkStrength = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetWifiNetworkStrength(), "getter should return the property value") + }) + + t.Run("GetWifiNetworkStrength_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + obj.WifiNetworkStrength = nil + + // Act & Assert + assert.Nil(t, obj.GetWifiNetworkStrength(), "getter should return nil when property is nil") + }) + + t.Run("GetWifiNetworkStrength_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceMetadata + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetWifiNetworkStrength() // Should return zero value + }) + + t.Run("GetIPAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + var expected *string + obj.IPAddress = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIPAddress(), "getter should return the property value") + }) + + t.Run("GetIPAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + obj.IPAddress = nil + + // Act & Assert + assert.Nil(t, obj.GetIPAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetIPAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceMetadata + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIPAddress() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDeviceMetadata(t *testing.T) { + t.Run("SetBatteryPercentage_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + var fernTestValueBatteryPercentage *string + + // Act + obj.SetBatteryPercentage(fernTestValueBatteryPercentage) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetChargingState_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + var fernTestValueChargingState *string + + // Act + obj.SetChargingState(fernTestValueChargingState) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNetworkConnectionType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + var fernTestValueNetworkConnectionType *string + + // Act + obj.SetNetworkConnectionType(fernTestValueNetworkConnectionType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPaymentRegion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + var fernTestValuePaymentRegion *string + + // Act + obj.SetPaymentRegion(fernTestValuePaymentRegion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSerialNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + var fernTestValueSerialNumber *string + + // Act + obj.SetSerialNumber(fernTestValueSerialNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOsVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + var fernTestValueOsVersion *string + + // Act + obj.SetOsVersion(fernTestValueOsVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + var fernTestValueAppVersion *string + + // Act + obj.SetAppVersion(fernTestValueAppVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetWifiNetworkName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + var fernTestValueWifiNetworkName *string + + // Act + obj.SetWifiNetworkName(fernTestValueWifiNetworkName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetWifiNetworkStrength_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + var fernTestValueWifiNetworkStrength *string + + // Act + obj.SetWifiNetworkStrength(fernTestValueWifiNetworkStrength) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIPAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + var fernTestValueIPAddress *string + + // Act + obj.SetIPAddress(fernTestValueIPAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisputeCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &DisputeCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &DisputeCreatedEvent{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &DisputeCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &DisputeCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &DisputeCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &DisputeCreatedEvent{} + var fernTestValueData *DisputeCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDisputeCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEvent{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEvent{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEvent{} + var expected *DisputeCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDisputeCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEvent{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEvent{} + var fernTestValueData *DisputeCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisputeCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &DisputeCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &DisputeCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &DisputeCreatedEventData{} + var fernTestValueObject *DisputeCreatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDisputeCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEventData{} + var expected *DisputeCreatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDisputeCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEventData{} + var fernTestValueObject *DisputeCreatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisputeCreatedEventObject(t *testing.T) { + t.Run("SetObject", func(t *testing.T) { + obj := &DisputeCreatedEventObject{} + var fernTestValueObject *Dispute + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDisputeCreatedEventObject(t *testing.T) { + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEventObject{} + var expected *Dispute + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEventObject{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeCreatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDisputeCreatedEventObject(t *testing.T) { + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEventObject{} + var fernTestValueObject *Dispute + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisputeEvidence(t *testing.T) { + t.Run("SetEvidenceID", func(t *testing.T) { + obj := &DisputeEvidence{} + var fernTestValueEvidenceID *string + obj.SetEvidenceID(fernTestValueEvidenceID) + assert.Equal(t, fernTestValueEvidenceID, obj.EvidenceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &DisputeEvidence{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDisputeID", func(t *testing.T) { + obj := &DisputeEvidence{} + var fernTestValueDisputeID *string + obj.SetDisputeID(fernTestValueDisputeID) + assert.Equal(t, fernTestValueDisputeID, obj.DisputeID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEvidenceFile", func(t *testing.T) { + obj := &DisputeEvidence{} + var fernTestValueEvidenceFile *DisputeEvidenceFile + obj.SetEvidenceFile(fernTestValueEvidenceFile) + assert.Equal(t, fernTestValueEvidenceFile, obj.EvidenceFile) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEvidenceText", func(t *testing.T) { + obj := &DisputeEvidence{} + var fernTestValueEvidenceText *string + obj.SetEvidenceText(fernTestValueEvidenceText) + assert.Equal(t, fernTestValueEvidenceText, obj.EvidenceText) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUploadedAt", func(t *testing.T) { + obj := &DisputeEvidence{} + var fernTestValueUploadedAt *string + obj.SetUploadedAt(fernTestValueUploadedAt) + assert.Equal(t, fernTestValueUploadedAt, obj.UploadedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEvidenceType", func(t *testing.T) { + obj := &DisputeEvidence{} + var fernTestValueEvidenceType *DisputeEvidenceType + obj.SetEvidenceType(fernTestValueEvidenceType) + assert.Equal(t, fernTestValueEvidenceType, obj.EvidenceType) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDisputeEvidence(t *testing.T) { + t.Run("GetEvidenceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidence{} + var expected *string + obj.EvidenceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEvidenceID(), "getter should return the property value") + }) + + t.Run("GetEvidenceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidence{} + obj.EvidenceID = nil + + // Act & Assert + assert.Nil(t, obj.GetEvidenceID(), "getter should return nil when property is nil") + }) + + t.Run("GetEvidenceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidence + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEvidenceID() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidence{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidence{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidence + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetDisputeID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidence{} + var expected *string + obj.DisputeID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDisputeID(), "getter should return the property value") + }) + + t.Run("GetDisputeID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidence{} + obj.DisputeID = nil + + // Act & Assert + assert.Nil(t, obj.GetDisputeID(), "getter should return nil when property is nil") + }) + + t.Run("GetDisputeID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidence + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDisputeID() // Should return zero value + }) + + t.Run("GetEvidenceFile", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidence{} + var expected *DisputeEvidenceFile + obj.EvidenceFile = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEvidenceFile(), "getter should return the property value") + }) + + t.Run("GetEvidenceFile_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidence{} + obj.EvidenceFile = nil + + // Act & Assert + assert.Nil(t, obj.GetEvidenceFile(), "getter should return nil when property is nil") + }) + + t.Run("GetEvidenceFile_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidence + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEvidenceFile() // Should return zero value + }) + + t.Run("GetEvidenceText", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidence{} + var expected *string + obj.EvidenceText = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEvidenceText(), "getter should return the property value") + }) + + t.Run("GetEvidenceText_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidence{} + obj.EvidenceText = nil + + // Act & Assert + assert.Nil(t, obj.GetEvidenceText(), "getter should return nil when property is nil") + }) + + t.Run("GetEvidenceText_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidence + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEvidenceText() // Should return zero value + }) + + t.Run("GetUploadedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidence{} + var expected *string + obj.UploadedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUploadedAt(), "getter should return the property value") + }) + + t.Run("GetUploadedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidence{} + obj.UploadedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUploadedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUploadedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidence + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUploadedAt() // Should return zero value + }) + + t.Run("GetEvidenceType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidence{} + var expected *DisputeEvidenceType + obj.EvidenceType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEvidenceType(), "getter should return the property value") + }) + + t.Run("GetEvidenceType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidence{} + obj.EvidenceType = nil + + // Act & Assert + assert.Nil(t, obj.GetEvidenceType(), "getter should return nil when property is nil") + }) + + t.Run("GetEvidenceType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidence + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEvidenceType() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDisputeEvidence(t *testing.T) { + t.Run("SetEvidenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidence{} + var fernTestValueEvidenceID *string + + // Act + obj.SetEvidenceID(fernTestValueEvidenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidence{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDisputeID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidence{} + var fernTestValueDisputeID *string + + // Act + obj.SetDisputeID(fernTestValueDisputeID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEvidenceFile_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidence{} + var fernTestValueEvidenceFile *DisputeEvidenceFile + + // Act + obj.SetEvidenceFile(fernTestValueEvidenceFile) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEvidenceText_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidence{} + var fernTestValueEvidenceText *string + + // Act + obj.SetEvidenceText(fernTestValueEvidenceText) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUploadedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidence{} + var fernTestValueUploadedAt *string + + // Act + obj.SetUploadedAt(fernTestValueUploadedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEvidenceType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidence{} + var fernTestValueEvidenceType *DisputeEvidenceType + + // Act + obj.SetEvidenceType(fernTestValueEvidenceType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisputeEvidenceAddedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &DisputeEvidenceAddedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &DisputeEvidenceAddedEvent{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &DisputeEvidenceAddedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &DisputeEvidenceAddedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &DisputeEvidenceAddedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &DisputeEvidenceAddedEvent{} + var fernTestValueData *DisputeEvidenceAddedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDisputeEvidenceAddedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceAddedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEvent{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEvent{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceAddedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceAddedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceAddedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceAddedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEvent{} + var expected *DisputeEvidenceAddedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceAddedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDisputeEvidenceAddedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEvent{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEvent{} + var fernTestValueData *DisputeEvidenceAddedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisputeEvidenceAddedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &DisputeEvidenceAddedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &DisputeEvidenceAddedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &DisputeEvidenceAddedEventData{} + var fernTestValueObject *DisputeEvidenceAddedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDisputeEvidenceAddedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceAddedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceAddedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEventData{} + var expected *DisputeEvidenceAddedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceAddedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDisputeEvidenceAddedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEventData{} + var fernTestValueObject *DisputeEvidenceAddedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisputeEvidenceAddedEventObject(t *testing.T) { + t.Run("SetObject", func(t *testing.T) { + obj := &DisputeEvidenceAddedEventObject{} + var fernTestValueObject *Dispute + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDisputeEvidenceAddedEventObject(t *testing.T) { + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEventObject{} + var expected *Dispute + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEventObject{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceAddedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDisputeEvidenceAddedEventObject(t *testing.T) { + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEventObject{} + var fernTestValueObject *Dispute + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisputeEvidenceCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &DisputeEvidenceCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &DisputeEvidenceCreatedEvent{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &DisputeEvidenceCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &DisputeEvidenceCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &DisputeEvidenceCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &DisputeEvidenceCreatedEvent{} + var fernTestValueData *DisputeEvidenceCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDisputeEvidenceCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEvent{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEvent{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEvent{} + var expected *DisputeEvidenceCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDisputeEvidenceCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEvent{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEvent{} + var fernTestValueData *DisputeEvidenceCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisputeEvidenceCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &DisputeEvidenceCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &DisputeEvidenceCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &DisputeEvidenceCreatedEventData{} + var fernTestValueObject *DisputeEvidenceCreatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDisputeEvidenceCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEventData{} + var expected *DisputeEvidenceCreatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDisputeEvidenceCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEventData{} + var fernTestValueObject *DisputeEvidenceCreatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisputeEvidenceCreatedEventObject(t *testing.T) { + t.Run("SetObject", func(t *testing.T) { + obj := &DisputeEvidenceCreatedEventObject{} + var fernTestValueObject *Dispute + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDisputeEvidenceCreatedEventObject(t *testing.T) { + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEventObject{} + var expected *Dispute + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEventObject{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceCreatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDisputeEvidenceCreatedEventObject(t *testing.T) { + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEventObject{} + var fernTestValueObject *Dispute + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisputeEvidenceDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &DisputeEvidenceDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &DisputeEvidenceDeletedEvent{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &DisputeEvidenceDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &DisputeEvidenceDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &DisputeEvidenceDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &DisputeEvidenceDeletedEvent{} + var fernTestValueData *DisputeEvidenceDeletedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDisputeEvidenceDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEvent{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEvent{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEvent{} + var expected *DisputeEvidenceDeletedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDisputeEvidenceDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEvent{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEvent{} + var fernTestValueData *DisputeEvidenceDeletedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisputeEvidenceDeletedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &DisputeEvidenceDeletedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &DisputeEvidenceDeletedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &DisputeEvidenceDeletedEventData{} + var fernTestValueObject *DisputeEvidenceDeletedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDisputeEvidenceDeletedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceDeletedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceDeletedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEventData{} + var expected *DisputeEvidenceDeletedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceDeletedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDisputeEvidenceDeletedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEventData{} + var fernTestValueObject *DisputeEvidenceDeletedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisputeEvidenceDeletedEventObject(t *testing.T) { + t.Run("SetObject", func(t *testing.T) { + obj := &DisputeEvidenceDeletedEventObject{} + var fernTestValueObject *Dispute + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDisputeEvidenceDeletedEventObject(t *testing.T) { + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEventObject{} + var expected *Dispute + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEventObject{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceDeletedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDisputeEvidenceDeletedEventObject(t *testing.T) { + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEventObject{} + var fernTestValueObject *Dispute + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisputeEvidenceFile(t *testing.T) { + t.Run("SetFilename", func(t *testing.T) { + obj := &DisputeEvidenceFile{} + var fernTestValueFilename *string + obj.SetFilename(fernTestValueFilename) + assert.Equal(t, fernTestValueFilename, obj.Filename) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFiletype", func(t *testing.T) { + obj := &DisputeEvidenceFile{} + var fernTestValueFiletype *string + obj.SetFiletype(fernTestValueFiletype) + assert.Equal(t, fernTestValueFiletype, obj.Filetype) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDisputeEvidenceFile(t *testing.T) { + t.Run("GetFilename", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceFile{} + var expected *string + obj.Filename = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFilename(), "getter should return the property value") + }) + + t.Run("GetFilename_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceFile{} + obj.Filename = nil + + // Act & Assert + assert.Nil(t, obj.GetFilename(), "getter should return nil when property is nil") + }) + + t.Run("GetFilename_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceFile + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFilename() // Should return zero value + }) + + t.Run("GetFiletype", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceFile{} + var expected *string + obj.Filetype = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFiletype(), "getter should return the property value") + }) + + t.Run("GetFiletype_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceFile{} + obj.Filetype = nil + + // Act & Assert + assert.Nil(t, obj.GetFiletype(), "getter should return nil when property is nil") + }) + + t.Run("GetFiletype_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceFile + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFiletype() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDisputeEvidenceFile(t *testing.T) { + t.Run("SetFilename_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceFile{} + var fernTestValueFilename *string + + // Act + obj.SetFilename(fernTestValueFilename) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFiletype_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceFile{} + var fernTestValueFiletype *string + + // Act + obj.SetFiletype(fernTestValueFiletype) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisputeEvidenceRemovedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &DisputeEvidenceRemovedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &DisputeEvidenceRemovedEvent{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &DisputeEvidenceRemovedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &DisputeEvidenceRemovedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &DisputeEvidenceRemovedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &DisputeEvidenceRemovedEvent{} + var fernTestValueData *DisputeEvidenceRemovedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDisputeEvidenceRemovedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceRemovedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEvent{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEvent{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceRemovedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceRemovedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceRemovedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceRemovedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEvent{} + var expected *DisputeEvidenceRemovedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceRemovedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDisputeEvidenceRemovedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEvent{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEvent{} + var fernTestValueData *DisputeEvidenceRemovedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisputeEvidenceRemovedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &DisputeEvidenceRemovedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &DisputeEvidenceRemovedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &DisputeEvidenceRemovedEventData{} + var fernTestValueObject *DisputeEvidenceRemovedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDisputeEvidenceRemovedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceRemovedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceRemovedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEventData{} + var expected *DisputeEvidenceRemovedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceRemovedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDisputeEvidenceRemovedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEventData{} + var fernTestValueObject *DisputeEvidenceRemovedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisputeEvidenceRemovedEventObject(t *testing.T) { + t.Run("SetObject", func(t *testing.T) { + obj := &DisputeEvidenceRemovedEventObject{} + var fernTestValueObject *Dispute + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDisputeEvidenceRemovedEventObject(t *testing.T) { + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEventObject{} + var expected *Dispute + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEventObject{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceRemovedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDisputeEvidenceRemovedEventObject(t *testing.T) { + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEventObject{} + var fernTestValueObject *Dispute + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisputeStateChangedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &DisputeStateChangedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &DisputeStateChangedEvent{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &DisputeStateChangedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &DisputeStateChangedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &DisputeStateChangedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &DisputeStateChangedEvent{} + var fernTestValueData *DisputeStateChangedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDisputeStateChangedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateChangedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEvent{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEvent{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateChangedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateChangedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateChangedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateChangedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEvent{} + var expected *DisputeStateChangedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateChangedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDisputeStateChangedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEvent{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEvent{} + var fernTestValueData *DisputeStateChangedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisputeStateChangedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &DisputeStateChangedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &DisputeStateChangedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &DisputeStateChangedEventData{} + var fernTestValueObject *DisputeStateChangedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDisputeStateChangedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateChangedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateChangedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEventData{} + var expected *DisputeStateChangedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateChangedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDisputeStateChangedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEventData{} + var fernTestValueObject *DisputeStateChangedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisputeStateChangedEventObject(t *testing.T) { + t.Run("SetObject", func(t *testing.T) { + obj := &DisputeStateChangedEventObject{} + var fernTestValueObject *Dispute + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDisputeStateChangedEventObject(t *testing.T) { + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEventObject{} + var expected *Dispute + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEventObject{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateChangedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDisputeStateChangedEventObject(t *testing.T) { + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEventObject{} + var fernTestValueObject *Dispute + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisputeStateUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &DisputeStateUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &DisputeStateUpdatedEvent{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &DisputeStateUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &DisputeStateUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &DisputeStateUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &DisputeStateUpdatedEvent{} + var fernTestValueData *DisputeStateUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDisputeStateUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEvent{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEvent{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEvent{} + var expected *DisputeStateUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDisputeStateUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEvent{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEvent{} + var fernTestValueData *DisputeStateUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisputeStateUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &DisputeStateUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &DisputeStateUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &DisputeStateUpdatedEventData{} + var fernTestValueObject *DisputeStateUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDisputeStateUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEventData{} + var expected *DisputeStateUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDisputeStateUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEventData{} + var fernTestValueObject *DisputeStateUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDisputeStateUpdatedEventObject(t *testing.T) { + t.Run("SetObject", func(t *testing.T) { + obj := &DisputeStateUpdatedEventObject{} + var fernTestValueObject *Dispute + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersDisputeStateUpdatedEventObject(t *testing.T) { + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEventObject{} + var expected *Dispute + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEventObject{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitDisputeStateUpdatedEventObject(t *testing.T) { + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEventObject{} + var fernTestValueObject *Dispute + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersEmployeeWage(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &EmployeeWage{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEmployeeID", func(t *testing.T) { + obj := &EmployeeWage{} + var fernTestValueEmployeeID *string + obj.SetEmployeeID(fernTestValueEmployeeID) + assert.Equal(t, fernTestValueEmployeeID, obj.EmployeeID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTitle", func(t *testing.T) { + obj := &EmployeeWage{} + var fernTestValueTitle *string + obj.SetTitle(fernTestValueTitle) + assert.Equal(t, fernTestValueTitle, obj.Title) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetHourlyRate", func(t *testing.T) { + obj := &EmployeeWage{} + var fernTestValueHourlyRate *Money + obj.SetHourlyRate(fernTestValueHourlyRate) + assert.Equal(t, fernTestValueHourlyRate, obj.HourlyRate) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersEmployeeWage(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EmployeeWage{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EmployeeWage{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *EmployeeWage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetEmployeeID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EmployeeWage{} + var expected *string + obj.EmployeeID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEmployeeID(), "getter should return the property value") + }) + + t.Run("GetEmployeeID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EmployeeWage{} + obj.EmployeeID = nil + + // Act & Assert + assert.Nil(t, obj.GetEmployeeID(), "getter should return nil when property is nil") + }) + + t.Run("GetEmployeeID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *EmployeeWage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEmployeeID() // Should return zero value + }) + + t.Run("GetTitle", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EmployeeWage{} + var expected *string + obj.Title = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTitle(), "getter should return the property value") + }) + + t.Run("GetTitle_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EmployeeWage{} + obj.Title = nil + + // Act & Assert + assert.Nil(t, obj.GetTitle(), "getter should return nil when property is nil") + }) + + t.Run("GetTitle_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *EmployeeWage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTitle() // Should return zero value + }) + + t.Run("GetHourlyRate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EmployeeWage{} + var expected *Money + obj.HourlyRate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetHourlyRate(), "getter should return the property value") + }) + + t.Run("GetHourlyRate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EmployeeWage{} + obj.HourlyRate = nil + + // Act & Assert + assert.Nil(t, obj.GetHourlyRate(), "getter should return nil when property is nil") + }) + + t.Run("GetHourlyRate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *EmployeeWage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetHourlyRate() // Should return zero value + }) + +} + +func TestSettersMarkExplicitEmployeeWage(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EmployeeWage{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEmployeeID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EmployeeWage{} + var fernTestValueEmployeeID *string + + // Act + obj.SetEmployeeID(fernTestValueEmployeeID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTitle_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EmployeeWage{} + var fernTestValueTitle *string + + // Act + obj.SetTitle(fernTestValueTitle) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetHourlyRate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EmployeeWage{} + var fernTestValueHourlyRate *Money + + // Act + obj.SetHourlyRate(fernTestValueHourlyRate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersError(t *testing.T) { + t.Run("SetCategory", func(t *testing.T) { + obj := &Error{} + var fernTestValueCategory ErrorCategory + obj.SetCategory(fernTestValueCategory) + assert.Equal(t, fernTestValueCategory, obj.Category) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCode", func(t *testing.T) { + obj := &Error{} + var fernTestValueCode ErrorCode + obj.SetCode(fernTestValueCode) + assert.Equal(t, fernTestValueCode, obj.Code) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDetail", func(t *testing.T) { + obj := &Error{} + var fernTestValueDetail *string + obj.SetDetail(fernTestValueDetail) + assert.Equal(t, fernTestValueDetail, obj.Detail) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetField", func(t *testing.T) { + obj := &Error{} + var fernTestValueField *string + obj.SetField(fernTestValueField) + assert.Equal(t, fernTestValueField, obj.Field) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersError(t *testing.T) { + t.Run("GetCategory", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Error{} + var expected ErrorCategory + obj.Category = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCategory(), "getter should return the property value") + }) + + t.Run("GetCategory_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Error + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCategory() // Should return zero value + }) + + t.Run("GetCode", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Error{} + var expected ErrorCode + obj.Code = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCode(), "getter should return the property value") + }) + + t.Run("GetCode_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Error + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCode() // Should return zero value + }) + + t.Run("GetDetail", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Error{} + var expected *string + obj.Detail = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDetail(), "getter should return the property value") + }) + + t.Run("GetDetail_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Error{} + obj.Detail = nil + + // Act & Assert + assert.Nil(t, obj.GetDetail(), "getter should return nil when property is nil") + }) + + t.Run("GetDetail_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Error + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDetail() // Should return zero value + }) + + t.Run("GetField", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Error{} + var expected *string + obj.Field = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetField(), "getter should return the property value") + }) + + t.Run("GetField_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Error{} + obj.Field = nil + + // Act & Assert + assert.Nil(t, obj.GetField(), "getter should return nil when property is nil") + }) + + t.Run("GetField_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Error + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetField() // Should return zero value + }) + +} + +func TestSettersMarkExplicitError(t *testing.T) { + t.Run("SetCategory_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Error{} + var fernTestValueCategory ErrorCategory + + // Act + obj.SetCategory(fernTestValueCategory) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCode_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Error{} + var fernTestValueCode ErrorCode + + // Act + obj.SetCode(fernTestValueCode) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDetail_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Error{} + var fernTestValueDetail *string + + // Act + obj.SetDetail(fernTestValueDetail) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetField_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Error{} + var fernTestValueField *string + + // Act + obj.SetField(fernTestValueField) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersEventTypeMetadata(t *testing.T) { + t.Run("SetEventType", func(t *testing.T) { + obj := &EventTypeMetadata{} + var fernTestValueEventType *string + obj.SetEventType(fernTestValueEventType) + assert.Equal(t, fernTestValueEventType, obj.EventType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAPIVersionIntroduced", func(t *testing.T) { + obj := &EventTypeMetadata{} + var fernTestValueAPIVersionIntroduced *string + obj.SetAPIVersionIntroduced(fernTestValueAPIVersionIntroduced) + assert.Equal(t, fernTestValueAPIVersionIntroduced, obj.APIVersionIntroduced) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReleaseStatus", func(t *testing.T) { + obj := &EventTypeMetadata{} + var fernTestValueReleaseStatus *string + obj.SetReleaseStatus(fernTestValueReleaseStatus) + assert.Equal(t, fernTestValueReleaseStatus, obj.ReleaseStatus) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersEventTypeMetadata(t *testing.T) { + t.Run("GetEventType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventTypeMetadata{} + var expected *string + obj.EventType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventType(), "getter should return the property value") + }) + + t.Run("GetEventType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventTypeMetadata{} + obj.EventType = nil + + // Act & Assert + assert.Nil(t, obj.GetEventType(), "getter should return nil when property is nil") + }) + + t.Run("GetEventType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *EventTypeMetadata + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventType() // Should return zero value + }) + + t.Run("GetAPIVersionIntroduced", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventTypeMetadata{} + var expected *string + obj.APIVersionIntroduced = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAPIVersionIntroduced(), "getter should return the property value") + }) + + t.Run("GetAPIVersionIntroduced_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventTypeMetadata{} + obj.APIVersionIntroduced = nil + + // Act & Assert + assert.Nil(t, obj.GetAPIVersionIntroduced(), "getter should return nil when property is nil") + }) + + t.Run("GetAPIVersionIntroduced_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *EventTypeMetadata + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAPIVersionIntroduced() // Should return zero value + }) + + t.Run("GetReleaseStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventTypeMetadata{} + var expected *string + obj.ReleaseStatus = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReleaseStatus(), "getter should return the property value") + }) + + t.Run("GetReleaseStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventTypeMetadata{} + obj.ReleaseStatus = nil + + // Act & Assert + assert.Nil(t, obj.GetReleaseStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetReleaseStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *EventTypeMetadata + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReleaseStatus() // Should return zero value + }) + +} + +func TestSettersMarkExplicitEventTypeMetadata(t *testing.T) { + t.Run("SetEventType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventTypeMetadata{} + var fernTestValueEventType *string + + // Act + obj.SetEventType(fernTestValueEventType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAPIVersionIntroduced_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventTypeMetadata{} + var fernTestValueAPIVersionIntroduced *string + + // Act + obj.SetAPIVersionIntroduced(fernTestValueAPIVersionIntroduced) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReleaseStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventTypeMetadata{} + var fernTestValueReleaseStatus *string + + // Act + obj.SetReleaseStatus(fernTestValueReleaseStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersFilterValue(t *testing.T) { + t.Run("SetAll", func(t *testing.T) { + obj := &FilterValue{} + var fernTestValueAll []string + obj.SetAll(fernTestValueAll) + assert.Equal(t, fernTestValueAll, obj.All) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAny", func(t *testing.T) { + obj := &FilterValue{} + var fernTestValueAny []string + obj.SetAny(fernTestValueAny) + assert.Equal(t, fernTestValueAny, obj.Any) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNone", func(t *testing.T) { + obj := &FilterValue{} + var fernTestValueNone []string + obj.SetNone(fernTestValueNone) + assert.Equal(t, fernTestValueNone, obj.None) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersFilterValue(t *testing.T) { + t.Run("GetAll", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FilterValue{} + var expected []string + obj.All = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAll(), "getter should return the property value") + }) + + t.Run("GetAll_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FilterValue{} + obj.All = nil + + // Act & Assert + assert.Nil(t, obj.GetAll(), "getter should return nil when property is nil") + }) + + t.Run("GetAll_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FilterValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAll() // Should return zero value + }) + + t.Run("GetAny", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FilterValue{} + var expected []string + obj.Any = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAny(), "getter should return the property value") + }) + + t.Run("GetAny_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FilterValue{} + obj.Any = nil + + // Act & Assert + assert.Nil(t, obj.GetAny(), "getter should return nil when property is nil") + }) + + t.Run("GetAny_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FilterValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAny() // Should return zero value + }) + + t.Run("GetNone", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FilterValue{} + var expected []string + obj.None = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNone(), "getter should return the property value") + }) + + t.Run("GetNone_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FilterValue{} + obj.None = nil + + // Act & Assert + assert.Nil(t, obj.GetNone(), "getter should return nil when property is nil") + }) + + t.Run("GetNone_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FilterValue + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNone() // Should return zero value + }) + +} + +func TestSettersMarkExplicitFilterValue(t *testing.T) { + t.Run("SetAll_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FilterValue{} + var fernTestValueAll []string + + // Act + obj.SetAll(fernTestValueAll) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAny_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FilterValue{} + var fernTestValueAny []string + + // Act + obj.SetAny(fernTestValueAny) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNone_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FilterValue{} + var fernTestValueNone []string + + // Act + obj.SetNone(fernTestValueNone) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersFulfillment(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &Fulfillment{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &Fulfillment{} + var fernTestValueType *FulfillmentType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetState", func(t *testing.T) { + obj := &Fulfillment{} + var fernTestValueState *FulfillmentState + obj.SetState(fernTestValueState) + assert.Equal(t, fernTestValueState, obj.State) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLineItemApplication", func(t *testing.T) { + obj := &Fulfillment{} + var fernTestValueLineItemApplication *FulfillmentFulfillmentLineItemApplication + obj.SetLineItemApplication(fernTestValueLineItemApplication) + assert.Equal(t, fernTestValueLineItemApplication, obj.LineItemApplication) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEntries", func(t *testing.T) { + obj := &Fulfillment{} + var fernTestValueEntries []*FulfillmentFulfillmentEntry + obj.SetEntries(fernTestValueEntries) + assert.Equal(t, fernTestValueEntries, obj.Entries) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMetadata", func(t *testing.T) { + obj := &Fulfillment{} + var fernTestValueMetadata map[string]*string + obj.SetMetadata(fernTestValueMetadata) + assert.Equal(t, fernTestValueMetadata, obj.Metadata) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPickupDetails", func(t *testing.T) { + obj := &Fulfillment{} + var fernTestValuePickupDetails *FulfillmentPickupDetails + obj.SetPickupDetails(fernTestValuePickupDetails) + assert.Equal(t, fernTestValuePickupDetails, obj.PickupDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetShipmentDetails", func(t *testing.T) { + obj := &Fulfillment{} + var fernTestValueShipmentDetails *FulfillmentShipmentDetails + obj.SetShipmentDetails(fernTestValueShipmentDetails) + assert.Equal(t, fernTestValueShipmentDetails, obj.ShipmentDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeliveryDetails", func(t *testing.T) { + obj := &Fulfillment{} + var fernTestValueDeliveryDetails *FulfillmentDeliveryDetails + obj.SetDeliveryDetails(fernTestValueDeliveryDetails) + assert.Equal(t, fernTestValueDeliveryDetails, obj.DeliveryDetails) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersFulfillment(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Fulfillment{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Fulfillment{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Fulfillment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Fulfillment{} + var expected *FulfillmentType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Fulfillment{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Fulfillment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetState", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Fulfillment{} + var expected *FulfillmentState + obj.State = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetState(), "getter should return the property value") + }) + + t.Run("GetState_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Fulfillment{} + obj.State = nil + + // Act & Assert + assert.Nil(t, obj.GetState(), "getter should return nil when property is nil") + }) + + t.Run("GetState_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Fulfillment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetState() // Should return zero value + }) + + t.Run("GetLineItemApplication", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Fulfillment{} + var expected *FulfillmentFulfillmentLineItemApplication + obj.LineItemApplication = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLineItemApplication(), "getter should return the property value") + }) + + t.Run("GetLineItemApplication_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Fulfillment{} + obj.LineItemApplication = nil + + // Act & Assert + assert.Nil(t, obj.GetLineItemApplication(), "getter should return nil when property is nil") + }) + + t.Run("GetLineItemApplication_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Fulfillment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLineItemApplication() // Should return zero value + }) + + t.Run("GetEntries", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Fulfillment{} + var expected []*FulfillmentFulfillmentEntry + obj.Entries = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEntries(), "getter should return the property value") + }) + + t.Run("GetEntries_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Fulfillment{} + obj.Entries = nil + + // Act & Assert + assert.Nil(t, obj.GetEntries(), "getter should return nil when property is nil") + }) + + t.Run("GetEntries_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Fulfillment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEntries() // Should return zero value + }) + + t.Run("GetMetadata", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Fulfillment{} + var expected map[string]*string + obj.Metadata = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMetadata(), "getter should return the property value") + }) + + t.Run("GetMetadata_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Fulfillment{} + obj.Metadata = nil + + // Act & Assert + assert.Nil(t, obj.GetMetadata(), "getter should return nil when property is nil") + }) + + t.Run("GetMetadata_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Fulfillment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMetadata() // Should return zero value + }) + + t.Run("GetPickupDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Fulfillment{} + var expected *FulfillmentPickupDetails + obj.PickupDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPickupDetails(), "getter should return the property value") + }) + + t.Run("GetPickupDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Fulfillment{} + obj.PickupDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetPickupDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetPickupDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Fulfillment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPickupDetails() // Should return zero value + }) + + t.Run("GetShipmentDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Fulfillment{} + var expected *FulfillmentShipmentDetails + obj.ShipmentDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetShipmentDetails(), "getter should return the property value") + }) + + t.Run("GetShipmentDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Fulfillment{} + obj.ShipmentDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetShipmentDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetShipmentDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Fulfillment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetShipmentDetails() // Should return zero value + }) + + t.Run("GetDeliveryDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Fulfillment{} + var expected *FulfillmentDeliveryDetails + obj.DeliveryDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeliveryDetails(), "getter should return the property value") + }) + + t.Run("GetDeliveryDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Fulfillment{} + obj.DeliveryDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetDeliveryDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetDeliveryDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Fulfillment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeliveryDetails() // Should return zero value + }) + +} + +func TestSettersMarkExplicitFulfillment(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Fulfillment{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Fulfillment{} + var fernTestValueType *FulfillmentType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetState_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Fulfillment{} + var fernTestValueState *FulfillmentState + + // Act + obj.SetState(fernTestValueState) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLineItemApplication_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Fulfillment{} + var fernTestValueLineItemApplication *FulfillmentFulfillmentLineItemApplication + + // Act + obj.SetLineItemApplication(fernTestValueLineItemApplication) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEntries_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Fulfillment{} + var fernTestValueEntries []*FulfillmentFulfillmentEntry + + // Act + obj.SetEntries(fernTestValueEntries) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMetadata_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Fulfillment{} + var fernTestValueMetadata map[string]*string + + // Act + obj.SetMetadata(fernTestValueMetadata) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPickupDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Fulfillment{} + var fernTestValuePickupDetails *FulfillmentPickupDetails + + // Act + obj.SetPickupDetails(fernTestValuePickupDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetShipmentDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Fulfillment{} + var fernTestValueShipmentDetails *FulfillmentShipmentDetails + + // Act + obj.SetShipmentDetails(fernTestValueShipmentDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeliveryDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Fulfillment{} + var fernTestValueDeliveryDetails *FulfillmentDeliveryDetails + + // Act + obj.SetDeliveryDetails(fernTestValueDeliveryDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersFulfillmentDeliveryDetails(t *testing.T) { + t.Run("SetRecipient", func(t *testing.T) { + obj := &FulfillmentDeliveryDetails{} + var fernTestValueRecipient *FulfillmentRecipient + obj.SetRecipient(fernTestValueRecipient) + assert.Equal(t, fernTestValueRecipient, obj.Recipient) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetScheduleType", func(t *testing.T) { + obj := &FulfillmentDeliveryDetails{} + var fernTestValueScheduleType *FulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleType + obj.SetScheduleType(fernTestValueScheduleType) + assert.Equal(t, fernTestValueScheduleType, obj.ScheduleType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPlacedAt", func(t *testing.T) { + obj := &FulfillmentDeliveryDetails{} + var fernTestValuePlacedAt *string + obj.SetPlacedAt(fernTestValuePlacedAt) + assert.Equal(t, fernTestValuePlacedAt, obj.PlacedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeliverAt", func(t *testing.T) { + obj := &FulfillmentDeliveryDetails{} + var fernTestValueDeliverAt *string + obj.SetDeliverAt(fernTestValueDeliverAt) + assert.Equal(t, fernTestValueDeliverAt, obj.DeliverAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPrepTimeDuration", func(t *testing.T) { + obj := &FulfillmentDeliveryDetails{} + var fernTestValuePrepTimeDuration *string + obj.SetPrepTimeDuration(fernTestValuePrepTimeDuration) + assert.Equal(t, fernTestValuePrepTimeDuration, obj.PrepTimeDuration) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeliveryWindowDuration", func(t *testing.T) { + obj := &FulfillmentDeliveryDetails{} + var fernTestValueDeliveryWindowDuration *string + obj.SetDeliveryWindowDuration(fernTestValueDeliveryWindowDuration) + assert.Equal(t, fernTestValueDeliveryWindowDuration, obj.DeliveryWindowDuration) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNote", func(t *testing.T) { + obj := &FulfillmentDeliveryDetails{} + var fernTestValueNote *string + obj.SetNote(fernTestValueNote) + assert.Equal(t, fernTestValueNote, obj.Note) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCompletedAt", func(t *testing.T) { + obj := &FulfillmentDeliveryDetails{} + var fernTestValueCompletedAt *string + obj.SetCompletedAt(fernTestValueCompletedAt) + assert.Equal(t, fernTestValueCompletedAt, obj.CompletedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetInProgressAt", func(t *testing.T) { + obj := &FulfillmentDeliveryDetails{} + var fernTestValueInProgressAt *string + obj.SetInProgressAt(fernTestValueInProgressAt) + assert.Equal(t, fernTestValueInProgressAt, obj.InProgressAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRejectedAt", func(t *testing.T) { + obj := &FulfillmentDeliveryDetails{} + var fernTestValueRejectedAt *string + obj.SetRejectedAt(fernTestValueRejectedAt) + assert.Equal(t, fernTestValueRejectedAt, obj.RejectedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReadyAt", func(t *testing.T) { + obj := &FulfillmentDeliveryDetails{} + var fernTestValueReadyAt *string + obj.SetReadyAt(fernTestValueReadyAt) + assert.Equal(t, fernTestValueReadyAt, obj.ReadyAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeliveredAt", func(t *testing.T) { + obj := &FulfillmentDeliveryDetails{} + var fernTestValueDeliveredAt *string + obj.SetDeliveredAt(fernTestValueDeliveredAt) + assert.Equal(t, fernTestValueDeliveredAt, obj.DeliveredAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCanceledAt", func(t *testing.T) { + obj := &FulfillmentDeliveryDetails{} + var fernTestValueCanceledAt *string + obj.SetCanceledAt(fernTestValueCanceledAt) + assert.Equal(t, fernTestValueCanceledAt, obj.CanceledAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCancelReason", func(t *testing.T) { + obj := &FulfillmentDeliveryDetails{} + var fernTestValueCancelReason *string + obj.SetCancelReason(fernTestValueCancelReason) + assert.Equal(t, fernTestValueCancelReason, obj.CancelReason) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCourierPickupAt", func(t *testing.T) { + obj := &FulfillmentDeliveryDetails{} + var fernTestValueCourierPickupAt *string + obj.SetCourierPickupAt(fernTestValueCourierPickupAt) + assert.Equal(t, fernTestValueCourierPickupAt, obj.CourierPickupAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCourierPickupWindowDuration", func(t *testing.T) { + obj := &FulfillmentDeliveryDetails{} + var fernTestValueCourierPickupWindowDuration *string + obj.SetCourierPickupWindowDuration(fernTestValueCourierPickupWindowDuration) + assert.Equal(t, fernTestValueCourierPickupWindowDuration, obj.CourierPickupWindowDuration) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsNoContactDelivery", func(t *testing.T) { + obj := &FulfillmentDeliveryDetails{} + var fernTestValueIsNoContactDelivery *bool + obj.SetIsNoContactDelivery(fernTestValueIsNoContactDelivery) + assert.Equal(t, fernTestValueIsNoContactDelivery, obj.IsNoContactDelivery) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDropoffNotes", func(t *testing.T) { + obj := &FulfillmentDeliveryDetails{} + var fernTestValueDropoffNotes *string + obj.SetDropoffNotes(fernTestValueDropoffNotes) + assert.Equal(t, fernTestValueDropoffNotes, obj.DropoffNotes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCourierProviderName", func(t *testing.T) { + obj := &FulfillmentDeliveryDetails{} + var fernTestValueCourierProviderName *string + obj.SetCourierProviderName(fernTestValueCourierProviderName) + assert.Equal(t, fernTestValueCourierProviderName, obj.CourierProviderName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCourierSupportPhoneNumber", func(t *testing.T) { + obj := &FulfillmentDeliveryDetails{} + var fernTestValueCourierSupportPhoneNumber *string + obj.SetCourierSupportPhoneNumber(fernTestValueCourierSupportPhoneNumber) + assert.Equal(t, fernTestValueCourierSupportPhoneNumber, obj.CourierSupportPhoneNumber) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSquareDeliveryID", func(t *testing.T) { + obj := &FulfillmentDeliveryDetails{} + var fernTestValueSquareDeliveryID *string + obj.SetSquareDeliveryID(fernTestValueSquareDeliveryID) + assert.Equal(t, fernTestValueSquareDeliveryID, obj.SquareDeliveryID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExternalDeliveryID", func(t *testing.T) { + obj := &FulfillmentDeliveryDetails{} + var fernTestValueExternalDeliveryID *string + obj.SetExternalDeliveryID(fernTestValueExternalDeliveryID) + assert.Equal(t, fernTestValueExternalDeliveryID, obj.ExternalDeliveryID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetManagedDelivery", func(t *testing.T) { + obj := &FulfillmentDeliveryDetails{} + var fernTestValueManagedDelivery *bool + obj.SetManagedDelivery(fernTestValueManagedDelivery) + assert.Equal(t, fernTestValueManagedDelivery, obj.ManagedDelivery) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersFulfillmentDeliveryDetails(t *testing.T) { + t.Run("GetRecipient", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var expected *FulfillmentRecipient + obj.Recipient = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRecipient(), "getter should return the property value") + }) + + t.Run("GetRecipient_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + obj.Recipient = nil + + // Act & Assert + assert.Nil(t, obj.GetRecipient(), "getter should return nil when property is nil") + }) + + t.Run("GetRecipient_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentDeliveryDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRecipient() // Should return zero value + }) + + t.Run("GetScheduleType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var expected *FulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleType + obj.ScheduleType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetScheduleType(), "getter should return the property value") + }) + + t.Run("GetScheduleType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + obj.ScheduleType = nil + + // Act & Assert + assert.Nil(t, obj.GetScheduleType(), "getter should return nil when property is nil") + }) + + t.Run("GetScheduleType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentDeliveryDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetScheduleType() // Should return zero value + }) + + t.Run("GetPlacedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var expected *string + obj.PlacedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPlacedAt(), "getter should return the property value") + }) + + t.Run("GetPlacedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + obj.PlacedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetPlacedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetPlacedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentDeliveryDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPlacedAt() // Should return zero value + }) + + t.Run("GetDeliverAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var expected *string + obj.DeliverAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeliverAt(), "getter should return the property value") + }) + + t.Run("GetDeliverAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + obj.DeliverAt = nil + + // Act & Assert + assert.Nil(t, obj.GetDeliverAt(), "getter should return nil when property is nil") + }) + + t.Run("GetDeliverAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentDeliveryDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeliverAt() // Should return zero value + }) + + t.Run("GetPrepTimeDuration", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var expected *string + obj.PrepTimeDuration = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPrepTimeDuration(), "getter should return the property value") + }) + + t.Run("GetPrepTimeDuration_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + obj.PrepTimeDuration = nil + + // Act & Assert + assert.Nil(t, obj.GetPrepTimeDuration(), "getter should return nil when property is nil") + }) + + t.Run("GetPrepTimeDuration_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentDeliveryDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPrepTimeDuration() // Should return zero value + }) + + t.Run("GetDeliveryWindowDuration", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var expected *string + obj.DeliveryWindowDuration = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeliveryWindowDuration(), "getter should return the property value") + }) + + t.Run("GetDeliveryWindowDuration_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + obj.DeliveryWindowDuration = nil + + // Act & Assert + assert.Nil(t, obj.GetDeliveryWindowDuration(), "getter should return nil when property is nil") + }) + + t.Run("GetDeliveryWindowDuration_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentDeliveryDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeliveryWindowDuration() // Should return zero value + }) + + t.Run("GetNote", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var expected *string + obj.Note = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNote(), "getter should return the property value") + }) + + t.Run("GetNote_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + obj.Note = nil + + // Act & Assert + assert.Nil(t, obj.GetNote(), "getter should return nil when property is nil") + }) + + t.Run("GetNote_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentDeliveryDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNote() // Should return zero value + }) + + t.Run("GetCompletedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var expected *string + obj.CompletedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCompletedAt(), "getter should return the property value") + }) + + t.Run("GetCompletedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + obj.CompletedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCompletedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCompletedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentDeliveryDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCompletedAt() // Should return zero value + }) + + t.Run("GetInProgressAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var expected *string + obj.InProgressAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInProgressAt(), "getter should return the property value") + }) + + t.Run("GetInProgressAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + obj.InProgressAt = nil + + // Act & Assert + assert.Nil(t, obj.GetInProgressAt(), "getter should return nil when property is nil") + }) + + t.Run("GetInProgressAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentDeliveryDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInProgressAt() // Should return zero value + }) + + t.Run("GetRejectedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var expected *string + obj.RejectedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRejectedAt(), "getter should return the property value") + }) + + t.Run("GetRejectedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + obj.RejectedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetRejectedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetRejectedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentDeliveryDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRejectedAt() // Should return zero value + }) + + t.Run("GetReadyAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var expected *string + obj.ReadyAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReadyAt(), "getter should return the property value") + }) + + t.Run("GetReadyAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + obj.ReadyAt = nil + + // Act & Assert + assert.Nil(t, obj.GetReadyAt(), "getter should return nil when property is nil") + }) + + t.Run("GetReadyAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentDeliveryDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReadyAt() // Should return zero value + }) + + t.Run("GetDeliveredAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var expected *string + obj.DeliveredAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeliveredAt(), "getter should return the property value") + }) + + t.Run("GetDeliveredAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + obj.DeliveredAt = nil + + // Act & Assert + assert.Nil(t, obj.GetDeliveredAt(), "getter should return nil when property is nil") + }) + + t.Run("GetDeliveredAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentDeliveryDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeliveredAt() // Should return zero value + }) + + t.Run("GetCanceledAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var expected *string + obj.CanceledAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCanceledAt(), "getter should return the property value") + }) + + t.Run("GetCanceledAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + obj.CanceledAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCanceledAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCanceledAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentDeliveryDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCanceledAt() // Should return zero value + }) + + t.Run("GetCancelReason", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var expected *string + obj.CancelReason = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCancelReason(), "getter should return the property value") + }) + + t.Run("GetCancelReason_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + obj.CancelReason = nil + + // Act & Assert + assert.Nil(t, obj.GetCancelReason(), "getter should return nil when property is nil") + }) + + t.Run("GetCancelReason_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentDeliveryDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCancelReason() // Should return zero value + }) + + t.Run("GetCourierPickupAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var expected *string + obj.CourierPickupAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCourierPickupAt(), "getter should return the property value") + }) + + t.Run("GetCourierPickupAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + obj.CourierPickupAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCourierPickupAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCourierPickupAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentDeliveryDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCourierPickupAt() // Should return zero value + }) + + t.Run("GetCourierPickupWindowDuration", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var expected *string + obj.CourierPickupWindowDuration = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCourierPickupWindowDuration(), "getter should return the property value") + }) + + t.Run("GetCourierPickupWindowDuration_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + obj.CourierPickupWindowDuration = nil + + // Act & Assert + assert.Nil(t, obj.GetCourierPickupWindowDuration(), "getter should return nil when property is nil") + }) + + t.Run("GetCourierPickupWindowDuration_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentDeliveryDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCourierPickupWindowDuration() // Should return zero value + }) + + t.Run("GetIsNoContactDelivery", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var expected *bool + obj.IsNoContactDelivery = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsNoContactDelivery(), "getter should return the property value") + }) + + t.Run("GetIsNoContactDelivery_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + obj.IsNoContactDelivery = nil + + // Act & Assert + assert.Nil(t, obj.GetIsNoContactDelivery(), "getter should return nil when property is nil") + }) + + t.Run("GetIsNoContactDelivery_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentDeliveryDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsNoContactDelivery() // Should return zero value + }) + + t.Run("GetDropoffNotes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var expected *string + obj.DropoffNotes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDropoffNotes(), "getter should return the property value") + }) + + t.Run("GetDropoffNotes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + obj.DropoffNotes = nil + + // Act & Assert + assert.Nil(t, obj.GetDropoffNotes(), "getter should return nil when property is nil") + }) + + t.Run("GetDropoffNotes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentDeliveryDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDropoffNotes() // Should return zero value + }) + + t.Run("GetCourierProviderName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var expected *string + obj.CourierProviderName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCourierProviderName(), "getter should return the property value") + }) + + t.Run("GetCourierProviderName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + obj.CourierProviderName = nil + + // Act & Assert + assert.Nil(t, obj.GetCourierProviderName(), "getter should return nil when property is nil") + }) + + t.Run("GetCourierProviderName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentDeliveryDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCourierProviderName() // Should return zero value + }) + + t.Run("GetCourierSupportPhoneNumber", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var expected *string + obj.CourierSupportPhoneNumber = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCourierSupportPhoneNumber(), "getter should return the property value") + }) + + t.Run("GetCourierSupportPhoneNumber_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + obj.CourierSupportPhoneNumber = nil + + // Act & Assert + assert.Nil(t, obj.GetCourierSupportPhoneNumber(), "getter should return nil when property is nil") + }) + + t.Run("GetCourierSupportPhoneNumber_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentDeliveryDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCourierSupportPhoneNumber() // Should return zero value + }) + + t.Run("GetSquareDeliveryID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var expected *string + obj.SquareDeliveryID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSquareDeliveryID(), "getter should return the property value") + }) + + t.Run("GetSquareDeliveryID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + obj.SquareDeliveryID = nil + + // Act & Assert + assert.Nil(t, obj.GetSquareDeliveryID(), "getter should return nil when property is nil") + }) + + t.Run("GetSquareDeliveryID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentDeliveryDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSquareDeliveryID() // Should return zero value + }) + + t.Run("GetExternalDeliveryID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var expected *string + obj.ExternalDeliveryID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExternalDeliveryID(), "getter should return the property value") + }) + + t.Run("GetExternalDeliveryID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + obj.ExternalDeliveryID = nil + + // Act & Assert + assert.Nil(t, obj.GetExternalDeliveryID(), "getter should return nil when property is nil") + }) + + t.Run("GetExternalDeliveryID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentDeliveryDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExternalDeliveryID() // Should return zero value + }) + + t.Run("GetManagedDelivery", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var expected *bool + obj.ManagedDelivery = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetManagedDelivery(), "getter should return the property value") + }) + + t.Run("GetManagedDelivery_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + obj.ManagedDelivery = nil + + // Act & Assert + assert.Nil(t, obj.GetManagedDelivery(), "getter should return nil when property is nil") + }) + + t.Run("GetManagedDelivery_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentDeliveryDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetManagedDelivery() // Should return zero value + }) + +} + +func TestSettersMarkExplicitFulfillmentDeliveryDetails(t *testing.T) { + t.Run("SetRecipient_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var fernTestValueRecipient *FulfillmentRecipient + + // Act + obj.SetRecipient(fernTestValueRecipient) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetScheduleType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var fernTestValueScheduleType *FulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleType + + // Act + obj.SetScheduleType(fernTestValueScheduleType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPlacedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var fernTestValuePlacedAt *string + + // Act + obj.SetPlacedAt(fernTestValuePlacedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeliverAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var fernTestValueDeliverAt *string + + // Act + obj.SetDeliverAt(fernTestValueDeliverAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPrepTimeDuration_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var fernTestValuePrepTimeDuration *string + + // Act + obj.SetPrepTimeDuration(fernTestValuePrepTimeDuration) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeliveryWindowDuration_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var fernTestValueDeliveryWindowDuration *string + + // Act + obj.SetDeliveryWindowDuration(fernTestValueDeliveryWindowDuration) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNote_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var fernTestValueNote *string + + // Act + obj.SetNote(fernTestValueNote) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCompletedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var fernTestValueCompletedAt *string + + // Act + obj.SetCompletedAt(fernTestValueCompletedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetInProgressAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var fernTestValueInProgressAt *string + + // Act + obj.SetInProgressAt(fernTestValueInProgressAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRejectedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var fernTestValueRejectedAt *string + + // Act + obj.SetRejectedAt(fernTestValueRejectedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReadyAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var fernTestValueReadyAt *string + + // Act + obj.SetReadyAt(fernTestValueReadyAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeliveredAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var fernTestValueDeliveredAt *string + + // Act + obj.SetDeliveredAt(fernTestValueDeliveredAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCanceledAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var fernTestValueCanceledAt *string + + // Act + obj.SetCanceledAt(fernTestValueCanceledAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCancelReason_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var fernTestValueCancelReason *string + + // Act + obj.SetCancelReason(fernTestValueCancelReason) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCourierPickupAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var fernTestValueCourierPickupAt *string + + // Act + obj.SetCourierPickupAt(fernTestValueCourierPickupAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCourierPickupWindowDuration_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var fernTestValueCourierPickupWindowDuration *string + + // Act + obj.SetCourierPickupWindowDuration(fernTestValueCourierPickupWindowDuration) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsNoContactDelivery_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var fernTestValueIsNoContactDelivery *bool + + // Act + obj.SetIsNoContactDelivery(fernTestValueIsNoContactDelivery) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDropoffNotes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var fernTestValueDropoffNotes *string + + // Act + obj.SetDropoffNotes(fernTestValueDropoffNotes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCourierProviderName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var fernTestValueCourierProviderName *string + + // Act + obj.SetCourierProviderName(fernTestValueCourierProviderName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCourierSupportPhoneNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var fernTestValueCourierSupportPhoneNumber *string + + // Act + obj.SetCourierSupportPhoneNumber(fernTestValueCourierSupportPhoneNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSquareDeliveryID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var fernTestValueSquareDeliveryID *string + + // Act + obj.SetSquareDeliveryID(fernTestValueSquareDeliveryID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExternalDeliveryID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var fernTestValueExternalDeliveryID *string + + // Act + obj.SetExternalDeliveryID(fernTestValueExternalDeliveryID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetManagedDelivery_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + var fernTestValueManagedDelivery *bool + + // Act + obj.SetManagedDelivery(fernTestValueManagedDelivery) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersFulfillmentFulfillmentEntry(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &FulfillmentFulfillmentEntry{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLineItemUID", func(t *testing.T) { + obj := &FulfillmentFulfillmentEntry{} + var fernTestValueLineItemUID string + obj.SetLineItemUID(fernTestValueLineItemUID) + assert.Equal(t, fernTestValueLineItemUID, obj.LineItemUID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuantity", func(t *testing.T) { + obj := &FulfillmentFulfillmentEntry{} + var fernTestValueQuantity string + obj.SetQuantity(fernTestValueQuantity) + assert.Equal(t, fernTestValueQuantity, obj.Quantity) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMetadata", func(t *testing.T) { + obj := &FulfillmentFulfillmentEntry{} + var fernTestValueMetadata map[string]*string + obj.SetMetadata(fernTestValueMetadata) + assert.Equal(t, fernTestValueMetadata, obj.Metadata) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersFulfillmentFulfillmentEntry(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentFulfillmentEntry{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentFulfillmentEntry{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentFulfillmentEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetLineItemUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentFulfillmentEntry{} + var expected string + obj.LineItemUID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLineItemUID(), "getter should return the property value") + }) + + t.Run("GetLineItemUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentFulfillmentEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLineItemUID() // Should return zero value + }) + + t.Run("GetQuantity", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentFulfillmentEntry{} + var expected string + obj.Quantity = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQuantity(), "getter should return the property value") + }) + + t.Run("GetQuantity_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentFulfillmentEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQuantity() // Should return zero value + }) + + t.Run("GetMetadata", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentFulfillmentEntry{} + var expected map[string]*string + obj.Metadata = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMetadata(), "getter should return the property value") + }) + + t.Run("GetMetadata_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentFulfillmentEntry{} + obj.Metadata = nil + + // Act & Assert + assert.Nil(t, obj.GetMetadata(), "getter should return nil when property is nil") + }) + + t.Run("GetMetadata_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentFulfillmentEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMetadata() // Should return zero value + }) + +} + +func TestSettersMarkExplicitFulfillmentFulfillmentEntry(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentFulfillmentEntry{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLineItemUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentFulfillmentEntry{} + var fernTestValueLineItemUID string + + // Act + obj.SetLineItemUID(fernTestValueLineItemUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuantity_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentFulfillmentEntry{} + var fernTestValueQuantity string + + // Act + obj.SetQuantity(fernTestValueQuantity) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMetadata_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentFulfillmentEntry{} + var fernTestValueMetadata map[string]*string + + // Act + obj.SetMetadata(fernTestValueMetadata) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersFulfillmentPickupDetails(t *testing.T) { + t.Run("SetRecipient", func(t *testing.T) { + obj := &FulfillmentPickupDetails{} + var fernTestValueRecipient *FulfillmentRecipient + obj.SetRecipient(fernTestValueRecipient) + assert.Equal(t, fernTestValueRecipient, obj.Recipient) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExpiresAt", func(t *testing.T) { + obj := &FulfillmentPickupDetails{} + var fernTestValueExpiresAt *string + obj.SetExpiresAt(fernTestValueExpiresAt) + assert.Equal(t, fernTestValueExpiresAt, obj.ExpiresAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAutoCompleteDuration", func(t *testing.T) { + obj := &FulfillmentPickupDetails{} + var fernTestValueAutoCompleteDuration *string + obj.SetAutoCompleteDuration(fernTestValueAutoCompleteDuration) + assert.Equal(t, fernTestValueAutoCompleteDuration, obj.AutoCompleteDuration) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetScheduleType", func(t *testing.T) { + obj := &FulfillmentPickupDetails{} + var fernTestValueScheduleType *FulfillmentPickupDetailsScheduleType + obj.SetScheduleType(fernTestValueScheduleType) + assert.Equal(t, fernTestValueScheduleType, obj.ScheduleType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPickupAt", func(t *testing.T) { + obj := &FulfillmentPickupDetails{} + var fernTestValuePickupAt *string + obj.SetPickupAt(fernTestValuePickupAt) + assert.Equal(t, fernTestValuePickupAt, obj.PickupAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPickupWindowDuration", func(t *testing.T) { + obj := &FulfillmentPickupDetails{} + var fernTestValuePickupWindowDuration *string + obj.SetPickupWindowDuration(fernTestValuePickupWindowDuration) + assert.Equal(t, fernTestValuePickupWindowDuration, obj.PickupWindowDuration) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPrepTimeDuration", func(t *testing.T) { + obj := &FulfillmentPickupDetails{} + var fernTestValuePrepTimeDuration *string + obj.SetPrepTimeDuration(fernTestValuePrepTimeDuration) + assert.Equal(t, fernTestValuePrepTimeDuration, obj.PrepTimeDuration) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNote", func(t *testing.T) { + obj := &FulfillmentPickupDetails{} + var fernTestValueNote *string + obj.SetNote(fernTestValueNote) + assert.Equal(t, fernTestValueNote, obj.Note) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPlacedAt", func(t *testing.T) { + obj := &FulfillmentPickupDetails{} + var fernTestValuePlacedAt *string + obj.SetPlacedAt(fernTestValuePlacedAt) + assert.Equal(t, fernTestValuePlacedAt, obj.PlacedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAcceptedAt", func(t *testing.T) { + obj := &FulfillmentPickupDetails{} + var fernTestValueAcceptedAt *string + obj.SetAcceptedAt(fernTestValueAcceptedAt) + assert.Equal(t, fernTestValueAcceptedAt, obj.AcceptedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRejectedAt", func(t *testing.T) { + obj := &FulfillmentPickupDetails{} + var fernTestValueRejectedAt *string + obj.SetRejectedAt(fernTestValueRejectedAt) + assert.Equal(t, fernTestValueRejectedAt, obj.RejectedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReadyAt", func(t *testing.T) { + obj := &FulfillmentPickupDetails{} + var fernTestValueReadyAt *string + obj.SetReadyAt(fernTestValueReadyAt) + assert.Equal(t, fernTestValueReadyAt, obj.ReadyAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExpiredAt", func(t *testing.T) { + obj := &FulfillmentPickupDetails{} + var fernTestValueExpiredAt *string + obj.SetExpiredAt(fernTestValueExpiredAt) + assert.Equal(t, fernTestValueExpiredAt, obj.ExpiredAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPickedUpAt", func(t *testing.T) { + obj := &FulfillmentPickupDetails{} + var fernTestValuePickedUpAt *string + obj.SetPickedUpAt(fernTestValuePickedUpAt) + assert.Equal(t, fernTestValuePickedUpAt, obj.PickedUpAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCanceledAt", func(t *testing.T) { + obj := &FulfillmentPickupDetails{} + var fernTestValueCanceledAt *string + obj.SetCanceledAt(fernTestValueCanceledAt) + assert.Equal(t, fernTestValueCanceledAt, obj.CanceledAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCancelReason", func(t *testing.T) { + obj := &FulfillmentPickupDetails{} + var fernTestValueCancelReason *string + obj.SetCancelReason(fernTestValueCancelReason) + assert.Equal(t, fernTestValueCancelReason, obj.CancelReason) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsCurbsidePickup", func(t *testing.T) { + obj := &FulfillmentPickupDetails{} + var fernTestValueIsCurbsidePickup *bool + obj.SetIsCurbsidePickup(fernTestValueIsCurbsidePickup) + assert.Equal(t, fernTestValueIsCurbsidePickup, obj.IsCurbsidePickup) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCurbsidePickupDetails", func(t *testing.T) { + obj := &FulfillmentPickupDetails{} + var fernTestValueCurbsidePickupDetails *FulfillmentPickupDetailsCurbsidePickupDetails + obj.SetCurbsidePickupDetails(fernTestValueCurbsidePickupDetails) + assert.Equal(t, fernTestValueCurbsidePickupDetails, obj.CurbsidePickupDetails) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersFulfillmentPickupDetails(t *testing.T) { + t.Run("GetRecipient", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var expected *FulfillmentRecipient + obj.Recipient = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRecipient(), "getter should return the property value") + }) + + t.Run("GetRecipient_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + obj.Recipient = nil + + // Act & Assert + assert.Nil(t, obj.GetRecipient(), "getter should return nil when property is nil") + }) + + t.Run("GetRecipient_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentPickupDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRecipient() // Should return zero value + }) + + t.Run("GetExpiresAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var expected *string + obj.ExpiresAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExpiresAt(), "getter should return the property value") + }) + + t.Run("GetExpiresAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + obj.ExpiresAt = nil + + // Act & Assert + assert.Nil(t, obj.GetExpiresAt(), "getter should return nil when property is nil") + }) + + t.Run("GetExpiresAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentPickupDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExpiresAt() // Should return zero value + }) + + t.Run("GetAutoCompleteDuration", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var expected *string + obj.AutoCompleteDuration = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAutoCompleteDuration(), "getter should return the property value") + }) + + t.Run("GetAutoCompleteDuration_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + obj.AutoCompleteDuration = nil + + // Act & Assert + assert.Nil(t, obj.GetAutoCompleteDuration(), "getter should return nil when property is nil") + }) + + t.Run("GetAutoCompleteDuration_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentPickupDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAutoCompleteDuration() // Should return zero value + }) + + t.Run("GetScheduleType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var expected *FulfillmentPickupDetailsScheduleType + obj.ScheduleType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetScheduleType(), "getter should return the property value") + }) + + t.Run("GetScheduleType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + obj.ScheduleType = nil + + // Act & Assert + assert.Nil(t, obj.GetScheduleType(), "getter should return nil when property is nil") + }) + + t.Run("GetScheduleType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentPickupDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetScheduleType() // Should return zero value + }) + + t.Run("GetPickupAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var expected *string + obj.PickupAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPickupAt(), "getter should return the property value") + }) + + t.Run("GetPickupAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + obj.PickupAt = nil + + // Act & Assert + assert.Nil(t, obj.GetPickupAt(), "getter should return nil when property is nil") + }) + + t.Run("GetPickupAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentPickupDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPickupAt() // Should return zero value + }) + + t.Run("GetPickupWindowDuration", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var expected *string + obj.PickupWindowDuration = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPickupWindowDuration(), "getter should return the property value") + }) + + t.Run("GetPickupWindowDuration_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + obj.PickupWindowDuration = nil + + // Act & Assert + assert.Nil(t, obj.GetPickupWindowDuration(), "getter should return nil when property is nil") + }) + + t.Run("GetPickupWindowDuration_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentPickupDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPickupWindowDuration() // Should return zero value + }) + + t.Run("GetPrepTimeDuration", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var expected *string + obj.PrepTimeDuration = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPrepTimeDuration(), "getter should return the property value") + }) + + t.Run("GetPrepTimeDuration_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + obj.PrepTimeDuration = nil + + // Act & Assert + assert.Nil(t, obj.GetPrepTimeDuration(), "getter should return nil when property is nil") + }) + + t.Run("GetPrepTimeDuration_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentPickupDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPrepTimeDuration() // Should return zero value + }) + + t.Run("GetNote", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var expected *string + obj.Note = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNote(), "getter should return the property value") + }) + + t.Run("GetNote_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + obj.Note = nil + + // Act & Assert + assert.Nil(t, obj.GetNote(), "getter should return nil when property is nil") + }) + + t.Run("GetNote_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentPickupDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNote() // Should return zero value + }) + + t.Run("GetPlacedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var expected *string + obj.PlacedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPlacedAt(), "getter should return the property value") + }) + + t.Run("GetPlacedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + obj.PlacedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetPlacedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetPlacedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentPickupDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPlacedAt() // Should return zero value + }) + + t.Run("GetAcceptedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var expected *string + obj.AcceptedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAcceptedAt(), "getter should return the property value") + }) + + t.Run("GetAcceptedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + obj.AcceptedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetAcceptedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetAcceptedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentPickupDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAcceptedAt() // Should return zero value + }) + + t.Run("GetRejectedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var expected *string + obj.RejectedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRejectedAt(), "getter should return the property value") + }) + + t.Run("GetRejectedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + obj.RejectedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetRejectedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetRejectedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentPickupDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRejectedAt() // Should return zero value + }) + + t.Run("GetReadyAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var expected *string + obj.ReadyAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReadyAt(), "getter should return the property value") + }) + + t.Run("GetReadyAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + obj.ReadyAt = nil + + // Act & Assert + assert.Nil(t, obj.GetReadyAt(), "getter should return nil when property is nil") + }) + + t.Run("GetReadyAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentPickupDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReadyAt() // Should return zero value + }) + + t.Run("GetExpiredAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var expected *string + obj.ExpiredAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExpiredAt(), "getter should return the property value") + }) + + t.Run("GetExpiredAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + obj.ExpiredAt = nil + + // Act & Assert + assert.Nil(t, obj.GetExpiredAt(), "getter should return nil when property is nil") + }) + + t.Run("GetExpiredAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentPickupDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExpiredAt() // Should return zero value + }) + + t.Run("GetPickedUpAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var expected *string + obj.PickedUpAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPickedUpAt(), "getter should return the property value") + }) + + t.Run("GetPickedUpAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + obj.PickedUpAt = nil + + // Act & Assert + assert.Nil(t, obj.GetPickedUpAt(), "getter should return nil when property is nil") + }) + + t.Run("GetPickedUpAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentPickupDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPickedUpAt() // Should return zero value + }) + + t.Run("GetCanceledAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var expected *string + obj.CanceledAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCanceledAt(), "getter should return the property value") + }) + + t.Run("GetCanceledAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + obj.CanceledAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCanceledAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCanceledAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentPickupDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCanceledAt() // Should return zero value + }) + + t.Run("GetCancelReason", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var expected *string + obj.CancelReason = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCancelReason(), "getter should return the property value") + }) + + t.Run("GetCancelReason_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + obj.CancelReason = nil + + // Act & Assert + assert.Nil(t, obj.GetCancelReason(), "getter should return nil when property is nil") + }) + + t.Run("GetCancelReason_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentPickupDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCancelReason() // Should return zero value + }) + + t.Run("GetIsCurbsidePickup", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var expected *bool + obj.IsCurbsidePickup = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsCurbsidePickup(), "getter should return the property value") + }) + + t.Run("GetIsCurbsidePickup_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + obj.IsCurbsidePickup = nil + + // Act & Assert + assert.Nil(t, obj.GetIsCurbsidePickup(), "getter should return nil when property is nil") + }) + + t.Run("GetIsCurbsidePickup_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentPickupDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsCurbsidePickup() // Should return zero value + }) + + t.Run("GetCurbsidePickupDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var expected *FulfillmentPickupDetailsCurbsidePickupDetails + obj.CurbsidePickupDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCurbsidePickupDetails(), "getter should return the property value") + }) + + t.Run("GetCurbsidePickupDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + obj.CurbsidePickupDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetCurbsidePickupDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetCurbsidePickupDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentPickupDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCurbsidePickupDetails() // Should return zero value + }) + +} + +func TestSettersMarkExplicitFulfillmentPickupDetails(t *testing.T) { + t.Run("SetRecipient_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var fernTestValueRecipient *FulfillmentRecipient + + // Act + obj.SetRecipient(fernTestValueRecipient) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExpiresAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var fernTestValueExpiresAt *string + + // Act + obj.SetExpiresAt(fernTestValueExpiresAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAutoCompleteDuration_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var fernTestValueAutoCompleteDuration *string + + // Act + obj.SetAutoCompleteDuration(fernTestValueAutoCompleteDuration) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetScheduleType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var fernTestValueScheduleType *FulfillmentPickupDetailsScheduleType + + // Act + obj.SetScheduleType(fernTestValueScheduleType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPickupAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var fernTestValuePickupAt *string + + // Act + obj.SetPickupAt(fernTestValuePickupAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPickupWindowDuration_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var fernTestValuePickupWindowDuration *string + + // Act + obj.SetPickupWindowDuration(fernTestValuePickupWindowDuration) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPrepTimeDuration_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var fernTestValuePrepTimeDuration *string + + // Act + obj.SetPrepTimeDuration(fernTestValuePrepTimeDuration) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNote_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var fernTestValueNote *string + + // Act + obj.SetNote(fernTestValueNote) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPlacedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var fernTestValuePlacedAt *string + + // Act + obj.SetPlacedAt(fernTestValuePlacedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAcceptedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var fernTestValueAcceptedAt *string + + // Act + obj.SetAcceptedAt(fernTestValueAcceptedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRejectedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var fernTestValueRejectedAt *string + + // Act + obj.SetRejectedAt(fernTestValueRejectedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReadyAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var fernTestValueReadyAt *string + + // Act + obj.SetReadyAt(fernTestValueReadyAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExpiredAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var fernTestValueExpiredAt *string + + // Act + obj.SetExpiredAt(fernTestValueExpiredAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPickedUpAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var fernTestValuePickedUpAt *string + + // Act + obj.SetPickedUpAt(fernTestValuePickedUpAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCanceledAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var fernTestValueCanceledAt *string + + // Act + obj.SetCanceledAt(fernTestValueCanceledAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCancelReason_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var fernTestValueCancelReason *string + + // Act + obj.SetCancelReason(fernTestValueCancelReason) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsCurbsidePickup_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var fernTestValueIsCurbsidePickup *bool + + // Act + obj.SetIsCurbsidePickup(fernTestValueIsCurbsidePickup) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCurbsidePickupDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + var fernTestValueCurbsidePickupDetails *FulfillmentPickupDetailsCurbsidePickupDetails + + // Act + obj.SetCurbsidePickupDetails(fernTestValueCurbsidePickupDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersFulfillmentPickupDetailsCurbsidePickupDetails(t *testing.T) { + t.Run("SetCurbsideDetails", func(t *testing.T) { + obj := &FulfillmentPickupDetailsCurbsidePickupDetails{} + var fernTestValueCurbsideDetails *string + obj.SetCurbsideDetails(fernTestValueCurbsideDetails) + assert.Equal(t, fernTestValueCurbsideDetails, obj.CurbsideDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBuyerArrivedAt", func(t *testing.T) { + obj := &FulfillmentPickupDetailsCurbsidePickupDetails{} + var fernTestValueBuyerArrivedAt *string + obj.SetBuyerArrivedAt(fernTestValueBuyerArrivedAt) + assert.Equal(t, fernTestValueBuyerArrivedAt, obj.BuyerArrivedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersFulfillmentPickupDetailsCurbsidePickupDetails(t *testing.T) { + t.Run("GetCurbsideDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetailsCurbsidePickupDetails{} + var expected *string + obj.CurbsideDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCurbsideDetails(), "getter should return the property value") + }) + + t.Run("GetCurbsideDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetailsCurbsidePickupDetails{} + obj.CurbsideDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetCurbsideDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetCurbsideDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentPickupDetailsCurbsidePickupDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCurbsideDetails() // Should return zero value + }) + + t.Run("GetBuyerArrivedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetailsCurbsidePickupDetails{} + var expected *string + obj.BuyerArrivedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBuyerArrivedAt(), "getter should return the property value") + }) + + t.Run("GetBuyerArrivedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetailsCurbsidePickupDetails{} + obj.BuyerArrivedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetBuyerArrivedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetBuyerArrivedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentPickupDetailsCurbsidePickupDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBuyerArrivedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitFulfillmentPickupDetailsCurbsidePickupDetails(t *testing.T) { + t.Run("SetCurbsideDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetailsCurbsidePickupDetails{} + var fernTestValueCurbsideDetails *string + + // Act + obj.SetCurbsideDetails(fernTestValueCurbsideDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBuyerArrivedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetailsCurbsidePickupDetails{} + var fernTestValueBuyerArrivedAt *string + + // Act + obj.SetBuyerArrivedAt(fernTestValueBuyerArrivedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersFulfillmentRecipient(t *testing.T) { + t.Run("SetCustomerID", func(t *testing.T) { + obj := &FulfillmentRecipient{} + var fernTestValueCustomerID *string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDisplayName", func(t *testing.T) { + obj := &FulfillmentRecipient{} + var fernTestValueDisplayName *string + obj.SetDisplayName(fernTestValueDisplayName) + assert.Equal(t, fernTestValueDisplayName, obj.DisplayName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEmailAddress", func(t *testing.T) { + obj := &FulfillmentRecipient{} + var fernTestValueEmailAddress *string + obj.SetEmailAddress(fernTestValueEmailAddress) + assert.Equal(t, fernTestValueEmailAddress, obj.EmailAddress) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPhoneNumber", func(t *testing.T) { + obj := &FulfillmentRecipient{} + var fernTestValuePhoneNumber *string + obj.SetPhoneNumber(fernTestValuePhoneNumber) + assert.Equal(t, fernTestValuePhoneNumber, obj.PhoneNumber) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAddress", func(t *testing.T) { + obj := &FulfillmentRecipient{} + var fernTestValueAddress *Address + obj.SetAddress(fernTestValueAddress) + assert.Equal(t, fernTestValueAddress, obj.Address) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersFulfillmentRecipient(t *testing.T) { + t.Run("GetCustomerID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentRecipient{} + var expected *string + obj.CustomerID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomerID(), "getter should return the property value") + }) + + t.Run("GetCustomerID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentRecipient{} + obj.CustomerID = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomerID(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomerID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentRecipient + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomerID() // Should return zero value + }) + + t.Run("GetDisplayName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentRecipient{} + var expected *string + obj.DisplayName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDisplayName(), "getter should return the property value") + }) + + t.Run("GetDisplayName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentRecipient{} + obj.DisplayName = nil + + // Act & Assert + assert.Nil(t, obj.GetDisplayName(), "getter should return nil when property is nil") + }) + + t.Run("GetDisplayName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentRecipient + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDisplayName() // Should return zero value + }) + + t.Run("GetEmailAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentRecipient{} + var expected *string + obj.EmailAddress = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEmailAddress(), "getter should return the property value") + }) + + t.Run("GetEmailAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentRecipient{} + obj.EmailAddress = nil + + // Act & Assert + assert.Nil(t, obj.GetEmailAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetEmailAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentRecipient + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEmailAddress() // Should return zero value + }) + + t.Run("GetPhoneNumber", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentRecipient{} + var expected *string + obj.PhoneNumber = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPhoneNumber(), "getter should return the property value") + }) + + t.Run("GetPhoneNumber_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentRecipient{} + obj.PhoneNumber = nil + + // Act & Assert + assert.Nil(t, obj.GetPhoneNumber(), "getter should return nil when property is nil") + }) + + t.Run("GetPhoneNumber_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentRecipient + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPhoneNumber() // Should return zero value + }) + + t.Run("GetAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentRecipient{} + var expected *Address + obj.Address = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAddress(), "getter should return the property value") + }) + + t.Run("GetAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentRecipient{} + obj.Address = nil + + // Act & Assert + assert.Nil(t, obj.GetAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentRecipient + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAddress() // Should return zero value + }) + +} + +func TestSettersMarkExplicitFulfillmentRecipient(t *testing.T) { + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentRecipient{} + var fernTestValueCustomerID *string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDisplayName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentRecipient{} + var fernTestValueDisplayName *string + + // Act + obj.SetDisplayName(fernTestValueDisplayName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEmailAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentRecipient{} + var fernTestValueEmailAddress *string + + // Act + obj.SetEmailAddress(fernTestValueEmailAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPhoneNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentRecipient{} + var fernTestValuePhoneNumber *string + + // Act + obj.SetPhoneNumber(fernTestValuePhoneNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentRecipient{} + var fernTestValueAddress *Address + + // Act + obj.SetAddress(fernTestValueAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersFulfillmentShipmentDetails(t *testing.T) { + t.Run("SetRecipient", func(t *testing.T) { + obj := &FulfillmentShipmentDetails{} + var fernTestValueRecipient *FulfillmentRecipient + obj.SetRecipient(fernTestValueRecipient) + assert.Equal(t, fernTestValueRecipient, obj.Recipient) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCarrier", func(t *testing.T) { + obj := &FulfillmentShipmentDetails{} + var fernTestValueCarrier *string + obj.SetCarrier(fernTestValueCarrier) + assert.Equal(t, fernTestValueCarrier, obj.Carrier) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetShippingNote", func(t *testing.T) { + obj := &FulfillmentShipmentDetails{} + var fernTestValueShippingNote *string + obj.SetShippingNote(fernTestValueShippingNote) + assert.Equal(t, fernTestValueShippingNote, obj.ShippingNote) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetShippingType", func(t *testing.T) { + obj := &FulfillmentShipmentDetails{} + var fernTestValueShippingType *string + obj.SetShippingType(fernTestValueShippingType) + assert.Equal(t, fernTestValueShippingType, obj.ShippingType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTrackingNumber", func(t *testing.T) { + obj := &FulfillmentShipmentDetails{} + var fernTestValueTrackingNumber *string + obj.SetTrackingNumber(fernTestValueTrackingNumber) + assert.Equal(t, fernTestValueTrackingNumber, obj.TrackingNumber) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTrackingURL", func(t *testing.T) { + obj := &FulfillmentShipmentDetails{} + var fernTestValueTrackingURL *string + obj.SetTrackingURL(fernTestValueTrackingURL) + assert.Equal(t, fernTestValueTrackingURL, obj.TrackingURL) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPlacedAt", func(t *testing.T) { + obj := &FulfillmentShipmentDetails{} + var fernTestValuePlacedAt *string + obj.SetPlacedAt(fernTestValuePlacedAt) + assert.Equal(t, fernTestValuePlacedAt, obj.PlacedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetInProgressAt", func(t *testing.T) { + obj := &FulfillmentShipmentDetails{} + var fernTestValueInProgressAt *string + obj.SetInProgressAt(fernTestValueInProgressAt) + assert.Equal(t, fernTestValueInProgressAt, obj.InProgressAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPackagedAt", func(t *testing.T) { + obj := &FulfillmentShipmentDetails{} + var fernTestValuePackagedAt *string + obj.SetPackagedAt(fernTestValuePackagedAt) + assert.Equal(t, fernTestValuePackagedAt, obj.PackagedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExpectedShippedAt", func(t *testing.T) { + obj := &FulfillmentShipmentDetails{} + var fernTestValueExpectedShippedAt *string + obj.SetExpectedShippedAt(fernTestValueExpectedShippedAt) + assert.Equal(t, fernTestValueExpectedShippedAt, obj.ExpectedShippedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetShippedAt", func(t *testing.T) { + obj := &FulfillmentShipmentDetails{} + var fernTestValueShippedAt *string + obj.SetShippedAt(fernTestValueShippedAt) + assert.Equal(t, fernTestValueShippedAt, obj.ShippedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCanceledAt", func(t *testing.T) { + obj := &FulfillmentShipmentDetails{} + var fernTestValueCanceledAt *string + obj.SetCanceledAt(fernTestValueCanceledAt) + assert.Equal(t, fernTestValueCanceledAt, obj.CanceledAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCancelReason", func(t *testing.T) { + obj := &FulfillmentShipmentDetails{} + var fernTestValueCancelReason *string + obj.SetCancelReason(fernTestValueCancelReason) + assert.Equal(t, fernTestValueCancelReason, obj.CancelReason) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFailedAt", func(t *testing.T) { + obj := &FulfillmentShipmentDetails{} + var fernTestValueFailedAt *string + obj.SetFailedAt(fernTestValueFailedAt) + assert.Equal(t, fernTestValueFailedAt, obj.FailedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFailureReason", func(t *testing.T) { + obj := &FulfillmentShipmentDetails{} + var fernTestValueFailureReason *string + obj.SetFailureReason(fernTestValueFailureReason) + assert.Equal(t, fernTestValueFailureReason, obj.FailureReason) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersFulfillmentShipmentDetails(t *testing.T) { + t.Run("GetRecipient", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var expected *FulfillmentRecipient + obj.Recipient = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRecipient(), "getter should return the property value") + }) + + t.Run("GetRecipient_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + obj.Recipient = nil + + // Act & Assert + assert.Nil(t, obj.GetRecipient(), "getter should return nil when property is nil") + }) + + t.Run("GetRecipient_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentShipmentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRecipient() // Should return zero value + }) + + t.Run("GetCarrier", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var expected *string + obj.Carrier = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCarrier(), "getter should return the property value") + }) + + t.Run("GetCarrier_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + obj.Carrier = nil + + // Act & Assert + assert.Nil(t, obj.GetCarrier(), "getter should return nil when property is nil") + }) + + t.Run("GetCarrier_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentShipmentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCarrier() // Should return zero value + }) + + t.Run("GetShippingNote", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var expected *string + obj.ShippingNote = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetShippingNote(), "getter should return the property value") + }) + + t.Run("GetShippingNote_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + obj.ShippingNote = nil + + // Act & Assert + assert.Nil(t, obj.GetShippingNote(), "getter should return nil when property is nil") + }) + + t.Run("GetShippingNote_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentShipmentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetShippingNote() // Should return zero value + }) + + t.Run("GetShippingType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var expected *string + obj.ShippingType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetShippingType(), "getter should return the property value") + }) + + t.Run("GetShippingType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + obj.ShippingType = nil + + // Act & Assert + assert.Nil(t, obj.GetShippingType(), "getter should return nil when property is nil") + }) + + t.Run("GetShippingType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentShipmentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetShippingType() // Should return zero value + }) + + t.Run("GetTrackingNumber", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var expected *string + obj.TrackingNumber = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTrackingNumber(), "getter should return the property value") + }) + + t.Run("GetTrackingNumber_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + obj.TrackingNumber = nil + + // Act & Assert + assert.Nil(t, obj.GetTrackingNumber(), "getter should return nil when property is nil") + }) + + t.Run("GetTrackingNumber_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentShipmentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTrackingNumber() // Should return zero value + }) + + t.Run("GetTrackingURL", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var expected *string + obj.TrackingURL = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTrackingURL(), "getter should return the property value") + }) + + t.Run("GetTrackingURL_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + obj.TrackingURL = nil + + // Act & Assert + assert.Nil(t, obj.GetTrackingURL(), "getter should return nil when property is nil") + }) + + t.Run("GetTrackingURL_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentShipmentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTrackingURL() // Should return zero value + }) + + t.Run("GetPlacedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var expected *string + obj.PlacedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPlacedAt(), "getter should return the property value") + }) + + t.Run("GetPlacedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + obj.PlacedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetPlacedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetPlacedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentShipmentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPlacedAt() // Should return zero value + }) + + t.Run("GetInProgressAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var expected *string + obj.InProgressAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInProgressAt(), "getter should return the property value") + }) + + t.Run("GetInProgressAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + obj.InProgressAt = nil + + // Act & Assert + assert.Nil(t, obj.GetInProgressAt(), "getter should return nil when property is nil") + }) + + t.Run("GetInProgressAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentShipmentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInProgressAt() // Should return zero value + }) + + t.Run("GetPackagedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var expected *string + obj.PackagedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPackagedAt(), "getter should return the property value") + }) + + t.Run("GetPackagedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + obj.PackagedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetPackagedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetPackagedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentShipmentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPackagedAt() // Should return zero value + }) + + t.Run("GetExpectedShippedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var expected *string + obj.ExpectedShippedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExpectedShippedAt(), "getter should return the property value") + }) + + t.Run("GetExpectedShippedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + obj.ExpectedShippedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetExpectedShippedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetExpectedShippedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentShipmentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExpectedShippedAt() // Should return zero value + }) + + t.Run("GetShippedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var expected *string + obj.ShippedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetShippedAt(), "getter should return the property value") + }) + + t.Run("GetShippedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + obj.ShippedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetShippedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetShippedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentShipmentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetShippedAt() // Should return zero value + }) + + t.Run("GetCanceledAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var expected *string + obj.CanceledAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCanceledAt(), "getter should return the property value") + }) + + t.Run("GetCanceledAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + obj.CanceledAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCanceledAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCanceledAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentShipmentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCanceledAt() // Should return zero value + }) + + t.Run("GetCancelReason", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var expected *string + obj.CancelReason = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCancelReason(), "getter should return the property value") + }) + + t.Run("GetCancelReason_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + obj.CancelReason = nil + + // Act & Assert + assert.Nil(t, obj.GetCancelReason(), "getter should return nil when property is nil") + }) + + t.Run("GetCancelReason_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentShipmentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCancelReason() // Should return zero value + }) + + t.Run("GetFailedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var expected *string + obj.FailedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFailedAt(), "getter should return the property value") + }) + + t.Run("GetFailedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + obj.FailedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetFailedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetFailedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentShipmentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFailedAt() // Should return zero value + }) + + t.Run("GetFailureReason", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var expected *string + obj.FailureReason = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFailureReason(), "getter should return the property value") + }) + + t.Run("GetFailureReason_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + obj.FailureReason = nil + + // Act & Assert + assert.Nil(t, obj.GetFailureReason(), "getter should return nil when property is nil") + }) + + t.Run("GetFailureReason_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentShipmentDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFailureReason() // Should return zero value + }) + +} + +func TestSettersMarkExplicitFulfillmentShipmentDetails(t *testing.T) { + t.Run("SetRecipient_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var fernTestValueRecipient *FulfillmentRecipient + + // Act + obj.SetRecipient(fernTestValueRecipient) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCarrier_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var fernTestValueCarrier *string + + // Act + obj.SetCarrier(fernTestValueCarrier) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetShippingNote_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var fernTestValueShippingNote *string + + // Act + obj.SetShippingNote(fernTestValueShippingNote) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetShippingType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var fernTestValueShippingType *string + + // Act + obj.SetShippingType(fernTestValueShippingType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTrackingNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var fernTestValueTrackingNumber *string + + // Act + obj.SetTrackingNumber(fernTestValueTrackingNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTrackingURL_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var fernTestValueTrackingURL *string + + // Act + obj.SetTrackingURL(fernTestValueTrackingURL) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPlacedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var fernTestValuePlacedAt *string + + // Act + obj.SetPlacedAt(fernTestValuePlacedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetInProgressAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var fernTestValueInProgressAt *string + + // Act + obj.SetInProgressAt(fernTestValueInProgressAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPackagedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var fernTestValuePackagedAt *string + + // Act + obj.SetPackagedAt(fernTestValuePackagedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExpectedShippedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var fernTestValueExpectedShippedAt *string + + // Act + obj.SetExpectedShippedAt(fernTestValueExpectedShippedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetShippedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var fernTestValueShippedAt *string + + // Act + obj.SetShippedAt(fernTestValueShippedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCanceledAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var fernTestValueCanceledAt *string + + // Act + obj.SetCanceledAt(fernTestValueCanceledAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCancelReason_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var fernTestValueCancelReason *string + + // Act + obj.SetCancelReason(fernTestValueCancelReason) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFailedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var fernTestValueFailedAt *string + + // Act + obj.SetFailedAt(fernTestValueFailedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFailureReason_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + var fernTestValueFailureReason *string + + // Act + obj.SetFailureReason(fernTestValueFailureReason) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetBreakTypeResponse(t *testing.T) { + t.Run("SetBreakType", func(t *testing.T) { + obj := &GetBreakTypeResponse{} + var fernTestValueBreakType *BreakType + obj.SetBreakType(fernTestValueBreakType) + assert.Equal(t, fernTestValueBreakType, obj.BreakType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &GetBreakTypeResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetBreakTypeResponse(t *testing.T) { + t.Run("GetBreakType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBreakTypeResponse{} + var expected *BreakType + obj.BreakType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBreakType(), "getter should return the property value") + }) + + t.Run("GetBreakType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBreakTypeResponse{} + obj.BreakType = nil + + // Act & Assert + assert.Nil(t, obj.GetBreakType(), "getter should return nil when property is nil") + }) + + t.Run("GetBreakType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetBreakTypeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBreakType() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBreakTypeResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBreakTypeResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetBreakTypeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetBreakTypeResponse(t *testing.T) { + t.Run("SetBreakType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBreakTypeResponse{} + var fernTestValueBreakType *BreakType + + // Act + obj.SetBreakType(fernTestValueBreakType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBreakTypeResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetCashDrawerShiftResponse(t *testing.T) { + t.Run("SetCashDrawerShift", func(t *testing.T) { + obj := &GetCashDrawerShiftResponse{} + var fernTestValueCashDrawerShift *CashDrawerShift + obj.SetCashDrawerShift(fernTestValueCashDrawerShift) + assert.Equal(t, fernTestValueCashDrawerShift, obj.CashDrawerShift) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &GetCashDrawerShiftResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetCashDrawerShiftResponse(t *testing.T) { + t.Run("GetCashDrawerShift", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCashDrawerShiftResponse{} + var expected *CashDrawerShift + obj.CashDrawerShift = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCashDrawerShift(), "getter should return the property value") + }) + + t.Run("GetCashDrawerShift_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCashDrawerShiftResponse{} + obj.CashDrawerShift = nil + + // Act & Assert + assert.Nil(t, obj.GetCashDrawerShift(), "getter should return nil when property is nil") + }) + + t.Run("GetCashDrawerShift_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCashDrawerShiftResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCashDrawerShift() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCashDrawerShiftResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCashDrawerShiftResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCashDrawerShiftResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetCashDrawerShiftResponse(t *testing.T) { + t.Run("SetCashDrawerShift_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCashDrawerShiftResponse{} + var fernTestValueCashDrawerShift *CashDrawerShift + + // Act + obj.SetCashDrawerShift(fernTestValueCashDrawerShift) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCashDrawerShiftResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetCatalogObjectResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetCatalogObjectResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &GetCatalogObjectResponse{} + var fernTestValueObject *CatalogObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRelatedObjects", func(t *testing.T) { + obj := &GetCatalogObjectResponse{} + var fernTestValueRelatedObjects []*CatalogObject + obj.SetRelatedObjects(fernTestValueRelatedObjects) + assert.Equal(t, fernTestValueRelatedObjects, obj.RelatedObjects) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetCatalogObjectResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCatalogObjectResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCatalogObjectResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCatalogObjectResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCatalogObjectResponse{} + var expected *CatalogObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCatalogObjectResponse{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCatalogObjectResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + + t.Run("GetRelatedObjects", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCatalogObjectResponse{} + var expected []*CatalogObject + obj.RelatedObjects = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRelatedObjects(), "getter should return the property value") + }) + + t.Run("GetRelatedObjects_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCatalogObjectResponse{} + obj.RelatedObjects = nil + + // Act & Assert + assert.Nil(t, obj.GetRelatedObjects(), "getter should return nil when property is nil") + }) + + t.Run("GetRelatedObjects_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCatalogObjectResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRelatedObjects() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetCatalogObjectResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCatalogObjectResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCatalogObjectResponse{} + var fernTestValueObject *CatalogObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRelatedObjects_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCatalogObjectResponse{} + var fernTestValueRelatedObjects []*CatalogObject + + // Act + obj.SetRelatedObjects(fernTestValueRelatedObjects) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetCustomerCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition", func(t *testing.T) { + obj := &GetCustomerCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + assert.Equal(t, fernTestValueCustomAttributeDefinition, obj.CustomAttributeDefinition) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &GetCustomerCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetCustomerCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetCustomAttributeDefinition", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerCustomAttributeDefinitionResponse{} + var expected *CustomAttributeDefinition + obj.CustomAttributeDefinition = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeDefinition(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeDefinition_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerCustomAttributeDefinitionResponse{} + obj.CustomAttributeDefinition = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeDefinition(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeDefinition_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCustomerCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeDefinition() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerCustomAttributeDefinitionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerCustomAttributeDefinitionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCustomerCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetCustomerCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + + // Act + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetCustomerCustomAttributeResponse(t *testing.T) { + t.Run("SetCustomAttribute", func(t *testing.T) { + obj := &GetCustomerCustomAttributeResponse{} + var fernTestValueCustomAttribute *CustomAttribute + obj.SetCustomAttribute(fernTestValueCustomAttribute) + assert.Equal(t, fernTestValueCustomAttribute, obj.CustomAttribute) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &GetCustomerCustomAttributeResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetCustomerCustomAttributeResponse(t *testing.T) { + t.Run("GetCustomAttribute", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerCustomAttributeResponse{} + var expected *CustomAttribute + obj.CustomAttribute = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttribute(), "getter should return the property value") + }) + + t.Run("GetCustomAttribute_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerCustomAttributeResponse{} + obj.CustomAttribute = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttribute(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttribute_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCustomerCustomAttributeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttribute() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerCustomAttributeResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerCustomAttributeResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCustomerCustomAttributeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetCustomerCustomAttributeResponse(t *testing.T) { + t.Run("SetCustomAttribute_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerCustomAttributeResponse{} + var fernTestValueCustomAttribute *CustomAttribute + + // Act + obj.SetCustomAttribute(fernTestValueCustomAttribute) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerCustomAttributeResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetCustomerGroupResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetCustomerGroupResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGroup", func(t *testing.T) { + obj := &GetCustomerGroupResponse{} + var fernTestValueGroup *CustomerGroup + obj.SetGroup(fernTestValueGroup) + assert.Equal(t, fernTestValueGroup, obj.Group) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetCustomerGroupResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerGroupResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerGroupResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCustomerGroupResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetGroup", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerGroupResponse{} + var expected *CustomerGroup + obj.Group = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGroup(), "getter should return the property value") + }) + + t.Run("GetGroup_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerGroupResponse{} + obj.Group = nil + + // Act & Assert + assert.Nil(t, obj.GetGroup(), "getter should return nil when property is nil") + }) + + t.Run("GetGroup_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCustomerGroupResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGroup() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetCustomerGroupResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerGroupResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGroup_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerGroupResponse{} + var fernTestValueGroup *CustomerGroup + + // Act + obj.SetGroup(fernTestValueGroup) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetCustomerSegmentResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetCustomerSegmentResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSegment", func(t *testing.T) { + obj := &GetCustomerSegmentResponse{} + var fernTestValueSegment *CustomerSegment + obj.SetSegment(fernTestValueSegment) + assert.Equal(t, fernTestValueSegment, obj.Segment) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetCustomerSegmentResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerSegmentResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerSegmentResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCustomerSegmentResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetSegment", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerSegmentResponse{} + var expected *CustomerSegment + obj.Segment = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSegment(), "getter should return the property value") + }) + + t.Run("GetSegment_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerSegmentResponse{} + obj.Segment = nil + + // Act & Assert + assert.Nil(t, obj.GetSegment(), "getter should return nil when property is nil") + }) + + t.Run("GetSegment_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCustomerSegmentResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSegment() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetCustomerSegmentResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerSegmentResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSegment_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerSegmentResponse{} + var fernTestValueSegment *CustomerSegment + + // Act + obj.SetSegment(fernTestValueSegment) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetDeviceCodeResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetDeviceCodeResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeviceCode", func(t *testing.T) { + obj := &GetDeviceCodeResponse{} + var fernTestValueDeviceCode *DeviceCode + obj.SetDeviceCode(fernTestValueDeviceCode) + assert.Equal(t, fernTestValueDeviceCode, obj.DeviceCode) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetDeviceCodeResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDeviceCodeResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDeviceCodeResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetDeviceCodeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetDeviceCode", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDeviceCodeResponse{} + var expected *DeviceCode + obj.DeviceCode = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeviceCode(), "getter should return the property value") + }) + + t.Run("GetDeviceCode_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDeviceCodeResponse{} + obj.DeviceCode = nil + + // Act & Assert + assert.Nil(t, obj.GetDeviceCode(), "getter should return nil when property is nil") + }) + + t.Run("GetDeviceCode_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetDeviceCodeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeviceCode() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetDeviceCodeResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDeviceCodeResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeviceCode_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDeviceCodeResponse{} + var fernTestValueDeviceCode *DeviceCode + + // Act + obj.SetDeviceCode(fernTestValueDeviceCode) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetDisputeEvidenceResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetDisputeEvidenceResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEvidence", func(t *testing.T) { + obj := &GetDisputeEvidenceResponse{} + var fernTestValueEvidence *DisputeEvidence + obj.SetEvidence(fernTestValueEvidence) + assert.Equal(t, fernTestValueEvidence, obj.Evidence) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetDisputeEvidenceResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDisputeEvidenceResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDisputeEvidenceResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetDisputeEvidenceResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetEvidence", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDisputeEvidenceResponse{} + var expected *DisputeEvidence + obj.Evidence = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEvidence(), "getter should return the property value") + }) + + t.Run("GetEvidence_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDisputeEvidenceResponse{} + obj.Evidence = nil + + // Act & Assert + assert.Nil(t, obj.GetEvidence(), "getter should return nil when property is nil") + }) + + t.Run("GetEvidence_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetDisputeEvidenceResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEvidence() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetDisputeEvidenceResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDisputeEvidenceResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEvidence_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDisputeEvidenceResponse{} + var fernTestValueEvidence *DisputeEvidence + + // Act + obj.SetEvidence(fernTestValueEvidence) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetEmployeeWageResponse(t *testing.T) { + t.Run("SetEmployeeWage", func(t *testing.T) { + obj := &GetEmployeeWageResponse{} + var fernTestValueEmployeeWage *EmployeeWage + obj.SetEmployeeWage(fernTestValueEmployeeWage) + assert.Equal(t, fernTestValueEmployeeWage, obj.EmployeeWage) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &GetEmployeeWageResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetEmployeeWageResponse(t *testing.T) { + t.Run("GetEmployeeWage", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetEmployeeWageResponse{} + var expected *EmployeeWage + obj.EmployeeWage = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEmployeeWage(), "getter should return the property value") + }) + + t.Run("GetEmployeeWage_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetEmployeeWageResponse{} + obj.EmployeeWage = nil + + // Act & Assert + assert.Nil(t, obj.GetEmployeeWage(), "getter should return nil when property is nil") + }) + + t.Run("GetEmployeeWage_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetEmployeeWageResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEmployeeWage() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetEmployeeWageResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetEmployeeWageResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetEmployeeWageResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetEmployeeWageResponse(t *testing.T) { + t.Run("SetEmployeeWage_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetEmployeeWageResponse{} + var fernTestValueEmployeeWage *EmployeeWage + + // Act + obj.SetEmployeeWage(fernTestValueEmployeeWage) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetEmployeeWageResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetLoyaltyAccountResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetLoyaltyAccountResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLoyaltyAccount", func(t *testing.T) { + obj := &GetLoyaltyAccountResponse{} + var fernTestValueLoyaltyAccount *LoyaltyAccount + obj.SetLoyaltyAccount(fernTestValueLoyaltyAccount) + assert.Equal(t, fernTestValueLoyaltyAccount, obj.LoyaltyAccount) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetLoyaltyAccountResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLoyaltyAccountResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLoyaltyAccountResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetLoyaltyAccountResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetLoyaltyAccount", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLoyaltyAccountResponse{} + var expected *LoyaltyAccount + obj.LoyaltyAccount = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyAccount(), "getter should return the property value") + }) + + t.Run("GetLoyaltyAccount_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLoyaltyAccountResponse{} + obj.LoyaltyAccount = nil + + // Act & Assert + assert.Nil(t, obj.GetLoyaltyAccount(), "getter should return nil when property is nil") + }) + + t.Run("GetLoyaltyAccount_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetLoyaltyAccountResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyAccount() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetLoyaltyAccountResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLoyaltyAccountResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLoyaltyAccount_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLoyaltyAccountResponse{} + var fernTestValueLoyaltyAccount *LoyaltyAccount + + // Act + obj.SetLoyaltyAccount(fernTestValueLoyaltyAccount) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetLoyaltyProgramResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetLoyaltyProgramResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetProgram", func(t *testing.T) { + obj := &GetLoyaltyProgramResponse{} + var fernTestValueProgram *LoyaltyProgram + obj.SetProgram(fernTestValueProgram) + assert.Equal(t, fernTestValueProgram, obj.Program) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetLoyaltyProgramResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLoyaltyProgramResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLoyaltyProgramResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetLoyaltyProgramResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetProgram", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLoyaltyProgramResponse{} + var expected *LoyaltyProgram + obj.Program = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetProgram(), "getter should return the property value") + }) + + t.Run("GetProgram_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLoyaltyProgramResponse{} + obj.Program = nil + + // Act & Assert + assert.Nil(t, obj.GetProgram(), "getter should return nil when property is nil") + }) + + t.Run("GetProgram_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetLoyaltyProgramResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetProgram() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetLoyaltyProgramResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLoyaltyProgramResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetProgram_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLoyaltyProgramResponse{} + var fernTestValueProgram *LoyaltyProgram + + // Act + obj.SetProgram(fernTestValueProgram) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetLoyaltyPromotionResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetLoyaltyPromotionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLoyaltyPromotion", func(t *testing.T) { + obj := &GetLoyaltyPromotionResponse{} + var fernTestValueLoyaltyPromotion *LoyaltyPromotion + obj.SetLoyaltyPromotion(fernTestValueLoyaltyPromotion) + assert.Equal(t, fernTestValueLoyaltyPromotion, obj.LoyaltyPromotion) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetLoyaltyPromotionResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLoyaltyPromotionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLoyaltyPromotionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetLoyaltyPromotionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetLoyaltyPromotion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLoyaltyPromotionResponse{} + var expected *LoyaltyPromotion + obj.LoyaltyPromotion = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyPromotion(), "getter should return the property value") + }) + + t.Run("GetLoyaltyPromotion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLoyaltyPromotionResponse{} + obj.LoyaltyPromotion = nil + + // Act & Assert + assert.Nil(t, obj.GetLoyaltyPromotion(), "getter should return nil when property is nil") + }) + + t.Run("GetLoyaltyPromotion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetLoyaltyPromotionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyPromotion() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetLoyaltyPromotionResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLoyaltyPromotionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLoyaltyPromotion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLoyaltyPromotionResponse{} + var fernTestValueLoyaltyPromotion *LoyaltyPromotion + + // Act + obj.SetLoyaltyPromotion(fernTestValueLoyaltyPromotion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetLoyaltyRewardResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetLoyaltyRewardResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReward", func(t *testing.T) { + obj := &GetLoyaltyRewardResponse{} + var fernTestValueReward *LoyaltyReward + obj.SetReward(fernTestValueReward) + assert.Equal(t, fernTestValueReward, obj.Reward) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetLoyaltyRewardResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLoyaltyRewardResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLoyaltyRewardResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetLoyaltyRewardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetReward", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLoyaltyRewardResponse{} + var expected *LoyaltyReward + obj.Reward = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReward(), "getter should return the property value") + }) + + t.Run("GetReward_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLoyaltyRewardResponse{} + obj.Reward = nil + + // Act & Assert + assert.Nil(t, obj.GetReward(), "getter should return nil when property is nil") + }) + + t.Run("GetReward_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetLoyaltyRewardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReward() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetLoyaltyRewardResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLoyaltyRewardResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReward_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLoyaltyRewardResponse{} + var fernTestValueReward *LoyaltyReward + + // Act + obj.SetReward(fernTestValueReward) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetPaymentLinkResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetPaymentLinkResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPaymentLink", func(t *testing.T) { + obj := &GetPaymentLinkResponse{} + var fernTestValuePaymentLink *PaymentLink + obj.SetPaymentLink(fernTestValuePaymentLink) + assert.Equal(t, fernTestValuePaymentLink, obj.PaymentLink) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetPaymentLinkResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPaymentLinkResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPaymentLinkResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetPaymentLinkResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetPaymentLink", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPaymentLinkResponse{} + var expected *PaymentLink + obj.PaymentLink = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentLink(), "getter should return the property value") + }) + + t.Run("GetPaymentLink_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPaymentLinkResponse{} + obj.PaymentLink = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentLink(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentLink_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetPaymentLinkResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentLink() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetPaymentLinkResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPaymentLinkResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPaymentLink_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPaymentLinkResponse{} + var fernTestValuePaymentLink *PaymentLink + + // Act + obj.SetPaymentLink(fernTestValuePaymentLink) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetShiftResponse(t *testing.T) { + t.Run("SetShift", func(t *testing.T) { + obj := &GetShiftResponse{} + var fernTestValueShift *Shift + obj.SetShift(fernTestValueShift) + assert.Equal(t, fernTestValueShift, obj.Shift) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &GetShiftResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetShiftResponse(t *testing.T) { + t.Run("GetShift", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetShiftResponse{} + var expected *Shift + obj.Shift = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetShift(), "getter should return the property value") + }) + + t.Run("GetShift_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetShiftResponse{} + obj.Shift = nil + + // Act & Assert + assert.Nil(t, obj.GetShift(), "getter should return nil when property is nil") + }) + + t.Run("GetShift_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetShiftResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetShift() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetShiftResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetShiftResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetShiftResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetShiftResponse(t *testing.T) { + t.Run("SetShift_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetShiftResponse{} + var fernTestValueShift *Shift + + // Act + obj.SetShift(fernTestValueShift) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetShiftResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetTeamMemberBookingProfileResponse(t *testing.T) { + t.Run("SetTeamMemberBookingProfile", func(t *testing.T) { + obj := &GetTeamMemberBookingProfileResponse{} + var fernTestValueTeamMemberBookingProfile *TeamMemberBookingProfile + obj.SetTeamMemberBookingProfile(fernTestValueTeamMemberBookingProfile) + assert.Equal(t, fernTestValueTeamMemberBookingProfile, obj.TeamMemberBookingProfile) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &GetTeamMemberBookingProfileResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetTeamMemberBookingProfileResponse(t *testing.T) { + t.Run("GetTeamMemberBookingProfile", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTeamMemberBookingProfileResponse{} + var expected *TeamMemberBookingProfile + obj.TeamMemberBookingProfile = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMemberBookingProfile(), "getter should return the property value") + }) + + t.Run("GetTeamMemberBookingProfile_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTeamMemberBookingProfileResponse{} + obj.TeamMemberBookingProfile = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMemberBookingProfile(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMemberBookingProfile_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetTeamMemberBookingProfileResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMemberBookingProfile() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTeamMemberBookingProfileResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTeamMemberBookingProfileResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetTeamMemberBookingProfileResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetTeamMemberBookingProfileResponse(t *testing.T) { + t.Run("SetTeamMemberBookingProfile_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTeamMemberBookingProfileResponse{} + var fernTestValueTeamMemberBookingProfile *TeamMemberBookingProfile + + // Act + obj.SetTeamMemberBookingProfile(fernTestValueTeamMemberBookingProfile) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTeamMemberBookingProfileResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetTeamMemberWageResponse(t *testing.T) { + t.Run("SetTeamMemberWage", func(t *testing.T) { + obj := &GetTeamMemberWageResponse{} + var fernTestValueTeamMemberWage *TeamMemberWage + obj.SetTeamMemberWage(fernTestValueTeamMemberWage) + assert.Equal(t, fernTestValueTeamMemberWage, obj.TeamMemberWage) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &GetTeamMemberWageResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetTeamMemberWageResponse(t *testing.T) { + t.Run("GetTeamMemberWage", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTeamMemberWageResponse{} + var expected *TeamMemberWage + obj.TeamMemberWage = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMemberWage(), "getter should return the property value") + }) + + t.Run("GetTeamMemberWage_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTeamMemberWageResponse{} + obj.TeamMemberWage = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMemberWage(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMemberWage_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetTeamMemberWageResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMemberWage() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTeamMemberWageResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTeamMemberWageResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetTeamMemberWageResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetTeamMemberWageResponse(t *testing.T) { + t.Run("SetTeamMemberWage_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTeamMemberWageResponse{} + var fernTestValueTeamMemberWage *TeamMemberWage + + // Act + obj.SetTeamMemberWage(fernTestValueTeamMemberWage) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTeamMemberWageResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetTerminalActionResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetTerminalActionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAction", func(t *testing.T) { + obj := &GetTerminalActionResponse{} + var fernTestValueAction *TerminalAction + obj.SetAction(fernTestValueAction) + assert.Equal(t, fernTestValueAction, obj.Action) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetTerminalActionResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTerminalActionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTerminalActionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetTerminalActionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetAction", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTerminalActionResponse{} + var expected *TerminalAction + obj.Action = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAction(), "getter should return the property value") + }) + + t.Run("GetAction_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTerminalActionResponse{} + obj.Action = nil + + // Act & Assert + assert.Nil(t, obj.GetAction(), "getter should return nil when property is nil") + }) + + t.Run("GetAction_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetTerminalActionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAction() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetTerminalActionResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTerminalActionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAction_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTerminalActionResponse{} + var fernTestValueAction *TerminalAction + + // Act + obj.SetAction(fernTestValueAction) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetTerminalCheckoutResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetTerminalCheckoutResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCheckout", func(t *testing.T) { + obj := &GetTerminalCheckoutResponse{} + var fernTestValueCheckout *TerminalCheckout + obj.SetCheckout(fernTestValueCheckout) + assert.Equal(t, fernTestValueCheckout, obj.Checkout) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetTerminalCheckoutResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTerminalCheckoutResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTerminalCheckoutResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetTerminalCheckoutResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetCheckout", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTerminalCheckoutResponse{} + var expected *TerminalCheckout + obj.Checkout = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCheckout(), "getter should return the property value") + }) + + t.Run("GetCheckout_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTerminalCheckoutResponse{} + obj.Checkout = nil + + // Act & Assert + assert.Nil(t, obj.GetCheckout(), "getter should return nil when property is nil") + }) + + t.Run("GetCheckout_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetTerminalCheckoutResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCheckout() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetTerminalCheckoutResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTerminalCheckoutResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCheckout_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTerminalCheckoutResponse{} + var fernTestValueCheckout *TerminalCheckout + + // Act + obj.SetCheckout(fernTestValueCheckout) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetTerminalRefundResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetTerminalRefundResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRefund", func(t *testing.T) { + obj := &GetTerminalRefundResponse{} + var fernTestValueRefund *TerminalRefund + obj.SetRefund(fernTestValueRefund) + assert.Equal(t, fernTestValueRefund, obj.Refund) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetTerminalRefundResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTerminalRefundResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTerminalRefundResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetTerminalRefundResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetRefund", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTerminalRefundResponse{} + var expected *TerminalRefund + obj.Refund = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRefund(), "getter should return the property value") + }) + + t.Run("GetRefund_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTerminalRefundResponse{} + obj.Refund = nil + + // Act & Assert + assert.Nil(t, obj.GetRefund(), "getter should return nil when property is nil") + }) + + t.Run("GetRefund_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetTerminalRefundResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRefund() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetTerminalRefundResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTerminalRefundResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRefund_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTerminalRefundResponse{} + var fernTestValueRefund *TerminalRefund + + // Act + obj.SetRefund(fernTestValueRefund) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetTransactionResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetTransactionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTransaction", func(t *testing.T) { + obj := &GetTransactionResponse{} + var fernTestValueTransaction *Transaction + obj.SetTransaction(fernTestValueTransaction) + assert.Equal(t, fernTestValueTransaction, obj.Transaction) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetTransactionResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTransactionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTransactionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetTransactionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetTransaction", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTransactionResponse{} + var expected *Transaction + obj.Transaction = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTransaction(), "getter should return the property value") + }) + + t.Run("GetTransaction_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTransactionResponse{} + obj.Transaction = nil + + // Act & Assert + assert.Nil(t, obj.GetTransaction(), "getter should return nil when property is nil") + }) + + t.Run("GetTransaction_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetTransactionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTransaction() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetTransactionResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTransactionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTransaction_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTransactionResponse{} + var fernTestValueTransaction *Transaction + + // Act + obj.SetTransaction(fernTestValueTransaction) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetWageSettingResponse(t *testing.T) { + t.Run("SetWageSetting", func(t *testing.T) { + obj := &GetWageSettingResponse{} + var fernTestValueWageSetting *WageSetting + obj.SetWageSetting(fernTestValueWageSetting) + assert.Equal(t, fernTestValueWageSetting, obj.WageSetting) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &GetWageSettingResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetWageSettingResponse(t *testing.T) { + t.Run("GetWageSetting", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetWageSettingResponse{} + var expected *WageSetting + obj.WageSetting = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetWageSetting(), "getter should return the property value") + }) + + t.Run("GetWageSetting_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetWageSettingResponse{} + obj.WageSetting = nil + + // Act & Assert + assert.Nil(t, obj.GetWageSetting(), "getter should return nil when property is nil") + }) + + t.Run("GetWageSetting_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetWageSettingResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetWageSetting() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetWageSettingResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetWageSettingResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetWageSettingResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetWageSettingResponse(t *testing.T) { + t.Run("SetWageSetting_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetWageSettingResponse{} + var fernTestValueWageSetting *WageSetting + + // Act + obj.SetWageSetting(fernTestValueWageSetting) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetWageSettingResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetWebhookSubscriptionResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetWebhookSubscriptionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSubscription", func(t *testing.T) { + obj := &GetWebhookSubscriptionResponse{} + var fernTestValueSubscription *WebhookSubscription + obj.SetSubscription(fernTestValueSubscription) + assert.Equal(t, fernTestValueSubscription, obj.Subscription) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetWebhookSubscriptionResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetWebhookSubscriptionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetWebhookSubscriptionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetWebhookSubscriptionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetSubscription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetWebhookSubscriptionResponse{} + var expected *WebhookSubscription + obj.Subscription = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscription(), "getter should return the property value") + }) + + t.Run("GetSubscription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetWebhookSubscriptionResponse{} + obj.Subscription = nil + + // Act & Assert + assert.Nil(t, obj.GetSubscription(), "getter should return nil when property is nil") + }) + + t.Run("GetSubscription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetWebhookSubscriptionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscription() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetWebhookSubscriptionResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetWebhookSubscriptionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSubscription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetWebhookSubscriptionResponse{} + var fernTestValueSubscription *WebhookSubscription + + // Act + obj.SetSubscription(fernTestValueSubscription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardActivity(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &GiftCardActivity{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &GiftCardActivity{} + var fernTestValueType GiftCardActivityType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &GiftCardActivity{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &GiftCardActivity{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGiftCardID", func(t *testing.T) { + obj := &GiftCardActivity{} + var fernTestValueGiftCardID *string + obj.SetGiftCardID(fernTestValueGiftCardID) + assert.Equal(t, fernTestValueGiftCardID, obj.GiftCardID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGiftCardGan", func(t *testing.T) { + obj := &GiftCardActivity{} + var fernTestValueGiftCardGan *string + obj.SetGiftCardGan(fernTestValueGiftCardGan) + assert.Equal(t, fernTestValueGiftCardGan, obj.GiftCardGan) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGiftCardBalanceMoney", func(t *testing.T) { + obj := &GiftCardActivity{} + var fernTestValueGiftCardBalanceMoney *Money + obj.SetGiftCardBalanceMoney(fernTestValueGiftCardBalanceMoney) + assert.Equal(t, fernTestValueGiftCardBalanceMoney, obj.GiftCardBalanceMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLoadActivityDetails", func(t *testing.T) { + obj := &GiftCardActivity{} + var fernTestValueLoadActivityDetails *GiftCardActivityLoad + obj.SetLoadActivityDetails(fernTestValueLoadActivityDetails) + assert.Equal(t, fernTestValueLoadActivityDetails, obj.LoadActivityDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetActivateActivityDetails", func(t *testing.T) { + obj := &GiftCardActivity{} + var fernTestValueActivateActivityDetails *GiftCardActivityActivate + obj.SetActivateActivityDetails(fernTestValueActivateActivityDetails) + assert.Equal(t, fernTestValueActivateActivityDetails, obj.ActivateActivityDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRedeemActivityDetails", func(t *testing.T) { + obj := &GiftCardActivity{} + var fernTestValueRedeemActivityDetails *GiftCardActivityRedeem + obj.SetRedeemActivityDetails(fernTestValueRedeemActivityDetails) + assert.Equal(t, fernTestValueRedeemActivityDetails, obj.RedeemActivityDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetClearBalanceActivityDetails", func(t *testing.T) { + obj := &GiftCardActivity{} + var fernTestValueClearBalanceActivityDetails *GiftCardActivityClearBalance + obj.SetClearBalanceActivityDetails(fernTestValueClearBalanceActivityDetails) + assert.Equal(t, fernTestValueClearBalanceActivityDetails, obj.ClearBalanceActivityDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeactivateActivityDetails", func(t *testing.T) { + obj := &GiftCardActivity{} + var fernTestValueDeactivateActivityDetails *GiftCardActivityDeactivate + obj.SetDeactivateActivityDetails(fernTestValueDeactivateActivityDetails) + assert.Equal(t, fernTestValueDeactivateActivityDetails, obj.DeactivateActivityDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAdjustIncrementActivityDetails", func(t *testing.T) { + obj := &GiftCardActivity{} + var fernTestValueAdjustIncrementActivityDetails *GiftCardActivityAdjustIncrement + obj.SetAdjustIncrementActivityDetails(fernTestValueAdjustIncrementActivityDetails) + assert.Equal(t, fernTestValueAdjustIncrementActivityDetails, obj.AdjustIncrementActivityDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAdjustDecrementActivityDetails", func(t *testing.T) { + obj := &GiftCardActivity{} + var fernTestValueAdjustDecrementActivityDetails *GiftCardActivityAdjustDecrement + obj.SetAdjustDecrementActivityDetails(fernTestValueAdjustDecrementActivityDetails) + assert.Equal(t, fernTestValueAdjustDecrementActivityDetails, obj.AdjustDecrementActivityDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRefundActivityDetails", func(t *testing.T) { + obj := &GiftCardActivity{} + var fernTestValueRefundActivityDetails *GiftCardActivityRefund + obj.SetRefundActivityDetails(fernTestValueRefundActivityDetails) + assert.Equal(t, fernTestValueRefundActivityDetails, obj.RefundActivityDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUnlinkedActivityRefundActivityDetails", func(t *testing.T) { + obj := &GiftCardActivity{} + var fernTestValueUnlinkedActivityRefundActivityDetails *GiftCardActivityUnlinkedActivityRefund + obj.SetUnlinkedActivityRefundActivityDetails(fernTestValueUnlinkedActivityRefundActivityDetails) + assert.Equal(t, fernTestValueUnlinkedActivityRefundActivityDetails, obj.UnlinkedActivityRefundActivityDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImportActivityDetails", func(t *testing.T) { + obj := &GiftCardActivity{} + var fernTestValueImportActivityDetails *GiftCardActivityImport + obj.SetImportActivityDetails(fernTestValueImportActivityDetails) + assert.Equal(t, fernTestValueImportActivityDetails, obj.ImportActivityDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBlockActivityDetails", func(t *testing.T) { + obj := &GiftCardActivity{} + var fernTestValueBlockActivityDetails *GiftCardActivityBlock + obj.SetBlockActivityDetails(fernTestValueBlockActivityDetails) + assert.Equal(t, fernTestValueBlockActivityDetails, obj.BlockActivityDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUnblockActivityDetails", func(t *testing.T) { + obj := &GiftCardActivity{} + var fernTestValueUnblockActivityDetails *GiftCardActivityUnblock + obj.SetUnblockActivityDetails(fernTestValueUnblockActivityDetails) + assert.Equal(t, fernTestValueUnblockActivityDetails, obj.UnblockActivityDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImportReversalActivityDetails", func(t *testing.T) { + obj := &GiftCardActivity{} + var fernTestValueImportReversalActivityDetails *GiftCardActivityImportReversal + obj.SetImportReversalActivityDetails(fernTestValueImportReversalActivityDetails) + assert.Equal(t, fernTestValueImportReversalActivityDetails, obj.ImportReversalActivityDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTransferBalanceToActivityDetails", func(t *testing.T) { + obj := &GiftCardActivity{} + var fernTestValueTransferBalanceToActivityDetails *GiftCardActivityTransferBalanceTo + obj.SetTransferBalanceToActivityDetails(fernTestValueTransferBalanceToActivityDetails) + assert.Equal(t, fernTestValueTransferBalanceToActivityDetails, obj.TransferBalanceToActivityDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTransferBalanceFromActivityDetails", func(t *testing.T) { + obj := &GiftCardActivity{} + var fernTestValueTransferBalanceFromActivityDetails *GiftCardActivityTransferBalanceFrom + obj.SetTransferBalanceFromActivityDetails(fernTestValueTransferBalanceFromActivityDetails) + assert.Equal(t, fernTestValueTransferBalanceFromActivityDetails, obj.TransferBalanceFromActivityDetails) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardActivity(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivity + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var expected GiftCardActivityType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivity + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var expected string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivity + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivity + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetGiftCardID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var expected *string + obj.GiftCardID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGiftCardID(), "getter should return the property value") + }) + + t.Run("GetGiftCardID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + obj.GiftCardID = nil + + // Act & Assert + assert.Nil(t, obj.GetGiftCardID(), "getter should return nil when property is nil") + }) + + t.Run("GetGiftCardID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivity + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGiftCardID() // Should return zero value + }) + + t.Run("GetGiftCardGan", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var expected *string + obj.GiftCardGan = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGiftCardGan(), "getter should return the property value") + }) + + t.Run("GetGiftCardGan_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + obj.GiftCardGan = nil + + // Act & Assert + assert.Nil(t, obj.GetGiftCardGan(), "getter should return nil when property is nil") + }) + + t.Run("GetGiftCardGan_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivity + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGiftCardGan() // Should return zero value + }) + + t.Run("GetGiftCardBalanceMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var expected *Money + obj.GiftCardBalanceMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGiftCardBalanceMoney(), "getter should return the property value") + }) + + t.Run("GetGiftCardBalanceMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + obj.GiftCardBalanceMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetGiftCardBalanceMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetGiftCardBalanceMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivity + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGiftCardBalanceMoney() // Should return zero value + }) + + t.Run("GetLoadActivityDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var expected *GiftCardActivityLoad + obj.LoadActivityDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoadActivityDetails(), "getter should return the property value") + }) + + t.Run("GetLoadActivityDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + obj.LoadActivityDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetLoadActivityDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetLoadActivityDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivity + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoadActivityDetails() // Should return zero value + }) + + t.Run("GetActivateActivityDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var expected *GiftCardActivityActivate + obj.ActivateActivityDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetActivateActivityDetails(), "getter should return the property value") + }) + + t.Run("GetActivateActivityDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + obj.ActivateActivityDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetActivateActivityDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetActivateActivityDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivity + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetActivateActivityDetails() // Should return zero value + }) + + t.Run("GetRedeemActivityDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var expected *GiftCardActivityRedeem + obj.RedeemActivityDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRedeemActivityDetails(), "getter should return the property value") + }) + + t.Run("GetRedeemActivityDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + obj.RedeemActivityDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetRedeemActivityDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetRedeemActivityDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivity + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRedeemActivityDetails() // Should return zero value + }) + + t.Run("GetClearBalanceActivityDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var expected *GiftCardActivityClearBalance + obj.ClearBalanceActivityDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetClearBalanceActivityDetails(), "getter should return the property value") + }) + + t.Run("GetClearBalanceActivityDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + obj.ClearBalanceActivityDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetClearBalanceActivityDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetClearBalanceActivityDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivity + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetClearBalanceActivityDetails() // Should return zero value + }) + + t.Run("GetDeactivateActivityDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var expected *GiftCardActivityDeactivate + obj.DeactivateActivityDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeactivateActivityDetails(), "getter should return the property value") + }) + + t.Run("GetDeactivateActivityDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + obj.DeactivateActivityDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetDeactivateActivityDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetDeactivateActivityDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivity + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeactivateActivityDetails() // Should return zero value + }) + + t.Run("GetAdjustIncrementActivityDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var expected *GiftCardActivityAdjustIncrement + obj.AdjustIncrementActivityDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAdjustIncrementActivityDetails(), "getter should return the property value") + }) + + t.Run("GetAdjustIncrementActivityDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + obj.AdjustIncrementActivityDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetAdjustIncrementActivityDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetAdjustIncrementActivityDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivity + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAdjustIncrementActivityDetails() // Should return zero value + }) + + t.Run("GetAdjustDecrementActivityDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var expected *GiftCardActivityAdjustDecrement + obj.AdjustDecrementActivityDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAdjustDecrementActivityDetails(), "getter should return the property value") + }) + + t.Run("GetAdjustDecrementActivityDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + obj.AdjustDecrementActivityDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetAdjustDecrementActivityDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetAdjustDecrementActivityDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivity + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAdjustDecrementActivityDetails() // Should return zero value + }) + + t.Run("GetRefundActivityDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var expected *GiftCardActivityRefund + obj.RefundActivityDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRefundActivityDetails(), "getter should return the property value") + }) + + t.Run("GetRefundActivityDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + obj.RefundActivityDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetRefundActivityDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetRefundActivityDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivity + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRefundActivityDetails() // Should return zero value + }) + + t.Run("GetUnlinkedActivityRefundActivityDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var expected *GiftCardActivityUnlinkedActivityRefund + obj.UnlinkedActivityRefundActivityDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUnlinkedActivityRefundActivityDetails(), "getter should return the property value") + }) + + t.Run("GetUnlinkedActivityRefundActivityDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + obj.UnlinkedActivityRefundActivityDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetUnlinkedActivityRefundActivityDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetUnlinkedActivityRefundActivityDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivity + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUnlinkedActivityRefundActivityDetails() // Should return zero value + }) + + t.Run("GetImportActivityDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var expected *GiftCardActivityImport + obj.ImportActivityDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImportActivityDetails(), "getter should return the property value") + }) + + t.Run("GetImportActivityDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + obj.ImportActivityDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetImportActivityDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetImportActivityDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivity + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImportActivityDetails() // Should return zero value + }) + + t.Run("GetBlockActivityDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var expected *GiftCardActivityBlock + obj.BlockActivityDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBlockActivityDetails(), "getter should return the property value") + }) + + t.Run("GetBlockActivityDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + obj.BlockActivityDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetBlockActivityDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetBlockActivityDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivity + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBlockActivityDetails() // Should return zero value + }) + + t.Run("GetUnblockActivityDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var expected *GiftCardActivityUnblock + obj.UnblockActivityDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUnblockActivityDetails(), "getter should return the property value") + }) + + t.Run("GetUnblockActivityDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + obj.UnblockActivityDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetUnblockActivityDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetUnblockActivityDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivity + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUnblockActivityDetails() // Should return zero value + }) + + t.Run("GetImportReversalActivityDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var expected *GiftCardActivityImportReversal + obj.ImportReversalActivityDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImportReversalActivityDetails(), "getter should return the property value") + }) + + t.Run("GetImportReversalActivityDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + obj.ImportReversalActivityDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetImportReversalActivityDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetImportReversalActivityDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivity + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImportReversalActivityDetails() // Should return zero value + }) + + t.Run("GetTransferBalanceToActivityDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var expected *GiftCardActivityTransferBalanceTo + obj.TransferBalanceToActivityDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTransferBalanceToActivityDetails(), "getter should return the property value") + }) + + t.Run("GetTransferBalanceToActivityDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + obj.TransferBalanceToActivityDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetTransferBalanceToActivityDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetTransferBalanceToActivityDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivity + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTransferBalanceToActivityDetails() // Should return zero value + }) + + t.Run("GetTransferBalanceFromActivityDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var expected *GiftCardActivityTransferBalanceFrom + obj.TransferBalanceFromActivityDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTransferBalanceFromActivityDetails(), "getter should return the property value") + }) + + t.Run("GetTransferBalanceFromActivityDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + obj.TransferBalanceFromActivityDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetTransferBalanceFromActivityDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetTransferBalanceFromActivityDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivity + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTransferBalanceFromActivityDetails() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardActivity(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var fernTestValueType GiftCardActivityType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGiftCardID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var fernTestValueGiftCardID *string + + // Act + obj.SetGiftCardID(fernTestValueGiftCardID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGiftCardGan_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var fernTestValueGiftCardGan *string + + // Act + obj.SetGiftCardGan(fernTestValueGiftCardGan) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGiftCardBalanceMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var fernTestValueGiftCardBalanceMoney *Money + + // Act + obj.SetGiftCardBalanceMoney(fernTestValueGiftCardBalanceMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLoadActivityDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var fernTestValueLoadActivityDetails *GiftCardActivityLoad + + // Act + obj.SetLoadActivityDetails(fernTestValueLoadActivityDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetActivateActivityDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var fernTestValueActivateActivityDetails *GiftCardActivityActivate + + // Act + obj.SetActivateActivityDetails(fernTestValueActivateActivityDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRedeemActivityDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var fernTestValueRedeemActivityDetails *GiftCardActivityRedeem + + // Act + obj.SetRedeemActivityDetails(fernTestValueRedeemActivityDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetClearBalanceActivityDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var fernTestValueClearBalanceActivityDetails *GiftCardActivityClearBalance + + // Act + obj.SetClearBalanceActivityDetails(fernTestValueClearBalanceActivityDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeactivateActivityDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var fernTestValueDeactivateActivityDetails *GiftCardActivityDeactivate + + // Act + obj.SetDeactivateActivityDetails(fernTestValueDeactivateActivityDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAdjustIncrementActivityDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var fernTestValueAdjustIncrementActivityDetails *GiftCardActivityAdjustIncrement + + // Act + obj.SetAdjustIncrementActivityDetails(fernTestValueAdjustIncrementActivityDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAdjustDecrementActivityDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var fernTestValueAdjustDecrementActivityDetails *GiftCardActivityAdjustDecrement + + // Act + obj.SetAdjustDecrementActivityDetails(fernTestValueAdjustDecrementActivityDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRefundActivityDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var fernTestValueRefundActivityDetails *GiftCardActivityRefund + + // Act + obj.SetRefundActivityDetails(fernTestValueRefundActivityDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUnlinkedActivityRefundActivityDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var fernTestValueUnlinkedActivityRefundActivityDetails *GiftCardActivityUnlinkedActivityRefund + + // Act + obj.SetUnlinkedActivityRefundActivityDetails(fernTestValueUnlinkedActivityRefundActivityDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImportActivityDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var fernTestValueImportActivityDetails *GiftCardActivityImport + + // Act + obj.SetImportActivityDetails(fernTestValueImportActivityDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBlockActivityDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var fernTestValueBlockActivityDetails *GiftCardActivityBlock + + // Act + obj.SetBlockActivityDetails(fernTestValueBlockActivityDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUnblockActivityDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var fernTestValueUnblockActivityDetails *GiftCardActivityUnblock + + // Act + obj.SetUnblockActivityDetails(fernTestValueUnblockActivityDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImportReversalActivityDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var fernTestValueImportReversalActivityDetails *GiftCardActivityImportReversal + + // Act + obj.SetImportReversalActivityDetails(fernTestValueImportReversalActivityDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTransferBalanceToActivityDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var fernTestValueTransferBalanceToActivityDetails *GiftCardActivityTransferBalanceTo + + // Act + obj.SetTransferBalanceToActivityDetails(fernTestValueTransferBalanceToActivityDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTransferBalanceFromActivityDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + var fernTestValueTransferBalanceFromActivityDetails *GiftCardActivityTransferBalanceFrom + + // Act + obj.SetTransferBalanceFromActivityDetails(fernTestValueTransferBalanceFromActivityDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardActivityActivate(t *testing.T) { + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &GiftCardActivityActivate{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrderID", func(t *testing.T) { + obj := &GiftCardActivityActivate{} + var fernTestValueOrderID *string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLineItemUID", func(t *testing.T) { + obj := &GiftCardActivityActivate{} + var fernTestValueLineItemUID *string + obj.SetLineItemUID(fernTestValueLineItemUID) + assert.Equal(t, fernTestValueLineItemUID, obj.LineItemUID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReferenceID", func(t *testing.T) { + obj := &GiftCardActivityActivate{} + var fernTestValueReferenceID *string + obj.SetReferenceID(fernTestValueReferenceID) + assert.Equal(t, fernTestValueReferenceID, obj.ReferenceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBuyerPaymentInstrumentIDs", func(t *testing.T) { + obj := &GiftCardActivityActivate{} + var fernTestValueBuyerPaymentInstrumentIDs []string + obj.SetBuyerPaymentInstrumentIDs(fernTestValueBuyerPaymentInstrumentIDs) + assert.Equal(t, fernTestValueBuyerPaymentInstrumentIDs, obj.BuyerPaymentInstrumentIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardActivityActivate(t *testing.T) { + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityActivate{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityActivate{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityActivate + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + + t.Run("GetOrderID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityActivate{} + var expected *string + obj.OrderID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderID(), "getter should return the property value") + }) + + t.Run("GetOrderID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityActivate{} + obj.OrderID = nil + + // Act & Assert + assert.Nil(t, obj.GetOrderID(), "getter should return nil when property is nil") + }) + + t.Run("GetOrderID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityActivate + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderID() // Should return zero value + }) + + t.Run("GetLineItemUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityActivate{} + var expected *string + obj.LineItemUID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLineItemUID(), "getter should return the property value") + }) + + t.Run("GetLineItemUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityActivate{} + obj.LineItemUID = nil + + // Act & Assert + assert.Nil(t, obj.GetLineItemUID(), "getter should return nil when property is nil") + }) + + t.Run("GetLineItemUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityActivate + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLineItemUID() // Should return zero value + }) + + t.Run("GetReferenceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityActivate{} + var expected *string + obj.ReferenceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReferenceID(), "getter should return the property value") + }) + + t.Run("GetReferenceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityActivate{} + obj.ReferenceID = nil + + // Act & Assert + assert.Nil(t, obj.GetReferenceID(), "getter should return nil when property is nil") + }) + + t.Run("GetReferenceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityActivate + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReferenceID() // Should return zero value + }) + + t.Run("GetBuyerPaymentInstrumentIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityActivate{} + var expected []string + obj.BuyerPaymentInstrumentIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBuyerPaymentInstrumentIDs(), "getter should return the property value") + }) + + t.Run("GetBuyerPaymentInstrumentIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityActivate{} + obj.BuyerPaymentInstrumentIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetBuyerPaymentInstrumentIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetBuyerPaymentInstrumentIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityActivate + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBuyerPaymentInstrumentIDs() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardActivityActivate(t *testing.T) { + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityActivate{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityActivate{} + var fernTestValueOrderID *string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLineItemUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityActivate{} + var fernTestValueLineItemUID *string + + // Act + obj.SetLineItemUID(fernTestValueLineItemUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReferenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityActivate{} + var fernTestValueReferenceID *string + + // Act + obj.SetReferenceID(fernTestValueReferenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBuyerPaymentInstrumentIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityActivate{} + var fernTestValueBuyerPaymentInstrumentIDs []string + + // Act + obj.SetBuyerPaymentInstrumentIDs(fernTestValueBuyerPaymentInstrumentIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardActivityAdjustDecrement(t *testing.T) { + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &GiftCardActivityAdjustDecrement{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReason", func(t *testing.T) { + obj := &GiftCardActivityAdjustDecrement{} + var fernTestValueReason GiftCardActivityAdjustDecrementReason + obj.SetReason(fernTestValueReason) + assert.Equal(t, fernTestValueReason, obj.Reason) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardActivityAdjustDecrement(t *testing.T) { + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityAdjustDecrement{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityAdjustDecrement{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityAdjustDecrement + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + + t.Run("GetReason", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityAdjustDecrement{} + var expected GiftCardActivityAdjustDecrementReason + obj.Reason = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReason(), "getter should return the property value") + }) + + t.Run("GetReason_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityAdjustDecrement + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReason() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardActivityAdjustDecrement(t *testing.T) { + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityAdjustDecrement{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReason_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityAdjustDecrement{} + var fernTestValueReason GiftCardActivityAdjustDecrementReason + + // Act + obj.SetReason(fernTestValueReason) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardActivityAdjustIncrement(t *testing.T) { + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &GiftCardActivityAdjustIncrement{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReason", func(t *testing.T) { + obj := &GiftCardActivityAdjustIncrement{} + var fernTestValueReason GiftCardActivityAdjustIncrementReason + obj.SetReason(fernTestValueReason) + assert.Equal(t, fernTestValueReason, obj.Reason) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardActivityAdjustIncrement(t *testing.T) { + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityAdjustIncrement{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityAdjustIncrement{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityAdjustIncrement + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + + t.Run("GetReason", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityAdjustIncrement{} + var expected GiftCardActivityAdjustIncrementReason + obj.Reason = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReason(), "getter should return the property value") + }) + + t.Run("GetReason_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityAdjustIncrement + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReason() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardActivityAdjustIncrement(t *testing.T) { + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityAdjustIncrement{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReason_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityAdjustIncrement{} + var fernTestValueReason GiftCardActivityAdjustIncrementReason + + // Act + obj.SetReason(fernTestValueReason) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardActivityClearBalance(t *testing.T) { + t.Run("SetReason", func(t *testing.T) { + obj := &GiftCardActivityClearBalance{} + var fernTestValueReason GiftCardActivityClearBalanceReason + obj.SetReason(fernTestValueReason) + assert.Equal(t, fernTestValueReason, obj.Reason) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardActivityClearBalance(t *testing.T) { + t.Run("GetReason", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityClearBalance{} + var expected GiftCardActivityClearBalanceReason + obj.Reason = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReason(), "getter should return the property value") + }) + + t.Run("GetReason_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityClearBalance + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReason() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardActivityClearBalance(t *testing.T) { + t.Run("SetReason_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityClearBalance{} + var fernTestValueReason GiftCardActivityClearBalanceReason + + // Act + obj.SetReason(fernTestValueReason) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardActivityCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &GiftCardActivityCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &GiftCardActivityCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &GiftCardActivityCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &GiftCardActivityCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &GiftCardActivityCreatedEvent{} + var fernTestValueData *GiftCardActivityCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardActivityCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEvent{} + var expected *GiftCardActivityCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardActivityCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEvent{} + var fernTestValueData *GiftCardActivityCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardActivityCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &GiftCardActivityCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &GiftCardActivityCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &GiftCardActivityCreatedEventData{} + var fernTestValueObject *GiftCardActivityCreatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardActivityCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEventData{} + var expected *GiftCardActivityCreatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardActivityCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEventData{} + var fernTestValueObject *GiftCardActivityCreatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardActivityCreatedEventObject(t *testing.T) { + t.Run("SetGiftCardActivity", func(t *testing.T) { + obj := &GiftCardActivityCreatedEventObject{} + var fernTestValueGiftCardActivity *GiftCardActivity + obj.SetGiftCardActivity(fernTestValueGiftCardActivity) + assert.Equal(t, fernTestValueGiftCardActivity, obj.GiftCardActivity) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardActivityCreatedEventObject(t *testing.T) { + t.Run("GetGiftCardActivity", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEventObject{} + var expected *GiftCardActivity + obj.GiftCardActivity = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGiftCardActivity(), "getter should return the property value") + }) + + t.Run("GetGiftCardActivity_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEventObject{} + obj.GiftCardActivity = nil + + // Act & Assert + assert.Nil(t, obj.GetGiftCardActivity(), "getter should return nil when property is nil") + }) + + t.Run("GetGiftCardActivity_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityCreatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGiftCardActivity() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardActivityCreatedEventObject(t *testing.T) { + t.Run("SetGiftCardActivity_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEventObject{} + var fernTestValueGiftCardActivity *GiftCardActivity + + // Act + obj.SetGiftCardActivity(fernTestValueGiftCardActivity) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardActivityDeactivate(t *testing.T) { + t.Run("SetReason", func(t *testing.T) { + obj := &GiftCardActivityDeactivate{} + var fernTestValueReason GiftCardActivityDeactivateReason + obj.SetReason(fernTestValueReason) + assert.Equal(t, fernTestValueReason, obj.Reason) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardActivityDeactivate(t *testing.T) { + t.Run("GetReason", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityDeactivate{} + var expected GiftCardActivityDeactivateReason + obj.Reason = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReason(), "getter should return the property value") + }) + + t.Run("GetReason_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityDeactivate + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReason() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardActivityDeactivate(t *testing.T) { + t.Run("SetReason_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityDeactivate{} + var fernTestValueReason GiftCardActivityDeactivateReason + + // Act + obj.SetReason(fernTestValueReason) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardActivityImport(t *testing.T) { + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &GiftCardActivityImport{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardActivityImport(t *testing.T) { + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityImport{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityImport{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityImport + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardActivityImport(t *testing.T) { + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityImport{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardActivityImportReversal(t *testing.T) { + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &GiftCardActivityImportReversal{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardActivityImportReversal(t *testing.T) { + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityImportReversal{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityImportReversal{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityImportReversal + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardActivityImportReversal(t *testing.T) { + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityImportReversal{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardActivityLoad(t *testing.T) { + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &GiftCardActivityLoad{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrderID", func(t *testing.T) { + obj := &GiftCardActivityLoad{} + var fernTestValueOrderID *string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLineItemUID", func(t *testing.T) { + obj := &GiftCardActivityLoad{} + var fernTestValueLineItemUID *string + obj.SetLineItemUID(fernTestValueLineItemUID) + assert.Equal(t, fernTestValueLineItemUID, obj.LineItemUID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReferenceID", func(t *testing.T) { + obj := &GiftCardActivityLoad{} + var fernTestValueReferenceID *string + obj.SetReferenceID(fernTestValueReferenceID) + assert.Equal(t, fernTestValueReferenceID, obj.ReferenceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBuyerPaymentInstrumentIDs", func(t *testing.T) { + obj := &GiftCardActivityLoad{} + var fernTestValueBuyerPaymentInstrumentIDs []string + obj.SetBuyerPaymentInstrumentIDs(fernTestValueBuyerPaymentInstrumentIDs) + assert.Equal(t, fernTestValueBuyerPaymentInstrumentIDs, obj.BuyerPaymentInstrumentIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardActivityLoad(t *testing.T) { + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityLoad{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityLoad{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityLoad + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + + t.Run("GetOrderID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityLoad{} + var expected *string + obj.OrderID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderID(), "getter should return the property value") + }) + + t.Run("GetOrderID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityLoad{} + obj.OrderID = nil + + // Act & Assert + assert.Nil(t, obj.GetOrderID(), "getter should return nil when property is nil") + }) + + t.Run("GetOrderID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityLoad + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderID() // Should return zero value + }) + + t.Run("GetLineItemUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityLoad{} + var expected *string + obj.LineItemUID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLineItemUID(), "getter should return the property value") + }) + + t.Run("GetLineItemUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityLoad{} + obj.LineItemUID = nil + + // Act & Assert + assert.Nil(t, obj.GetLineItemUID(), "getter should return nil when property is nil") + }) + + t.Run("GetLineItemUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityLoad + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLineItemUID() // Should return zero value + }) + + t.Run("GetReferenceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityLoad{} + var expected *string + obj.ReferenceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReferenceID(), "getter should return the property value") + }) + + t.Run("GetReferenceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityLoad{} + obj.ReferenceID = nil + + // Act & Assert + assert.Nil(t, obj.GetReferenceID(), "getter should return nil when property is nil") + }) + + t.Run("GetReferenceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityLoad + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReferenceID() // Should return zero value + }) + + t.Run("GetBuyerPaymentInstrumentIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityLoad{} + var expected []string + obj.BuyerPaymentInstrumentIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBuyerPaymentInstrumentIDs(), "getter should return the property value") + }) + + t.Run("GetBuyerPaymentInstrumentIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityLoad{} + obj.BuyerPaymentInstrumentIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetBuyerPaymentInstrumentIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetBuyerPaymentInstrumentIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityLoad + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBuyerPaymentInstrumentIDs() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardActivityLoad(t *testing.T) { + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityLoad{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityLoad{} + var fernTestValueOrderID *string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLineItemUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityLoad{} + var fernTestValueLineItemUID *string + + // Act + obj.SetLineItemUID(fernTestValueLineItemUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReferenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityLoad{} + var fernTestValueReferenceID *string + + // Act + obj.SetReferenceID(fernTestValueReferenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBuyerPaymentInstrumentIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityLoad{} + var fernTestValueBuyerPaymentInstrumentIDs []string + + // Act + obj.SetBuyerPaymentInstrumentIDs(fernTestValueBuyerPaymentInstrumentIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardActivityRedeem(t *testing.T) { + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &GiftCardActivityRedeem{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPaymentID", func(t *testing.T) { + obj := &GiftCardActivityRedeem{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReferenceID", func(t *testing.T) { + obj := &GiftCardActivityRedeem{} + var fernTestValueReferenceID *string + obj.SetReferenceID(fernTestValueReferenceID) + assert.Equal(t, fernTestValueReferenceID, obj.ReferenceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &GiftCardActivityRedeem{} + var fernTestValueStatus *GiftCardActivityRedeemStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardActivityRedeem(t *testing.T) { + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityRedeem{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityRedeem{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityRedeem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityRedeem{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityRedeem{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityRedeem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + + t.Run("GetReferenceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityRedeem{} + var expected *string + obj.ReferenceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReferenceID(), "getter should return the property value") + }) + + t.Run("GetReferenceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityRedeem{} + obj.ReferenceID = nil + + // Act & Assert + assert.Nil(t, obj.GetReferenceID(), "getter should return nil when property is nil") + }) + + t.Run("GetReferenceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityRedeem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReferenceID() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityRedeem{} + var expected *GiftCardActivityRedeemStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityRedeem{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityRedeem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardActivityRedeem(t *testing.T) { + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityRedeem{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityRedeem{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReferenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityRedeem{} + var fernTestValueReferenceID *string + + // Act + obj.SetReferenceID(fernTestValueReferenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityRedeem{} + var fernTestValueStatus *GiftCardActivityRedeemStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardActivityRefund(t *testing.T) { + t.Run("SetRedeemActivityID", func(t *testing.T) { + obj := &GiftCardActivityRefund{} + var fernTestValueRedeemActivityID *string + obj.SetRedeemActivityID(fernTestValueRedeemActivityID) + assert.Equal(t, fernTestValueRedeemActivityID, obj.RedeemActivityID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &GiftCardActivityRefund{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReferenceID", func(t *testing.T) { + obj := &GiftCardActivityRefund{} + var fernTestValueReferenceID *string + obj.SetReferenceID(fernTestValueReferenceID) + assert.Equal(t, fernTestValueReferenceID, obj.ReferenceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPaymentID", func(t *testing.T) { + obj := &GiftCardActivityRefund{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardActivityRefund(t *testing.T) { + t.Run("GetRedeemActivityID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityRefund{} + var expected *string + obj.RedeemActivityID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRedeemActivityID(), "getter should return the property value") + }) + + t.Run("GetRedeemActivityID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityRefund{} + obj.RedeemActivityID = nil + + // Act & Assert + assert.Nil(t, obj.GetRedeemActivityID(), "getter should return nil when property is nil") + }) + + t.Run("GetRedeemActivityID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRedeemActivityID() // Should return zero value + }) + + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityRefund{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityRefund{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + + t.Run("GetReferenceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityRefund{} + var expected *string + obj.ReferenceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReferenceID(), "getter should return the property value") + }) + + t.Run("GetReferenceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityRefund{} + obj.ReferenceID = nil + + // Act & Assert + assert.Nil(t, obj.GetReferenceID(), "getter should return nil when property is nil") + }) + + t.Run("GetReferenceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReferenceID() // Should return zero value + }) + + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityRefund{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityRefund{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardActivityRefund(t *testing.T) { + t.Run("SetRedeemActivityID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityRefund{} + var fernTestValueRedeemActivityID *string + + // Act + obj.SetRedeemActivityID(fernTestValueRedeemActivityID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityRefund{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReferenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityRefund{} + var fernTestValueReferenceID *string + + // Act + obj.SetReferenceID(fernTestValueReferenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityRefund{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardActivityTransferBalanceFrom(t *testing.T) { + t.Run("SetTransferToGiftCardID", func(t *testing.T) { + obj := &GiftCardActivityTransferBalanceFrom{} + var fernTestValueTransferToGiftCardID string + obj.SetTransferToGiftCardID(fernTestValueTransferToGiftCardID) + assert.Equal(t, fernTestValueTransferToGiftCardID, obj.TransferToGiftCardID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &GiftCardActivityTransferBalanceFrom{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardActivityTransferBalanceFrom(t *testing.T) { + t.Run("GetTransferToGiftCardID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityTransferBalanceFrom{} + var expected string + obj.TransferToGiftCardID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTransferToGiftCardID(), "getter should return the property value") + }) + + t.Run("GetTransferToGiftCardID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityTransferBalanceFrom + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTransferToGiftCardID() // Should return zero value + }) + + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityTransferBalanceFrom{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityTransferBalanceFrom{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityTransferBalanceFrom + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardActivityTransferBalanceFrom(t *testing.T) { + t.Run("SetTransferToGiftCardID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityTransferBalanceFrom{} + var fernTestValueTransferToGiftCardID string + + // Act + obj.SetTransferToGiftCardID(fernTestValueTransferToGiftCardID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityTransferBalanceFrom{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardActivityTransferBalanceTo(t *testing.T) { + t.Run("SetTransferFromGiftCardID", func(t *testing.T) { + obj := &GiftCardActivityTransferBalanceTo{} + var fernTestValueTransferFromGiftCardID string + obj.SetTransferFromGiftCardID(fernTestValueTransferFromGiftCardID) + assert.Equal(t, fernTestValueTransferFromGiftCardID, obj.TransferFromGiftCardID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &GiftCardActivityTransferBalanceTo{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardActivityTransferBalanceTo(t *testing.T) { + t.Run("GetTransferFromGiftCardID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityTransferBalanceTo{} + var expected string + obj.TransferFromGiftCardID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTransferFromGiftCardID(), "getter should return the property value") + }) + + t.Run("GetTransferFromGiftCardID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityTransferBalanceTo + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTransferFromGiftCardID() // Should return zero value + }) + + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityTransferBalanceTo{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityTransferBalanceTo{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityTransferBalanceTo + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardActivityTransferBalanceTo(t *testing.T) { + t.Run("SetTransferFromGiftCardID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityTransferBalanceTo{} + var fernTestValueTransferFromGiftCardID string + + // Act + obj.SetTransferFromGiftCardID(fernTestValueTransferFromGiftCardID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityTransferBalanceTo{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardActivityUnlinkedActivityRefund(t *testing.T) { + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &GiftCardActivityUnlinkedActivityRefund{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReferenceID", func(t *testing.T) { + obj := &GiftCardActivityUnlinkedActivityRefund{} + var fernTestValueReferenceID *string + obj.SetReferenceID(fernTestValueReferenceID) + assert.Equal(t, fernTestValueReferenceID, obj.ReferenceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPaymentID", func(t *testing.T) { + obj := &GiftCardActivityUnlinkedActivityRefund{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardActivityUnlinkedActivityRefund(t *testing.T) { + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUnlinkedActivityRefund{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUnlinkedActivityRefund{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityUnlinkedActivityRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + + t.Run("GetReferenceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUnlinkedActivityRefund{} + var expected *string + obj.ReferenceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReferenceID(), "getter should return the property value") + }) + + t.Run("GetReferenceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUnlinkedActivityRefund{} + obj.ReferenceID = nil + + // Act & Assert + assert.Nil(t, obj.GetReferenceID(), "getter should return nil when property is nil") + }) + + t.Run("GetReferenceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityUnlinkedActivityRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReferenceID() // Should return zero value + }) + + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUnlinkedActivityRefund{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUnlinkedActivityRefund{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityUnlinkedActivityRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardActivityUnlinkedActivityRefund(t *testing.T) { + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUnlinkedActivityRefund{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReferenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUnlinkedActivityRefund{} + var fernTestValueReferenceID *string + + // Act + obj.SetReferenceID(fernTestValueReferenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUnlinkedActivityRefund{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardActivityUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &GiftCardActivityUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &GiftCardActivityUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &GiftCardActivityUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &GiftCardActivityUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &GiftCardActivityUpdatedEvent{} + var fernTestValueData *GiftCardActivityUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardActivityUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEvent{} + var expected *GiftCardActivityUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardActivityUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEvent{} + var fernTestValueData *GiftCardActivityUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardActivityUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &GiftCardActivityUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &GiftCardActivityUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &GiftCardActivityUpdatedEventData{} + var fernTestValueObject *GiftCardActivityUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardActivityUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEventData{} + var expected *GiftCardActivityUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardActivityUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEventData{} + var fernTestValueObject *GiftCardActivityUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardActivityUpdatedEventObject(t *testing.T) { + t.Run("SetGiftCardActivity", func(t *testing.T) { + obj := &GiftCardActivityUpdatedEventObject{} + var fernTestValueGiftCardActivity *GiftCardActivity + obj.SetGiftCardActivity(fernTestValueGiftCardActivity) + assert.Equal(t, fernTestValueGiftCardActivity, obj.GiftCardActivity) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardActivityUpdatedEventObject(t *testing.T) { + t.Run("GetGiftCardActivity", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEventObject{} + var expected *GiftCardActivity + obj.GiftCardActivity = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGiftCardActivity(), "getter should return the property value") + }) + + t.Run("GetGiftCardActivity_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEventObject{} + obj.GiftCardActivity = nil + + // Act & Assert + assert.Nil(t, obj.GetGiftCardActivity(), "getter should return nil when property is nil") + }) + + t.Run("GetGiftCardActivity_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGiftCardActivity() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardActivityUpdatedEventObject(t *testing.T) { + t.Run("SetGiftCardActivity_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEventObject{} + var fernTestValueGiftCardActivity *GiftCardActivity + + // Act + obj.SetGiftCardActivity(fernTestValueGiftCardActivity) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &GiftCardCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &GiftCardCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &GiftCardCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &GiftCardCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &GiftCardCreatedEvent{} + var fernTestValueData *GiftCardCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEvent{} + var expected *GiftCardCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEvent{} + var fernTestValueData *GiftCardCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &GiftCardCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &GiftCardCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &GiftCardCreatedEventData{} + var fernTestValueObject *GiftCardCreatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEventData{} + var expected *GiftCardCreatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEventData{} + var fernTestValueObject *GiftCardCreatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardCreatedEventObject(t *testing.T) { + t.Run("SetGiftCard", func(t *testing.T) { + obj := &GiftCardCreatedEventObject{} + var fernTestValueGiftCard *GiftCard + obj.SetGiftCard(fernTestValueGiftCard) + assert.Equal(t, fernTestValueGiftCard, obj.GiftCard) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardCreatedEventObject(t *testing.T) { + t.Run("GetGiftCard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEventObject{} + var expected *GiftCard + obj.GiftCard = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGiftCard(), "getter should return the property value") + }) + + t.Run("GetGiftCard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEventObject{} + obj.GiftCard = nil + + // Act & Assert + assert.Nil(t, obj.GetGiftCard(), "getter should return nil when property is nil") + }) + + t.Run("GetGiftCard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCreatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGiftCard() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardCreatedEventObject(t *testing.T) { + t.Run("SetGiftCard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEventObject{} + var fernTestValueGiftCard *GiftCard + + // Act + obj.SetGiftCard(fernTestValueGiftCard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardCustomerLinkedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &GiftCardCustomerLinkedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &GiftCardCustomerLinkedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &GiftCardCustomerLinkedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &GiftCardCustomerLinkedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &GiftCardCustomerLinkedEvent{} + var fernTestValueData *GiftCardCustomerLinkedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardCustomerLinkedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerLinkedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerLinkedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerLinkedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerLinkedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEvent{} + var expected *GiftCardCustomerLinkedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerLinkedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardCustomerLinkedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEvent{} + var fernTestValueData *GiftCardCustomerLinkedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardCustomerLinkedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &GiftCardCustomerLinkedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &GiftCardCustomerLinkedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &GiftCardCustomerLinkedEventData{} + var fernTestValueObject *GiftCardCustomerLinkedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardCustomerLinkedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerLinkedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerLinkedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEventData{} + var expected *GiftCardCustomerLinkedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerLinkedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardCustomerLinkedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEventData{} + var fernTestValueObject *GiftCardCustomerLinkedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardCustomerLinkedEventObject(t *testing.T) { + t.Run("SetGiftCard", func(t *testing.T) { + obj := &GiftCardCustomerLinkedEventObject{} + var fernTestValueGiftCard *GiftCard + obj.SetGiftCard(fernTestValueGiftCard) + assert.Equal(t, fernTestValueGiftCard, obj.GiftCard) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLinkedCustomerID", func(t *testing.T) { + obj := &GiftCardCustomerLinkedEventObject{} + var fernTestValueLinkedCustomerID *string + obj.SetLinkedCustomerID(fernTestValueLinkedCustomerID) + assert.Equal(t, fernTestValueLinkedCustomerID, obj.LinkedCustomerID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardCustomerLinkedEventObject(t *testing.T) { + t.Run("GetGiftCard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEventObject{} + var expected *GiftCard + obj.GiftCard = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGiftCard(), "getter should return the property value") + }) + + t.Run("GetGiftCard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEventObject{} + obj.GiftCard = nil + + // Act & Assert + assert.Nil(t, obj.GetGiftCard(), "getter should return nil when property is nil") + }) + + t.Run("GetGiftCard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerLinkedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGiftCard() // Should return zero value + }) + + t.Run("GetLinkedCustomerID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEventObject{} + var expected *string + obj.LinkedCustomerID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLinkedCustomerID(), "getter should return the property value") + }) + + t.Run("GetLinkedCustomerID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEventObject{} + obj.LinkedCustomerID = nil + + // Act & Assert + assert.Nil(t, obj.GetLinkedCustomerID(), "getter should return nil when property is nil") + }) + + t.Run("GetLinkedCustomerID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerLinkedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLinkedCustomerID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardCustomerLinkedEventObject(t *testing.T) { + t.Run("SetGiftCard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEventObject{} + var fernTestValueGiftCard *GiftCard + + // Act + obj.SetGiftCard(fernTestValueGiftCard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLinkedCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEventObject{} + var fernTestValueLinkedCustomerID *string + + // Act + obj.SetLinkedCustomerID(fernTestValueLinkedCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardCustomerUnlinkedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &GiftCardCustomerUnlinkedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &GiftCardCustomerUnlinkedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &GiftCardCustomerUnlinkedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &GiftCardCustomerUnlinkedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &GiftCardCustomerUnlinkedEvent{} + var fernTestValueData *GiftCardCustomerUnlinkedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardCustomerUnlinkedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerUnlinkedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerUnlinkedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerUnlinkedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerUnlinkedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEvent{} + var expected *GiftCardCustomerUnlinkedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerUnlinkedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardCustomerUnlinkedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEvent{} + var fernTestValueData *GiftCardCustomerUnlinkedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardCustomerUnlinkedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &GiftCardCustomerUnlinkedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &GiftCardCustomerUnlinkedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &GiftCardCustomerUnlinkedEventData{} + var fernTestValueObject *GiftCardCustomerUnlinkedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardCustomerUnlinkedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerUnlinkedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerUnlinkedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEventData{} + var expected *GiftCardCustomerUnlinkedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerUnlinkedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardCustomerUnlinkedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEventData{} + var fernTestValueObject *GiftCardCustomerUnlinkedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardCustomerUnlinkedEventObject(t *testing.T) { + t.Run("SetGiftCard", func(t *testing.T) { + obj := &GiftCardCustomerUnlinkedEventObject{} + var fernTestValueGiftCard *GiftCard + obj.SetGiftCard(fernTestValueGiftCard) + assert.Equal(t, fernTestValueGiftCard, obj.GiftCard) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUnlinkedCustomerID", func(t *testing.T) { + obj := &GiftCardCustomerUnlinkedEventObject{} + var fernTestValueUnlinkedCustomerID *string + obj.SetUnlinkedCustomerID(fernTestValueUnlinkedCustomerID) + assert.Equal(t, fernTestValueUnlinkedCustomerID, obj.UnlinkedCustomerID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardCustomerUnlinkedEventObject(t *testing.T) { + t.Run("GetGiftCard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEventObject{} + var expected *GiftCard + obj.GiftCard = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGiftCard(), "getter should return the property value") + }) + + t.Run("GetGiftCard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEventObject{} + obj.GiftCard = nil + + // Act & Assert + assert.Nil(t, obj.GetGiftCard(), "getter should return nil when property is nil") + }) + + t.Run("GetGiftCard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerUnlinkedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGiftCard() // Should return zero value + }) + + t.Run("GetUnlinkedCustomerID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEventObject{} + var expected *string + obj.UnlinkedCustomerID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUnlinkedCustomerID(), "getter should return the property value") + }) + + t.Run("GetUnlinkedCustomerID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEventObject{} + obj.UnlinkedCustomerID = nil + + // Act & Assert + assert.Nil(t, obj.GetUnlinkedCustomerID(), "getter should return nil when property is nil") + }) + + t.Run("GetUnlinkedCustomerID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerUnlinkedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUnlinkedCustomerID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardCustomerUnlinkedEventObject(t *testing.T) { + t.Run("SetGiftCard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEventObject{} + var fernTestValueGiftCard *GiftCard + + // Act + obj.SetGiftCard(fernTestValueGiftCard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUnlinkedCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEventObject{} + var fernTestValueUnlinkedCustomerID *string + + // Act + obj.SetUnlinkedCustomerID(fernTestValueUnlinkedCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &GiftCardUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &GiftCardUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &GiftCardUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &GiftCardUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &GiftCardUpdatedEvent{} + var fernTestValueData *GiftCardUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEvent{} + var expected *GiftCardUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEvent{} + var fernTestValueData *GiftCardUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &GiftCardUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &GiftCardUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &GiftCardUpdatedEventData{} + var fernTestValueObject *GiftCardUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEventData{} + var expected *GiftCardUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEventData{} + var fernTestValueObject *GiftCardUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGiftCardUpdatedEventObject(t *testing.T) { + t.Run("SetGiftCard", func(t *testing.T) { + obj := &GiftCardUpdatedEventObject{} + var fernTestValueGiftCard *GiftCard + obj.SetGiftCard(fernTestValueGiftCard) + assert.Equal(t, fernTestValueGiftCard, obj.GiftCard) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGiftCardUpdatedEventObject(t *testing.T) { + t.Run("GetGiftCard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEventObject{} + var expected *GiftCard + obj.GiftCard = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGiftCard(), "getter should return the property value") + }) + + t.Run("GetGiftCard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEventObject{} + obj.GiftCard = nil + + // Act & Assert + assert.Nil(t, obj.GetGiftCard(), "getter should return nil when property is nil") + }) + + t.Run("GetGiftCard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGiftCard() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGiftCardUpdatedEventObject(t *testing.T) { + t.Run("SetGiftCard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEventObject{} + var fernTestValueGiftCard *GiftCard + + // Act + obj.SetGiftCard(fernTestValueGiftCard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInventoryCountUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &InventoryCountUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &InventoryCountUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &InventoryCountUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &InventoryCountUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &InventoryCountUpdatedEvent{} + var fernTestValueData *InventoryCountUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInventoryCountUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryCountUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryCountUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryCountUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryCountUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEvent{} + var expected *InventoryCountUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryCountUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInventoryCountUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEvent{} + var fernTestValueData *InventoryCountUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInventoryCountUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &InventoryCountUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &InventoryCountUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &InventoryCountUpdatedEventData{} + var fernTestValueObject *InventoryCountUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInventoryCountUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryCountUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryCountUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEventData{} + var expected *InventoryCountUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryCountUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInventoryCountUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEventData{} + var fernTestValueObject *InventoryCountUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInventoryCountUpdatedEventObject(t *testing.T) { + t.Run("SetInventoryCounts", func(t *testing.T) { + obj := &InventoryCountUpdatedEventObject{} + var fernTestValueInventoryCounts []*InventoryCount + obj.SetInventoryCounts(fernTestValueInventoryCounts) + assert.Equal(t, fernTestValueInventoryCounts, obj.InventoryCounts) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInventoryCountUpdatedEventObject(t *testing.T) { + t.Run("GetInventoryCounts", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEventObject{} + var expected []*InventoryCount + obj.InventoryCounts = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInventoryCounts(), "getter should return the property value") + }) + + t.Run("GetInventoryCounts_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEventObject{} + obj.InventoryCounts = nil + + // Act & Assert + assert.Nil(t, obj.GetInventoryCounts(), "getter should return nil when property is nil") + }) + + t.Run("GetInventoryCounts_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryCountUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInventoryCounts() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInventoryCountUpdatedEventObject(t *testing.T) { + t.Run("SetInventoryCounts_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEventObject{} + var fernTestValueInventoryCounts []*InventoryCount + + // Act + obj.SetInventoryCounts(fernTestValueInventoryCounts) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoiceCanceledEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &InvoiceCanceledEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &InvoiceCanceledEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &InvoiceCanceledEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &InvoiceCanceledEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &InvoiceCanceledEvent{} + var fernTestValueData *InvoiceCanceledEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoiceCanceledEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCanceledEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCanceledEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCanceledEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCanceledEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEvent{} + var expected *InvoiceCanceledEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCanceledEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoiceCanceledEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEvent{} + var fernTestValueData *InvoiceCanceledEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoiceCanceledEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &InvoiceCanceledEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &InvoiceCanceledEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &InvoiceCanceledEventData{} + var fernTestValueObject *InvoiceCanceledEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoiceCanceledEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCanceledEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCanceledEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEventData{} + var expected *InvoiceCanceledEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCanceledEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoiceCanceledEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEventData{} + var fernTestValueObject *InvoiceCanceledEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoiceCanceledEventObject(t *testing.T) { + t.Run("SetInvoice", func(t *testing.T) { + obj := &InvoiceCanceledEventObject{} + var fernTestValueInvoice *Invoice + obj.SetInvoice(fernTestValueInvoice) + assert.Equal(t, fernTestValueInvoice, obj.Invoice) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoiceCanceledEventObject(t *testing.T) { + t.Run("GetInvoice", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEventObject{} + var expected *Invoice + obj.Invoice = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInvoice(), "getter should return the property value") + }) + + t.Run("GetInvoice_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEventObject{} + obj.Invoice = nil + + // Act & Assert + assert.Nil(t, obj.GetInvoice(), "getter should return nil when property is nil") + }) + + t.Run("GetInvoice_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCanceledEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInvoice() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoiceCanceledEventObject(t *testing.T) { + t.Run("SetInvoice_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEventObject{} + var fernTestValueInvoice *Invoice + + // Act + obj.SetInvoice(fernTestValueInvoice) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoiceCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &InvoiceCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &InvoiceCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &InvoiceCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &InvoiceCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &InvoiceCreatedEvent{} + var fernTestValueData *InvoiceCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoiceCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEvent{} + var expected *InvoiceCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoiceCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEvent{} + var fernTestValueData *InvoiceCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoiceCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &InvoiceCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &InvoiceCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &InvoiceCreatedEventData{} + var fernTestValueObject *InvoiceCreatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoiceCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEventData{} + var expected *InvoiceCreatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoiceCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEventData{} + var fernTestValueObject *InvoiceCreatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoiceCreatedEventObject(t *testing.T) { + t.Run("SetInvoice", func(t *testing.T) { + obj := &InvoiceCreatedEventObject{} + var fernTestValueInvoice *Invoice + obj.SetInvoice(fernTestValueInvoice) + assert.Equal(t, fernTestValueInvoice, obj.Invoice) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoiceCreatedEventObject(t *testing.T) { + t.Run("GetInvoice", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEventObject{} + var expected *Invoice + obj.Invoice = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInvoice(), "getter should return the property value") + }) + + t.Run("GetInvoice_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEventObject{} + obj.Invoice = nil + + // Act & Assert + assert.Nil(t, obj.GetInvoice(), "getter should return nil when property is nil") + }) + + t.Run("GetInvoice_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCreatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInvoice() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoiceCreatedEventObject(t *testing.T) { + t.Run("SetInvoice_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEventObject{} + var fernTestValueInvoice *Invoice + + // Act + obj.SetInvoice(fernTestValueInvoice) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoiceDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &InvoiceDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &InvoiceDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &InvoiceDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &InvoiceDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &InvoiceDeletedEvent{} + var fernTestValueData *InvoiceDeletedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoiceDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceDeletedEvent{} + var expected *InvoiceDeletedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoiceDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceDeletedEvent{} + var fernTestValueData *InvoiceDeletedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoiceDeletedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &InvoiceDeletedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &InvoiceDeletedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeleted", func(t *testing.T) { + obj := &InvoiceDeletedEventData{} + var fernTestValueDeleted *bool + obj.SetDeleted(fernTestValueDeleted) + assert.Equal(t, fernTestValueDeleted, obj.Deleted) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoiceDeletedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceDeletedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceDeletedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceDeletedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceDeletedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceDeletedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceDeletedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetDeleted", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceDeletedEventData{} + var expected *bool + obj.Deleted = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeleted(), "getter should return the property value") + }) + + t.Run("GetDeleted_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceDeletedEventData{} + obj.Deleted = nil + + // Act & Assert + assert.Nil(t, obj.GetDeleted(), "getter should return nil when property is nil") + }) + + t.Run("GetDeleted_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceDeletedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeleted() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoiceDeletedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceDeletedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceDeletedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeleted_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceDeletedEventData{} + var fernTestValueDeleted *bool + + // Act + obj.SetDeleted(fernTestValueDeleted) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoicePaymentMadeEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &InvoicePaymentMadeEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &InvoicePaymentMadeEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &InvoicePaymentMadeEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &InvoicePaymentMadeEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &InvoicePaymentMadeEvent{} + var fernTestValueData *InvoicePaymentMadeEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoicePaymentMadeEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentMadeEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentMadeEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentMadeEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentMadeEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEvent{} + var expected *InvoicePaymentMadeEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentMadeEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoicePaymentMadeEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEvent{} + var fernTestValueData *InvoicePaymentMadeEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoicePaymentMadeEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &InvoicePaymentMadeEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &InvoicePaymentMadeEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &InvoicePaymentMadeEventData{} + var fernTestValueObject *InvoicePaymentMadeEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoicePaymentMadeEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentMadeEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentMadeEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEventData{} + var expected *InvoicePaymentMadeEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentMadeEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoicePaymentMadeEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEventData{} + var fernTestValueObject *InvoicePaymentMadeEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoicePaymentMadeEventObject(t *testing.T) { + t.Run("SetInvoice", func(t *testing.T) { + obj := &InvoicePaymentMadeEventObject{} + var fernTestValueInvoice *Invoice + obj.SetInvoice(fernTestValueInvoice) + assert.Equal(t, fernTestValueInvoice, obj.Invoice) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoicePaymentMadeEventObject(t *testing.T) { + t.Run("GetInvoice", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEventObject{} + var expected *Invoice + obj.Invoice = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInvoice(), "getter should return the property value") + }) + + t.Run("GetInvoice_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEventObject{} + obj.Invoice = nil + + // Act & Assert + assert.Nil(t, obj.GetInvoice(), "getter should return nil when property is nil") + }) + + t.Run("GetInvoice_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentMadeEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInvoice() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoicePaymentMadeEventObject(t *testing.T) { + t.Run("SetInvoice_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEventObject{} + var fernTestValueInvoice *Invoice + + // Act + obj.SetInvoice(fernTestValueInvoice) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoicePublishedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &InvoicePublishedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &InvoicePublishedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &InvoicePublishedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &InvoicePublishedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &InvoicePublishedEvent{} + var fernTestValueData *InvoicePublishedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoicePublishedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePublishedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePublishedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePublishedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePublishedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEvent{} + var expected *InvoicePublishedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePublishedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoicePublishedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEvent{} + var fernTestValueData *InvoicePublishedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoicePublishedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &InvoicePublishedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &InvoicePublishedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &InvoicePublishedEventData{} + var fernTestValueObject *InvoicePublishedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoicePublishedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePublishedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePublishedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEventData{} + var expected *InvoicePublishedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePublishedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoicePublishedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEventData{} + var fernTestValueObject *InvoicePublishedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoicePublishedEventObject(t *testing.T) { + t.Run("SetInvoice", func(t *testing.T) { + obj := &InvoicePublishedEventObject{} + var fernTestValueInvoice *Invoice + obj.SetInvoice(fernTestValueInvoice) + assert.Equal(t, fernTestValueInvoice, obj.Invoice) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoicePublishedEventObject(t *testing.T) { + t.Run("GetInvoice", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEventObject{} + var expected *Invoice + obj.Invoice = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInvoice(), "getter should return the property value") + }) + + t.Run("GetInvoice_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEventObject{} + obj.Invoice = nil + + // Act & Assert + assert.Nil(t, obj.GetInvoice(), "getter should return nil when property is nil") + }) + + t.Run("GetInvoice_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePublishedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInvoice() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoicePublishedEventObject(t *testing.T) { + t.Run("SetInvoice_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEventObject{} + var fernTestValueInvoice *Invoice + + // Act + obj.SetInvoice(fernTestValueInvoice) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoiceRefundedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &InvoiceRefundedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &InvoiceRefundedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &InvoiceRefundedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &InvoiceRefundedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &InvoiceRefundedEvent{} + var fernTestValueData *InvoiceRefundedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoiceRefundedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceRefundedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceRefundedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceRefundedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceRefundedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEvent{} + var expected *InvoiceRefundedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceRefundedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoiceRefundedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEvent{} + var fernTestValueData *InvoiceRefundedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoiceRefundedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &InvoiceRefundedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &InvoiceRefundedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &InvoiceRefundedEventData{} + var fernTestValueObject *InvoiceRefundedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoiceRefundedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceRefundedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceRefundedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEventData{} + var expected *InvoiceRefundedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceRefundedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoiceRefundedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEventData{} + var fernTestValueObject *InvoiceRefundedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoiceRefundedEventObject(t *testing.T) { + t.Run("SetInvoice", func(t *testing.T) { + obj := &InvoiceRefundedEventObject{} + var fernTestValueInvoice *Invoice + obj.SetInvoice(fernTestValueInvoice) + assert.Equal(t, fernTestValueInvoice, obj.Invoice) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoiceRefundedEventObject(t *testing.T) { + t.Run("GetInvoice", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEventObject{} + var expected *Invoice + obj.Invoice = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInvoice(), "getter should return the property value") + }) + + t.Run("GetInvoice_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEventObject{} + obj.Invoice = nil + + // Act & Assert + assert.Nil(t, obj.GetInvoice(), "getter should return nil when property is nil") + }) + + t.Run("GetInvoice_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceRefundedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInvoice() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoiceRefundedEventObject(t *testing.T) { + t.Run("SetInvoice_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEventObject{} + var fernTestValueInvoice *Invoice + + // Act + obj.SetInvoice(fernTestValueInvoice) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoiceScheduledChargeFailedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &InvoiceScheduledChargeFailedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &InvoiceScheduledChargeFailedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &InvoiceScheduledChargeFailedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &InvoiceScheduledChargeFailedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &InvoiceScheduledChargeFailedEvent{} + var fernTestValueData *InvoiceScheduledChargeFailedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoiceScheduledChargeFailedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceScheduledChargeFailedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceScheduledChargeFailedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceScheduledChargeFailedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceScheduledChargeFailedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEvent{} + var expected *InvoiceScheduledChargeFailedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceScheduledChargeFailedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoiceScheduledChargeFailedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEvent{} + var fernTestValueData *InvoiceScheduledChargeFailedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoiceScheduledChargeFailedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &InvoiceScheduledChargeFailedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &InvoiceScheduledChargeFailedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &InvoiceScheduledChargeFailedEventData{} + var fernTestValueObject *InvoiceScheduledChargeFailedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoiceScheduledChargeFailedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceScheduledChargeFailedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceScheduledChargeFailedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEventData{} + var expected *InvoiceScheduledChargeFailedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceScheduledChargeFailedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoiceScheduledChargeFailedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEventData{} + var fernTestValueObject *InvoiceScheduledChargeFailedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoiceScheduledChargeFailedEventObject(t *testing.T) { + t.Run("SetInvoice", func(t *testing.T) { + obj := &InvoiceScheduledChargeFailedEventObject{} + var fernTestValueInvoice *Invoice + obj.SetInvoice(fernTestValueInvoice) + assert.Equal(t, fernTestValueInvoice, obj.Invoice) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoiceScheduledChargeFailedEventObject(t *testing.T) { + t.Run("GetInvoice", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEventObject{} + var expected *Invoice + obj.Invoice = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInvoice(), "getter should return the property value") + }) + + t.Run("GetInvoice_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEventObject{} + obj.Invoice = nil + + // Act & Assert + assert.Nil(t, obj.GetInvoice(), "getter should return nil when property is nil") + }) + + t.Run("GetInvoice_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceScheduledChargeFailedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInvoice() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoiceScheduledChargeFailedEventObject(t *testing.T) { + t.Run("SetInvoice_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEventObject{} + var fernTestValueInvoice *Invoice + + // Act + obj.SetInvoice(fernTestValueInvoice) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoiceUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &InvoiceUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &InvoiceUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &InvoiceUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &InvoiceUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &InvoiceUpdatedEvent{} + var fernTestValueData *InvoiceUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoiceUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEvent{} + var expected *InvoiceUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoiceUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEvent{} + var fernTestValueData *InvoiceUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoiceUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &InvoiceUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &InvoiceUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &InvoiceUpdatedEventData{} + var fernTestValueObject *InvoiceUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoiceUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEventData{} + var expected *InvoiceUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoiceUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEventData{} + var fernTestValueObject *InvoiceUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersInvoiceUpdatedEventObject(t *testing.T) { + t.Run("SetInvoice", func(t *testing.T) { + obj := &InvoiceUpdatedEventObject{} + var fernTestValueInvoice *Invoice + obj.SetInvoice(fernTestValueInvoice) + assert.Equal(t, fernTestValueInvoice, obj.Invoice) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersInvoiceUpdatedEventObject(t *testing.T) { + t.Run("GetInvoice", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEventObject{} + var expected *Invoice + obj.Invoice = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInvoice(), "getter should return the property value") + }) + + t.Run("GetInvoice_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEventObject{} + obj.Invoice = nil + + // Act & Assert + assert.Nil(t, obj.GetInvoice(), "getter should return nil when property is nil") + }) + + t.Run("GetInvoice_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInvoice() // Should return zero value + }) + +} + +func TestSettersMarkExplicitInvoiceUpdatedEventObject(t *testing.T) { + t.Run("SetInvoice_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEventObject{} + var fernTestValueInvoice *Invoice + + // Act + obj.SetInvoice(fernTestValueInvoice) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersItemVariationLocationOverrides(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &ItemVariationLocationOverrides{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPriceMoney", func(t *testing.T) { + obj := &ItemVariationLocationOverrides{} + var fernTestValuePriceMoney *Money + obj.SetPriceMoney(fernTestValuePriceMoney) + assert.Equal(t, fernTestValuePriceMoney, obj.PriceMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPricingType", func(t *testing.T) { + obj := &ItemVariationLocationOverrides{} + var fernTestValuePricingType *CatalogPricingType + obj.SetPricingType(fernTestValuePricingType) + assert.Equal(t, fernTestValuePricingType, obj.PricingType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTrackInventory", func(t *testing.T) { + obj := &ItemVariationLocationOverrides{} + var fernTestValueTrackInventory *bool + obj.SetTrackInventory(fernTestValueTrackInventory) + assert.Equal(t, fernTestValueTrackInventory, obj.TrackInventory) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetInventoryAlertType", func(t *testing.T) { + obj := &ItemVariationLocationOverrides{} + var fernTestValueInventoryAlertType *InventoryAlertType + obj.SetInventoryAlertType(fernTestValueInventoryAlertType) + assert.Equal(t, fernTestValueInventoryAlertType, obj.InventoryAlertType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetInventoryAlertThreshold", func(t *testing.T) { + obj := &ItemVariationLocationOverrides{} + var fernTestValueInventoryAlertThreshold *int64 + obj.SetInventoryAlertThreshold(fernTestValueInventoryAlertThreshold) + assert.Equal(t, fernTestValueInventoryAlertThreshold, obj.InventoryAlertThreshold) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSoldOut", func(t *testing.T) { + obj := &ItemVariationLocationOverrides{} + var fernTestValueSoldOut *bool + obj.SetSoldOut(fernTestValueSoldOut) + assert.Equal(t, fernTestValueSoldOut, obj.SoldOut) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSoldOutValidUntil", func(t *testing.T) { + obj := &ItemVariationLocationOverrides{} + var fernTestValueSoldOutValidUntil *string + obj.SetSoldOutValidUntil(fernTestValueSoldOutValidUntil) + assert.Equal(t, fernTestValueSoldOutValidUntil, obj.SoldOutValidUntil) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersItemVariationLocationOverrides(t *testing.T) { + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ItemVariationLocationOverrides{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ItemVariationLocationOverrides{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ItemVariationLocationOverrides + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetPriceMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ItemVariationLocationOverrides{} + var expected *Money + obj.PriceMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPriceMoney(), "getter should return the property value") + }) + + t.Run("GetPriceMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ItemVariationLocationOverrides{} + obj.PriceMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetPriceMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetPriceMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ItemVariationLocationOverrides + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPriceMoney() // Should return zero value + }) + + t.Run("GetPricingType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ItemVariationLocationOverrides{} + var expected *CatalogPricingType + obj.PricingType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPricingType(), "getter should return the property value") + }) + + t.Run("GetPricingType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ItemVariationLocationOverrides{} + obj.PricingType = nil + + // Act & Assert + assert.Nil(t, obj.GetPricingType(), "getter should return nil when property is nil") + }) + + t.Run("GetPricingType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ItemVariationLocationOverrides + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPricingType() // Should return zero value + }) + + t.Run("GetTrackInventory", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ItemVariationLocationOverrides{} + var expected *bool + obj.TrackInventory = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTrackInventory(), "getter should return the property value") + }) + + t.Run("GetTrackInventory_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ItemVariationLocationOverrides{} + obj.TrackInventory = nil + + // Act & Assert + assert.Nil(t, obj.GetTrackInventory(), "getter should return nil when property is nil") + }) + + t.Run("GetTrackInventory_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ItemVariationLocationOverrides + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTrackInventory() // Should return zero value + }) + + t.Run("GetInventoryAlertType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ItemVariationLocationOverrides{} + var expected *InventoryAlertType + obj.InventoryAlertType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInventoryAlertType(), "getter should return the property value") + }) + + t.Run("GetInventoryAlertType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ItemVariationLocationOverrides{} + obj.InventoryAlertType = nil + + // Act & Assert + assert.Nil(t, obj.GetInventoryAlertType(), "getter should return nil when property is nil") + }) + + t.Run("GetInventoryAlertType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ItemVariationLocationOverrides + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInventoryAlertType() // Should return zero value + }) + + t.Run("GetInventoryAlertThreshold", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ItemVariationLocationOverrides{} + var expected *int64 + obj.InventoryAlertThreshold = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInventoryAlertThreshold(), "getter should return the property value") + }) + + t.Run("GetInventoryAlertThreshold_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ItemVariationLocationOverrides{} + obj.InventoryAlertThreshold = nil + + // Act & Assert + assert.Nil(t, obj.GetInventoryAlertThreshold(), "getter should return nil when property is nil") + }) + + t.Run("GetInventoryAlertThreshold_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ItemVariationLocationOverrides + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInventoryAlertThreshold() // Should return zero value + }) + + t.Run("GetSoldOut", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ItemVariationLocationOverrides{} + var expected *bool + obj.SoldOut = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSoldOut(), "getter should return the property value") + }) + + t.Run("GetSoldOut_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ItemVariationLocationOverrides{} + obj.SoldOut = nil + + // Act & Assert + assert.Nil(t, obj.GetSoldOut(), "getter should return nil when property is nil") + }) + + t.Run("GetSoldOut_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ItemVariationLocationOverrides + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSoldOut() // Should return zero value + }) + + t.Run("GetSoldOutValidUntil", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ItemVariationLocationOverrides{} + var expected *string + obj.SoldOutValidUntil = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSoldOutValidUntil(), "getter should return the property value") + }) + + t.Run("GetSoldOutValidUntil_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ItemVariationLocationOverrides{} + obj.SoldOutValidUntil = nil + + // Act & Assert + assert.Nil(t, obj.GetSoldOutValidUntil(), "getter should return nil when property is nil") + }) + + t.Run("GetSoldOutValidUntil_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ItemVariationLocationOverrides + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSoldOutValidUntil() // Should return zero value + }) + +} + +func TestSettersMarkExplicitItemVariationLocationOverrides(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ItemVariationLocationOverrides{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPriceMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ItemVariationLocationOverrides{} + var fernTestValuePriceMoney *Money + + // Act + obj.SetPriceMoney(fernTestValuePriceMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPricingType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ItemVariationLocationOverrides{} + var fernTestValuePricingType *CatalogPricingType + + // Act + obj.SetPricingType(fernTestValuePricingType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTrackInventory_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ItemVariationLocationOverrides{} + var fernTestValueTrackInventory *bool + + // Act + obj.SetTrackInventory(fernTestValueTrackInventory) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetInventoryAlertType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ItemVariationLocationOverrides{} + var fernTestValueInventoryAlertType *InventoryAlertType + + // Act + obj.SetInventoryAlertType(fernTestValueInventoryAlertType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetInventoryAlertThreshold_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ItemVariationLocationOverrides{} + var fernTestValueInventoryAlertThreshold *int64 + + // Act + obj.SetInventoryAlertThreshold(fernTestValueInventoryAlertThreshold) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSoldOut_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ItemVariationLocationOverrides{} + var fernTestValueSoldOut *bool + + // Act + obj.SetSoldOut(fernTestValueSoldOut) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSoldOutValidUntil_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ItemVariationLocationOverrides{} + var fernTestValueSoldOutValidUntil *string + + // Act + obj.SetSoldOutValidUntil(fernTestValueSoldOutValidUntil) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersJobAssignment(t *testing.T) { + t.Run("SetJobTitle", func(t *testing.T) { + obj := &JobAssignment{} + var fernTestValueJobTitle *string + obj.SetJobTitle(fernTestValueJobTitle) + assert.Equal(t, fernTestValueJobTitle, obj.JobTitle) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPayType", func(t *testing.T) { + obj := &JobAssignment{} + var fernTestValuePayType JobAssignmentPayType + obj.SetPayType(fernTestValuePayType) + assert.Equal(t, fernTestValuePayType, obj.PayType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetHourlyRate", func(t *testing.T) { + obj := &JobAssignment{} + var fernTestValueHourlyRate *Money + obj.SetHourlyRate(fernTestValueHourlyRate) + assert.Equal(t, fernTestValueHourlyRate, obj.HourlyRate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAnnualRate", func(t *testing.T) { + obj := &JobAssignment{} + var fernTestValueAnnualRate *Money + obj.SetAnnualRate(fernTestValueAnnualRate) + assert.Equal(t, fernTestValueAnnualRate, obj.AnnualRate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetWeeklyHours", func(t *testing.T) { + obj := &JobAssignment{} + var fernTestValueWeeklyHours *int + obj.SetWeeklyHours(fernTestValueWeeklyHours) + assert.Equal(t, fernTestValueWeeklyHours, obj.WeeklyHours) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetJobID", func(t *testing.T) { + obj := &JobAssignment{} + var fernTestValueJobID *string + obj.SetJobID(fernTestValueJobID) + assert.Equal(t, fernTestValueJobID, obj.JobID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersJobAssignment(t *testing.T) { + t.Run("GetJobTitle", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobAssignment{} + var expected *string + obj.JobTitle = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetJobTitle(), "getter should return the property value") + }) + + t.Run("GetJobTitle_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobAssignment{} + obj.JobTitle = nil + + // Act & Assert + assert.Nil(t, obj.GetJobTitle(), "getter should return nil when property is nil") + }) + + t.Run("GetJobTitle_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobAssignment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetJobTitle() // Should return zero value + }) + + t.Run("GetPayType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobAssignment{} + var expected JobAssignmentPayType + obj.PayType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPayType(), "getter should return the property value") + }) + + t.Run("GetPayType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobAssignment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPayType() // Should return zero value + }) + + t.Run("GetHourlyRate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobAssignment{} + var expected *Money + obj.HourlyRate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetHourlyRate(), "getter should return the property value") + }) + + t.Run("GetHourlyRate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobAssignment{} + obj.HourlyRate = nil + + // Act & Assert + assert.Nil(t, obj.GetHourlyRate(), "getter should return nil when property is nil") + }) + + t.Run("GetHourlyRate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobAssignment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetHourlyRate() // Should return zero value + }) + + t.Run("GetAnnualRate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobAssignment{} + var expected *Money + obj.AnnualRate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAnnualRate(), "getter should return the property value") + }) + + t.Run("GetAnnualRate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobAssignment{} + obj.AnnualRate = nil + + // Act & Assert + assert.Nil(t, obj.GetAnnualRate(), "getter should return nil when property is nil") + }) + + t.Run("GetAnnualRate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobAssignment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAnnualRate() // Should return zero value + }) + + t.Run("GetWeeklyHours", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobAssignment{} + var expected *int + obj.WeeklyHours = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetWeeklyHours(), "getter should return the property value") + }) + + t.Run("GetWeeklyHours_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobAssignment{} + obj.WeeklyHours = nil + + // Act & Assert + assert.Nil(t, obj.GetWeeklyHours(), "getter should return nil when property is nil") + }) + + t.Run("GetWeeklyHours_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobAssignment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetWeeklyHours() // Should return zero value + }) + + t.Run("GetJobID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobAssignment{} + var expected *string + obj.JobID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetJobID(), "getter should return the property value") + }) + + t.Run("GetJobID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobAssignment{} + obj.JobID = nil + + // Act & Assert + assert.Nil(t, obj.GetJobID(), "getter should return nil when property is nil") + }) + + t.Run("GetJobID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobAssignment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetJobID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitJobAssignment(t *testing.T) { + t.Run("SetJobTitle_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobAssignment{} + var fernTestValueJobTitle *string + + // Act + obj.SetJobTitle(fernTestValueJobTitle) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPayType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobAssignment{} + var fernTestValuePayType JobAssignmentPayType + + // Act + obj.SetPayType(fernTestValuePayType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetHourlyRate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobAssignment{} + var fernTestValueHourlyRate *Money + + // Act + obj.SetHourlyRate(fernTestValueHourlyRate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAnnualRate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobAssignment{} + var fernTestValueAnnualRate *Money + + // Act + obj.SetAnnualRate(fernTestValueAnnualRate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetWeeklyHours_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobAssignment{} + var fernTestValueWeeklyHours *int + + // Act + obj.SetWeeklyHours(fernTestValueWeeklyHours) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetJobID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobAssignment{} + var fernTestValueJobID *string + + // Act + obj.SetJobID(fernTestValueJobID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersJobCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &JobCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &JobCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &JobCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &JobCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &JobCreatedEvent{} + var fernTestValueData *JobCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersJobCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEvent{} + var expected *JobCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitJobCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEvent{} + var fernTestValueData *JobCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersJobCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &JobCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &JobCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &JobCreatedEventData{} + var fernTestValueObject *JobCreatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersJobCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEventData{} + var expected *JobCreatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitJobCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEventData{} + var fernTestValueObject *JobCreatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersJobCreatedEventObject(t *testing.T) { + t.Run("SetJob", func(t *testing.T) { + obj := &JobCreatedEventObject{} + var fernTestValueJob *Job + obj.SetJob(fernTestValueJob) + assert.Equal(t, fernTestValueJob, obj.Job) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersJobCreatedEventObject(t *testing.T) { + t.Run("GetJob", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEventObject{} + var expected *Job + obj.Job = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetJob(), "getter should return the property value") + }) + + t.Run("GetJob_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEventObject{} + obj.Job = nil + + // Act & Assert + assert.Nil(t, obj.GetJob(), "getter should return nil when property is nil") + }) + + t.Run("GetJob_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobCreatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetJob() // Should return zero value + }) + +} + +func TestSettersMarkExplicitJobCreatedEventObject(t *testing.T) { + t.Run("SetJob_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEventObject{} + var fernTestValueJob *Job + + // Act + obj.SetJob(fernTestValueJob) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersJobUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &JobUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &JobUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &JobUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &JobUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &JobUpdatedEvent{} + var fernTestValueData *JobUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersJobUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEvent{} + var expected *JobUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitJobUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEvent{} + var fernTestValueData *JobUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersJobUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &JobUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &JobUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &JobUpdatedEventData{} + var fernTestValueObject *JobUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersJobUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEventData{} + var expected *JobUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitJobUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEventData{} + var fernTestValueObject *JobUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersJobUpdatedEventObject(t *testing.T) { + t.Run("SetJob", func(t *testing.T) { + obj := &JobUpdatedEventObject{} + var fernTestValueJob *Job + obj.SetJob(fernTestValueJob) + assert.Equal(t, fernTestValueJob, obj.Job) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersJobUpdatedEventObject(t *testing.T) { + t.Run("GetJob", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEventObject{} + var expected *Job + obj.Job = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetJob(), "getter should return the property value") + }) + + t.Run("GetJob_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEventObject{} + obj.Job = nil + + // Act & Assert + assert.Nil(t, obj.GetJob(), "getter should return nil when property is nil") + }) + + t.Run("GetJob_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetJob() // Should return zero value + }) + +} + +func TestSettersMarkExplicitJobUpdatedEventObject(t *testing.T) { + t.Run("SetJob_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEventObject{} + var fernTestValueJob *Job + + // Act + obj.SetJob(fernTestValueJob) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLaborScheduledShiftCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LaborScheduledShiftCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &LaborScheduledShiftCreatedEvent{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LaborScheduledShiftCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LaborScheduledShiftCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LaborScheduledShiftCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LaborScheduledShiftCreatedEvent{} + var fernTestValueData *LaborScheduledShiftCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLaborScheduledShiftCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEvent{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEvent{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEvent{} + var expected *LaborScheduledShiftCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLaborScheduledShiftCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEvent{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEvent{} + var fernTestValueData *LaborScheduledShiftCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLaborScheduledShiftCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &LaborScheduledShiftCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &LaborScheduledShiftCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &LaborScheduledShiftCreatedEventData{} + var fernTestValueObject *LaborScheduledShiftCreatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLaborScheduledShiftCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEventData{} + var expected *LaborScheduledShiftCreatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLaborScheduledShiftCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEventData{} + var fernTestValueObject *LaborScheduledShiftCreatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLaborScheduledShiftCreatedEventObject(t *testing.T) { + t.Run("SetScheduledShift", func(t *testing.T) { + obj := &LaborScheduledShiftCreatedEventObject{} + var fernTestValueScheduledShift *ScheduledShift + obj.SetScheduledShift(fernTestValueScheduledShift) + assert.Equal(t, fernTestValueScheduledShift, obj.ScheduledShift) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLaborScheduledShiftCreatedEventObject(t *testing.T) { + t.Run("GetScheduledShift", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEventObject{} + var expected *ScheduledShift + obj.ScheduledShift = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetScheduledShift(), "getter should return the property value") + }) + + t.Run("GetScheduledShift_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEventObject{} + obj.ScheduledShift = nil + + // Act & Assert + assert.Nil(t, obj.GetScheduledShift(), "getter should return nil when property is nil") + }) + + t.Run("GetScheduledShift_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftCreatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetScheduledShift() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLaborScheduledShiftCreatedEventObject(t *testing.T) { + t.Run("SetScheduledShift_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEventObject{} + var fernTestValueScheduledShift *ScheduledShift + + // Act + obj.SetScheduledShift(fernTestValueScheduledShift) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLaborScheduledShiftDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LaborScheduledShiftDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &LaborScheduledShiftDeletedEvent{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LaborScheduledShiftDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LaborScheduledShiftDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LaborScheduledShiftDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LaborScheduledShiftDeletedEvent{} + var fernTestValueData *LaborScheduledShiftDeletedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLaborScheduledShiftDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEvent{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEvent{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEvent{} + var expected *LaborScheduledShiftDeletedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLaborScheduledShiftDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEvent{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEvent{} + var fernTestValueData *LaborScheduledShiftDeletedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLaborScheduledShiftDeletedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &LaborScheduledShiftDeletedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &LaborScheduledShiftDeletedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeleted", func(t *testing.T) { + obj := &LaborScheduledShiftDeletedEventData{} + var fernTestValueDeleted *bool + obj.SetDeleted(fernTestValueDeleted) + assert.Equal(t, fernTestValueDeleted, obj.Deleted) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLaborScheduledShiftDeletedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftDeletedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftDeletedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetDeleted", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEventData{} + var expected *bool + obj.Deleted = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeleted(), "getter should return the property value") + }) + + t.Run("GetDeleted_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEventData{} + obj.Deleted = nil + + // Act & Assert + assert.Nil(t, obj.GetDeleted(), "getter should return nil when property is nil") + }) + + t.Run("GetDeleted_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftDeletedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeleted() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLaborScheduledShiftDeletedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeleted_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEventData{} + var fernTestValueDeleted *bool + + // Act + obj.SetDeleted(fernTestValueDeleted) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLaborScheduledShiftPublishedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LaborScheduledShiftPublishedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &LaborScheduledShiftPublishedEvent{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LaborScheduledShiftPublishedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LaborScheduledShiftPublishedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LaborScheduledShiftPublishedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LaborScheduledShiftPublishedEvent{} + var fernTestValueData *LaborScheduledShiftPublishedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLaborScheduledShiftPublishedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftPublishedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEvent{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEvent{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftPublishedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftPublishedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftPublishedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftPublishedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEvent{} + var expected *LaborScheduledShiftPublishedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftPublishedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLaborScheduledShiftPublishedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEvent{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEvent{} + var fernTestValueData *LaborScheduledShiftPublishedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLaborScheduledShiftPublishedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &LaborScheduledShiftPublishedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &LaborScheduledShiftPublishedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &LaborScheduledShiftPublishedEventData{} + var fernTestValueObject *LaborScheduledShiftPublishedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLaborScheduledShiftPublishedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftPublishedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftPublishedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEventData{} + var expected *LaborScheduledShiftPublishedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftPublishedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLaborScheduledShiftPublishedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEventData{} + var fernTestValueObject *LaborScheduledShiftPublishedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLaborScheduledShiftPublishedEventObject(t *testing.T) { + t.Run("SetScheduledShift", func(t *testing.T) { + obj := &LaborScheduledShiftPublishedEventObject{} + var fernTestValueScheduledShift *ScheduledShift + obj.SetScheduledShift(fernTestValueScheduledShift) + assert.Equal(t, fernTestValueScheduledShift, obj.ScheduledShift) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLaborScheduledShiftPublishedEventObject(t *testing.T) { + t.Run("GetScheduledShift", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEventObject{} + var expected *ScheduledShift + obj.ScheduledShift = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetScheduledShift(), "getter should return the property value") + }) + + t.Run("GetScheduledShift_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEventObject{} + obj.ScheduledShift = nil + + // Act & Assert + assert.Nil(t, obj.GetScheduledShift(), "getter should return nil when property is nil") + }) + + t.Run("GetScheduledShift_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftPublishedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetScheduledShift() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLaborScheduledShiftPublishedEventObject(t *testing.T) { + t.Run("SetScheduledShift_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEventObject{} + var fernTestValueScheduledShift *ScheduledShift + + // Act + obj.SetScheduledShift(fernTestValueScheduledShift) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLaborScheduledShiftUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LaborScheduledShiftUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &LaborScheduledShiftUpdatedEvent{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LaborScheduledShiftUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LaborScheduledShiftUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LaborScheduledShiftUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LaborScheduledShiftUpdatedEvent{} + var fernTestValueData *LaborScheduledShiftUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLaborScheduledShiftUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEvent{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEvent{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEvent{} + var expected *LaborScheduledShiftUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLaborScheduledShiftUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEvent{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEvent{} + var fernTestValueData *LaborScheduledShiftUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLaborScheduledShiftUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &LaborScheduledShiftUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &LaborScheduledShiftUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &LaborScheduledShiftUpdatedEventData{} + var fernTestValueObject *LaborScheduledShiftUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLaborScheduledShiftUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEventData{} + var expected *LaborScheduledShiftUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLaborScheduledShiftUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEventData{} + var fernTestValueObject *LaborScheduledShiftUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLaborScheduledShiftUpdatedEventObject(t *testing.T) { + t.Run("SetScheduledShift", func(t *testing.T) { + obj := &LaborScheduledShiftUpdatedEventObject{} + var fernTestValueScheduledShift *ScheduledShift + obj.SetScheduledShift(fernTestValueScheduledShift) + assert.Equal(t, fernTestValueScheduledShift, obj.ScheduledShift) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLaborScheduledShiftUpdatedEventObject(t *testing.T) { + t.Run("GetScheduledShift", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEventObject{} + var expected *ScheduledShift + obj.ScheduledShift = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetScheduledShift(), "getter should return the property value") + }) + + t.Run("GetScheduledShift_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEventObject{} + obj.ScheduledShift = nil + + // Act & Assert + assert.Nil(t, obj.GetScheduledShift(), "getter should return nil when property is nil") + }) + + t.Run("GetScheduledShift_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetScheduledShift() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLaborScheduledShiftUpdatedEventObject(t *testing.T) { + t.Run("SetScheduledShift_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEventObject{} + var fernTestValueScheduledShift *ScheduledShift + + // Act + obj.SetScheduledShift(fernTestValueScheduledShift) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLaborShiftCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LaborShiftCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LaborShiftCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LaborShiftCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LaborShiftCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LaborShiftCreatedEvent{} + var fernTestValueData *LaborShiftCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLaborShiftCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEvent{} + var expected *LaborShiftCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLaborShiftCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEvent{} + var fernTestValueData *LaborShiftCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLaborShiftCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &LaborShiftCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &LaborShiftCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &LaborShiftCreatedEventData{} + var fernTestValueObject *LaborShiftCreatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLaborShiftCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEventData{} + var expected *LaborShiftCreatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLaborShiftCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEventData{} + var fernTestValueObject *LaborShiftCreatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLaborShiftCreatedEventObject(t *testing.T) { + t.Run("SetShift", func(t *testing.T) { + obj := &LaborShiftCreatedEventObject{} + var fernTestValueShift *Shift + obj.SetShift(fernTestValueShift) + assert.Equal(t, fernTestValueShift, obj.Shift) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLaborShiftCreatedEventObject(t *testing.T) { + t.Run("GetShift", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEventObject{} + var expected *Shift + obj.Shift = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetShift(), "getter should return the property value") + }) + + t.Run("GetShift_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEventObject{} + obj.Shift = nil + + // Act & Assert + assert.Nil(t, obj.GetShift(), "getter should return nil when property is nil") + }) + + t.Run("GetShift_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftCreatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetShift() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLaborShiftCreatedEventObject(t *testing.T) { + t.Run("SetShift_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEventObject{} + var fernTestValueShift *Shift + + // Act + obj.SetShift(fernTestValueShift) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLaborShiftDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LaborShiftDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LaborShiftDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LaborShiftDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LaborShiftDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LaborShiftDeletedEvent{} + var fernTestValueData *LaborShiftDeletedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLaborShiftDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftDeletedEvent{} + var expected *LaborShiftDeletedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLaborShiftDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftDeletedEvent{} + var fernTestValueData *LaborShiftDeletedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLaborShiftDeletedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &LaborShiftDeletedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &LaborShiftDeletedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeleted", func(t *testing.T) { + obj := &LaborShiftDeletedEventData{} + var fernTestValueDeleted *bool + obj.SetDeleted(fernTestValueDeleted) + assert.Equal(t, fernTestValueDeleted, obj.Deleted) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLaborShiftDeletedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftDeletedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftDeletedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftDeletedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftDeletedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftDeletedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftDeletedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetDeleted", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftDeletedEventData{} + var expected *bool + obj.Deleted = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeleted(), "getter should return the property value") + }) + + t.Run("GetDeleted_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftDeletedEventData{} + obj.Deleted = nil + + // Act & Assert + assert.Nil(t, obj.GetDeleted(), "getter should return nil when property is nil") + }) + + t.Run("GetDeleted_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftDeletedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeleted() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLaborShiftDeletedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftDeletedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftDeletedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeleted_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftDeletedEventData{} + var fernTestValueDeleted *bool + + // Act + obj.SetDeleted(fernTestValueDeleted) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLaborShiftUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LaborShiftUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LaborShiftUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LaborShiftUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LaborShiftUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LaborShiftUpdatedEvent{} + var fernTestValueData *LaborShiftUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLaborShiftUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEvent{} + var expected *LaborShiftUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLaborShiftUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEvent{} + var fernTestValueData *LaborShiftUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLaborShiftUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &LaborShiftUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &LaborShiftUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &LaborShiftUpdatedEventData{} + var fernTestValueObject *LaborShiftUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLaborShiftUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEventData{} + var expected *LaborShiftUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLaborShiftUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEventData{} + var fernTestValueObject *LaborShiftUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLaborShiftUpdatedEventObject(t *testing.T) { + t.Run("SetShift", func(t *testing.T) { + obj := &LaborShiftUpdatedEventObject{} + var fernTestValueShift *Shift + obj.SetShift(fernTestValueShift) + assert.Equal(t, fernTestValueShift, obj.Shift) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLaborShiftUpdatedEventObject(t *testing.T) { + t.Run("GetShift", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEventObject{} + var expected *Shift + obj.Shift = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetShift(), "getter should return the property value") + }) + + t.Run("GetShift_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEventObject{} + obj.Shift = nil + + // Act & Assert + assert.Nil(t, obj.GetShift(), "getter should return nil when property is nil") + }) + + t.Run("GetShift_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetShift() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLaborShiftUpdatedEventObject(t *testing.T) { + t.Run("SetShift_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEventObject{} + var fernTestValueShift *Shift + + // Act + obj.SetShift(fernTestValueShift) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLaborTimecardCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LaborTimecardCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LaborTimecardCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LaborTimecardCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LaborTimecardCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LaborTimecardCreatedEvent{} + var fernTestValueData *LaborTimecardCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLaborTimecardCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEvent{} + var expected *LaborTimecardCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLaborTimecardCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEvent{} + var fernTestValueData *LaborTimecardCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLaborTimecardCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &LaborTimecardCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &LaborTimecardCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &LaborTimecardCreatedEventData{} + var fernTestValueObject *LaborTimecardCreatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLaborTimecardCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEventData{} + var expected *LaborTimecardCreatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLaborTimecardCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEventData{} + var fernTestValueObject *LaborTimecardCreatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLaborTimecardCreatedEventObject(t *testing.T) { + t.Run("SetTimecard", func(t *testing.T) { + obj := &LaborTimecardCreatedEventObject{} + var fernTestValueTimecard *Timecard + obj.SetTimecard(fernTestValueTimecard) + assert.Equal(t, fernTestValueTimecard, obj.Timecard) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLaborTimecardCreatedEventObject(t *testing.T) { + t.Run("GetTimecard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEventObject{} + var expected *Timecard + obj.Timecard = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTimecard(), "getter should return the property value") + }) + + t.Run("GetTimecard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEventObject{} + obj.Timecard = nil + + // Act & Assert + assert.Nil(t, obj.GetTimecard(), "getter should return nil when property is nil") + }) + + t.Run("GetTimecard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardCreatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTimecard() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLaborTimecardCreatedEventObject(t *testing.T) { + t.Run("SetTimecard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEventObject{} + var fernTestValueTimecard *Timecard + + // Act + obj.SetTimecard(fernTestValueTimecard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLaborTimecardDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LaborTimecardDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LaborTimecardDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LaborTimecardDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LaborTimecardDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LaborTimecardDeletedEvent{} + var fernTestValueData *LaborTimecardDeletedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLaborTimecardDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardDeletedEvent{} + var expected *LaborTimecardDeletedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLaborTimecardDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardDeletedEvent{} + var fernTestValueData *LaborTimecardDeletedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLaborTimecardDeletedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &LaborTimecardDeletedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &LaborTimecardDeletedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeleted", func(t *testing.T) { + obj := &LaborTimecardDeletedEventData{} + var fernTestValueDeleted *bool + obj.SetDeleted(fernTestValueDeleted) + assert.Equal(t, fernTestValueDeleted, obj.Deleted) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLaborTimecardDeletedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardDeletedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardDeletedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardDeletedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardDeletedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardDeletedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardDeletedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetDeleted", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardDeletedEventData{} + var expected *bool + obj.Deleted = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeleted(), "getter should return the property value") + }) + + t.Run("GetDeleted_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardDeletedEventData{} + obj.Deleted = nil + + // Act & Assert + assert.Nil(t, obj.GetDeleted(), "getter should return nil when property is nil") + }) + + t.Run("GetDeleted_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardDeletedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeleted() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLaborTimecardDeletedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardDeletedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardDeletedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeleted_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardDeletedEventData{} + var fernTestValueDeleted *bool + + // Act + obj.SetDeleted(fernTestValueDeleted) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLaborTimecardUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LaborTimecardUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LaborTimecardUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LaborTimecardUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LaborTimecardUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LaborTimecardUpdatedEvent{} + var fernTestValueData *LaborTimecardUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLaborTimecardUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEvent{} + var expected *LaborTimecardUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLaborTimecardUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEvent{} + var fernTestValueData *LaborTimecardUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLaborTimecardUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &LaborTimecardUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &LaborTimecardUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &LaborTimecardUpdatedEventData{} + var fernTestValueObject *LaborTimecardUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLaborTimecardUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEventData{} + var expected *LaborTimecardUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLaborTimecardUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEventData{} + var fernTestValueObject *LaborTimecardUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLaborTimecardUpdatedEventObject(t *testing.T) { + t.Run("SetTimecard", func(t *testing.T) { + obj := &LaborTimecardUpdatedEventObject{} + var fernTestValueTimecard *Timecard + obj.SetTimecard(fernTestValueTimecard) + assert.Equal(t, fernTestValueTimecard, obj.Timecard) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLaborTimecardUpdatedEventObject(t *testing.T) { + t.Run("GetTimecard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEventObject{} + var expected *Timecard + obj.Timecard = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTimecard(), "getter should return the property value") + }) + + t.Run("GetTimecard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEventObject{} + obj.Timecard = nil + + // Act & Assert + assert.Nil(t, obj.GetTimecard(), "getter should return nil when property is nil") + }) + + t.Run("GetTimecard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTimecard() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLaborTimecardUpdatedEventObject(t *testing.T) { + t.Run("SetTimecard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEventObject{} + var fernTestValueTimecard *Timecard + + // Act + obj.SetTimecard(fernTestValueTimecard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListBookingCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinitions", func(t *testing.T) { + obj := &ListBookingCustomAttributeDefinitionsResponse{} + var fernTestValueCustomAttributeDefinitions []*CustomAttributeDefinition + obj.SetCustomAttributeDefinitions(fernTestValueCustomAttributeDefinitions) + assert.Equal(t, fernTestValueCustomAttributeDefinitions, obj.CustomAttributeDefinitions) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListBookingCustomAttributeDefinitionsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &ListBookingCustomAttributeDefinitionsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListBookingCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("GetCustomAttributeDefinitions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingCustomAttributeDefinitionsResponse{} + var expected []*CustomAttributeDefinition + obj.CustomAttributeDefinitions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeDefinitions(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeDefinitions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingCustomAttributeDefinitionsResponse{} + obj.CustomAttributeDefinitions = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeDefinitions(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeDefinitions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListBookingCustomAttributeDefinitionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeDefinitions() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingCustomAttributeDefinitionsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingCustomAttributeDefinitionsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListBookingCustomAttributeDefinitionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingCustomAttributeDefinitionsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingCustomAttributeDefinitionsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListBookingCustomAttributeDefinitionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListBookingCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinitions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingCustomAttributeDefinitionsResponse{} + var fernTestValueCustomAttributeDefinitions []*CustomAttributeDefinition + + // Act + obj.SetCustomAttributeDefinitions(fernTestValueCustomAttributeDefinitions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingCustomAttributeDefinitionsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingCustomAttributeDefinitionsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListBookingCustomAttributesResponse(t *testing.T) { + t.Run("SetCustomAttributes", func(t *testing.T) { + obj := &ListBookingCustomAttributesResponse{} + var fernTestValueCustomAttributes []*CustomAttribute + obj.SetCustomAttributes(fernTestValueCustomAttributes) + assert.Equal(t, fernTestValueCustomAttributes, obj.CustomAttributes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListBookingCustomAttributesResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &ListBookingCustomAttributesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListBookingCustomAttributesResponse(t *testing.T) { + t.Run("GetCustomAttributes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingCustomAttributesResponse{} + var expected []*CustomAttribute + obj.CustomAttributes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributes(), "getter should return the property value") + }) + + t.Run("GetCustomAttributes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingCustomAttributesResponse{} + obj.CustomAttributes = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributes(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListBookingCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributes() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingCustomAttributesResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingCustomAttributesResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListBookingCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingCustomAttributesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingCustomAttributesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListBookingCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListBookingCustomAttributesResponse(t *testing.T) { + t.Run("SetCustomAttributes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingCustomAttributesResponse{} + var fernTestValueCustomAttributes []*CustomAttribute + + // Act + obj.SetCustomAttributes(fernTestValueCustomAttributes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingCustomAttributesResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingCustomAttributesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListBreakTypesResponse(t *testing.T) { + t.Run("SetBreakTypes", func(t *testing.T) { + obj := &ListBreakTypesResponse{} + var fernTestValueBreakTypes []*BreakType + obj.SetBreakTypes(fernTestValueBreakTypes) + assert.Equal(t, fernTestValueBreakTypes, obj.BreakTypes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListBreakTypesResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &ListBreakTypesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListBreakTypesResponse(t *testing.T) { + t.Run("GetBreakTypes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBreakTypesResponse{} + var expected []*BreakType + obj.BreakTypes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBreakTypes(), "getter should return the property value") + }) + + t.Run("GetBreakTypes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBreakTypesResponse{} + obj.BreakTypes = nil + + // Act & Assert + assert.Nil(t, obj.GetBreakTypes(), "getter should return nil when property is nil") + }) + + t.Run("GetBreakTypes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListBreakTypesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBreakTypes() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBreakTypesResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBreakTypesResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListBreakTypesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBreakTypesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBreakTypesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListBreakTypesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListBreakTypesResponse(t *testing.T) { + t.Run("SetBreakTypes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBreakTypesResponse{} + var fernTestValueBreakTypes []*BreakType + + // Act + obj.SetBreakTypes(fernTestValueBreakTypes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBreakTypesResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBreakTypesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListCashDrawerShiftEventsResponse(t *testing.T) { + t.Run("SetCursor", func(t *testing.T) { + obj := &ListCashDrawerShiftEventsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &ListCashDrawerShiftEventsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCashDrawerShiftEvents", func(t *testing.T) { + obj := &ListCashDrawerShiftEventsResponse{} + var fernTestValueCashDrawerShiftEvents []*CashDrawerShiftEvent + obj.SetCashDrawerShiftEvents(fernTestValueCashDrawerShiftEvents) + assert.Equal(t, fernTestValueCashDrawerShiftEvents, obj.CashDrawerShiftEvents) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListCashDrawerShiftEventsResponse(t *testing.T) { + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCashDrawerShiftEventsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCashDrawerShiftEventsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCashDrawerShiftEventsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCashDrawerShiftEventsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCashDrawerShiftEventsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCashDrawerShiftEventsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetCashDrawerShiftEvents", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCashDrawerShiftEventsResponse{} + var expected []*CashDrawerShiftEvent + obj.CashDrawerShiftEvents = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCashDrawerShiftEvents(), "getter should return the property value") + }) + + t.Run("GetCashDrawerShiftEvents_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCashDrawerShiftEventsResponse{} + obj.CashDrawerShiftEvents = nil + + // Act & Assert + assert.Nil(t, obj.GetCashDrawerShiftEvents(), "getter should return nil when property is nil") + }) + + t.Run("GetCashDrawerShiftEvents_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCashDrawerShiftEventsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCashDrawerShiftEvents() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListCashDrawerShiftEventsResponse(t *testing.T) { + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCashDrawerShiftEventsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCashDrawerShiftEventsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCashDrawerShiftEvents_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCashDrawerShiftEventsResponse{} + var fernTestValueCashDrawerShiftEvents []*CashDrawerShiftEvent + + // Act + obj.SetCashDrawerShiftEvents(fernTestValueCashDrawerShiftEvents) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListCashDrawerShiftsResponse(t *testing.T) { + t.Run("SetCursor", func(t *testing.T) { + obj := &ListCashDrawerShiftsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &ListCashDrawerShiftsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCashDrawerShifts", func(t *testing.T) { + obj := &ListCashDrawerShiftsResponse{} + var fernTestValueCashDrawerShifts []*CashDrawerShiftSummary + obj.SetCashDrawerShifts(fernTestValueCashDrawerShifts) + assert.Equal(t, fernTestValueCashDrawerShifts, obj.CashDrawerShifts) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListCashDrawerShiftsResponse(t *testing.T) { + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCashDrawerShiftsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCashDrawerShiftsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCashDrawerShiftsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCashDrawerShiftsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCashDrawerShiftsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCashDrawerShiftsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetCashDrawerShifts", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCashDrawerShiftsResponse{} + var expected []*CashDrawerShiftSummary + obj.CashDrawerShifts = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCashDrawerShifts(), "getter should return the property value") + }) + + t.Run("GetCashDrawerShifts_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCashDrawerShiftsResponse{} + obj.CashDrawerShifts = nil + + // Act & Assert + assert.Nil(t, obj.GetCashDrawerShifts(), "getter should return nil when property is nil") + }) + + t.Run("GetCashDrawerShifts_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCashDrawerShiftsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCashDrawerShifts() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListCashDrawerShiftsResponse(t *testing.T) { + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCashDrawerShiftsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCashDrawerShiftsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCashDrawerShifts_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCashDrawerShiftsResponse{} + var fernTestValueCashDrawerShifts []*CashDrawerShiftSummary + + // Act + obj.SetCashDrawerShifts(fernTestValueCashDrawerShifts) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListCustomerCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinitions", func(t *testing.T) { + obj := &ListCustomerCustomAttributeDefinitionsResponse{} + var fernTestValueCustomAttributeDefinitions []*CustomAttributeDefinition + obj.SetCustomAttributeDefinitions(fernTestValueCustomAttributeDefinitions) + assert.Equal(t, fernTestValueCustomAttributeDefinitions, obj.CustomAttributeDefinitions) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListCustomerCustomAttributeDefinitionsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &ListCustomerCustomAttributeDefinitionsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListCustomerCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("GetCustomAttributeDefinitions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerCustomAttributeDefinitionsResponse{} + var expected []*CustomAttributeDefinition + obj.CustomAttributeDefinitions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeDefinitions(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeDefinitions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerCustomAttributeDefinitionsResponse{} + obj.CustomAttributeDefinitions = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeDefinitions(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeDefinitions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCustomerCustomAttributeDefinitionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeDefinitions() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerCustomAttributeDefinitionsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerCustomAttributeDefinitionsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCustomerCustomAttributeDefinitionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerCustomAttributeDefinitionsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerCustomAttributeDefinitionsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCustomerCustomAttributeDefinitionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListCustomerCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinitions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerCustomAttributeDefinitionsResponse{} + var fernTestValueCustomAttributeDefinitions []*CustomAttributeDefinition + + // Act + obj.SetCustomAttributeDefinitions(fernTestValueCustomAttributeDefinitions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerCustomAttributeDefinitionsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerCustomAttributeDefinitionsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListCustomerCustomAttributesResponse(t *testing.T) { + t.Run("SetCustomAttributes", func(t *testing.T) { + obj := &ListCustomerCustomAttributesResponse{} + var fernTestValueCustomAttributes []*CustomAttribute + obj.SetCustomAttributes(fernTestValueCustomAttributes) + assert.Equal(t, fernTestValueCustomAttributes, obj.CustomAttributes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListCustomerCustomAttributesResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &ListCustomerCustomAttributesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListCustomerCustomAttributesResponse(t *testing.T) { + t.Run("GetCustomAttributes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerCustomAttributesResponse{} + var expected []*CustomAttribute + obj.CustomAttributes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributes(), "getter should return the property value") + }) + + t.Run("GetCustomAttributes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerCustomAttributesResponse{} + obj.CustomAttributes = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributes(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCustomerCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributes() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerCustomAttributesResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerCustomAttributesResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCustomerCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerCustomAttributesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerCustomAttributesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCustomerCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListCustomerCustomAttributesResponse(t *testing.T) { + t.Run("SetCustomAttributes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerCustomAttributesResponse{} + var fernTestValueCustomAttributes []*CustomAttribute + + // Act + obj.SetCustomAttributes(fernTestValueCustomAttributes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerCustomAttributesResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerCustomAttributesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListCustomerGroupsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &ListCustomerGroupsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGroups", func(t *testing.T) { + obj := &ListCustomerGroupsResponse{} + var fernTestValueGroups []*CustomerGroup + obj.SetGroups(fernTestValueGroups) + assert.Equal(t, fernTestValueGroups, obj.Groups) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListCustomerGroupsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListCustomerGroupsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerGroupsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerGroupsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCustomerGroupsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetGroups", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerGroupsResponse{} + var expected []*CustomerGroup + obj.Groups = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGroups(), "getter should return the property value") + }) + + t.Run("GetGroups_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerGroupsResponse{} + obj.Groups = nil + + // Act & Assert + assert.Nil(t, obj.GetGroups(), "getter should return nil when property is nil") + }) + + t.Run("GetGroups_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCustomerGroupsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGroups() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerGroupsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerGroupsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCustomerGroupsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListCustomerGroupsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerGroupsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGroups_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerGroupsResponse{} + var fernTestValueGroups []*CustomerGroup + + // Act + obj.SetGroups(fernTestValueGroups) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerGroupsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListCustomerSegmentsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &ListCustomerSegmentsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSegments", func(t *testing.T) { + obj := &ListCustomerSegmentsResponse{} + var fernTestValueSegments []*CustomerSegment + obj.SetSegments(fernTestValueSegments) + assert.Equal(t, fernTestValueSegments, obj.Segments) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListCustomerSegmentsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListCustomerSegmentsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerSegmentsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerSegmentsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCustomerSegmentsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetSegments", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerSegmentsResponse{} + var expected []*CustomerSegment + obj.Segments = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSegments(), "getter should return the property value") + }) + + t.Run("GetSegments_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerSegmentsResponse{} + obj.Segments = nil + + // Act & Assert + assert.Nil(t, obj.GetSegments(), "getter should return nil when property is nil") + }) + + t.Run("GetSegments_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCustomerSegmentsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSegments() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerSegmentsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerSegmentsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCustomerSegmentsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListCustomerSegmentsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerSegmentsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSegments_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerSegmentsResponse{} + var fernTestValueSegments []*CustomerSegment + + // Act + obj.SetSegments(fernTestValueSegments) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerSegmentsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListDeviceCodesResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &ListDeviceCodesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeviceCodes", func(t *testing.T) { + obj := &ListDeviceCodesResponse{} + var fernTestValueDeviceCodes []*DeviceCode + obj.SetDeviceCodes(fernTestValueDeviceCodes) + assert.Equal(t, fernTestValueDeviceCodes, obj.DeviceCodes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListDeviceCodesResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListDeviceCodesResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDeviceCodesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDeviceCodesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListDeviceCodesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetDeviceCodes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDeviceCodesResponse{} + var expected []*DeviceCode + obj.DeviceCodes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeviceCodes(), "getter should return the property value") + }) + + t.Run("GetDeviceCodes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDeviceCodesResponse{} + obj.DeviceCodes = nil + + // Act & Assert + assert.Nil(t, obj.GetDeviceCodes(), "getter should return nil when property is nil") + }) + + t.Run("GetDeviceCodes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListDeviceCodesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeviceCodes() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDeviceCodesResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDeviceCodesResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListDeviceCodesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListDeviceCodesResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDeviceCodesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeviceCodes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDeviceCodesResponse{} + var fernTestValueDeviceCodes []*DeviceCode + + // Act + obj.SetDeviceCodes(fernTestValueDeviceCodes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDeviceCodesResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListDisputeEvidenceResponse(t *testing.T) { + t.Run("SetEvidence", func(t *testing.T) { + obj := &ListDisputeEvidenceResponse{} + var fernTestValueEvidence []*DisputeEvidence + obj.SetEvidence(fernTestValueEvidence) + assert.Equal(t, fernTestValueEvidence, obj.Evidence) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &ListDisputeEvidenceResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListDisputeEvidenceResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListDisputeEvidenceResponse(t *testing.T) { + t.Run("GetEvidence", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDisputeEvidenceResponse{} + var expected []*DisputeEvidence + obj.Evidence = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEvidence(), "getter should return the property value") + }) + + t.Run("GetEvidence_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDisputeEvidenceResponse{} + obj.Evidence = nil + + // Act & Assert + assert.Nil(t, obj.GetEvidence(), "getter should return nil when property is nil") + }) + + t.Run("GetEvidence_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListDisputeEvidenceResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEvidence() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDisputeEvidenceResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDisputeEvidenceResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListDisputeEvidenceResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDisputeEvidenceResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDisputeEvidenceResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListDisputeEvidenceResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListDisputeEvidenceResponse(t *testing.T) { + t.Run("SetEvidence_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDisputeEvidenceResponse{} + var fernTestValueEvidence []*DisputeEvidence + + // Act + obj.SetEvidence(fernTestValueEvidence) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDisputeEvidenceResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDisputeEvidenceResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListEmployeeWagesResponse(t *testing.T) { + t.Run("SetEmployeeWages", func(t *testing.T) { + obj := &ListEmployeeWagesResponse{} + var fernTestValueEmployeeWages []*EmployeeWage + obj.SetEmployeeWages(fernTestValueEmployeeWages) + assert.Equal(t, fernTestValueEmployeeWages, obj.EmployeeWages) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListEmployeeWagesResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &ListEmployeeWagesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListEmployeeWagesResponse(t *testing.T) { + t.Run("GetEmployeeWages", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEmployeeWagesResponse{} + var expected []*EmployeeWage + obj.EmployeeWages = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEmployeeWages(), "getter should return the property value") + }) + + t.Run("GetEmployeeWages_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEmployeeWagesResponse{} + obj.EmployeeWages = nil + + // Act & Assert + assert.Nil(t, obj.GetEmployeeWages(), "getter should return nil when property is nil") + }) + + t.Run("GetEmployeeWages_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListEmployeeWagesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEmployeeWages() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEmployeeWagesResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEmployeeWagesResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListEmployeeWagesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEmployeeWagesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEmployeeWagesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListEmployeeWagesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListEmployeeWagesResponse(t *testing.T) { + t.Run("SetEmployeeWages_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEmployeeWagesResponse{} + var fernTestValueEmployeeWages []*EmployeeWage + + // Act + obj.SetEmployeeWages(fernTestValueEmployeeWages) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEmployeeWagesResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEmployeeWagesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListGiftCardActivitiesResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &ListGiftCardActivitiesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGiftCardActivities", func(t *testing.T) { + obj := &ListGiftCardActivitiesResponse{} + var fernTestValueGiftCardActivities []*GiftCardActivity + obj.SetGiftCardActivities(fernTestValueGiftCardActivities) + assert.Equal(t, fernTestValueGiftCardActivities, obj.GiftCardActivities) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListGiftCardActivitiesResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListGiftCardActivitiesResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListGiftCardActivitiesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListGiftCardActivitiesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListGiftCardActivitiesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetGiftCardActivities", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListGiftCardActivitiesResponse{} + var expected []*GiftCardActivity + obj.GiftCardActivities = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGiftCardActivities(), "getter should return the property value") + }) + + t.Run("GetGiftCardActivities_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListGiftCardActivitiesResponse{} + obj.GiftCardActivities = nil + + // Act & Assert + assert.Nil(t, obj.GetGiftCardActivities(), "getter should return nil when property is nil") + }) + + t.Run("GetGiftCardActivities_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListGiftCardActivitiesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGiftCardActivities() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListGiftCardActivitiesResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListGiftCardActivitiesResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListGiftCardActivitiesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListGiftCardActivitiesResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListGiftCardActivitiesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGiftCardActivities_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListGiftCardActivitiesResponse{} + var fernTestValueGiftCardActivities []*GiftCardActivity + + // Act + obj.SetGiftCardActivities(fernTestValueGiftCardActivities) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListGiftCardActivitiesResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListLocationBookingProfilesResponse(t *testing.T) { + t.Run("SetLocationBookingProfiles", func(t *testing.T) { + obj := &ListLocationBookingProfilesResponse{} + var fernTestValueLocationBookingProfiles []*LocationBookingProfile + obj.SetLocationBookingProfiles(fernTestValueLocationBookingProfiles) + assert.Equal(t, fernTestValueLocationBookingProfiles, obj.LocationBookingProfiles) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListLocationBookingProfilesResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &ListLocationBookingProfilesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListLocationBookingProfilesResponse(t *testing.T) { + t.Run("GetLocationBookingProfiles", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationBookingProfilesResponse{} + var expected []*LocationBookingProfile + obj.LocationBookingProfiles = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationBookingProfiles(), "getter should return the property value") + }) + + t.Run("GetLocationBookingProfiles_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationBookingProfilesResponse{} + obj.LocationBookingProfiles = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationBookingProfiles(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationBookingProfiles_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListLocationBookingProfilesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationBookingProfiles() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationBookingProfilesResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationBookingProfilesResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListLocationBookingProfilesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationBookingProfilesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationBookingProfilesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListLocationBookingProfilesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListLocationBookingProfilesResponse(t *testing.T) { + t.Run("SetLocationBookingProfiles_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationBookingProfilesResponse{} + var fernTestValueLocationBookingProfiles []*LocationBookingProfile + + // Act + obj.SetLocationBookingProfiles(fernTestValueLocationBookingProfiles) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationBookingProfilesResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationBookingProfilesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListLocationCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinitions", func(t *testing.T) { + obj := &ListLocationCustomAttributeDefinitionsResponse{} + var fernTestValueCustomAttributeDefinitions []*CustomAttributeDefinition + obj.SetCustomAttributeDefinitions(fernTestValueCustomAttributeDefinitions) + assert.Equal(t, fernTestValueCustomAttributeDefinitions, obj.CustomAttributeDefinitions) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListLocationCustomAttributeDefinitionsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &ListLocationCustomAttributeDefinitionsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListLocationCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("GetCustomAttributeDefinitions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationCustomAttributeDefinitionsResponse{} + var expected []*CustomAttributeDefinition + obj.CustomAttributeDefinitions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeDefinitions(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeDefinitions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationCustomAttributeDefinitionsResponse{} + obj.CustomAttributeDefinitions = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeDefinitions(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeDefinitions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListLocationCustomAttributeDefinitionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeDefinitions() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationCustomAttributeDefinitionsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationCustomAttributeDefinitionsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListLocationCustomAttributeDefinitionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationCustomAttributeDefinitionsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationCustomAttributeDefinitionsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListLocationCustomAttributeDefinitionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListLocationCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinitions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationCustomAttributeDefinitionsResponse{} + var fernTestValueCustomAttributeDefinitions []*CustomAttributeDefinition + + // Act + obj.SetCustomAttributeDefinitions(fernTestValueCustomAttributeDefinitions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationCustomAttributeDefinitionsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationCustomAttributeDefinitionsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListLocationCustomAttributesResponse(t *testing.T) { + t.Run("SetCustomAttributes", func(t *testing.T) { + obj := &ListLocationCustomAttributesResponse{} + var fernTestValueCustomAttributes []*CustomAttribute + obj.SetCustomAttributes(fernTestValueCustomAttributes) + assert.Equal(t, fernTestValueCustomAttributes, obj.CustomAttributes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListLocationCustomAttributesResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &ListLocationCustomAttributesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListLocationCustomAttributesResponse(t *testing.T) { + t.Run("GetCustomAttributes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationCustomAttributesResponse{} + var expected []*CustomAttribute + obj.CustomAttributes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributes(), "getter should return the property value") + }) + + t.Run("GetCustomAttributes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationCustomAttributesResponse{} + obj.CustomAttributes = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributes(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListLocationCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributes() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationCustomAttributesResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationCustomAttributesResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListLocationCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationCustomAttributesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationCustomAttributesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListLocationCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListLocationCustomAttributesResponse(t *testing.T) { + t.Run("SetCustomAttributes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationCustomAttributesResponse{} + var fernTestValueCustomAttributes []*CustomAttribute + + // Act + obj.SetCustomAttributes(fernTestValueCustomAttributes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationCustomAttributesResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationCustomAttributesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListLoyaltyProgramsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &ListLoyaltyProgramsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPrograms", func(t *testing.T) { + obj := &ListLoyaltyProgramsResponse{} + var fernTestValuePrograms []*LoyaltyProgram + obj.SetPrograms(fernTestValuePrograms) + assert.Equal(t, fernTestValuePrograms, obj.Programs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListLoyaltyProgramsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLoyaltyProgramsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLoyaltyProgramsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListLoyaltyProgramsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetPrograms", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLoyaltyProgramsResponse{} + var expected []*LoyaltyProgram + obj.Programs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPrograms(), "getter should return the property value") + }) + + t.Run("GetPrograms_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLoyaltyProgramsResponse{} + obj.Programs = nil + + // Act & Assert + assert.Nil(t, obj.GetPrograms(), "getter should return nil when property is nil") + }) + + t.Run("GetPrograms_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListLoyaltyProgramsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPrograms() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListLoyaltyProgramsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLoyaltyProgramsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPrograms_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLoyaltyProgramsResponse{} + var fernTestValuePrograms []*LoyaltyProgram + + // Act + obj.SetPrograms(fernTestValuePrograms) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListLoyaltyPromotionsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &ListLoyaltyPromotionsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLoyaltyPromotions", func(t *testing.T) { + obj := &ListLoyaltyPromotionsResponse{} + var fernTestValueLoyaltyPromotions []*LoyaltyPromotion + obj.SetLoyaltyPromotions(fernTestValueLoyaltyPromotions) + assert.Equal(t, fernTestValueLoyaltyPromotions, obj.LoyaltyPromotions) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListLoyaltyPromotionsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListLoyaltyPromotionsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLoyaltyPromotionsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLoyaltyPromotionsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListLoyaltyPromotionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetLoyaltyPromotions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLoyaltyPromotionsResponse{} + var expected []*LoyaltyPromotion + obj.LoyaltyPromotions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyPromotions(), "getter should return the property value") + }) + + t.Run("GetLoyaltyPromotions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLoyaltyPromotionsResponse{} + obj.LoyaltyPromotions = nil + + // Act & Assert + assert.Nil(t, obj.GetLoyaltyPromotions(), "getter should return nil when property is nil") + }) + + t.Run("GetLoyaltyPromotions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListLoyaltyPromotionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyPromotions() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLoyaltyPromotionsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLoyaltyPromotionsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListLoyaltyPromotionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListLoyaltyPromotionsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLoyaltyPromotionsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLoyaltyPromotions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLoyaltyPromotionsResponse{} + var fernTestValueLoyaltyPromotions []*LoyaltyPromotion + + // Act + obj.SetLoyaltyPromotions(fernTestValueLoyaltyPromotions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLoyaltyPromotionsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListMerchantCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinitions", func(t *testing.T) { + obj := &ListMerchantCustomAttributeDefinitionsResponse{} + var fernTestValueCustomAttributeDefinitions []*CustomAttributeDefinition + obj.SetCustomAttributeDefinitions(fernTestValueCustomAttributeDefinitions) + assert.Equal(t, fernTestValueCustomAttributeDefinitions, obj.CustomAttributeDefinitions) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListMerchantCustomAttributeDefinitionsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &ListMerchantCustomAttributeDefinitionsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListMerchantCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("GetCustomAttributeDefinitions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantCustomAttributeDefinitionsResponse{} + var expected []*CustomAttributeDefinition + obj.CustomAttributeDefinitions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeDefinitions(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeDefinitions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantCustomAttributeDefinitionsResponse{} + obj.CustomAttributeDefinitions = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeDefinitions(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeDefinitions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListMerchantCustomAttributeDefinitionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeDefinitions() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantCustomAttributeDefinitionsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantCustomAttributeDefinitionsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListMerchantCustomAttributeDefinitionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantCustomAttributeDefinitionsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantCustomAttributeDefinitionsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListMerchantCustomAttributeDefinitionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListMerchantCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinitions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantCustomAttributeDefinitionsResponse{} + var fernTestValueCustomAttributeDefinitions []*CustomAttributeDefinition + + // Act + obj.SetCustomAttributeDefinitions(fernTestValueCustomAttributeDefinitions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantCustomAttributeDefinitionsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantCustomAttributeDefinitionsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListMerchantCustomAttributesResponse(t *testing.T) { + t.Run("SetCustomAttributes", func(t *testing.T) { + obj := &ListMerchantCustomAttributesResponse{} + var fernTestValueCustomAttributes []*CustomAttribute + obj.SetCustomAttributes(fernTestValueCustomAttributes) + assert.Equal(t, fernTestValueCustomAttributes, obj.CustomAttributes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListMerchantCustomAttributesResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &ListMerchantCustomAttributesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListMerchantCustomAttributesResponse(t *testing.T) { + t.Run("GetCustomAttributes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantCustomAttributesResponse{} + var expected []*CustomAttribute + obj.CustomAttributes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributes(), "getter should return the property value") + }) + + t.Run("GetCustomAttributes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantCustomAttributesResponse{} + obj.CustomAttributes = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributes(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListMerchantCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributes() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantCustomAttributesResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantCustomAttributesResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListMerchantCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantCustomAttributesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantCustomAttributesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListMerchantCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListMerchantCustomAttributesResponse(t *testing.T) { + t.Run("SetCustomAttributes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantCustomAttributesResponse{} + var fernTestValueCustomAttributes []*CustomAttribute + + // Act + obj.SetCustomAttributes(fernTestValueCustomAttributes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantCustomAttributesResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantCustomAttributesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListOrderCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinitions", func(t *testing.T) { + obj := &ListOrderCustomAttributeDefinitionsResponse{} + var fernTestValueCustomAttributeDefinitions []*CustomAttributeDefinition + obj.SetCustomAttributeDefinitions(fernTestValueCustomAttributeDefinitions) + assert.Equal(t, fernTestValueCustomAttributeDefinitions, obj.CustomAttributeDefinitions) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListOrderCustomAttributeDefinitionsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &ListOrderCustomAttributeDefinitionsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListOrderCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("GetCustomAttributeDefinitions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListOrderCustomAttributeDefinitionsResponse{} + var expected []*CustomAttributeDefinition + obj.CustomAttributeDefinitions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeDefinitions(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeDefinitions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListOrderCustomAttributeDefinitionsResponse{} + obj.CustomAttributeDefinitions = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeDefinitions(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeDefinitions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListOrderCustomAttributeDefinitionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeDefinitions() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListOrderCustomAttributeDefinitionsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListOrderCustomAttributeDefinitionsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListOrderCustomAttributeDefinitionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListOrderCustomAttributeDefinitionsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListOrderCustomAttributeDefinitionsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListOrderCustomAttributeDefinitionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListOrderCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinitions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListOrderCustomAttributeDefinitionsResponse{} + var fernTestValueCustomAttributeDefinitions []*CustomAttributeDefinition + + // Act + obj.SetCustomAttributeDefinitions(fernTestValueCustomAttributeDefinitions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListOrderCustomAttributeDefinitionsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListOrderCustomAttributeDefinitionsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListOrderCustomAttributesResponse(t *testing.T) { + t.Run("SetCustomAttributes", func(t *testing.T) { + obj := &ListOrderCustomAttributesResponse{} + var fernTestValueCustomAttributes []*CustomAttribute + obj.SetCustomAttributes(fernTestValueCustomAttributes) + assert.Equal(t, fernTestValueCustomAttributes, obj.CustomAttributes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListOrderCustomAttributesResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &ListOrderCustomAttributesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListOrderCustomAttributesResponse(t *testing.T) { + t.Run("GetCustomAttributes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListOrderCustomAttributesResponse{} + var expected []*CustomAttribute + obj.CustomAttributes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributes(), "getter should return the property value") + }) + + t.Run("GetCustomAttributes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListOrderCustomAttributesResponse{} + obj.CustomAttributes = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributes(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListOrderCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributes() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListOrderCustomAttributesResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListOrderCustomAttributesResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListOrderCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListOrderCustomAttributesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListOrderCustomAttributesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListOrderCustomAttributesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListOrderCustomAttributesResponse(t *testing.T) { + t.Run("SetCustomAttributes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListOrderCustomAttributesResponse{} + var fernTestValueCustomAttributes []*CustomAttribute + + // Act + obj.SetCustomAttributes(fernTestValueCustomAttributes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListOrderCustomAttributesResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListOrderCustomAttributesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListPaymentLinksResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &ListPaymentLinksResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPaymentLinks", func(t *testing.T) { + obj := &ListPaymentLinksResponse{} + var fernTestValuePaymentLinks []*PaymentLink + obj.SetPaymentLinks(fernTestValuePaymentLinks) + assert.Equal(t, fernTestValuePaymentLinks, obj.PaymentLinks) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListPaymentLinksResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListPaymentLinksResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentLinksResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentLinksResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListPaymentLinksResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetPaymentLinks", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentLinksResponse{} + var expected []*PaymentLink + obj.PaymentLinks = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentLinks(), "getter should return the property value") + }) + + t.Run("GetPaymentLinks_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentLinksResponse{} + obj.PaymentLinks = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentLinks(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentLinks_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListPaymentLinksResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentLinks() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentLinksResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentLinksResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListPaymentLinksResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListPaymentLinksResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentLinksResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPaymentLinks_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentLinksResponse{} + var fernTestValuePaymentLinks []*PaymentLink + + // Act + obj.SetPaymentLinks(fernTestValuePaymentLinks) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentLinksResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListTeamMemberBookingProfilesResponse(t *testing.T) { + t.Run("SetTeamMemberBookingProfiles", func(t *testing.T) { + obj := &ListTeamMemberBookingProfilesResponse{} + var fernTestValueTeamMemberBookingProfiles []*TeamMemberBookingProfile + obj.SetTeamMemberBookingProfiles(fernTestValueTeamMemberBookingProfiles) + assert.Equal(t, fernTestValueTeamMemberBookingProfiles, obj.TeamMemberBookingProfiles) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListTeamMemberBookingProfilesResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &ListTeamMemberBookingProfilesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListTeamMemberBookingProfilesResponse(t *testing.T) { + t.Run("GetTeamMemberBookingProfiles", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTeamMemberBookingProfilesResponse{} + var expected []*TeamMemberBookingProfile + obj.TeamMemberBookingProfiles = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMemberBookingProfiles(), "getter should return the property value") + }) + + t.Run("GetTeamMemberBookingProfiles_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTeamMemberBookingProfilesResponse{} + obj.TeamMemberBookingProfiles = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMemberBookingProfiles(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMemberBookingProfiles_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListTeamMemberBookingProfilesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMemberBookingProfiles() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTeamMemberBookingProfilesResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTeamMemberBookingProfilesResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListTeamMemberBookingProfilesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTeamMemberBookingProfilesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTeamMemberBookingProfilesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListTeamMemberBookingProfilesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListTeamMemberBookingProfilesResponse(t *testing.T) { + t.Run("SetTeamMemberBookingProfiles_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTeamMemberBookingProfilesResponse{} + var fernTestValueTeamMemberBookingProfiles []*TeamMemberBookingProfile + + // Act + obj.SetTeamMemberBookingProfiles(fernTestValueTeamMemberBookingProfiles) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTeamMemberBookingProfilesResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTeamMemberBookingProfilesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListTeamMemberWagesResponse(t *testing.T) { + t.Run("SetTeamMemberWages", func(t *testing.T) { + obj := &ListTeamMemberWagesResponse{} + var fernTestValueTeamMemberWages []*TeamMemberWage + obj.SetTeamMemberWages(fernTestValueTeamMemberWages) + assert.Equal(t, fernTestValueTeamMemberWages, obj.TeamMemberWages) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListTeamMemberWagesResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &ListTeamMemberWagesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListTeamMemberWagesResponse(t *testing.T) { + t.Run("GetTeamMemberWages", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTeamMemberWagesResponse{} + var expected []*TeamMemberWage + obj.TeamMemberWages = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMemberWages(), "getter should return the property value") + }) + + t.Run("GetTeamMemberWages_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTeamMemberWagesResponse{} + obj.TeamMemberWages = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMemberWages(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMemberWages_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListTeamMemberWagesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMemberWages() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTeamMemberWagesResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTeamMemberWagesResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListTeamMemberWagesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTeamMemberWagesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTeamMemberWagesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListTeamMemberWagesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListTeamMemberWagesResponse(t *testing.T) { + t.Run("SetTeamMemberWages_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTeamMemberWagesResponse{} + var fernTestValueTeamMemberWages []*TeamMemberWage + + // Act + obj.SetTeamMemberWages(fernTestValueTeamMemberWages) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTeamMemberWagesResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTeamMemberWagesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListTransactionsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &ListTransactionsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTransactions", func(t *testing.T) { + obj := &ListTransactionsResponse{} + var fernTestValueTransactions []*Transaction + obj.SetTransactions(fernTestValueTransactions) + assert.Equal(t, fernTestValueTransactions, obj.Transactions) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListTransactionsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListTransactionsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTransactionsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTransactionsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListTransactionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetTransactions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTransactionsResponse{} + var expected []*Transaction + obj.Transactions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTransactions(), "getter should return the property value") + }) + + t.Run("GetTransactions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTransactionsResponse{} + obj.Transactions = nil + + // Act & Assert + assert.Nil(t, obj.GetTransactions(), "getter should return nil when property is nil") + }) + + t.Run("GetTransactions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListTransactionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTransactions() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTransactionsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTransactionsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListTransactionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListTransactionsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTransactionsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTransactions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTransactionsResponse{} + var fernTestValueTransactions []*Transaction + + // Act + obj.SetTransactions(fernTestValueTransactions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTransactionsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListWebhookEventTypesResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &ListWebhookEventTypesResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventTypes", func(t *testing.T) { + obj := &ListWebhookEventTypesResponse{} + var fernTestValueEventTypes []string + obj.SetEventTypes(fernTestValueEventTypes) + assert.Equal(t, fernTestValueEventTypes, obj.EventTypes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMetadata", func(t *testing.T) { + obj := &ListWebhookEventTypesResponse{} + var fernTestValueMetadata []*EventTypeMetadata + obj.SetMetadata(fernTestValueMetadata) + assert.Equal(t, fernTestValueMetadata, obj.Metadata) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListWebhookEventTypesResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWebhookEventTypesResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWebhookEventTypesResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListWebhookEventTypesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetEventTypes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWebhookEventTypesResponse{} + var expected []string + obj.EventTypes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventTypes(), "getter should return the property value") + }) + + t.Run("GetEventTypes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWebhookEventTypesResponse{} + obj.EventTypes = nil + + // Act & Assert + assert.Nil(t, obj.GetEventTypes(), "getter should return nil when property is nil") + }) + + t.Run("GetEventTypes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListWebhookEventTypesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventTypes() // Should return zero value + }) + + t.Run("GetMetadata", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWebhookEventTypesResponse{} + var expected []*EventTypeMetadata + obj.Metadata = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMetadata(), "getter should return the property value") + }) + + t.Run("GetMetadata_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWebhookEventTypesResponse{} + obj.Metadata = nil + + // Act & Assert + assert.Nil(t, obj.GetMetadata(), "getter should return nil when property is nil") + }) + + t.Run("GetMetadata_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListWebhookEventTypesResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMetadata() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListWebhookEventTypesResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWebhookEventTypesResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventTypes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWebhookEventTypesResponse{} + var fernTestValueEventTypes []string + + // Act + obj.SetEventTypes(fernTestValueEventTypes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMetadata_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWebhookEventTypesResponse{} + var fernTestValueMetadata []*EventTypeMetadata + + // Act + obj.SetMetadata(fernTestValueMetadata) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListWebhookSubscriptionsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &ListWebhookSubscriptionsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSubscriptions", func(t *testing.T) { + obj := &ListWebhookSubscriptionsResponse{} + var fernTestValueSubscriptions []*WebhookSubscription + obj.SetSubscriptions(fernTestValueSubscriptions) + assert.Equal(t, fernTestValueSubscriptions, obj.Subscriptions) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListWebhookSubscriptionsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListWebhookSubscriptionsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWebhookSubscriptionsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWebhookSubscriptionsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListWebhookSubscriptionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetSubscriptions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWebhookSubscriptionsResponse{} + var expected []*WebhookSubscription + obj.Subscriptions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscriptions(), "getter should return the property value") + }) + + t.Run("GetSubscriptions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWebhookSubscriptionsResponse{} + obj.Subscriptions = nil + + // Act & Assert + assert.Nil(t, obj.GetSubscriptions(), "getter should return nil when property is nil") + }) + + t.Run("GetSubscriptions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListWebhookSubscriptionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscriptions() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWebhookSubscriptionsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWebhookSubscriptionsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListWebhookSubscriptionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListWebhookSubscriptionsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWebhookSubscriptionsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSubscriptions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWebhookSubscriptionsResponse{} + var fernTestValueSubscriptions []*WebhookSubscription + + // Act + obj.SetSubscriptions(fernTestValueSubscriptions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWebhookSubscriptionsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListWorkweekConfigsResponse(t *testing.T) { + t.Run("SetWorkweekConfigs", func(t *testing.T) { + obj := &ListWorkweekConfigsResponse{} + var fernTestValueWorkweekConfigs []*WorkweekConfig + obj.SetWorkweekConfigs(fernTestValueWorkweekConfigs) + assert.Equal(t, fernTestValueWorkweekConfigs, obj.WorkweekConfigs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &ListWorkweekConfigsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &ListWorkweekConfigsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersListWorkweekConfigsResponse(t *testing.T) { + t.Run("GetWorkweekConfigs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWorkweekConfigsResponse{} + var expected []*WorkweekConfig + obj.WorkweekConfigs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetWorkweekConfigs(), "getter should return the property value") + }) + + t.Run("GetWorkweekConfigs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWorkweekConfigsResponse{} + obj.WorkweekConfigs = nil + + // Act & Assert + assert.Nil(t, obj.GetWorkweekConfigs(), "getter should return nil when property is nil") + }) + + t.Run("GetWorkweekConfigs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListWorkweekConfigsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetWorkweekConfigs() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWorkweekConfigsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWorkweekConfigsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListWorkweekConfigsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWorkweekConfigsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWorkweekConfigsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListWorkweekConfigsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitListWorkweekConfigsResponse(t *testing.T) { + t.Run("SetWorkweekConfigs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWorkweekConfigsResponse{} + var fernTestValueWorkweekConfigs []*WorkweekConfig + + // Act + obj.SetWorkweekConfigs(fernTestValueWorkweekConfigs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWorkweekConfigsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWorkweekConfigsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLocationBookingProfile(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &LocationBookingProfile{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBookingSiteURL", func(t *testing.T) { + obj := &LocationBookingProfile{} + var fernTestValueBookingSiteURL *string + obj.SetBookingSiteURL(fernTestValueBookingSiteURL) + assert.Equal(t, fernTestValueBookingSiteURL, obj.BookingSiteURL) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOnlineBookingEnabled", func(t *testing.T) { + obj := &LocationBookingProfile{} + var fernTestValueOnlineBookingEnabled *bool + obj.SetOnlineBookingEnabled(fernTestValueOnlineBookingEnabled) + assert.Equal(t, fernTestValueOnlineBookingEnabled, obj.OnlineBookingEnabled) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLocationBookingProfile(t *testing.T) { + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationBookingProfile{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationBookingProfile{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationBookingProfile + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetBookingSiteURL", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationBookingProfile{} + var expected *string + obj.BookingSiteURL = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBookingSiteURL(), "getter should return the property value") + }) + + t.Run("GetBookingSiteURL_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationBookingProfile{} + obj.BookingSiteURL = nil + + // Act & Assert + assert.Nil(t, obj.GetBookingSiteURL(), "getter should return nil when property is nil") + }) + + t.Run("GetBookingSiteURL_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationBookingProfile + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBookingSiteURL() // Should return zero value + }) + + t.Run("GetOnlineBookingEnabled", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationBookingProfile{} + var expected *bool + obj.OnlineBookingEnabled = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOnlineBookingEnabled(), "getter should return the property value") + }) + + t.Run("GetOnlineBookingEnabled_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationBookingProfile{} + obj.OnlineBookingEnabled = nil + + // Act & Assert + assert.Nil(t, obj.GetOnlineBookingEnabled(), "getter should return nil when property is nil") + }) + + t.Run("GetOnlineBookingEnabled_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationBookingProfile + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOnlineBookingEnabled() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLocationBookingProfile(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationBookingProfile{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBookingSiteURL_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationBookingProfile{} + var fernTestValueBookingSiteURL *string + + // Act + obj.SetBookingSiteURL(fernTestValueBookingSiteURL) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOnlineBookingEnabled_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationBookingProfile{} + var fernTestValueOnlineBookingEnabled *bool + + // Act + obj.SetOnlineBookingEnabled(fernTestValueOnlineBookingEnabled) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLocationCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LocationCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &LocationCreatedEvent{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LocationCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LocationCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LocationCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LocationCreatedEvent{} + var fernTestValueData *LocationCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLocationCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCreatedEvent{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCreatedEvent{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCreatedEvent{} + var expected *LocationCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLocationCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCreatedEvent{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCreatedEvent{} + var fernTestValueData *LocationCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLocationCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &LocationCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &LocationCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLocationCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLocationCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLocationCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLocationCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionOwnedCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionOwnedCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionOwnedCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionOwnedCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedCreatedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionOwnedCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLocationCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLocationCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLocationCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedDeletedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLocationCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLocationCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLocationCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedUpdatedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLocationCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLocationCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLocationCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionVisibleCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionVisibleCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionVisibleCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionVisibleCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleCreatedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionVisibleCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLocationCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLocationCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLocationCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleDeletedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLocationCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLocationCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LocationCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLocationCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleUpdatedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLocationCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLocationCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LocationCustomAttributeOwnedDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LocationCustomAttributeOwnedDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LocationCustomAttributeOwnedDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LocationCustomAttributeOwnedDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LocationCustomAttributeOwnedDeletedEvent{} + var fernTestValueData *CustomAttributeEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLocationCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedDeletedEvent{} + var expected *CustomAttributeEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLocationCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedDeletedEvent{} + var fernTestValueData *CustomAttributeEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLocationCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LocationCustomAttributeOwnedUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LocationCustomAttributeOwnedUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LocationCustomAttributeOwnedUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LocationCustomAttributeOwnedUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LocationCustomAttributeOwnedUpdatedEvent{} + var fernTestValueData *CustomAttributeEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLocationCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedUpdatedEvent{} + var expected *CustomAttributeEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLocationCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedUpdatedEvent{} + var fernTestValueData *CustomAttributeEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLocationCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LocationCustomAttributeVisibleDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LocationCustomAttributeVisibleDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LocationCustomAttributeVisibleDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LocationCustomAttributeVisibleDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LocationCustomAttributeVisibleDeletedEvent{} + var fernTestValueData *CustomAttributeEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLocationCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleDeletedEvent{} + var expected *CustomAttributeEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLocationCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleDeletedEvent{} + var fernTestValueData *CustomAttributeEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLocationCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LocationCustomAttributeVisibleUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LocationCustomAttributeVisibleUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LocationCustomAttributeVisibleUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LocationCustomAttributeVisibleUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LocationCustomAttributeVisibleUpdatedEvent{} + var fernTestValueData *CustomAttributeEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLocationCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleUpdatedEvent{} + var expected *CustomAttributeEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLocationCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleUpdatedEvent{} + var fernTestValueData *CustomAttributeEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLocationSettingsUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LocationSettingsUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LocationSettingsUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LocationSettingsUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LocationSettingsUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LocationSettingsUpdatedEvent{} + var fernTestValueData *LocationSettingsUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLocationSettingsUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationSettingsUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationSettingsUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationSettingsUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationSettingsUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEvent{} + var expected *LocationSettingsUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationSettingsUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLocationSettingsUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEvent{} + var fernTestValueData *LocationSettingsUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLocationSettingsUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &LocationSettingsUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &LocationSettingsUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &LocationSettingsUpdatedEventData{} + var fernTestValueObject *LocationSettingsUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLocationSettingsUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationSettingsUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationSettingsUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEventData{} + var expected *LocationSettingsUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationSettingsUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLocationSettingsUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEventData{} + var fernTestValueObject *LocationSettingsUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLocationSettingsUpdatedEventObject(t *testing.T) { + t.Run("SetLocationSettings", func(t *testing.T) { + obj := &LocationSettingsUpdatedEventObject{} + var fernTestValueLocationSettings *CheckoutLocationSettings + obj.SetLocationSettings(fernTestValueLocationSettings) + assert.Equal(t, fernTestValueLocationSettings, obj.LocationSettings) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLocationSettingsUpdatedEventObject(t *testing.T) { + t.Run("GetLocationSettings", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEventObject{} + var expected *CheckoutLocationSettings + obj.LocationSettings = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationSettings(), "getter should return the property value") + }) + + t.Run("GetLocationSettings_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEventObject{} + obj.LocationSettings = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationSettings(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationSettings_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationSettingsUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationSettings() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLocationSettingsUpdatedEventObject(t *testing.T) { + t.Run("SetLocationSettings_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEventObject{} + var fernTestValueLocationSettings *CheckoutLocationSettings + + // Act + obj.SetLocationSettings(fernTestValueLocationSettings) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLocationUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LocationUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &LocationUpdatedEvent{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LocationUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LocationUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LocationUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LocationUpdatedEvent{} + var fernTestValueData *LocationUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLocationUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationUpdatedEvent{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationUpdatedEvent{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationUpdatedEvent{} + var expected *LocationUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLocationUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationUpdatedEvent{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationUpdatedEvent{} + var fernTestValueData *LocationUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLocationUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &LocationUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &LocationUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLocationUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLocationUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyAccount(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &LoyaltyAccount{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetProgramID", func(t *testing.T) { + obj := &LoyaltyAccount{} + var fernTestValueProgramID string + obj.SetProgramID(fernTestValueProgramID) + assert.Equal(t, fernTestValueProgramID, obj.ProgramID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBalance", func(t *testing.T) { + obj := &LoyaltyAccount{} + var fernTestValueBalance *int + obj.SetBalance(fernTestValueBalance) + assert.Equal(t, fernTestValueBalance, obj.Balance) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLifetimePoints", func(t *testing.T) { + obj := &LoyaltyAccount{} + var fernTestValueLifetimePoints *int + obj.SetLifetimePoints(fernTestValueLifetimePoints) + assert.Equal(t, fernTestValueLifetimePoints, obj.LifetimePoints) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerID", func(t *testing.T) { + obj := &LoyaltyAccount{} + var fernTestValueCustomerID *string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEnrolledAt", func(t *testing.T) { + obj := &LoyaltyAccount{} + var fernTestValueEnrolledAt *string + obj.SetEnrolledAt(fernTestValueEnrolledAt) + assert.Equal(t, fernTestValueEnrolledAt, obj.EnrolledAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LoyaltyAccount{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &LoyaltyAccount{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMapping", func(t *testing.T) { + obj := &LoyaltyAccount{} + var fernTestValueMapping *LoyaltyAccountMapping + obj.SetMapping(fernTestValueMapping) + assert.Equal(t, fernTestValueMapping, obj.Mapping) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExpiringPointDeadlines", func(t *testing.T) { + obj := &LoyaltyAccount{} + var fernTestValueExpiringPointDeadlines []*LoyaltyAccountExpiringPointDeadline + obj.SetExpiringPointDeadlines(fernTestValueExpiringPointDeadlines) + assert.Equal(t, fernTestValueExpiringPointDeadlines, obj.ExpiringPointDeadlines) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyAccount(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetProgramID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + var expected string + obj.ProgramID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetProgramID(), "getter should return the property value") + }) + + t.Run("GetProgramID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetProgramID() // Should return zero value + }) + + t.Run("GetBalance", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + var expected *int + obj.Balance = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBalance(), "getter should return the property value") + }) + + t.Run("GetBalance_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + obj.Balance = nil + + // Act & Assert + assert.Nil(t, obj.GetBalance(), "getter should return nil when property is nil") + }) + + t.Run("GetBalance_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBalance() // Should return zero value + }) + + t.Run("GetLifetimePoints", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + var expected *int + obj.LifetimePoints = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLifetimePoints(), "getter should return the property value") + }) + + t.Run("GetLifetimePoints_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + obj.LifetimePoints = nil + + // Act & Assert + assert.Nil(t, obj.GetLifetimePoints(), "getter should return nil when property is nil") + }) + + t.Run("GetLifetimePoints_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLifetimePoints() // Should return zero value + }) + + t.Run("GetCustomerID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + var expected *string + obj.CustomerID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomerID(), "getter should return the property value") + }) + + t.Run("GetCustomerID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + obj.CustomerID = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomerID(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomerID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomerID() // Should return zero value + }) + + t.Run("GetEnrolledAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + var expected *string + obj.EnrolledAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEnrolledAt(), "getter should return the property value") + }) + + t.Run("GetEnrolledAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + obj.EnrolledAt = nil + + // Act & Assert + assert.Nil(t, obj.GetEnrolledAt(), "getter should return nil when property is nil") + }) + + t.Run("GetEnrolledAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEnrolledAt() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetMapping", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + var expected *LoyaltyAccountMapping + obj.Mapping = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMapping(), "getter should return the property value") + }) + + t.Run("GetMapping_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + obj.Mapping = nil + + // Act & Assert + assert.Nil(t, obj.GetMapping(), "getter should return nil when property is nil") + }) + + t.Run("GetMapping_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMapping() // Should return zero value + }) + + t.Run("GetExpiringPointDeadlines", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + var expected []*LoyaltyAccountExpiringPointDeadline + obj.ExpiringPointDeadlines = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExpiringPointDeadlines(), "getter should return the property value") + }) + + t.Run("GetExpiringPointDeadlines_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + obj.ExpiringPointDeadlines = nil + + // Act & Assert + assert.Nil(t, obj.GetExpiringPointDeadlines(), "getter should return nil when property is nil") + }) + + t.Run("GetExpiringPointDeadlines_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExpiringPointDeadlines() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyAccount(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetProgramID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + var fernTestValueProgramID string + + // Act + obj.SetProgramID(fernTestValueProgramID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBalance_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + var fernTestValueBalance *int + + // Act + obj.SetBalance(fernTestValueBalance) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLifetimePoints_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + var fernTestValueLifetimePoints *int + + // Act + obj.SetLifetimePoints(fernTestValueLifetimePoints) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + var fernTestValueCustomerID *string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEnrolledAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + var fernTestValueEnrolledAt *string + + // Act + obj.SetEnrolledAt(fernTestValueEnrolledAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMapping_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + var fernTestValueMapping *LoyaltyAccountMapping + + // Act + obj.SetMapping(fernTestValueMapping) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExpiringPointDeadlines_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + var fernTestValueExpiringPointDeadlines []*LoyaltyAccountExpiringPointDeadline + + // Act + obj.SetExpiringPointDeadlines(fernTestValueExpiringPointDeadlines) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyAccountCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LoyaltyAccountCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LoyaltyAccountCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LoyaltyAccountCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LoyaltyAccountCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LoyaltyAccountCreatedEvent{} + var fernTestValueData *LoyaltyAccountCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyAccountCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEvent{} + var expected *LoyaltyAccountCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyAccountCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEvent{} + var fernTestValueData *LoyaltyAccountCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyAccountCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &LoyaltyAccountCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &LoyaltyAccountCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &LoyaltyAccountCreatedEventData{} + var fernTestValueObject *LoyaltyAccountCreatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyAccountCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEventData{} + var expected *LoyaltyAccountCreatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyAccountCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEventData{} + var fernTestValueObject *LoyaltyAccountCreatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyAccountCreatedEventObject(t *testing.T) { + t.Run("SetLoyaltyAccount", func(t *testing.T) { + obj := &LoyaltyAccountCreatedEventObject{} + var fernTestValueLoyaltyAccount *LoyaltyAccount + obj.SetLoyaltyAccount(fernTestValueLoyaltyAccount) + assert.Equal(t, fernTestValueLoyaltyAccount, obj.LoyaltyAccount) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyAccountCreatedEventObject(t *testing.T) { + t.Run("GetLoyaltyAccount", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEventObject{} + var expected *LoyaltyAccount + obj.LoyaltyAccount = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyAccount(), "getter should return the property value") + }) + + t.Run("GetLoyaltyAccount_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEventObject{} + obj.LoyaltyAccount = nil + + // Act & Assert + assert.Nil(t, obj.GetLoyaltyAccount(), "getter should return nil when property is nil") + }) + + t.Run("GetLoyaltyAccount_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountCreatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyAccount() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyAccountCreatedEventObject(t *testing.T) { + t.Run("SetLoyaltyAccount_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEventObject{} + var fernTestValueLoyaltyAccount *LoyaltyAccount + + // Act + obj.SetLoyaltyAccount(fernTestValueLoyaltyAccount) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyAccountDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LoyaltyAccountDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LoyaltyAccountDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LoyaltyAccountDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LoyaltyAccountDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LoyaltyAccountDeletedEvent{} + var fernTestValueData *LoyaltyAccountDeletedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyAccountDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEvent{} + var expected *LoyaltyAccountDeletedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyAccountDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEvent{} + var fernTestValueData *LoyaltyAccountDeletedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyAccountDeletedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &LoyaltyAccountDeletedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &LoyaltyAccountDeletedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &LoyaltyAccountDeletedEventData{} + var fernTestValueObject *LoyaltyAccountDeletedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyAccountDeletedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountDeletedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountDeletedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEventData{} + var expected *LoyaltyAccountDeletedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountDeletedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyAccountDeletedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEventData{} + var fernTestValueObject *LoyaltyAccountDeletedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyAccountDeletedEventObject(t *testing.T) { + t.Run("SetLoyaltyAccount", func(t *testing.T) { + obj := &LoyaltyAccountDeletedEventObject{} + var fernTestValueLoyaltyAccount *LoyaltyAccount + obj.SetLoyaltyAccount(fernTestValueLoyaltyAccount) + assert.Equal(t, fernTestValueLoyaltyAccount, obj.LoyaltyAccount) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyAccountDeletedEventObject(t *testing.T) { + t.Run("GetLoyaltyAccount", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEventObject{} + var expected *LoyaltyAccount + obj.LoyaltyAccount = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyAccount(), "getter should return the property value") + }) + + t.Run("GetLoyaltyAccount_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEventObject{} + obj.LoyaltyAccount = nil + + // Act & Assert + assert.Nil(t, obj.GetLoyaltyAccount(), "getter should return nil when property is nil") + }) + + t.Run("GetLoyaltyAccount_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountDeletedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyAccount() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyAccountDeletedEventObject(t *testing.T) { + t.Run("SetLoyaltyAccount_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEventObject{} + var fernTestValueLoyaltyAccount *LoyaltyAccount + + // Act + obj.SetLoyaltyAccount(fernTestValueLoyaltyAccount) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyAccountExpiringPointDeadline(t *testing.T) { + t.Run("SetPoints", func(t *testing.T) { + obj := &LoyaltyAccountExpiringPointDeadline{} + var fernTestValuePoints int + obj.SetPoints(fernTestValuePoints) + assert.Equal(t, fernTestValuePoints, obj.Points) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExpiresAt", func(t *testing.T) { + obj := &LoyaltyAccountExpiringPointDeadline{} + var fernTestValueExpiresAt string + obj.SetExpiresAt(fernTestValueExpiresAt) + assert.Equal(t, fernTestValueExpiresAt, obj.ExpiresAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyAccountExpiringPointDeadline(t *testing.T) { + t.Run("GetPoints", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountExpiringPointDeadline{} + var expected int + obj.Points = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPoints(), "getter should return the property value") + }) + + t.Run("GetPoints_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountExpiringPointDeadline + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPoints() // Should return zero value + }) + + t.Run("GetExpiresAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountExpiringPointDeadline{} + var expected string + obj.ExpiresAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExpiresAt(), "getter should return the property value") + }) + + t.Run("GetExpiresAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountExpiringPointDeadline + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExpiresAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyAccountExpiringPointDeadline(t *testing.T) { + t.Run("SetPoints_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountExpiringPointDeadline{} + var fernTestValuePoints int + + // Act + obj.SetPoints(fernTestValuePoints) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExpiresAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountExpiringPointDeadline{} + var fernTestValueExpiresAt string + + // Act + obj.SetExpiresAt(fernTestValueExpiresAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyAccountMapping(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &LoyaltyAccountMapping{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LoyaltyAccountMapping{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPhoneNumber", func(t *testing.T) { + obj := &LoyaltyAccountMapping{} + var fernTestValuePhoneNumber *string + obj.SetPhoneNumber(fernTestValuePhoneNumber) + assert.Equal(t, fernTestValuePhoneNumber, obj.PhoneNumber) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyAccountMapping(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountMapping{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountMapping{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountMapping + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountMapping{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountMapping{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountMapping + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetPhoneNumber", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountMapping{} + var expected *string + obj.PhoneNumber = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPhoneNumber(), "getter should return the property value") + }) + + t.Run("GetPhoneNumber_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountMapping{} + obj.PhoneNumber = nil + + // Act & Assert + assert.Nil(t, obj.GetPhoneNumber(), "getter should return nil when property is nil") + }) + + t.Run("GetPhoneNumber_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountMapping + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPhoneNumber() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyAccountMapping(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountMapping{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountMapping{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPhoneNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountMapping{} + var fernTestValuePhoneNumber *string + + // Act + obj.SetPhoneNumber(fernTestValuePhoneNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyAccountUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LoyaltyAccountUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LoyaltyAccountUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LoyaltyAccountUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LoyaltyAccountUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LoyaltyAccountUpdatedEvent{} + var fernTestValueData *LoyaltyAccountUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyAccountUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEvent{} + var expected *LoyaltyAccountUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyAccountUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEvent{} + var fernTestValueData *LoyaltyAccountUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyAccountUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &LoyaltyAccountUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &LoyaltyAccountUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &LoyaltyAccountUpdatedEventData{} + var fernTestValueObject *LoyaltyAccountUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyAccountUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEventData{} + var expected *LoyaltyAccountUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyAccountUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEventData{} + var fernTestValueObject *LoyaltyAccountUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyAccountUpdatedEventObject(t *testing.T) { + t.Run("SetLoyaltyAccount", func(t *testing.T) { + obj := &LoyaltyAccountUpdatedEventObject{} + var fernTestValueLoyaltyAccount *LoyaltyAccount + obj.SetLoyaltyAccount(fernTestValueLoyaltyAccount) + assert.Equal(t, fernTestValueLoyaltyAccount, obj.LoyaltyAccount) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyAccountUpdatedEventObject(t *testing.T) { + t.Run("GetLoyaltyAccount", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEventObject{} + var expected *LoyaltyAccount + obj.LoyaltyAccount = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyAccount(), "getter should return the property value") + }) + + t.Run("GetLoyaltyAccount_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEventObject{} + obj.LoyaltyAccount = nil + + // Act & Assert + assert.Nil(t, obj.GetLoyaltyAccount(), "getter should return nil when property is nil") + }) + + t.Run("GetLoyaltyAccount_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyAccount() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyAccountUpdatedEventObject(t *testing.T) { + t.Run("SetLoyaltyAccount_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEventObject{} + var fernTestValueLoyaltyAccount *LoyaltyAccount + + // Act + obj.SetLoyaltyAccount(fernTestValueLoyaltyAccount) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyEvent(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &LoyaltyEvent{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LoyaltyEvent{} + var fernTestValueType LoyaltyEventType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LoyaltyEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAccumulatePoints", func(t *testing.T) { + obj := &LoyaltyEvent{} + var fernTestValueAccumulatePoints *LoyaltyEventAccumulatePoints + obj.SetAccumulatePoints(fernTestValueAccumulatePoints) + assert.Equal(t, fernTestValueAccumulatePoints, obj.AccumulatePoints) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreateReward", func(t *testing.T) { + obj := &LoyaltyEvent{} + var fernTestValueCreateReward *LoyaltyEventCreateReward + obj.SetCreateReward(fernTestValueCreateReward) + assert.Equal(t, fernTestValueCreateReward, obj.CreateReward) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRedeemReward", func(t *testing.T) { + obj := &LoyaltyEvent{} + var fernTestValueRedeemReward *LoyaltyEventRedeemReward + obj.SetRedeemReward(fernTestValueRedeemReward) + assert.Equal(t, fernTestValueRedeemReward, obj.RedeemReward) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeleteReward", func(t *testing.T) { + obj := &LoyaltyEvent{} + var fernTestValueDeleteReward *LoyaltyEventDeleteReward + obj.SetDeleteReward(fernTestValueDeleteReward) + assert.Equal(t, fernTestValueDeleteReward, obj.DeleteReward) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAdjustPoints", func(t *testing.T) { + obj := &LoyaltyEvent{} + var fernTestValueAdjustPoints *LoyaltyEventAdjustPoints + obj.SetAdjustPoints(fernTestValueAdjustPoints) + assert.Equal(t, fernTestValueAdjustPoints, obj.AdjustPoints) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLoyaltyAccountID", func(t *testing.T) { + obj := &LoyaltyEvent{} + var fernTestValueLoyaltyAccountID *string + obj.SetLoyaltyAccountID(fernTestValueLoyaltyAccountID) + assert.Equal(t, fernTestValueLoyaltyAccountID, obj.LoyaltyAccountID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &LoyaltyEvent{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSource", func(t *testing.T) { + obj := &LoyaltyEvent{} + var fernTestValueSource LoyaltyEventSource + obj.SetSource(fernTestValueSource) + assert.Equal(t, fernTestValueSource, obj.Source) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExpirePoints", func(t *testing.T) { + obj := &LoyaltyEvent{} + var fernTestValueExpirePoints *LoyaltyEventExpirePoints + obj.SetExpirePoints(fernTestValueExpirePoints) + assert.Equal(t, fernTestValueExpirePoints, obj.ExpirePoints) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOtherEvent", func(t *testing.T) { + obj := &LoyaltyEvent{} + var fernTestValueOtherEvent *LoyaltyEventOther + obj.SetOtherEvent(fernTestValueOtherEvent) + assert.Equal(t, fernTestValueOtherEvent, obj.OtherEvent) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAccumulatePromotionPoints", func(t *testing.T) { + obj := &LoyaltyEvent{} + var fernTestValueAccumulatePromotionPoints *LoyaltyEventAccumulatePromotionPoints + obj.SetAccumulatePromotionPoints(fernTestValueAccumulatePromotionPoints) + assert.Equal(t, fernTestValueAccumulatePromotionPoints, obj.AccumulatePromotionPoints) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyEvent(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + var expected LoyaltyEventType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetAccumulatePoints", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + var expected *LoyaltyEventAccumulatePoints + obj.AccumulatePoints = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAccumulatePoints(), "getter should return the property value") + }) + + t.Run("GetAccumulatePoints_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + obj.AccumulatePoints = nil + + // Act & Assert + assert.Nil(t, obj.GetAccumulatePoints(), "getter should return nil when property is nil") + }) + + t.Run("GetAccumulatePoints_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAccumulatePoints() // Should return zero value + }) + + t.Run("GetCreateReward", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + var expected *LoyaltyEventCreateReward + obj.CreateReward = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreateReward(), "getter should return the property value") + }) + + t.Run("GetCreateReward_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + obj.CreateReward = nil + + // Act & Assert + assert.Nil(t, obj.GetCreateReward(), "getter should return nil when property is nil") + }) + + t.Run("GetCreateReward_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreateReward() // Should return zero value + }) + + t.Run("GetRedeemReward", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + var expected *LoyaltyEventRedeemReward + obj.RedeemReward = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRedeemReward(), "getter should return the property value") + }) + + t.Run("GetRedeemReward_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + obj.RedeemReward = nil + + // Act & Assert + assert.Nil(t, obj.GetRedeemReward(), "getter should return nil when property is nil") + }) + + t.Run("GetRedeemReward_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRedeemReward() // Should return zero value + }) + + t.Run("GetDeleteReward", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + var expected *LoyaltyEventDeleteReward + obj.DeleteReward = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeleteReward(), "getter should return the property value") + }) + + t.Run("GetDeleteReward_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + obj.DeleteReward = nil + + // Act & Assert + assert.Nil(t, obj.GetDeleteReward(), "getter should return nil when property is nil") + }) + + t.Run("GetDeleteReward_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeleteReward() // Should return zero value + }) + + t.Run("GetAdjustPoints", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + var expected *LoyaltyEventAdjustPoints + obj.AdjustPoints = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAdjustPoints(), "getter should return the property value") + }) + + t.Run("GetAdjustPoints_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + obj.AdjustPoints = nil + + // Act & Assert + assert.Nil(t, obj.GetAdjustPoints(), "getter should return nil when property is nil") + }) + + t.Run("GetAdjustPoints_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAdjustPoints() // Should return zero value + }) + + t.Run("GetLoyaltyAccountID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + var expected *string + obj.LoyaltyAccountID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyAccountID(), "getter should return the property value") + }) + + t.Run("GetLoyaltyAccountID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + obj.LoyaltyAccountID = nil + + // Act & Assert + assert.Nil(t, obj.GetLoyaltyAccountID(), "getter should return nil when property is nil") + }) + + t.Run("GetLoyaltyAccountID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyAccountID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetSource", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + var expected LoyaltyEventSource + obj.Source = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSource(), "getter should return the property value") + }) + + t.Run("GetSource_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSource() // Should return zero value + }) + + t.Run("GetExpirePoints", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + var expected *LoyaltyEventExpirePoints + obj.ExpirePoints = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExpirePoints(), "getter should return the property value") + }) + + t.Run("GetExpirePoints_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + obj.ExpirePoints = nil + + // Act & Assert + assert.Nil(t, obj.GetExpirePoints(), "getter should return nil when property is nil") + }) + + t.Run("GetExpirePoints_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExpirePoints() // Should return zero value + }) + + t.Run("GetOtherEvent", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + var expected *LoyaltyEventOther + obj.OtherEvent = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOtherEvent(), "getter should return the property value") + }) + + t.Run("GetOtherEvent_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + obj.OtherEvent = nil + + // Act & Assert + assert.Nil(t, obj.GetOtherEvent(), "getter should return nil when property is nil") + }) + + t.Run("GetOtherEvent_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOtherEvent() // Should return zero value + }) + + t.Run("GetAccumulatePromotionPoints", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + var expected *LoyaltyEventAccumulatePromotionPoints + obj.AccumulatePromotionPoints = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAccumulatePromotionPoints(), "getter should return the property value") + }) + + t.Run("GetAccumulatePromotionPoints_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + obj.AccumulatePromotionPoints = nil + + // Act & Assert + assert.Nil(t, obj.GetAccumulatePromotionPoints(), "getter should return nil when property is nil") + }) + + t.Run("GetAccumulatePromotionPoints_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAccumulatePromotionPoints() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyEvent(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + var fernTestValueType LoyaltyEventType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAccumulatePoints_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + var fernTestValueAccumulatePoints *LoyaltyEventAccumulatePoints + + // Act + obj.SetAccumulatePoints(fernTestValueAccumulatePoints) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreateReward_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + var fernTestValueCreateReward *LoyaltyEventCreateReward + + // Act + obj.SetCreateReward(fernTestValueCreateReward) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRedeemReward_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + var fernTestValueRedeemReward *LoyaltyEventRedeemReward + + // Act + obj.SetRedeemReward(fernTestValueRedeemReward) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeleteReward_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + var fernTestValueDeleteReward *LoyaltyEventDeleteReward + + // Act + obj.SetDeleteReward(fernTestValueDeleteReward) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAdjustPoints_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + var fernTestValueAdjustPoints *LoyaltyEventAdjustPoints + + // Act + obj.SetAdjustPoints(fernTestValueAdjustPoints) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLoyaltyAccountID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + var fernTestValueLoyaltyAccountID *string + + // Act + obj.SetLoyaltyAccountID(fernTestValueLoyaltyAccountID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSource_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + var fernTestValueSource LoyaltyEventSource + + // Act + obj.SetSource(fernTestValueSource) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExpirePoints_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + var fernTestValueExpirePoints *LoyaltyEventExpirePoints + + // Act + obj.SetExpirePoints(fernTestValueExpirePoints) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOtherEvent_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + var fernTestValueOtherEvent *LoyaltyEventOther + + // Act + obj.SetOtherEvent(fernTestValueOtherEvent) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAccumulatePromotionPoints_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + var fernTestValueAccumulatePromotionPoints *LoyaltyEventAccumulatePromotionPoints + + // Act + obj.SetAccumulatePromotionPoints(fernTestValueAccumulatePromotionPoints) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyEventAccumulatePoints(t *testing.T) { + t.Run("SetLoyaltyProgramID", func(t *testing.T) { + obj := &LoyaltyEventAccumulatePoints{} + var fernTestValueLoyaltyProgramID *string + obj.SetLoyaltyProgramID(fernTestValueLoyaltyProgramID) + assert.Equal(t, fernTestValueLoyaltyProgramID, obj.LoyaltyProgramID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPoints", func(t *testing.T) { + obj := &LoyaltyEventAccumulatePoints{} + var fernTestValuePoints *int + obj.SetPoints(fernTestValuePoints) + assert.Equal(t, fernTestValuePoints, obj.Points) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrderID", func(t *testing.T) { + obj := &LoyaltyEventAccumulatePoints{} + var fernTestValueOrderID *string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyEventAccumulatePoints(t *testing.T) { + t.Run("GetLoyaltyProgramID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAccumulatePoints{} + var expected *string + obj.LoyaltyProgramID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyProgramID(), "getter should return the property value") + }) + + t.Run("GetLoyaltyProgramID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAccumulatePoints{} + obj.LoyaltyProgramID = nil + + // Act & Assert + assert.Nil(t, obj.GetLoyaltyProgramID(), "getter should return nil when property is nil") + }) + + t.Run("GetLoyaltyProgramID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventAccumulatePoints + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyProgramID() // Should return zero value + }) + + t.Run("GetPoints", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAccumulatePoints{} + var expected *int + obj.Points = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPoints(), "getter should return the property value") + }) + + t.Run("GetPoints_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAccumulatePoints{} + obj.Points = nil + + // Act & Assert + assert.Nil(t, obj.GetPoints(), "getter should return nil when property is nil") + }) + + t.Run("GetPoints_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventAccumulatePoints + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPoints() // Should return zero value + }) + + t.Run("GetOrderID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAccumulatePoints{} + var expected *string + obj.OrderID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderID(), "getter should return the property value") + }) + + t.Run("GetOrderID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAccumulatePoints{} + obj.OrderID = nil + + // Act & Assert + assert.Nil(t, obj.GetOrderID(), "getter should return nil when property is nil") + }) + + t.Run("GetOrderID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventAccumulatePoints + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyEventAccumulatePoints(t *testing.T) { + t.Run("SetLoyaltyProgramID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAccumulatePoints{} + var fernTestValueLoyaltyProgramID *string + + // Act + obj.SetLoyaltyProgramID(fernTestValueLoyaltyProgramID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPoints_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAccumulatePoints{} + var fernTestValuePoints *int + + // Act + obj.SetPoints(fernTestValuePoints) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAccumulatePoints{} + var fernTestValueOrderID *string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyEventAccumulatePromotionPoints(t *testing.T) { + t.Run("SetLoyaltyProgramID", func(t *testing.T) { + obj := &LoyaltyEventAccumulatePromotionPoints{} + var fernTestValueLoyaltyProgramID *string + obj.SetLoyaltyProgramID(fernTestValueLoyaltyProgramID) + assert.Equal(t, fernTestValueLoyaltyProgramID, obj.LoyaltyProgramID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLoyaltyPromotionID", func(t *testing.T) { + obj := &LoyaltyEventAccumulatePromotionPoints{} + var fernTestValueLoyaltyPromotionID *string + obj.SetLoyaltyPromotionID(fernTestValueLoyaltyPromotionID) + assert.Equal(t, fernTestValueLoyaltyPromotionID, obj.LoyaltyPromotionID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPoints", func(t *testing.T) { + obj := &LoyaltyEventAccumulatePromotionPoints{} + var fernTestValuePoints *int + obj.SetPoints(fernTestValuePoints) + assert.Equal(t, fernTestValuePoints, obj.Points) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrderID", func(t *testing.T) { + obj := &LoyaltyEventAccumulatePromotionPoints{} + var fernTestValueOrderID *string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyEventAccumulatePromotionPoints(t *testing.T) { + t.Run("GetLoyaltyProgramID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAccumulatePromotionPoints{} + var expected *string + obj.LoyaltyProgramID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyProgramID(), "getter should return the property value") + }) + + t.Run("GetLoyaltyProgramID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAccumulatePromotionPoints{} + obj.LoyaltyProgramID = nil + + // Act & Assert + assert.Nil(t, obj.GetLoyaltyProgramID(), "getter should return nil when property is nil") + }) + + t.Run("GetLoyaltyProgramID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventAccumulatePromotionPoints + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyProgramID() // Should return zero value + }) + + t.Run("GetLoyaltyPromotionID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAccumulatePromotionPoints{} + var expected *string + obj.LoyaltyPromotionID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyPromotionID(), "getter should return the property value") + }) + + t.Run("GetLoyaltyPromotionID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAccumulatePromotionPoints{} + obj.LoyaltyPromotionID = nil + + // Act & Assert + assert.Nil(t, obj.GetLoyaltyPromotionID(), "getter should return nil when property is nil") + }) + + t.Run("GetLoyaltyPromotionID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventAccumulatePromotionPoints + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyPromotionID() // Should return zero value + }) + + t.Run("GetPoints", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAccumulatePromotionPoints{} + var expected *int + obj.Points = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPoints(), "getter should return the property value") + }) + + t.Run("GetPoints_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAccumulatePromotionPoints{} + obj.Points = nil + + // Act & Assert + assert.Nil(t, obj.GetPoints(), "getter should return nil when property is nil") + }) + + t.Run("GetPoints_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventAccumulatePromotionPoints + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPoints() // Should return zero value + }) + + t.Run("GetOrderID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAccumulatePromotionPoints{} + var expected *string + obj.OrderID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderID(), "getter should return the property value") + }) + + t.Run("GetOrderID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAccumulatePromotionPoints{} + obj.OrderID = nil + + // Act & Assert + assert.Nil(t, obj.GetOrderID(), "getter should return nil when property is nil") + }) + + t.Run("GetOrderID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventAccumulatePromotionPoints + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyEventAccumulatePromotionPoints(t *testing.T) { + t.Run("SetLoyaltyProgramID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAccumulatePromotionPoints{} + var fernTestValueLoyaltyProgramID *string + + // Act + obj.SetLoyaltyProgramID(fernTestValueLoyaltyProgramID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLoyaltyPromotionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAccumulatePromotionPoints{} + var fernTestValueLoyaltyPromotionID *string + + // Act + obj.SetLoyaltyPromotionID(fernTestValueLoyaltyPromotionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPoints_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAccumulatePromotionPoints{} + var fernTestValuePoints *int + + // Act + obj.SetPoints(fernTestValuePoints) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAccumulatePromotionPoints{} + var fernTestValueOrderID *string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyEventAdjustPoints(t *testing.T) { + t.Run("SetLoyaltyProgramID", func(t *testing.T) { + obj := &LoyaltyEventAdjustPoints{} + var fernTestValueLoyaltyProgramID *string + obj.SetLoyaltyProgramID(fernTestValueLoyaltyProgramID) + assert.Equal(t, fernTestValueLoyaltyProgramID, obj.LoyaltyProgramID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPoints", func(t *testing.T) { + obj := &LoyaltyEventAdjustPoints{} + var fernTestValuePoints int + obj.SetPoints(fernTestValuePoints) + assert.Equal(t, fernTestValuePoints, obj.Points) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReason", func(t *testing.T) { + obj := &LoyaltyEventAdjustPoints{} + var fernTestValueReason *string + obj.SetReason(fernTestValueReason) + assert.Equal(t, fernTestValueReason, obj.Reason) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyEventAdjustPoints(t *testing.T) { + t.Run("GetLoyaltyProgramID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAdjustPoints{} + var expected *string + obj.LoyaltyProgramID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyProgramID(), "getter should return the property value") + }) + + t.Run("GetLoyaltyProgramID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAdjustPoints{} + obj.LoyaltyProgramID = nil + + // Act & Assert + assert.Nil(t, obj.GetLoyaltyProgramID(), "getter should return nil when property is nil") + }) + + t.Run("GetLoyaltyProgramID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventAdjustPoints + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyProgramID() // Should return zero value + }) + + t.Run("GetPoints", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAdjustPoints{} + var expected int + obj.Points = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPoints(), "getter should return the property value") + }) + + t.Run("GetPoints_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventAdjustPoints + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPoints() // Should return zero value + }) + + t.Run("GetReason", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAdjustPoints{} + var expected *string + obj.Reason = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReason(), "getter should return the property value") + }) + + t.Run("GetReason_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAdjustPoints{} + obj.Reason = nil + + // Act & Assert + assert.Nil(t, obj.GetReason(), "getter should return nil when property is nil") + }) + + t.Run("GetReason_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventAdjustPoints + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReason() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyEventAdjustPoints(t *testing.T) { + t.Run("SetLoyaltyProgramID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAdjustPoints{} + var fernTestValueLoyaltyProgramID *string + + // Act + obj.SetLoyaltyProgramID(fernTestValueLoyaltyProgramID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPoints_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAdjustPoints{} + var fernTestValuePoints int + + // Act + obj.SetPoints(fernTestValuePoints) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReason_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAdjustPoints{} + var fernTestValueReason *string + + // Act + obj.SetReason(fernTestValueReason) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyEventCreateReward(t *testing.T) { + t.Run("SetLoyaltyProgramID", func(t *testing.T) { + obj := &LoyaltyEventCreateReward{} + var fernTestValueLoyaltyProgramID *string + obj.SetLoyaltyProgramID(fernTestValueLoyaltyProgramID) + assert.Equal(t, fernTestValueLoyaltyProgramID, obj.LoyaltyProgramID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRewardID", func(t *testing.T) { + obj := &LoyaltyEventCreateReward{} + var fernTestValueRewardID *string + obj.SetRewardID(fernTestValueRewardID) + assert.Equal(t, fernTestValueRewardID, obj.RewardID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPoints", func(t *testing.T) { + obj := &LoyaltyEventCreateReward{} + var fernTestValuePoints *int + obj.SetPoints(fernTestValuePoints) + assert.Equal(t, fernTestValuePoints, obj.Points) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyEventCreateReward(t *testing.T) { + t.Run("GetLoyaltyProgramID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreateReward{} + var expected *string + obj.LoyaltyProgramID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyProgramID(), "getter should return the property value") + }) + + t.Run("GetLoyaltyProgramID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreateReward{} + obj.LoyaltyProgramID = nil + + // Act & Assert + assert.Nil(t, obj.GetLoyaltyProgramID(), "getter should return nil when property is nil") + }) + + t.Run("GetLoyaltyProgramID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventCreateReward + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyProgramID() // Should return zero value + }) + + t.Run("GetRewardID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreateReward{} + var expected *string + obj.RewardID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRewardID(), "getter should return the property value") + }) + + t.Run("GetRewardID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreateReward{} + obj.RewardID = nil + + // Act & Assert + assert.Nil(t, obj.GetRewardID(), "getter should return nil when property is nil") + }) + + t.Run("GetRewardID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventCreateReward + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRewardID() // Should return zero value + }) + + t.Run("GetPoints", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreateReward{} + var expected *int + obj.Points = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPoints(), "getter should return the property value") + }) + + t.Run("GetPoints_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreateReward{} + obj.Points = nil + + // Act & Assert + assert.Nil(t, obj.GetPoints(), "getter should return nil when property is nil") + }) + + t.Run("GetPoints_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventCreateReward + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPoints() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyEventCreateReward(t *testing.T) { + t.Run("SetLoyaltyProgramID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreateReward{} + var fernTestValueLoyaltyProgramID *string + + // Act + obj.SetLoyaltyProgramID(fernTestValueLoyaltyProgramID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRewardID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreateReward{} + var fernTestValueRewardID *string + + // Act + obj.SetRewardID(fernTestValueRewardID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPoints_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreateReward{} + var fernTestValuePoints *int + + // Act + obj.SetPoints(fernTestValuePoints) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyEventCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LoyaltyEventCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LoyaltyEventCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LoyaltyEventCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LoyaltyEventCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LoyaltyEventCreatedEvent{} + var fernTestValueData *LoyaltyEventCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyEventCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEvent{} + var expected *LoyaltyEventCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyEventCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEvent{} + var fernTestValueData *LoyaltyEventCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyEventCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &LoyaltyEventCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &LoyaltyEventCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &LoyaltyEventCreatedEventData{} + var fernTestValueObject *LoyaltyEventCreatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyEventCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEventData{} + var expected *LoyaltyEventCreatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyEventCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEventData{} + var fernTestValueObject *LoyaltyEventCreatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyEventCreatedEventObject(t *testing.T) { + t.Run("SetLoyaltyEvent", func(t *testing.T) { + obj := &LoyaltyEventCreatedEventObject{} + var fernTestValueLoyaltyEvent *LoyaltyEvent + obj.SetLoyaltyEvent(fernTestValueLoyaltyEvent) + assert.Equal(t, fernTestValueLoyaltyEvent, obj.LoyaltyEvent) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyEventCreatedEventObject(t *testing.T) { + t.Run("GetLoyaltyEvent", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEventObject{} + var expected *LoyaltyEvent + obj.LoyaltyEvent = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyEvent(), "getter should return the property value") + }) + + t.Run("GetLoyaltyEvent_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEventObject{} + obj.LoyaltyEvent = nil + + // Act & Assert + assert.Nil(t, obj.GetLoyaltyEvent(), "getter should return nil when property is nil") + }) + + t.Run("GetLoyaltyEvent_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventCreatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyEvent() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyEventCreatedEventObject(t *testing.T) { + t.Run("SetLoyaltyEvent_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEventObject{} + var fernTestValueLoyaltyEvent *LoyaltyEvent + + // Act + obj.SetLoyaltyEvent(fernTestValueLoyaltyEvent) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyEventDeleteReward(t *testing.T) { + t.Run("SetLoyaltyProgramID", func(t *testing.T) { + obj := &LoyaltyEventDeleteReward{} + var fernTestValueLoyaltyProgramID *string + obj.SetLoyaltyProgramID(fernTestValueLoyaltyProgramID) + assert.Equal(t, fernTestValueLoyaltyProgramID, obj.LoyaltyProgramID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRewardID", func(t *testing.T) { + obj := &LoyaltyEventDeleteReward{} + var fernTestValueRewardID *string + obj.SetRewardID(fernTestValueRewardID) + assert.Equal(t, fernTestValueRewardID, obj.RewardID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPoints", func(t *testing.T) { + obj := &LoyaltyEventDeleteReward{} + var fernTestValuePoints *int + obj.SetPoints(fernTestValuePoints) + assert.Equal(t, fernTestValuePoints, obj.Points) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyEventDeleteReward(t *testing.T) { + t.Run("GetLoyaltyProgramID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventDeleteReward{} + var expected *string + obj.LoyaltyProgramID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyProgramID(), "getter should return the property value") + }) + + t.Run("GetLoyaltyProgramID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventDeleteReward{} + obj.LoyaltyProgramID = nil + + // Act & Assert + assert.Nil(t, obj.GetLoyaltyProgramID(), "getter should return nil when property is nil") + }) + + t.Run("GetLoyaltyProgramID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventDeleteReward + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyProgramID() // Should return zero value + }) + + t.Run("GetRewardID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventDeleteReward{} + var expected *string + obj.RewardID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRewardID(), "getter should return the property value") + }) + + t.Run("GetRewardID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventDeleteReward{} + obj.RewardID = nil + + // Act & Assert + assert.Nil(t, obj.GetRewardID(), "getter should return nil when property is nil") + }) + + t.Run("GetRewardID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventDeleteReward + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRewardID() // Should return zero value + }) + + t.Run("GetPoints", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventDeleteReward{} + var expected *int + obj.Points = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPoints(), "getter should return the property value") + }) + + t.Run("GetPoints_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventDeleteReward{} + obj.Points = nil + + // Act & Assert + assert.Nil(t, obj.GetPoints(), "getter should return nil when property is nil") + }) + + t.Run("GetPoints_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventDeleteReward + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPoints() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyEventDeleteReward(t *testing.T) { + t.Run("SetLoyaltyProgramID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventDeleteReward{} + var fernTestValueLoyaltyProgramID *string + + // Act + obj.SetLoyaltyProgramID(fernTestValueLoyaltyProgramID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRewardID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventDeleteReward{} + var fernTestValueRewardID *string + + // Act + obj.SetRewardID(fernTestValueRewardID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPoints_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventDeleteReward{} + var fernTestValuePoints *int + + // Act + obj.SetPoints(fernTestValuePoints) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyEventExpirePoints(t *testing.T) { + t.Run("SetLoyaltyProgramID", func(t *testing.T) { + obj := &LoyaltyEventExpirePoints{} + var fernTestValueLoyaltyProgramID *string + obj.SetLoyaltyProgramID(fernTestValueLoyaltyProgramID) + assert.Equal(t, fernTestValueLoyaltyProgramID, obj.LoyaltyProgramID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPoints", func(t *testing.T) { + obj := &LoyaltyEventExpirePoints{} + var fernTestValuePoints int + obj.SetPoints(fernTestValuePoints) + assert.Equal(t, fernTestValuePoints, obj.Points) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyEventExpirePoints(t *testing.T) { + t.Run("GetLoyaltyProgramID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventExpirePoints{} + var expected *string + obj.LoyaltyProgramID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyProgramID(), "getter should return the property value") + }) + + t.Run("GetLoyaltyProgramID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventExpirePoints{} + obj.LoyaltyProgramID = nil + + // Act & Assert + assert.Nil(t, obj.GetLoyaltyProgramID(), "getter should return nil when property is nil") + }) + + t.Run("GetLoyaltyProgramID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventExpirePoints + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyProgramID() // Should return zero value + }) + + t.Run("GetPoints", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventExpirePoints{} + var expected int + obj.Points = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPoints(), "getter should return the property value") + }) + + t.Run("GetPoints_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventExpirePoints + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPoints() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyEventExpirePoints(t *testing.T) { + t.Run("SetLoyaltyProgramID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventExpirePoints{} + var fernTestValueLoyaltyProgramID *string + + // Act + obj.SetLoyaltyProgramID(fernTestValueLoyaltyProgramID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPoints_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventExpirePoints{} + var fernTestValuePoints int + + // Act + obj.SetPoints(fernTestValuePoints) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyEventOther(t *testing.T) { + t.Run("SetLoyaltyProgramID", func(t *testing.T) { + obj := &LoyaltyEventOther{} + var fernTestValueLoyaltyProgramID *string + obj.SetLoyaltyProgramID(fernTestValueLoyaltyProgramID) + assert.Equal(t, fernTestValueLoyaltyProgramID, obj.LoyaltyProgramID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPoints", func(t *testing.T) { + obj := &LoyaltyEventOther{} + var fernTestValuePoints int + obj.SetPoints(fernTestValuePoints) + assert.Equal(t, fernTestValuePoints, obj.Points) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyEventOther(t *testing.T) { + t.Run("GetLoyaltyProgramID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventOther{} + var expected *string + obj.LoyaltyProgramID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyProgramID(), "getter should return the property value") + }) + + t.Run("GetLoyaltyProgramID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventOther{} + obj.LoyaltyProgramID = nil + + // Act & Assert + assert.Nil(t, obj.GetLoyaltyProgramID(), "getter should return nil when property is nil") + }) + + t.Run("GetLoyaltyProgramID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventOther + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyProgramID() // Should return zero value + }) + + t.Run("GetPoints", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventOther{} + var expected int + obj.Points = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPoints(), "getter should return the property value") + }) + + t.Run("GetPoints_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventOther + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPoints() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyEventOther(t *testing.T) { + t.Run("SetLoyaltyProgramID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventOther{} + var fernTestValueLoyaltyProgramID *string + + // Act + obj.SetLoyaltyProgramID(fernTestValueLoyaltyProgramID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPoints_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventOther{} + var fernTestValuePoints int + + // Act + obj.SetPoints(fernTestValuePoints) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyEventRedeemReward(t *testing.T) { + t.Run("SetLoyaltyProgramID", func(t *testing.T) { + obj := &LoyaltyEventRedeemReward{} + var fernTestValueLoyaltyProgramID *string + obj.SetLoyaltyProgramID(fernTestValueLoyaltyProgramID) + assert.Equal(t, fernTestValueLoyaltyProgramID, obj.LoyaltyProgramID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRewardID", func(t *testing.T) { + obj := &LoyaltyEventRedeemReward{} + var fernTestValueRewardID *string + obj.SetRewardID(fernTestValueRewardID) + assert.Equal(t, fernTestValueRewardID, obj.RewardID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrderID", func(t *testing.T) { + obj := &LoyaltyEventRedeemReward{} + var fernTestValueOrderID *string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyEventRedeemReward(t *testing.T) { + t.Run("GetLoyaltyProgramID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventRedeemReward{} + var expected *string + obj.LoyaltyProgramID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyProgramID(), "getter should return the property value") + }) + + t.Run("GetLoyaltyProgramID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventRedeemReward{} + obj.LoyaltyProgramID = nil + + // Act & Assert + assert.Nil(t, obj.GetLoyaltyProgramID(), "getter should return nil when property is nil") + }) + + t.Run("GetLoyaltyProgramID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventRedeemReward + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyProgramID() // Should return zero value + }) + + t.Run("GetRewardID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventRedeemReward{} + var expected *string + obj.RewardID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRewardID(), "getter should return the property value") + }) + + t.Run("GetRewardID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventRedeemReward{} + obj.RewardID = nil + + // Act & Assert + assert.Nil(t, obj.GetRewardID(), "getter should return nil when property is nil") + }) + + t.Run("GetRewardID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventRedeemReward + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRewardID() // Should return zero value + }) + + t.Run("GetOrderID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventRedeemReward{} + var expected *string + obj.OrderID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderID(), "getter should return the property value") + }) + + t.Run("GetOrderID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventRedeemReward{} + obj.OrderID = nil + + // Act & Assert + assert.Nil(t, obj.GetOrderID(), "getter should return nil when property is nil") + }) + + t.Run("GetOrderID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventRedeemReward + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyEventRedeemReward(t *testing.T) { + t.Run("SetLoyaltyProgramID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventRedeemReward{} + var fernTestValueLoyaltyProgramID *string + + // Act + obj.SetLoyaltyProgramID(fernTestValueLoyaltyProgramID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRewardID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventRedeemReward{} + var fernTestValueRewardID *string + + // Act + obj.SetRewardID(fernTestValueRewardID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventRedeemReward{} + var fernTestValueOrderID *string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyProgram(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &LoyaltyProgram{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &LoyaltyProgram{} + var fernTestValueStatus *LoyaltyProgramStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRewardTiers", func(t *testing.T) { + obj := &LoyaltyProgram{} + var fernTestValueRewardTiers []*LoyaltyProgramRewardTier + obj.SetRewardTiers(fernTestValueRewardTiers) + assert.Equal(t, fernTestValueRewardTiers, obj.RewardTiers) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExpirationPolicy", func(t *testing.T) { + obj := &LoyaltyProgram{} + var fernTestValueExpirationPolicy *LoyaltyProgramExpirationPolicy + obj.SetExpirationPolicy(fernTestValueExpirationPolicy) + assert.Equal(t, fernTestValueExpirationPolicy, obj.ExpirationPolicy) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTerminology", func(t *testing.T) { + obj := &LoyaltyProgram{} + var fernTestValueTerminology *LoyaltyProgramTerminology + obj.SetTerminology(fernTestValueTerminology) + assert.Equal(t, fernTestValueTerminology, obj.Terminology) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationIDs", func(t *testing.T) { + obj := &LoyaltyProgram{} + var fernTestValueLocationIDs []string + obj.SetLocationIDs(fernTestValueLocationIDs) + assert.Equal(t, fernTestValueLocationIDs, obj.LocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LoyaltyProgram{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &LoyaltyProgram{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAccrualRules", func(t *testing.T) { + obj := &LoyaltyProgram{} + var fernTestValueAccrualRules []*LoyaltyProgramAccrualRule + obj.SetAccrualRules(fernTestValueAccrualRules) + assert.Equal(t, fernTestValueAccrualRules, obj.AccrualRules) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyProgram(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgram{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgram{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgram + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgram{} + var expected *LoyaltyProgramStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgram{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgram + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetRewardTiers", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgram{} + var expected []*LoyaltyProgramRewardTier + obj.RewardTiers = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRewardTiers(), "getter should return the property value") + }) + + t.Run("GetRewardTiers_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgram{} + obj.RewardTiers = nil + + // Act & Assert + assert.Nil(t, obj.GetRewardTiers(), "getter should return nil when property is nil") + }) + + t.Run("GetRewardTiers_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgram + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRewardTiers() // Should return zero value + }) + + t.Run("GetExpirationPolicy", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgram{} + var expected *LoyaltyProgramExpirationPolicy + obj.ExpirationPolicy = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExpirationPolicy(), "getter should return the property value") + }) + + t.Run("GetExpirationPolicy_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgram{} + obj.ExpirationPolicy = nil + + // Act & Assert + assert.Nil(t, obj.GetExpirationPolicy(), "getter should return nil when property is nil") + }) + + t.Run("GetExpirationPolicy_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgram + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExpirationPolicy() // Should return zero value + }) + + t.Run("GetTerminology", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgram{} + var expected *LoyaltyProgramTerminology + obj.Terminology = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTerminology(), "getter should return the property value") + }) + + t.Run("GetTerminology_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgram{} + obj.Terminology = nil + + // Act & Assert + assert.Nil(t, obj.GetTerminology(), "getter should return nil when property is nil") + }) + + t.Run("GetTerminology_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgram + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTerminology() // Should return zero value + }) + + t.Run("GetLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgram{} + var expected []string + obj.LocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationIDs(), "getter should return the property value") + }) + + t.Run("GetLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgram{} + obj.LocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgram + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationIDs() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgram{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgram{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgram + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgram{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgram{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgram + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetAccrualRules", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgram{} + var expected []*LoyaltyProgramAccrualRule + obj.AccrualRules = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAccrualRules(), "getter should return the property value") + }) + + t.Run("GetAccrualRules_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgram{} + obj.AccrualRules = nil + + // Act & Assert + assert.Nil(t, obj.GetAccrualRules(), "getter should return nil when property is nil") + }) + + t.Run("GetAccrualRules_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgram + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAccrualRules() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyProgram(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgram{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgram{} + var fernTestValueStatus *LoyaltyProgramStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRewardTiers_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgram{} + var fernTestValueRewardTiers []*LoyaltyProgramRewardTier + + // Act + obj.SetRewardTiers(fernTestValueRewardTiers) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExpirationPolicy_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgram{} + var fernTestValueExpirationPolicy *LoyaltyProgramExpirationPolicy + + // Act + obj.SetExpirationPolicy(fernTestValueExpirationPolicy) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTerminology_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgram{} + var fernTestValueTerminology *LoyaltyProgramTerminology + + // Act + obj.SetTerminology(fernTestValueTerminology) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgram{} + var fernTestValueLocationIDs []string + + // Act + obj.SetLocationIDs(fernTestValueLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgram{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgram{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAccrualRules_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgram{} + var fernTestValueAccrualRules []*LoyaltyProgramAccrualRule + + // Act + obj.SetAccrualRules(fernTestValueAccrualRules) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyProgramAccrualRule(t *testing.T) { + t.Run("SetAccrualType", func(t *testing.T) { + obj := &LoyaltyProgramAccrualRule{} + var fernTestValueAccrualType LoyaltyProgramAccrualRuleType + obj.SetAccrualType(fernTestValueAccrualType) + assert.Equal(t, fernTestValueAccrualType, obj.AccrualType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPoints", func(t *testing.T) { + obj := &LoyaltyProgramAccrualRule{} + var fernTestValuePoints *int + obj.SetPoints(fernTestValuePoints) + assert.Equal(t, fernTestValuePoints, obj.Points) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVisitData", func(t *testing.T) { + obj := &LoyaltyProgramAccrualRule{} + var fernTestValueVisitData *LoyaltyProgramAccrualRuleVisitData + obj.SetVisitData(fernTestValueVisitData) + assert.Equal(t, fernTestValueVisitData, obj.VisitData) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSpendData", func(t *testing.T) { + obj := &LoyaltyProgramAccrualRule{} + var fernTestValueSpendData *LoyaltyProgramAccrualRuleSpendData + obj.SetSpendData(fernTestValueSpendData) + assert.Equal(t, fernTestValueSpendData, obj.SpendData) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetItemVariationData", func(t *testing.T) { + obj := &LoyaltyProgramAccrualRule{} + var fernTestValueItemVariationData *LoyaltyProgramAccrualRuleItemVariationData + obj.SetItemVariationData(fernTestValueItemVariationData) + assert.Equal(t, fernTestValueItemVariationData, obj.ItemVariationData) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCategoryData", func(t *testing.T) { + obj := &LoyaltyProgramAccrualRule{} + var fernTestValueCategoryData *LoyaltyProgramAccrualRuleCategoryData + obj.SetCategoryData(fernTestValueCategoryData) + assert.Equal(t, fernTestValueCategoryData, obj.CategoryData) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyProgramAccrualRule(t *testing.T) { + t.Run("GetAccrualType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRule{} + var expected LoyaltyProgramAccrualRuleType + obj.AccrualType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAccrualType(), "getter should return the property value") + }) + + t.Run("GetAccrualType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramAccrualRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAccrualType() // Should return zero value + }) + + t.Run("GetPoints", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRule{} + var expected *int + obj.Points = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPoints(), "getter should return the property value") + }) + + t.Run("GetPoints_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRule{} + obj.Points = nil + + // Act & Assert + assert.Nil(t, obj.GetPoints(), "getter should return nil when property is nil") + }) + + t.Run("GetPoints_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramAccrualRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPoints() // Should return zero value + }) + + t.Run("GetVisitData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRule{} + var expected *LoyaltyProgramAccrualRuleVisitData + obj.VisitData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVisitData(), "getter should return the property value") + }) + + t.Run("GetVisitData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRule{} + obj.VisitData = nil + + // Act & Assert + assert.Nil(t, obj.GetVisitData(), "getter should return nil when property is nil") + }) + + t.Run("GetVisitData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramAccrualRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVisitData() // Should return zero value + }) + + t.Run("GetSpendData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRule{} + var expected *LoyaltyProgramAccrualRuleSpendData + obj.SpendData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSpendData(), "getter should return the property value") + }) + + t.Run("GetSpendData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRule{} + obj.SpendData = nil + + // Act & Assert + assert.Nil(t, obj.GetSpendData(), "getter should return nil when property is nil") + }) + + t.Run("GetSpendData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramAccrualRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSpendData() // Should return zero value + }) + + t.Run("GetItemVariationData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRule{} + var expected *LoyaltyProgramAccrualRuleItemVariationData + obj.ItemVariationData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItemVariationData(), "getter should return the property value") + }) + + t.Run("GetItemVariationData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRule{} + obj.ItemVariationData = nil + + // Act & Assert + assert.Nil(t, obj.GetItemVariationData(), "getter should return nil when property is nil") + }) + + t.Run("GetItemVariationData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramAccrualRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItemVariationData() // Should return zero value + }) + + t.Run("GetCategoryData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRule{} + var expected *LoyaltyProgramAccrualRuleCategoryData + obj.CategoryData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCategoryData(), "getter should return the property value") + }) + + t.Run("GetCategoryData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRule{} + obj.CategoryData = nil + + // Act & Assert + assert.Nil(t, obj.GetCategoryData(), "getter should return nil when property is nil") + }) + + t.Run("GetCategoryData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramAccrualRule + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCategoryData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyProgramAccrualRule(t *testing.T) { + t.Run("SetAccrualType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRule{} + var fernTestValueAccrualType LoyaltyProgramAccrualRuleType + + // Act + obj.SetAccrualType(fernTestValueAccrualType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPoints_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRule{} + var fernTestValuePoints *int + + // Act + obj.SetPoints(fernTestValuePoints) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVisitData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRule{} + var fernTestValueVisitData *LoyaltyProgramAccrualRuleVisitData + + // Act + obj.SetVisitData(fernTestValueVisitData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSpendData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRule{} + var fernTestValueSpendData *LoyaltyProgramAccrualRuleSpendData + + // Act + obj.SetSpendData(fernTestValueSpendData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetItemVariationData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRule{} + var fernTestValueItemVariationData *LoyaltyProgramAccrualRuleItemVariationData + + // Act + obj.SetItemVariationData(fernTestValueItemVariationData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCategoryData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRule{} + var fernTestValueCategoryData *LoyaltyProgramAccrualRuleCategoryData + + // Act + obj.SetCategoryData(fernTestValueCategoryData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyProgramAccrualRuleCategoryData(t *testing.T) { + t.Run("SetCategoryID", func(t *testing.T) { + obj := &LoyaltyProgramAccrualRuleCategoryData{} + var fernTestValueCategoryID string + obj.SetCategoryID(fernTestValueCategoryID) + assert.Equal(t, fernTestValueCategoryID, obj.CategoryID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyProgramAccrualRuleCategoryData(t *testing.T) { + t.Run("GetCategoryID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRuleCategoryData{} + var expected string + obj.CategoryID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCategoryID(), "getter should return the property value") + }) + + t.Run("GetCategoryID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramAccrualRuleCategoryData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCategoryID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyProgramAccrualRuleCategoryData(t *testing.T) { + t.Run("SetCategoryID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRuleCategoryData{} + var fernTestValueCategoryID string + + // Act + obj.SetCategoryID(fernTestValueCategoryID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyProgramAccrualRuleItemVariationData(t *testing.T) { + t.Run("SetItemVariationID", func(t *testing.T) { + obj := &LoyaltyProgramAccrualRuleItemVariationData{} + var fernTestValueItemVariationID string + obj.SetItemVariationID(fernTestValueItemVariationID) + assert.Equal(t, fernTestValueItemVariationID, obj.ItemVariationID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyProgramAccrualRuleItemVariationData(t *testing.T) { + t.Run("GetItemVariationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRuleItemVariationData{} + var expected string + obj.ItemVariationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItemVariationID(), "getter should return the property value") + }) + + t.Run("GetItemVariationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramAccrualRuleItemVariationData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItemVariationID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyProgramAccrualRuleItemVariationData(t *testing.T) { + t.Run("SetItemVariationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRuleItemVariationData{} + var fernTestValueItemVariationID string + + // Act + obj.SetItemVariationID(fernTestValueItemVariationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyProgramAccrualRuleSpendData(t *testing.T) { + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &LoyaltyProgramAccrualRuleSpendData{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExcludedCategoryIDs", func(t *testing.T) { + obj := &LoyaltyProgramAccrualRuleSpendData{} + var fernTestValueExcludedCategoryIDs []string + obj.SetExcludedCategoryIDs(fernTestValueExcludedCategoryIDs) + assert.Equal(t, fernTestValueExcludedCategoryIDs, obj.ExcludedCategoryIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExcludedItemVariationIDs", func(t *testing.T) { + obj := &LoyaltyProgramAccrualRuleSpendData{} + var fernTestValueExcludedItemVariationIDs []string + obj.SetExcludedItemVariationIDs(fernTestValueExcludedItemVariationIDs) + assert.Equal(t, fernTestValueExcludedItemVariationIDs, obj.ExcludedItemVariationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTaxMode", func(t *testing.T) { + obj := &LoyaltyProgramAccrualRuleSpendData{} + var fernTestValueTaxMode LoyaltyProgramAccrualRuleTaxMode + obj.SetTaxMode(fernTestValueTaxMode) + assert.Equal(t, fernTestValueTaxMode, obj.TaxMode) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyProgramAccrualRuleSpendData(t *testing.T) { + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRuleSpendData{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRuleSpendData{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramAccrualRuleSpendData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + + t.Run("GetExcludedCategoryIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRuleSpendData{} + var expected []string + obj.ExcludedCategoryIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExcludedCategoryIDs(), "getter should return the property value") + }) + + t.Run("GetExcludedCategoryIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRuleSpendData{} + obj.ExcludedCategoryIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetExcludedCategoryIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetExcludedCategoryIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramAccrualRuleSpendData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExcludedCategoryIDs() // Should return zero value + }) + + t.Run("GetExcludedItemVariationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRuleSpendData{} + var expected []string + obj.ExcludedItemVariationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExcludedItemVariationIDs(), "getter should return the property value") + }) + + t.Run("GetExcludedItemVariationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRuleSpendData{} + obj.ExcludedItemVariationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetExcludedItemVariationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetExcludedItemVariationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramAccrualRuleSpendData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExcludedItemVariationIDs() // Should return zero value + }) + + t.Run("GetTaxMode", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRuleSpendData{} + var expected LoyaltyProgramAccrualRuleTaxMode + obj.TaxMode = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTaxMode(), "getter should return the property value") + }) + + t.Run("GetTaxMode_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramAccrualRuleSpendData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTaxMode() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyProgramAccrualRuleSpendData(t *testing.T) { + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRuleSpendData{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExcludedCategoryIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRuleSpendData{} + var fernTestValueExcludedCategoryIDs []string + + // Act + obj.SetExcludedCategoryIDs(fernTestValueExcludedCategoryIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExcludedItemVariationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRuleSpendData{} + var fernTestValueExcludedItemVariationIDs []string + + // Act + obj.SetExcludedItemVariationIDs(fernTestValueExcludedItemVariationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTaxMode_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRuleSpendData{} + var fernTestValueTaxMode LoyaltyProgramAccrualRuleTaxMode + + // Act + obj.SetTaxMode(fernTestValueTaxMode) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyProgramAccrualRuleVisitData(t *testing.T) { + t.Run("SetMinimumAmountMoney", func(t *testing.T) { + obj := &LoyaltyProgramAccrualRuleVisitData{} + var fernTestValueMinimumAmountMoney *Money + obj.SetMinimumAmountMoney(fernTestValueMinimumAmountMoney) + assert.Equal(t, fernTestValueMinimumAmountMoney, obj.MinimumAmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTaxMode", func(t *testing.T) { + obj := &LoyaltyProgramAccrualRuleVisitData{} + var fernTestValueTaxMode LoyaltyProgramAccrualRuleTaxMode + obj.SetTaxMode(fernTestValueTaxMode) + assert.Equal(t, fernTestValueTaxMode, obj.TaxMode) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyProgramAccrualRuleVisitData(t *testing.T) { + t.Run("GetMinimumAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRuleVisitData{} + var expected *Money + obj.MinimumAmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMinimumAmountMoney(), "getter should return the property value") + }) + + t.Run("GetMinimumAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRuleVisitData{} + obj.MinimumAmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetMinimumAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetMinimumAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramAccrualRuleVisitData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMinimumAmountMoney() // Should return zero value + }) + + t.Run("GetTaxMode", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRuleVisitData{} + var expected LoyaltyProgramAccrualRuleTaxMode + obj.TaxMode = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTaxMode(), "getter should return the property value") + }) + + t.Run("GetTaxMode_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramAccrualRuleVisitData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTaxMode() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyProgramAccrualRuleVisitData(t *testing.T) { + t.Run("SetMinimumAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRuleVisitData{} + var fernTestValueMinimumAmountMoney *Money + + // Act + obj.SetMinimumAmountMoney(fernTestValueMinimumAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTaxMode_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRuleVisitData{} + var fernTestValueTaxMode LoyaltyProgramAccrualRuleTaxMode + + // Act + obj.SetTaxMode(fernTestValueTaxMode) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyProgramCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LoyaltyProgramCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LoyaltyProgramCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LoyaltyProgramCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LoyaltyProgramCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LoyaltyProgramCreatedEvent{} + var fernTestValueData *LoyaltyProgramCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyProgramCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEvent{} + var expected *LoyaltyProgramCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyProgramCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEvent{} + var fernTestValueData *LoyaltyProgramCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyProgramCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &LoyaltyProgramCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &LoyaltyProgramCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &LoyaltyProgramCreatedEventData{} + var fernTestValueObject *LoyaltyProgramCreatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyProgramCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEventData{} + var expected *LoyaltyProgramCreatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyProgramCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEventData{} + var fernTestValueObject *LoyaltyProgramCreatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyProgramCreatedEventObject(t *testing.T) { + t.Run("SetLoyaltyProgram", func(t *testing.T) { + obj := &LoyaltyProgramCreatedEventObject{} + var fernTestValueLoyaltyProgram *LoyaltyProgram + obj.SetLoyaltyProgram(fernTestValueLoyaltyProgram) + assert.Equal(t, fernTestValueLoyaltyProgram, obj.LoyaltyProgram) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyProgramCreatedEventObject(t *testing.T) { + t.Run("GetLoyaltyProgram", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEventObject{} + var expected *LoyaltyProgram + obj.LoyaltyProgram = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyProgram(), "getter should return the property value") + }) + + t.Run("GetLoyaltyProgram_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEventObject{} + obj.LoyaltyProgram = nil + + // Act & Assert + assert.Nil(t, obj.GetLoyaltyProgram(), "getter should return nil when property is nil") + }) + + t.Run("GetLoyaltyProgram_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramCreatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyProgram() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyProgramCreatedEventObject(t *testing.T) { + t.Run("SetLoyaltyProgram_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEventObject{} + var fernTestValueLoyaltyProgram *LoyaltyProgram + + // Act + obj.SetLoyaltyProgram(fernTestValueLoyaltyProgram) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyProgramExpirationPolicy(t *testing.T) { + t.Run("SetExpirationDuration", func(t *testing.T) { + obj := &LoyaltyProgramExpirationPolicy{} + var fernTestValueExpirationDuration string + obj.SetExpirationDuration(fernTestValueExpirationDuration) + assert.Equal(t, fernTestValueExpirationDuration, obj.ExpirationDuration) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyProgramExpirationPolicy(t *testing.T) { + t.Run("GetExpirationDuration", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramExpirationPolicy{} + var expected string + obj.ExpirationDuration = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExpirationDuration(), "getter should return the property value") + }) + + t.Run("GetExpirationDuration_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramExpirationPolicy + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExpirationDuration() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyProgramExpirationPolicy(t *testing.T) { + t.Run("SetExpirationDuration_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramExpirationPolicy{} + var fernTestValueExpirationDuration string + + // Act + obj.SetExpirationDuration(fernTestValueExpirationDuration) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyProgramRewardTier(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &LoyaltyProgramRewardTier{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPoints", func(t *testing.T) { + obj := &LoyaltyProgramRewardTier{} + var fernTestValuePoints int + obj.SetPoints(fernTestValuePoints) + assert.Equal(t, fernTestValuePoints, obj.Points) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &LoyaltyProgramRewardTier{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LoyaltyProgramRewardTier{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPricingRuleReference", func(t *testing.T) { + obj := &LoyaltyProgramRewardTier{} + var fernTestValuePricingRuleReference *CatalogObjectReference + obj.SetPricingRuleReference(fernTestValuePricingRuleReference) + assert.Equal(t, fernTestValuePricingRuleReference, obj.PricingRuleReference) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyProgramRewardTier(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramRewardTier{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramRewardTier{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramRewardTier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetPoints", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramRewardTier{} + var expected int + obj.Points = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPoints(), "getter should return the property value") + }) + + t.Run("GetPoints_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramRewardTier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPoints() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramRewardTier{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramRewardTier{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramRewardTier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramRewardTier{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramRewardTier{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramRewardTier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetPricingRuleReference", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramRewardTier{} + var expected *CatalogObjectReference + obj.PricingRuleReference = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPricingRuleReference(), "getter should return the property value") + }) + + t.Run("GetPricingRuleReference_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramRewardTier{} + obj.PricingRuleReference = nil + + // Act & Assert + assert.Nil(t, obj.GetPricingRuleReference(), "getter should return nil when property is nil") + }) + + t.Run("GetPricingRuleReference_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramRewardTier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPricingRuleReference() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyProgramRewardTier(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramRewardTier{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPoints_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramRewardTier{} + var fernTestValuePoints int + + // Act + obj.SetPoints(fernTestValuePoints) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramRewardTier{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramRewardTier{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPricingRuleReference_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramRewardTier{} + var fernTestValuePricingRuleReference *CatalogObjectReference + + // Act + obj.SetPricingRuleReference(fernTestValuePricingRuleReference) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyProgramTerminology(t *testing.T) { + t.Run("SetOne", func(t *testing.T) { + obj := &LoyaltyProgramTerminology{} + var fernTestValueOne string + obj.SetOne(fernTestValueOne) + assert.Equal(t, fernTestValueOne, obj.One) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOther", func(t *testing.T) { + obj := &LoyaltyProgramTerminology{} + var fernTestValueOther string + obj.SetOther(fernTestValueOther) + assert.Equal(t, fernTestValueOther, obj.Other) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyProgramTerminology(t *testing.T) { + t.Run("GetOne", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramTerminology{} + var expected string + obj.One = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOne(), "getter should return the property value") + }) + + t.Run("GetOne_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramTerminology + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOne() // Should return zero value + }) + + t.Run("GetOther", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramTerminology{} + var expected string + obj.Other = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOther(), "getter should return the property value") + }) + + t.Run("GetOther_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramTerminology + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOther() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyProgramTerminology(t *testing.T) { + t.Run("SetOne_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramTerminology{} + var fernTestValueOne string + + // Act + obj.SetOne(fernTestValueOne) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOther_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramTerminology{} + var fernTestValueOther string + + // Act + obj.SetOther(fernTestValueOther) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyProgramUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LoyaltyProgramUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LoyaltyProgramUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LoyaltyProgramUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LoyaltyProgramUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LoyaltyProgramUpdatedEvent{} + var fernTestValueData *LoyaltyProgramUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyProgramUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEvent{} + var expected *LoyaltyProgramUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyProgramUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEvent{} + var fernTestValueData *LoyaltyProgramUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyProgramUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &LoyaltyProgramUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &LoyaltyProgramUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &LoyaltyProgramUpdatedEventData{} + var fernTestValueObject *LoyaltyProgramUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyProgramUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEventData{} + var expected *LoyaltyProgramUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyProgramUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEventData{} + var fernTestValueObject *LoyaltyProgramUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyProgramUpdatedEventObject(t *testing.T) { + t.Run("SetLoyaltyProgram", func(t *testing.T) { + obj := &LoyaltyProgramUpdatedEventObject{} + var fernTestValueLoyaltyProgram *LoyaltyProgram + obj.SetLoyaltyProgram(fernTestValueLoyaltyProgram) + assert.Equal(t, fernTestValueLoyaltyProgram, obj.LoyaltyProgram) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyProgramUpdatedEventObject(t *testing.T) { + t.Run("GetLoyaltyProgram", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEventObject{} + var expected *LoyaltyProgram + obj.LoyaltyProgram = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyProgram(), "getter should return the property value") + }) + + t.Run("GetLoyaltyProgram_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEventObject{} + obj.LoyaltyProgram = nil + + // Act & Assert + assert.Nil(t, obj.GetLoyaltyProgram(), "getter should return nil when property is nil") + }) + + t.Run("GetLoyaltyProgram_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyProgram() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyProgramUpdatedEventObject(t *testing.T) { + t.Run("SetLoyaltyProgram_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEventObject{} + var fernTestValueLoyaltyProgram *LoyaltyProgram + + // Act + obj.SetLoyaltyProgram(fernTestValueLoyaltyProgram) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyPromotion(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &LoyaltyPromotion{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &LoyaltyPromotion{} + var fernTestValueName string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIncentive", func(t *testing.T) { + obj := &LoyaltyPromotion{} + var fernTestValueIncentive *LoyaltyPromotionIncentive + obj.SetIncentive(fernTestValueIncentive) + assert.Equal(t, fernTestValueIncentive, obj.Incentive) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAvailableTime", func(t *testing.T) { + obj := &LoyaltyPromotion{} + var fernTestValueAvailableTime *LoyaltyPromotionAvailableTimeData + obj.SetAvailableTime(fernTestValueAvailableTime) + assert.Equal(t, fernTestValueAvailableTime, obj.AvailableTime) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTriggerLimit", func(t *testing.T) { + obj := &LoyaltyPromotion{} + var fernTestValueTriggerLimit *LoyaltyPromotionTriggerLimit + obj.SetTriggerLimit(fernTestValueTriggerLimit) + assert.Equal(t, fernTestValueTriggerLimit, obj.TriggerLimit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &LoyaltyPromotion{} + var fernTestValueStatus *LoyaltyPromotionStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LoyaltyPromotion{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCanceledAt", func(t *testing.T) { + obj := &LoyaltyPromotion{} + var fernTestValueCanceledAt *string + obj.SetCanceledAt(fernTestValueCanceledAt) + assert.Equal(t, fernTestValueCanceledAt, obj.CanceledAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &LoyaltyPromotion{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLoyaltyProgramID", func(t *testing.T) { + obj := &LoyaltyPromotion{} + var fernTestValueLoyaltyProgramID *string + obj.SetLoyaltyProgramID(fernTestValueLoyaltyProgramID) + assert.Equal(t, fernTestValueLoyaltyProgramID, obj.LoyaltyProgramID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMinimumSpendAmountMoney", func(t *testing.T) { + obj := &LoyaltyPromotion{} + var fernTestValueMinimumSpendAmountMoney *Money + obj.SetMinimumSpendAmountMoney(fernTestValueMinimumSpendAmountMoney) + assert.Equal(t, fernTestValueMinimumSpendAmountMoney, obj.MinimumSpendAmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQualifyingItemVariationIDs", func(t *testing.T) { + obj := &LoyaltyPromotion{} + var fernTestValueQualifyingItemVariationIDs []string + obj.SetQualifyingItemVariationIDs(fernTestValueQualifyingItemVariationIDs) + assert.Equal(t, fernTestValueQualifyingItemVariationIDs, obj.QualifyingItemVariationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQualifyingCategoryIDs", func(t *testing.T) { + obj := &LoyaltyPromotion{} + var fernTestValueQualifyingCategoryIDs []string + obj.SetQualifyingCategoryIDs(fernTestValueQualifyingCategoryIDs) + assert.Equal(t, fernTestValueQualifyingCategoryIDs, obj.QualifyingCategoryIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyPromotion(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotion + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + var expected string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotion + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetIncentive", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + var expected *LoyaltyPromotionIncentive + obj.Incentive = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIncentive(), "getter should return the property value") + }) + + t.Run("GetIncentive_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + obj.Incentive = nil + + // Act & Assert + assert.Nil(t, obj.GetIncentive(), "getter should return nil when property is nil") + }) + + t.Run("GetIncentive_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotion + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIncentive() // Should return zero value + }) + + t.Run("GetAvailableTime", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + var expected *LoyaltyPromotionAvailableTimeData + obj.AvailableTime = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAvailableTime(), "getter should return the property value") + }) + + t.Run("GetAvailableTime_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + obj.AvailableTime = nil + + // Act & Assert + assert.Nil(t, obj.GetAvailableTime(), "getter should return nil when property is nil") + }) + + t.Run("GetAvailableTime_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotion + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAvailableTime() // Should return zero value + }) + + t.Run("GetTriggerLimit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + var expected *LoyaltyPromotionTriggerLimit + obj.TriggerLimit = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTriggerLimit(), "getter should return the property value") + }) + + t.Run("GetTriggerLimit_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + obj.TriggerLimit = nil + + // Act & Assert + assert.Nil(t, obj.GetTriggerLimit(), "getter should return nil when property is nil") + }) + + t.Run("GetTriggerLimit_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotion + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTriggerLimit() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + var expected *LoyaltyPromotionStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotion + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotion + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetCanceledAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + var expected *string + obj.CanceledAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCanceledAt(), "getter should return the property value") + }) + + t.Run("GetCanceledAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + obj.CanceledAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCanceledAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCanceledAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotion + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCanceledAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotion + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetLoyaltyProgramID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + var expected *string + obj.LoyaltyProgramID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyProgramID(), "getter should return the property value") + }) + + t.Run("GetLoyaltyProgramID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + obj.LoyaltyProgramID = nil + + // Act & Assert + assert.Nil(t, obj.GetLoyaltyProgramID(), "getter should return nil when property is nil") + }) + + t.Run("GetLoyaltyProgramID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotion + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyProgramID() // Should return zero value + }) + + t.Run("GetMinimumSpendAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + var expected *Money + obj.MinimumSpendAmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMinimumSpendAmountMoney(), "getter should return the property value") + }) + + t.Run("GetMinimumSpendAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + obj.MinimumSpendAmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetMinimumSpendAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetMinimumSpendAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotion + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMinimumSpendAmountMoney() // Should return zero value + }) + + t.Run("GetQualifyingItemVariationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + var expected []string + obj.QualifyingItemVariationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQualifyingItemVariationIDs(), "getter should return the property value") + }) + + t.Run("GetQualifyingItemVariationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + obj.QualifyingItemVariationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetQualifyingItemVariationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetQualifyingItemVariationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotion + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQualifyingItemVariationIDs() // Should return zero value + }) + + t.Run("GetQualifyingCategoryIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + var expected []string + obj.QualifyingCategoryIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQualifyingCategoryIDs(), "getter should return the property value") + }) + + t.Run("GetQualifyingCategoryIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + obj.QualifyingCategoryIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetQualifyingCategoryIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetQualifyingCategoryIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotion + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQualifyingCategoryIDs() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyPromotion(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + var fernTestValueName string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIncentive_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + var fernTestValueIncentive *LoyaltyPromotionIncentive + + // Act + obj.SetIncentive(fernTestValueIncentive) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAvailableTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + var fernTestValueAvailableTime *LoyaltyPromotionAvailableTimeData + + // Act + obj.SetAvailableTime(fernTestValueAvailableTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTriggerLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + var fernTestValueTriggerLimit *LoyaltyPromotionTriggerLimit + + // Act + obj.SetTriggerLimit(fernTestValueTriggerLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + var fernTestValueStatus *LoyaltyPromotionStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCanceledAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + var fernTestValueCanceledAt *string + + // Act + obj.SetCanceledAt(fernTestValueCanceledAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLoyaltyProgramID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + var fernTestValueLoyaltyProgramID *string + + // Act + obj.SetLoyaltyProgramID(fernTestValueLoyaltyProgramID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMinimumSpendAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + var fernTestValueMinimumSpendAmountMoney *Money + + // Act + obj.SetMinimumSpendAmountMoney(fernTestValueMinimumSpendAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQualifyingItemVariationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + var fernTestValueQualifyingItemVariationIDs []string + + // Act + obj.SetQualifyingItemVariationIDs(fernTestValueQualifyingItemVariationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQualifyingCategoryIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + var fernTestValueQualifyingCategoryIDs []string + + // Act + obj.SetQualifyingCategoryIDs(fernTestValueQualifyingCategoryIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyPromotionAvailableTimeData(t *testing.T) { + t.Run("SetStartDate", func(t *testing.T) { + obj := &LoyaltyPromotionAvailableTimeData{} + var fernTestValueStartDate *string + obj.SetStartDate(fernTestValueStartDate) + assert.Equal(t, fernTestValueStartDate, obj.StartDate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEndDate", func(t *testing.T) { + obj := &LoyaltyPromotionAvailableTimeData{} + var fernTestValueEndDate *string + obj.SetEndDate(fernTestValueEndDate) + assert.Equal(t, fernTestValueEndDate, obj.EndDate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTimePeriods", func(t *testing.T) { + obj := &LoyaltyPromotionAvailableTimeData{} + var fernTestValueTimePeriods []string + obj.SetTimePeriods(fernTestValueTimePeriods) + assert.Equal(t, fernTestValueTimePeriods, obj.TimePeriods) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyPromotionAvailableTimeData(t *testing.T) { + t.Run("GetStartDate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionAvailableTimeData{} + var expected *string + obj.StartDate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStartDate(), "getter should return the property value") + }) + + t.Run("GetStartDate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionAvailableTimeData{} + obj.StartDate = nil + + // Act & Assert + assert.Nil(t, obj.GetStartDate(), "getter should return nil when property is nil") + }) + + t.Run("GetStartDate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionAvailableTimeData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStartDate() // Should return zero value + }) + + t.Run("GetEndDate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionAvailableTimeData{} + var expected *string + obj.EndDate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEndDate(), "getter should return the property value") + }) + + t.Run("GetEndDate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionAvailableTimeData{} + obj.EndDate = nil + + // Act & Assert + assert.Nil(t, obj.GetEndDate(), "getter should return nil when property is nil") + }) + + t.Run("GetEndDate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionAvailableTimeData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEndDate() // Should return zero value + }) + + t.Run("GetTimePeriods", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionAvailableTimeData{} + var expected []string + obj.TimePeriods = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTimePeriods(), "getter should return the property value") + }) + + t.Run("GetTimePeriods_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionAvailableTimeData{} + obj.TimePeriods = nil + + // Act & Assert + assert.Nil(t, obj.GetTimePeriods(), "getter should return nil when property is nil") + }) + + t.Run("GetTimePeriods_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionAvailableTimeData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTimePeriods() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyPromotionAvailableTimeData(t *testing.T) { + t.Run("SetStartDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionAvailableTimeData{} + var fernTestValueStartDate *string + + // Act + obj.SetStartDate(fernTestValueStartDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEndDate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionAvailableTimeData{} + var fernTestValueEndDate *string + + // Act + obj.SetEndDate(fernTestValueEndDate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTimePeriods_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionAvailableTimeData{} + var fernTestValueTimePeriods []string + + // Act + obj.SetTimePeriods(fernTestValueTimePeriods) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyPromotionCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LoyaltyPromotionCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LoyaltyPromotionCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LoyaltyPromotionCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LoyaltyPromotionCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LoyaltyPromotionCreatedEvent{} + var fernTestValueData *LoyaltyPromotionCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyPromotionCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEvent{} + var expected *LoyaltyPromotionCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyPromotionCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEvent{} + var fernTestValueData *LoyaltyPromotionCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyPromotionCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &LoyaltyPromotionCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &LoyaltyPromotionCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &LoyaltyPromotionCreatedEventData{} + var fernTestValueObject *LoyaltyPromotionCreatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyPromotionCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEventData{} + var expected *LoyaltyPromotionCreatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyPromotionCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEventData{} + var fernTestValueObject *LoyaltyPromotionCreatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyPromotionCreatedEventObject(t *testing.T) { + t.Run("SetLoyaltyPromotion", func(t *testing.T) { + obj := &LoyaltyPromotionCreatedEventObject{} + var fernTestValueLoyaltyPromotion *LoyaltyPromotion + obj.SetLoyaltyPromotion(fernTestValueLoyaltyPromotion) + assert.Equal(t, fernTestValueLoyaltyPromotion, obj.LoyaltyPromotion) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyPromotionCreatedEventObject(t *testing.T) { + t.Run("GetLoyaltyPromotion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEventObject{} + var expected *LoyaltyPromotion + obj.LoyaltyPromotion = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyPromotion(), "getter should return the property value") + }) + + t.Run("GetLoyaltyPromotion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEventObject{} + obj.LoyaltyPromotion = nil + + // Act & Assert + assert.Nil(t, obj.GetLoyaltyPromotion(), "getter should return nil when property is nil") + }) + + t.Run("GetLoyaltyPromotion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionCreatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyPromotion() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyPromotionCreatedEventObject(t *testing.T) { + t.Run("SetLoyaltyPromotion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEventObject{} + var fernTestValueLoyaltyPromotion *LoyaltyPromotion + + // Act + obj.SetLoyaltyPromotion(fernTestValueLoyaltyPromotion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyPromotionIncentive(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &LoyaltyPromotionIncentive{} + var fernTestValueType LoyaltyPromotionIncentiveType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPointsMultiplierData", func(t *testing.T) { + obj := &LoyaltyPromotionIncentive{} + var fernTestValuePointsMultiplierData *LoyaltyPromotionIncentivePointsMultiplierData + obj.SetPointsMultiplierData(fernTestValuePointsMultiplierData) + assert.Equal(t, fernTestValuePointsMultiplierData, obj.PointsMultiplierData) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPointsAdditionData", func(t *testing.T) { + obj := &LoyaltyPromotionIncentive{} + var fernTestValuePointsAdditionData *LoyaltyPromotionIncentivePointsAdditionData + obj.SetPointsAdditionData(fernTestValuePointsAdditionData) + assert.Equal(t, fernTestValuePointsAdditionData, obj.PointsAdditionData) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyPromotionIncentive(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionIncentive{} + var expected LoyaltyPromotionIncentiveType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionIncentive + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetPointsMultiplierData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionIncentive{} + var expected *LoyaltyPromotionIncentivePointsMultiplierData + obj.PointsMultiplierData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPointsMultiplierData(), "getter should return the property value") + }) + + t.Run("GetPointsMultiplierData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionIncentive{} + obj.PointsMultiplierData = nil + + // Act & Assert + assert.Nil(t, obj.GetPointsMultiplierData(), "getter should return nil when property is nil") + }) + + t.Run("GetPointsMultiplierData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionIncentive + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPointsMultiplierData() // Should return zero value + }) + + t.Run("GetPointsAdditionData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionIncentive{} + var expected *LoyaltyPromotionIncentivePointsAdditionData + obj.PointsAdditionData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPointsAdditionData(), "getter should return the property value") + }) + + t.Run("GetPointsAdditionData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionIncentive{} + obj.PointsAdditionData = nil + + // Act & Assert + assert.Nil(t, obj.GetPointsAdditionData(), "getter should return nil when property is nil") + }) + + t.Run("GetPointsAdditionData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionIncentive + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPointsAdditionData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyPromotionIncentive(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionIncentive{} + var fernTestValueType LoyaltyPromotionIncentiveType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPointsMultiplierData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionIncentive{} + var fernTestValuePointsMultiplierData *LoyaltyPromotionIncentivePointsMultiplierData + + // Act + obj.SetPointsMultiplierData(fernTestValuePointsMultiplierData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPointsAdditionData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionIncentive{} + var fernTestValuePointsAdditionData *LoyaltyPromotionIncentivePointsAdditionData + + // Act + obj.SetPointsAdditionData(fernTestValuePointsAdditionData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyPromotionIncentivePointsAdditionData(t *testing.T) { + t.Run("SetPointsAddition", func(t *testing.T) { + obj := &LoyaltyPromotionIncentivePointsAdditionData{} + var fernTestValuePointsAddition int + obj.SetPointsAddition(fernTestValuePointsAddition) + assert.Equal(t, fernTestValuePointsAddition, obj.PointsAddition) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyPromotionIncentivePointsAdditionData(t *testing.T) { + t.Run("GetPointsAddition", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionIncentivePointsAdditionData{} + var expected int + obj.PointsAddition = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPointsAddition(), "getter should return the property value") + }) + + t.Run("GetPointsAddition_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionIncentivePointsAdditionData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPointsAddition() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyPromotionIncentivePointsAdditionData(t *testing.T) { + t.Run("SetPointsAddition_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionIncentivePointsAdditionData{} + var fernTestValuePointsAddition int + + // Act + obj.SetPointsAddition(fernTestValuePointsAddition) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyPromotionIncentivePointsMultiplierData(t *testing.T) { + t.Run("SetPointsMultiplier", func(t *testing.T) { + obj := &LoyaltyPromotionIncentivePointsMultiplierData{} + var fernTestValuePointsMultiplier *int + obj.SetPointsMultiplier(fernTestValuePointsMultiplier) + assert.Equal(t, fernTestValuePointsMultiplier, obj.PointsMultiplier) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMultiplier", func(t *testing.T) { + obj := &LoyaltyPromotionIncentivePointsMultiplierData{} + var fernTestValueMultiplier *string + obj.SetMultiplier(fernTestValueMultiplier) + assert.Equal(t, fernTestValueMultiplier, obj.Multiplier) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyPromotionIncentivePointsMultiplierData(t *testing.T) { + t.Run("GetPointsMultiplier", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionIncentivePointsMultiplierData{} + var expected *int + obj.PointsMultiplier = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPointsMultiplier(), "getter should return the property value") + }) + + t.Run("GetPointsMultiplier_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionIncentivePointsMultiplierData{} + obj.PointsMultiplier = nil + + // Act & Assert + assert.Nil(t, obj.GetPointsMultiplier(), "getter should return nil when property is nil") + }) + + t.Run("GetPointsMultiplier_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionIncentivePointsMultiplierData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPointsMultiplier() // Should return zero value + }) + + t.Run("GetMultiplier", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionIncentivePointsMultiplierData{} + var expected *string + obj.Multiplier = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMultiplier(), "getter should return the property value") + }) + + t.Run("GetMultiplier_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionIncentivePointsMultiplierData{} + obj.Multiplier = nil + + // Act & Assert + assert.Nil(t, obj.GetMultiplier(), "getter should return nil when property is nil") + }) + + t.Run("GetMultiplier_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionIncentivePointsMultiplierData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMultiplier() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyPromotionIncentivePointsMultiplierData(t *testing.T) { + t.Run("SetPointsMultiplier_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionIncentivePointsMultiplierData{} + var fernTestValuePointsMultiplier *int + + // Act + obj.SetPointsMultiplier(fernTestValuePointsMultiplier) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMultiplier_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionIncentivePointsMultiplierData{} + var fernTestValueMultiplier *string + + // Act + obj.SetMultiplier(fernTestValueMultiplier) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyPromotionTriggerLimit(t *testing.T) { + t.Run("SetTimes", func(t *testing.T) { + obj := &LoyaltyPromotionTriggerLimit{} + var fernTestValueTimes int + obj.SetTimes(fernTestValueTimes) + assert.Equal(t, fernTestValueTimes, obj.Times) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetInterval", func(t *testing.T) { + obj := &LoyaltyPromotionTriggerLimit{} + var fernTestValueInterval *LoyaltyPromotionTriggerLimitInterval + obj.SetInterval(fernTestValueInterval) + assert.Equal(t, fernTestValueInterval, obj.Interval) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyPromotionTriggerLimit(t *testing.T) { + t.Run("GetTimes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionTriggerLimit{} + var expected int + obj.Times = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTimes(), "getter should return the property value") + }) + + t.Run("GetTimes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionTriggerLimit + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTimes() // Should return zero value + }) + + t.Run("GetInterval", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionTriggerLimit{} + var expected *LoyaltyPromotionTriggerLimitInterval + obj.Interval = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetInterval(), "getter should return the property value") + }) + + t.Run("GetInterval_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionTriggerLimit{} + obj.Interval = nil + + // Act & Assert + assert.Nil(t, obj.GetInterval(), "getter should return nil when property is nil") + }) + + t.Run("GetInterval_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionTriggerLimit + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetInterval() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyPromotionTriggerLimit(t *testing.T) { + t.Run("SetTimes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionTriggerLimit{} + var fernTestValueTimes int + + // Act + obj.SetTimes(fernTestValueTimes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetInterval_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionTriggerLimit{} + var fernTestValueInterval *LoyaltyPromotionTriggerLimitInterval + + // Act + obj.SetInterval(fernTestValueInterval) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyPromotionUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &LoyaltyPromotionUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &LoyaltyPromotionUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &LoyaltyPromotionUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LoyaltyPromotionUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &LoyaltyPromotionUpdatedEvent{} + var fernTestValueData *LoyaltyPromotionUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyPromotionUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEvent{} + var expected *LoyaltyPromotionUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyPromotionUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEvent{} + var fernTestValueData *LoyaltyPromotionUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyPromotionUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &LoyaltyPromotionUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &LoyaltyPromotionUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &LoyaltyPromotionUpdatedEventData{} + var fernTestValueObject *LoyaltyPromotionUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyPromotionUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEventData{} + var expected *LoyaltyPromotionUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyPromotionUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEventData{} + var fernTestValueObject *LoyaltyPromotionUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyPromotionUpdatedEventObject(t *testing.T) { + t.Run("SetLoyaltyPromotion", func(t *testing.T) { + obj := &LoyaltyPromotionUpdatedEventObject{} + var fernTestValueLoyaltyPromotion *LoyaltyPromotion + obj.SetLoyaltyPromotion(fernTestValueLoyaltyPromotion) + assert.Equal(t, fernTestValueLoyaltyPromotion, obj.LoyaltyPromotion) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyPromotionUpdatedEventObject(t *testing.T) { + t.Run("GetLoyaltyPromotion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEventObject{} + var expected *LoyaltyPromotion + obj.LoyaltyPromotion = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyPromotion(), "getter should return the property value") + }) + + t.Run("GetLoyaltyPromotion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEventObject{} + obj.LoyaltyPromotion = nil + + // Act & Assert + assert.Nil(t, obj.GetLoyaltyPromotion(), "getter should return nil when property is nil") + }) + + t.Run("GetLoyaltyPromotion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyPromotion() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyPromotionUpdatedEventObject(t *testing.T) { + t.Run("SetLoyaltyPromotion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEventObject{} + var fernTestValueLoyaltyPromotion *LoyaltyPromotion + + // Act + obj.SetLoyaltyPromotion(fernTestValueLoyaltyPromotion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersLoyaltyReward(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &LoyaltyReward{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &LoyaltyReward{} + var fernTestValueStatus *LoyaltyRewardStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLoyaltyAccountID", func(t *testing.T) { + obj := &LoyaltyReward{} + var fernTestValueLoyaltyAccountID string + obj.SetLoyaltyAccountID(fernTestValueLoyaltyAccountID) + assert.Equal(t, fernTestValueLoyaltyAccountID, obj.LoyaltyAccountID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRewardTierID", func(t *testing.T) { + obj := &LoyaltyReward{} + var fernTestValueRewardTierID string + obj.SetRewardTierID(fernTestValueRewardTierID) + assert.Equal(t, fernTestValueRewardTierID, obj.RewardTierID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPoints", func(t *testing.T) { + obj := &LoyaltyReward{} + var fernTestValuePoints *int + obj.SetPoints(fernTestValuePoints) + assert.Equal(t, fernTestValuePoints, obj.Points) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrderID", func(t *testing.T) { + obj := &LoyaltyReward{} + var fernTestValueOrderID *string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &LoyaltyReward{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &LoyaltyReward{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRedeemedAt", func(t *testing.T) { + obj := &LoyaltyReward{} + var fernTestValueRedeemedAt *string + obj.SetRedeemedAt(fernTestValueRedeemedAt) + assert.Equal(t, fernTestValueRedeemedAt, obj.RedeemedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersLoyaltyReward(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyReward{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyReward{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyReward + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyReward{} + var expected *LoyaltyRewardStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyReward{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyReward + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetLoyaltyAccountID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyReward{} + var expected string + obj.LoyaltyAccountID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyAccountID(), "getter should return the property value") + }) + + t.Run("GetLoyaltyAccountID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyReward + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyAccountID() // Should return zero value + }) + + t.Run("GetRewardTierID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyReward{} + var expected string + obj.RewardTierID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRewardTierID(), "getter should return the property value") + }) + + t.Run("GetRewardTierID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyReward + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRewardTierID() // Should return zero value + }) + + t.Run("GetPoints", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyReward{} + var expected *int + obj.Points = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPoints(), "getter should return the property value") + }) + + t.Run("GetPoints_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyReward{} + obj.Points = nil + + // Act & Assert + assert.Nil(t, obj.GetPoints(), "getter should return nil when property is nil") + }) + + t.Run("GetPoints_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyReward + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPoints() // Should return zero value + }) + + t.Run("GetOrderID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyReward{} + var expected *string + obj.OrderID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderID(), "getter should return the property value") + }) + + t.Run("GetOrderID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyReward{} + obj.OrderID = nil + + // Act & Assert + assert.Nil(t, obj.GetOrderID(), "getter should return nil when property is nil") + }) + + t.Run("GetOrderID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyReward + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyReward{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyReward{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyReward + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyReward{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyReward{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyReward + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetRedeemedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyReward{} + var expected *string + obj.RedeemedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRedeemedAt(), "getter should return the property value") + }) + + t.Run("GetRedeemedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyReward{} + obj.RedeemedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetRedeemedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetRedeemedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyReward + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRedeemedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitLoyaltyReward(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyReward{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyReward{} + var fernTestValueStatus *LoyaltyRewardStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLoyaltyAccountID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyReward{} + var fernTestValueLoyaltyAccountID string + + // Act + obj.SetLoyaltyAccountID(fernTestValueLoyaltyAccountID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRewardTierID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyReward{} + var fernTestValueRewardTierID string + + // Act + obj.SetRewardTierID(fernTestValueRewardTierID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPoints_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyReward{} + var fernTestValuePoints *int + + // Act + obj.SetPoints(fernTestValuePoints) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyReward{} + var fernTestValueOrderID *string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyReward{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyReward{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRedeemedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyReward{} + var fernTestValueRedeemedAt *string + + // Act + obj.SetRedeemedAt(fernTestValueRedeemedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersMeasurementUnit(t *testing.T) { + t.Run("SetCustomUnit", func(t *testing.T) { + obj := &MeasurementUnit{} + var fernTestValueCustomUnit *MeasurementUnitCustom + obj.SetCustomUnit(fernTestValueCustomUnit) + assert.Equal(t, fernTestValueCustomUnit, obj.CustomUnit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAreaUnit", func(t *testing.T) { + obj := &MeasurementUnit{} + var fernTestValueAreaUnit *MeasurementUnitArea + obj.SetAreaUnit(fernTestValueAreaUnit) + assert.Equal(t, fernTestValueAreaUnit, obj.AreaUnit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLengthUnit", func(t *testing.T) { + obj := &MeasurementUnit{} + var fernTestValueLengthUnit *MeasurementUnitLength + obj.SetLengthUnit(fernTestValueLengthUnit) + assert.Equal(t, fernTestValueLengthUnit, obj.LengthUnit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVolumeUnit", func(t *testing.T) { + obj := &MeasurementUnit{} + var fernTestValueVolumeUnit *MeasurementUnitVolume + obj.SetVolumeUnit(fernTestValueVolumeUnit) + assert.Equal(t, fernTestValueVolumeUnit, obj.VolumeUnit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetWeightUnit", func(t *testing.T) { + obj := &MeasurementUnit{} + var fernTestValueWeightUnit *MeasurementUnitWeight + obj.SetWeightUnit(fernTestValueWeightUnit) + assert.Equal(t, fernTestValueWeightUnit, obj.WeightUnit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTimeUnit", func(t *testing.T) { + obj := &MeasurementUnit{} + var fernTestValueTimeUnit *MeasurementUnitTime + obj.SetTimeUnit(fernTestValueTimeUnit) + assert.Equal(t, fernTestValueTimeUnit, obj.TimeUnit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &MeasurementUnit{} + var fernTestValueType *MeasurementUnitUnitType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersMeasurementUnit(t *testing.T) { + t.Run("GetCustomUnit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MeasurementUnit{} + var expected *MeasurementUnitCustom + obj.CustomUnit = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomUnit(), "getter should return the property value") + }) + + t.Run("GetCustomUnit_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MeasurementUnit{} + obj.CustomUnit = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomUnit(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomUnit_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MeasurementUnit + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomUnit() // Should return zero value + }) + + t.Run("GetAreaUnit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MeasurementUnit{} + var expected *MeasurementUnitArea + obj.AreaUnit = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAreaUnit(), "getter should return the property value") + }) + + t.Run("GetAreaUnit_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MeasurementUnit{} + obj.AreaUnit = nil + + // Act & Assert + assert.Nil(t, obj.GetAreaUnit(), "getter should return nil when property is nil") + }) + + t.Run("GetAreaUnit_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MeasurementUnit + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAreaUnit() // Should return zero value + }) + + t.Run("GetLengthUnit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MeasurementUnit{} + var expected *MeasurementUnitLength + obj.LengthUnit = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLengthUnit(), "getter should return the property value") + }) + + t.Run("GetLengthUnit_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MeasurementUnit{} + obj.LengthUnit = nil + + // Act & Assert + assert.Nil(t, obj.GetLengthUnit(), "getter should return nil when property is nil") + }) + + t.Run("GetLengthUnit_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MeasurementUnit + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLengthUnit() // Should return zero value + }) + + t.Run("GetVolumeUnit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MeasurementUnit{} + var expected *MeasurementUnitVolume + obj.VolumeUnit = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVolumeUnit(), "getter should return the property value") + }) + + t.Run("GetVolumeUnit_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MeasurementUnit{} + obj.VolumeUnit = nil + + // Act & Assert + assert.Nil(t, obj.GetVolumeUnit(), "getter should return nil when property is nil") + }) + + t.Run("GetVolumeUnit_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MeasurementUnit + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVolumeUnit() // Should return zero value + }) + + t.Run("GetWeightUnit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MeasurementUnit{} + var expected *MeasurementUnitWeight + obj.WeightUnit = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetWeightUnit(), "getter should return the property value") + }) + + t.Run("GetWeightUnit_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MeasurementUnit{} + obj.WeightUnit = nil + + // Act & Assert + assert.Nil(t, obj.GetWeightUnit(), "getter should return nil when property is nil") + }) + + t.Run("GetWeightUnit_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MeasurementUnit + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetWeightUnit() // Should return zero value + }) + + t.Run("GetTimeUnit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MeasurementUnit{} + var expected *MeasurementUnitTime + obj.TimeUnit = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTimeUnit(), "getter should return the property value") + }) + + t.Run("GetTimeUnit_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MeasurementUnit{} + obj.TimeUnit = nil + + // Act & Assert + assert.Nil(t, obj.GetTimeUnit(), "getter should return nil when property is nil") + }) + + t.Run("GetTimeUnit_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MeasurementUnit + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTimeUnit() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MeasurementUnit{} + var expected *MeasurementUnitUnitType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MeasurementUnit{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MeasurementUnit + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + +} + +func TestSettersMarkExplicitMeasurementUnit(t *testing.T) { + t.Run("SetCustomUnit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MeasurementUnit{} + var fernTestValueCustomUnit *MeasurementUnitCustom + + // Act + obj.SetCustomUnit(fernTestValueCustomUnit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAreaUnit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MeasurementUnit{} + var fernTestValueAreaUnit *MeasurementUnitArea + + // Act + obj.SetAreaUnit(fernTestValueAreaUnit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLengthUnit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MeasurementUnit{} + var fernTestValueLengthUnit *MeasurementUnitLength + + // Act + obj.SetLengthUnit(fernTestValueLengthUnit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVolumeUnit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MeasurementUnit{} + var fernTestValueVolumeUnit *MeasurementUnitVolume + + // Act + obj.SetVolumeUnit(fernTestValueVolumeUnit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetWeightUnit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MeasurementUnit{} + var fernTestValueWeightUnit *MeasurementUnitWeight + + // Act + obj.SetWeightUnit(fernTestValueWeightUnit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTimeUnit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MeasurementUnit{} + var fernTestValueTimeUnit *MeasurementUnitTime + + // Act + obj.SetTimeUnit(fernTestValueTimeUnit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MeasurementUnit{} + var fernTestValueType *MeasurementUnitUnitType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersMeasurementUnitCustom(t *testing.T) { + t.Run("SetName", func(t *testing.T) { + obj := &MeasurementUnitCustom{} + var fernTestValueName string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAbbreviation", func(t *testing.T) { + obj := &MeasurementUnitCustom{} + var fernTestValueAbbreviation string + obj.SetAbbreviation(fernTestValueAbbreviation) + assert.Equal(t, fernTestValueAbbreviation, obj.Abbreviation) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersMeasurementUnitCustom(t *testing.T) { + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MeasurementUnitCustom{} + var expected string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MeasurementUnitCustom + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetAbbreviation", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MeasurementUnitCustom{} + var expected string + obj.Abbreviation = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAbbreviation(), "getter should return the property value") + }) + + t.Run("GetAbbreviation_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MeasurementUnitCustom + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAbbreviation() // Should return zero value + }) + +} + +func TestSettersMarkExplicitMeasurementUnitCustom(t *testing.T) { + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MeasurementUnitCustom{} + var fernTestValueName string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAbbreviation_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MeasurementUnitCustom{} + var fernTestValueAbbreviation string + + // Act + obj.SetAbbreviation(fernTestValueAbbreviation) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersMerchantCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersMerchantCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionOwnedCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionOwnedCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionOwnedCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionOwnedCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedCreatedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionOwnedCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitMerchantCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersMerchantCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersMerchantCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedDeletedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitMerchantCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersMerchantCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersMerchantCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedUpdatedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitMerchantCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersMerchantCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersMerchantCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionVisibleCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionVisibleCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionVisibleCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionVisibleCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleCreatedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionVisibleCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitMerchantCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersMerchantCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersMerchantCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleDeletedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitMerchantCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersMerchantCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &MerchantCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersMerchantCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleUpdatedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitMerchantCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersMerchantCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &MerchantCustomAttributeOwnedDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &MerchantCustomAttributeOwnedDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &MerchantCustomAttributeOwnedDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &MerchantCustomAttributeOwnedDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &MerchantCustomAttributeOwnedDeletedEvent{} + var fernTestValueData *CustomAttributeEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersMerchantCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedDeletedEvent{} + var expected *CustomAttributeEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitMerchantCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedDeletedEvent{} + var fernTestValueData *CustomAttributeEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersMerchantCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &MerchantCustomAttributeOwnedUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &MerchantCustomAttributeOwnedUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &MerchantCustomAttributeOwnedUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &MerchantCustomAttributeOwnedUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &MerchantCustomAttributeOwnedUpdatedEvent{} + var fernTestValueData *CustomAttributeEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersMerchantCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedUpdatedEvent{} + var expected *CustomAttributeEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitMerchantCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedUpdatedEvent{} + var fernTestValueData *CustomAttributeEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersMerchantCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &MerchantCustomAttributeVisibleDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &MerchantCustomAttributeVisibleDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &MerchantCustomAttributeVisibleDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &MerchantCustomAttributeVisibleDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &MerchantCustomAttributeVisibleDeletedEvent{} + var fernTestValueData *CustomAttributeEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersMerchantCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleDeletedEvent{} + var expected *CustomAttributeEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitMerchantCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleDeletedEvent{} + var fernTestValueData *CustomAttributeEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersMerchantCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &MerchantCustomAttributeVisibleUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &MerchantCustomAttributeVisibleUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &MerchantCustomAttributeVisibleUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &MerchantCustomAttributeVisibleUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &MerchantCustomAttributeVisibleUpdatedEvent{} + var fernTestValueData *CustomAttributeEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersMerchantCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleUpdatedEvent{} + var expected *CustomAttributeEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitMerchantCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleUpdatedEvent{} + var fernTestValueData *CustomAttributeEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersMerchantSettingsUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &MerchantSettingsUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &MerchantSettingsUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &MerchantSettingsUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &MerchantSettingsUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &MerchantSettingsUpdatedEvent{} + var fernTestValueData *MerchantSettingsUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersMerchantSettingsUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantSettingsUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantSettingsUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantSettingsUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantSettingsUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEvent{} + var expected *MerchantSettingsUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantSettingsUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitMerchantSettingsUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEvent{} + var fernTestValueData *MerchantSettingsUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersMerchantSettingsUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &MerchantSettingsUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &MerchantSettingsUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &MerchantSettingsUpdatedEventData{} + var fernTestValueObject *MerchantSettingsUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersMerchantSettingsUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantSettingsUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantSettingsUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEventData{} + var expected *MerchantSettingsUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantSettingsUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitMerchantSettingsUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEventData{} + var fernTestValueObject *MerchantSettingsUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersMerchantSettingsUpdatedEventObject(t *testing.T) { + t.Run("SetMerchantSettings", func(t *testing.T) { + obj := &MerchantSettingsUpdatedEventObject{} + var fernTestValueMerchantSettings *CheckoutMerchantSettings + obj.SetMerchantSettings(fernTestValueMerchantSettings) + assert.Equal(t, fernTestValueMerchantSettings, obj.MerchantSettings) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersMerchantSettingsUpdatedEventObject(t *testing.T) { + t.Run("GetMerchantSettings", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEventObject{} + var expected *CheckoutMerchantSettings + obj.MerchantSettings = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantSettings(), "getter should return the property value") + }) + + t.Run("GetMerchantSettings_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEventObject{} + obj.MerchantSettings = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantSettings(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantSettings_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantSettingsUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantSettings() // Should return zero value + }) + +} + +func TestSettersMarkExplicitMerchantSettingsUpdatedEventObject(t *testing.T) { + t.Run("SetMerchantSettings_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEventObject{} + var fernTestValueMerchantSettings *CheckoutMerchantSettings + + // Act + obj.SetMerchantSettings(fernTestValueMerchantSettings) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersModifierLocationOverrides(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &ModifierLocationOverrides{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPriceMoney", func(t *testing.T) { + obj := &ModifierLocationOverrides{} + var fernTestValuePriceMoney *Money + obj.SetPriceMoney(fernTestValuePriceMoney) + assert.Equal(t, fernTestValuePriceMoney, obj.PriceMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSoldOut", func(t *testing.T) { + obj := &ModifierLocationOverrides{} + var fernTestValueSoldOut *bool + obj.SetSoldOut(fernTestValueSoldOut) + assert.Equal(t, fernTestValueSoldOut, obj.SoldOut) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersModifierLocationOverrides(t *testing.T) { + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ModifierLocationOverrides{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ModifierLocationOverrides{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ModifierLocationOverrides + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetPriceMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ModifierLocationOverrides{} + var expected *Money + obj.PriceMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPriceMoney(), "getter should return the property value") + }) + + t.Run("GetPriceMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ModifierLocationOverrides{} + obj.PriceMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetPriceMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetPriceMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ModifierLocationOverrides + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPriceMoney() // Should return zero value + }) + + t.Run("GetSoldOut", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ModifierLocationOverrides{} + var expected *bool + obj.SoldOut = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSoldOut(), "getter should return the property value") + }) + + t.Run("GetSoldOut_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ModifierLocationOverrides{} + obj.SoldOut = nil + + // Act & Assert + assert.Nil(t, obj.GetSoldOut(), "getter should return nil when property is nil") + }) + + t.Run("GetSoldOut_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ModifierLocationOverrides + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSoldOut() // Should return zero value + }) + +} + +func TestSettersMarkExplicitModifierLocationOverrides(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ModifierLocationOverrides{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPriceMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ModifierLocationOverrides{} + var fernTestValuePriceMoney *Money + + // Act + obj.SetPriceMoney(fernTestValuePriceMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSoldOut_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ModifierLocationOverrides{} + var fernTestValueSoldOut *bool + + // Act + obj.SetSoldOut(fernTestValueSoldOut) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersMoney(t *testing.T) { + t.Run("SetAmount", func(t *testing.T) { + obj := &Money{} + var fernTestValueAmount *int64 + obj.SetAmount(fernTestValueAmount) + assert.Equal(t, fernTestValueAmount, obj.Amount) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCurrency", func(t *testing.T) { + obj := &Money{} + var fernTestValueCurrency *Currency + obj.SetCurrency(fernTestValueCurrency) + assert.Equal(t, fernTestValueCurrency, obj.Currency) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersMoney(t *testing.T) { + t.Run("GetAmount", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Money{} + var expected *int64 + obj.Amount = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmount(), "getter should return the property value") + }) + + t.Run("GetAmount_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Money{} + obj.Amount = nil + + // Act & Assert + assert.Nil(t, obj.GetAmount(), "getter should return nil when property is nil") + }) + + t.Run("GetAmount_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Money + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmount() // Should return zero value + }) + + t.Run("GetCurrency", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Money{} + var expected *Currency + obj.Currency = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCurrency(), "getter should return the property value") + }) + + t.Run("GetCurrency_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Money{} + obj.Currency = nil + + // Act & Assert + assert.Nil(t, obj.GetCurrency(), "getter should return nil when property is nil") + }) + + t.Run("GetCurrency_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Money + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCurrency() // Should return zero value + }) + +} + +func TestSettersMarkExplicitMoney(t *testing.T) { + t.Run("SetAmount_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Money{} + var fernTestValueAmount *int64 + + // Act + obj.SetAmount(fernTestValueAmount) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCurrency_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Money{} + var fernTestValueCurrency *Currency + + // Act + obj.SetCurrency(fernTestValueCurrency) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOauthAuthorizationRevokedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &OauthAuthorizationRevokedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &OauthAuthorizationRevokedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &OauthAuthorizationRevokedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &OauthAuthorizationRevokedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &OauthAuthorizationRevokedEvent{} + var fernTestValueData *OauthAuthorizationRevokedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOauthAuthorizationRevokedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OauthAuthorizationRevokedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OauthAuthorizationRevokedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OauthAuthorizationRevokedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OauthAuthorizationRevokedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEvent{} + var expected *OauthAuthorizationRevokedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OauthAuthorizationRevokedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOauthAuthorizationRevokedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEvent{} + var fernTestValueData *OauthAuthorizationRevokedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOauthAuthorizationRevokedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &OauthAuthorizationRevokedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &OauthAuthorizationRevokedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &OauthAuthorizationRevokedEventData{} + var fernTestValueObject *OauthAuthorizationRevokedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOauthAuthorizationRevokedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OauthAuthorizationRevokedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OauthAuthorizationRevokedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEventData{} + var expected *OauthAuthorizationRevokedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OauthAuthorizationRevokedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOauthAuthorizationRevokedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEventData{} + var fernTestValueObject *OauthAuthorizationRevokedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOauthAuthorizationRevokedEventObject(t *testing.T) { + t.Run("SetRevocation", func(t *testing.T) { + obj := &OauthAuthorizationRevokedEventObject{} + var fernTestValueRevocation *OauthAuthorizationRevokedEventRevocationObject + obj.SetRevocation(fernTestValueRevocation) + assert.Equal(t, fernTestValueRevocation, obj.Revocation) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOauthAuthorizationRevokedEventObject(t *testing.T) { + t.Run("GetRevocation", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEventObject{} + var expected *OauthAuthorizationRevokedEventRevocationObject + obj.Revocation = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRevocation(), "getter should return the property value") + }) + + t.Run("GetRevocation_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEventObject{} + obj.Revocation = nil + + // Act & Assert + assert.Nil(t, obj.GetRevocation(), "getter should return nil when property is nil") + }) + + t.Run("GetRevocation_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OauthAuthorizationRevokedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRevocation() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOauthAuthorizationRevokedEventObject(t *testing.T) { + t.Run("SetRevocation_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEventObject{} + var fernTestValueRevocation *OauthAuthorizationRevokedEventRevocationObject + + // Act + obj.SetRevocation(fernTestValueRevocation) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOauthAuthorizationRevokedEventRevocationObject(t *testing.T) { + t.Run("SetRevokedAt", func(t *testing.T) { + obj := &OauthAuthorizationRevokedEventRevocationObject{} + var fernTestValueRevokedAt *string + obj.SetRevokedAt(fernTestValueRevokedAt) + assert.Equal(t, fernTestValueRevokedAt, obj.RevokedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRevokerType", func(t *testing.T) { + obj := &OauthAuthorizationRevokedEventRevocationObject{} + var fernTestValueRevokerType *OauthAuthorizationRevokedEventRevokerType + obj.SetRevokerType(fernTestValueRevokerType) + assert.Equal(t, fernTestValueRevokerType, obj.RevokerType) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOauthAuthorizationRevokedEventRevocationObject(t *testing.T) { + t.Run("GetRevokedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEventRevocationObject{} + var expected *string + obj.RevokedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRevokedAt(), "getter should return the property value") + }) + + t.Run("GetRevokedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEventRevocationObject{} + obj.RevokedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetRevokedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetRevokedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OauthAuthorizationRevokedEventRevocationObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRevokedAt() // Should return zero value + }) + + t.Run("GetRevokerType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEventRevocationObject{} + var expected *OauthAuthorizationRevokedEventRevokerType + obj.RevokerType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRevokerType(), "getter should return the property value") + }) + + t.Run("GetRevokerType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEventRevocationObject{} + obj.RevokerType = nil + + // Act & Assert + assert.Nil(t, obj.GetRevokerType(), "getter should return nil when property is nil") + }) + + t.Run("GetRevokerType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OauthAuthorizationRevokedEventRevocationObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRevokerType() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOauthAuthorizationRevokedEventRevocationObject(t *testing.T) { + t.Run("SetRevokedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEventRevocationObject{} + var fernTestValueRevokedAt *string + + // Act + obj.SetRevokedAt(fernTestValueRevokedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRevokerType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEventRevocationObject{} + var fernTestValueRevokerType *OauthAuthorizationRevokedEventRevokerType + + // Act + obj.SetRevokerType(fernTestValueRevokerType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrder(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &Order{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &Order{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReferenceID", func(t *testing.T) { + obj := &Order{} + var fernTestValueReferenceID *string + obj.SetReferenceID(fernTestValueReferenceID) + assert.Equal(t, fernTestValueReferenceID, obj.ReferenceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSource", func(t *testing.T) { + obj := &Order{} + var fernTestValueSource *OrderSource + obj.SetSource(fernTestValueSource) + assert.Equal(t, fernTestValueSource, obj.Source) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerID", func(t *testing.T) { + obj := &Order{} + var fernTestValueCustomerID *string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLineItems", func(t *testing.T) { + obj := &Order{} + var fernTestValueLineItems []*OrderLineItem + obj.SetLineItems(fernTestValueLineItems) + assert.Equal(t, fernTestValueLineItems, obj.LineItems) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTaxes", func(t *testing.T) { + obj := &Order{} + var fernTestValueTaxes []*OrderLineItemTax + obj.SetTaxes(fernTestValueTaxes) + assert.Equal(t, fernTestValueTaxes, obj.Taxes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDiscounts", func(t *testing.T) { + obj := &Order{} + var fernTestValueDiscounts []*OrderLineItemDiscount + obj.SetDiscounts(fernTestValueDiscounts) + assert.Equal(t, fernTestValueDiscounts, obj.Discounts) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetServiceCharges", func(t *testing.T) { + obj := &Order{} + var fernTestValueServiceCharges []*OrderServiceCharge + obj.SetServiceCharges(fernTestValueServiceCharges) + assert.Equal(t, fernTestValueServiceCharges, obj.ServiceCharges) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFulfillments", func(t *testing.T) { + obj := &Order{} + var fernTestValueFulfillments []*Fulfillment + obj.SetFulfillments(fernTestValueFulfillments) + assert.Equal(t, fernTestValueFulfillments, obj.Fulfillments) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReturns", func(t *testing.T) { + obj := &Order{} + var fernTestValueReturns []*OrderReturn + obj.SetReturns(fernTestValueReturns) + assert.Equal(t, fernTestValueReturns, obj.Returns) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReturnAmounts", func(t *testing.T) { + obj := &Order{} + var fernTestValueReturnAmounts *OrderMoneyAmounts + obj.SetReturnAmounts(fernTestValueReturnAmounts) + assert.Equal(t, fernTestValueReturnAmounts, obj.ReturnAmounts) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNetAmounts", func(t *testing.T) { + obj := &Order{} + var fernTestValueNetAmounts *OrderMoneyAmounts + obj.SetNetAmounts(fernTestValueNetAmounts) + assert.Equal(t, fernTestValueNetAmounts, obj.NetAmounts) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRoundingAdjustment", func(t *testing.T) { + obj := &Order{} + var fernTestValueRoundingAdjustment *OrderRoundingAdjustment + obj.SetRoundingAdjustment(fernTestValueRoundingAdjustment) + assert.Equal(t, fernTestValueRoundingAdjustment, obj.RoundingAdjustment) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTenders", func(t *testing.T) { + obj := &Order{} + var fernTestValueTenders []*Tender + obj.SetTenders(fernTestValueTenders) + assert.Equal(t, fernTestValueTenders, obj.Tenders) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRefunds", func(t *testing.T) { + obj := &Order{} + var fernTestValueRefunds []*Refund + obj.SetRefunds(fernTestValueRefunds) + assert.Equal(t, fernTestValueRefunds, obj.Refunds) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMetadata", func(t *testing.T) { + obj := &Order{} + var fernTestValueMetadata map[string]*string + obj.SetMetadata(fernTestValueMetadata) + assert.Equal(t, fernTestValueMetadata, obj.Metadata) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &Order{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &Order{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetClosedAt", func(t *testing.T) { + obj := &Order{} + var fernTestValueClosedAt *string + obj.SetClosedAt(fernTestValueClosedAt) + assert.Equal(t, fernTestValueClosedAt, obj.ClosedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetState", func(t *testing.T) { + obj := &Order{} + var fernTestValueState *OrderState + obj.SetState(fernTestValueState) + assert.Equal(t, fernTestValueState, obj.State) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &Order{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTotalMoney", func(t *testing.T) { + obj := &Order{} + var fernTestValueTotalMoney *Money + obj.SetTotalMoney(fernTestValueTotalMoney) + assert.Equal(t, fernTestValueTotalMoney, obj.TotalMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTotalTaxMoney", func(t *testing.T) { + obj := &Order{} + var fernTestValueTotalTaxMoney *Money + obj.SetTotalTaxMoney(fernTestValueTotalTaxMoney) + assert.Equal(t, fernTestValueTotalTaxMoney, obj.TotalTaxMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTotalDiscountMoney", func(t *testing.T) { + obj := &Order{} + var fernTestValueTotalDiscountMoney *Money + obj.SetTotalDiscountMoney(fernTestValueTotalDiscountMoney) + assert.Equal(t, fernTestValueTotalDiscountMoney, obj.TotalDiscountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTotalTipMoney", func(t *testing.T) { + obj := &Order{} + var fernTestValueTotalTipMoney *Money + obj.SetTotalTipMoney(fernTestValueTotalTipMoney) + assert.Equal(t, fernTestValueTotalTipMoney, obj.TotalTipMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTotalServiceChargeMoney", func(t *testing.T) { + obj := &Order{} + var fernTestValueTotalServiceChargeMoney *Money + obj.SetTotalServiceChargeMoney(fernTestValueTotalServiceChargeMoney) + assert.Equal(t, fernTestValueTotalServiceChargeMoney, obj.TotalServiceChargeMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTicketName", func(t *testing.T) { + obj := &Order{} + var fernTestValueTicketName *string + obj.SetTicketName(fernTestValueTicketName) + assert.Equal(t, fernTestValueTicketName, obj.TicketName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPricingOptions", func(t *testing.T) { + obj := &Order{} + var fernTestValuePricingOptions *OrderPricingOptions + obj.SetPricingOptions(fernTestValuePricingOptions) + assert.Equal(t, fernTestValuePricingOptions, obj.PricingOptions) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRewards", func(t *testing.T) { + obj := &Order{} + var fernTestValueRewards []*OrderReward + obj.SetRewards(fernTestValueRewards) + assert.Equal(t, fernTestValueRewards, obj.Rewards) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNetAmountDueMoney", func(t *testing.T) { + obj := &Order{} + var fernTestValueNetAmountDueMoney *Money + obj.SetNetAmountDueMoney(fernTestValueNetAmountDueMoney) + assert.Equal(t, fernTestValueNetAmountDueMoney, obj.NetAmountDueMoney) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrder(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetReferenceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected *string + obj.ReferenceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReferenceID(), "getter should return the property value") + }) + + t.Run("GetReferenceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.ReferenceID = nil + + // Act & Assert + assert.Nil(t, obj.GetReferenceID(), "getter should return nil when property is nil") + }) + + t.Run("GetReferenceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReferenceID() // Should return zero value + }) + + t.Run("GetSource", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected *OrderSource + obj.Source = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSource(), "getter should return the property value") + }) + + t.Run("GetSource_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.Source = nil + + // Act & Assert + assert.Nil(t, obj.GetSource(), "getter should return nil when property is nil") + }) + + t.Run("GetSource_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSource() // Should return zero value + }) + + t.Run("GetCustomerID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected *string + obj.CustomerID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomerID(), "getter should return the property value") + }) + + t.Run("GetCustomerID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.CustomerID = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomerID(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomerID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomerID() // Should return zero value + }) + + t.Run("GetLineItems", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected []*OrderLineItem + obj.LineItems = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLineItems(), "getter should return the property value") + }) + + t.Run("GetLineItems_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.LineItems = nil + + // Act & Assert + assert.Nil(t, obj.GetLineItems(), "getter should return nil when property is nil") + }) + + t.Run("GetLineItems_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLineItems() // Should return zero value + }) + + t.Run("GetTaxes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected []*OrderLineItemTax + obj.Taxes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTaxes(), "getter should return the property value") + }) + + t.Run("GetTaxes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.Taxes = nil + + // Act & Assert + assert.Nil(t, obj.GetTaxes(), "getter should return nil when property is nil") + }) + + t.Run("GetTaxes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTaxes() // Should return zero value + }) + + t.Run("GetDiscounts", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected []*OrderLineItemDiscount + obj.Discounts = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDiscounts(), "getter should return the property value") + }) + + t.Run("GetDiscounts_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.Discounts = nil + + // Act & Assert + assert.Nil(t, obj.GetDiscounts(), "getter should return nil when property is nil") + }) + + t.Run("GetDiscounts_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDiscounts() // Should return zero value + }) + + t.Run("GetServiceCharges", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected []*OrderServiceCharge + obj.ServiceCharges = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetServiceCharges(), "getter should return the property value") + }) + + t.Run("GetServiceCharges_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.ServiceCharges = nil + + // Act & Assert + assert.Nil(t, obj.GetServiceCharges(), "getter should return nil when property is nil") + }) + + t.Run("GetServiceCharges_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetServiceCharges() // Should return zero value + }) + + t.Run("GetFulfillments", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected []*Fulfillment + obj.Fulfillments = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFulfillments(), "getter should return the property value") + }) + + t.Run("GetFulfillments_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.Fulfillments = nil + + // Act & Assert + assert.Nil(t, obj.GetFulfillments(), "getter should return nil when property is nil") + }) + + t.Run("GetFulfillments_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFulfillments() // Should return zero value + }) + + t.Run("GetReturns", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected []*OrderReturn + obj.Returns = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReturns(), "getter should return the property value") + }) + + t.Run("GetReturns_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.Returns = nil + + // Act & Assert + assert.Nil(t, obj.GetReturns(), "getter should return nil when property is nil") + }) + + t.Run("GetReturns_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReturns() // Should return zero value + }) + + t.Run("GetReturnAmounts", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected *OrderMoneyAmounts + obj.ReturnAmounts = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReturnAmounts(), "getter should return the property value") + }) + + t.Run("GetReturnAmounts_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.ReturnAmounts = nil + + // Act & Assert + assert.Nil(t, obj.GetReturnAmounts(), "getter should return nil when property is nil") + }) + + t.Run("GetReturnAmounts_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReturnAmounts() // Should return zero value + }) + + t.Run("GetNetAmounts", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected *OrderMoneyAmounts + obj.NetAmounts = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNetAmounts(), "getter should return the property value") + }) + + t.Run("GetNetAmounts_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.NetAmounts = nil + + // Act & Assert + assert.Nil(t, obj.GetNetAmounts(), "getter should return nil when property is nil") + }) + + t.Run("GetNetAmounts_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNetAmounts() // Should return zero value + }) + + t.Run("GetRoundingAdjustment", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected *OrderRoundingAdjustment + obj.RoundingAdjustment = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRoundingAdjustment(), "getter should return the property value") + }) + + t.Run("GetRoundingAdjustment_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.RoundingAdjustment = nil + + // Act & Assert + assert.Nil(t, obj.GetRoundingAdjustment(), "getter should return nil when property is nil") + }) + + t.Run("GetRoundingAdjustment_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRoundingAdjustment() // Should return zero value + }) + + t.Run("GetTenders", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected []*Tender + obj.Tenders = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTenders(), "getter should return the property value") + }) + + t.Run("GetTenders_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.Tenders = nil + + // Act & Assert + assert.Nil(t, obj.GetTenders(), "getter should return nil when property is nil") + }) + + t.Run("GetTenders_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTenders() // Should return zero value + }) + + t.Run("GetRefunds", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected []*Refund + obj.Refunds = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRefunds(), "getter should return the property value") + }) + + t.Run("GetRefunds_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.Refunds = nil + + // Act & Assert + assert.Nil(t, obj.GetRefunds(), "getter should return nil when property is nil") + }) + + t.Run("GetRefunds_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRefunds() // Should return zero value + }) + + t.Run("GetMetadata", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected map[string]*string + obj.Metadata = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMetadata(), "getter should return the property value") + }) + + t.Run("GetMetadata_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.Metadata = nil + + // Act & Assert + assert.Nil(t, obj.GetMetadata(), "getter should return nil when property is nil") + }) + + t.Run("GetMetadata_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMetadata() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetClosedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected *string + obj.ClosedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetClosedAt(), "getter should return the property value") + }) + + t.Run("GetClosedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.ClosedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetClosedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetClosedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetClosedAt() // Should return zero value + }) + + t.Run("GetState", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected *OrderState + obj.State = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetState(), "getter should return the property value") + }) + + t.Run("GetState_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.State = nil + + // Act & Assert + assert.Nil(t, obj.GetState(), "getter should return nil when property is nil") + }) + + t.Run("GetState_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetState() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected *int + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetTotalMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected *Money + obj.TotalMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTotalMoney(), "getter should return the property value") + }) + + t.Run("GetTotalMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.TotalMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTotalMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTotalMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTotalMoney() // Should return zero value + }) + + t.Run("GetTotalTaxMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected *Money + obj.TotalTaxMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTotalTaxMoney(), "getter should return the property value") + }) + + t.Run("GetTotalTaxMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.TotalTaxMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTotalTaxMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTotalTaxMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTotalTaxMoney() // Should return zero value + }) + + t.Run("GetTotalDiscountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected *Money + obj.TotalDiscountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTotalDiscountMoney(), "getter should return the property value") + }) + + t.Run("GetTotalDiscountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.TotalDiscountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTotalDiscountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTotalDiscountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTotalDiscountMoney() // Should return zero value + }) + + t.Run("GetTotalTipMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected *Money + obj.TotalTipMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTotalTipMoney(), "getter should return the property value") + }) + + t.Run("GetTotalTipMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.TotalTipMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTotalTipMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTotalTipMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTotalTipMoney() // Should return zero value + }) + + t.Run("GetTotalServiceChargeMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected *Money + obj.TotalServiceChargeMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTotalServiceChargeMoney(), "getter should return the property value") + }) + + t.Run("GetTotalServiceChargeMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.TotalServiceChargeMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTotalServiceChargeMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTotalServiceChargeMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTotalServiceChargeMoney() // Should return zero value + }) + + t.Run("GetTicketName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected *string + obj.TicketName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTicketName(), "getter should return the property value") + }) + + t.Run("GetTicketName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.TicketName = nil + + // Act & Assert + assert.Nil(t, obj.GetTicketName(), "getter should return nil when property is nil") + }) + + t.Run("GetTicketName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTicketName() // Should return zero value + }) + + t.Run("GetPricingOptions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected *OrderPricingOptions + obj.PricingOptions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPricingOptions(), "getter should return the property value") + }) + + t.Run("GetPricingOptions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.PricingOptions = nil + + // Act & Assert + assert.Nil(t, obj.GetPricingOptions(), "getter should return nil when property is nil") + }) + + t.Run("GetPricingOptions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPricingOptions() // Should return zero value + }) + + t.Run("GetRewards", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected []*OrderReward + obj.Rewards = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRewards(), "getter should return the property value") + }) + + t.Run("GetRewards_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.Rewards = nil + + // Act & Assert + assert.Nil(t, obj.GetRewards(), "getter should return nil when property is nil") + }) + + t.Run("GetRewards_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRewards() // Should return zero value + }) + + t.Run("GetNetAmountDueMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var expected *Money + obj.NetAmountDueMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNetAmountDueMoney(), "getter should return the property value") + }) + + t.Run("GetNetAmountDueMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + obj.NetAmountDueMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetNetAmountDueMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetNetAmountDueMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNetAmountDueMoney() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrder(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReferenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueReferenceID *string + + // Act + obj.SetReferenceID(fernTestValueReferenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSource_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueSource *OrderSource + + // Act + obj.SetSource(fernTestValueSource) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueCustomerID *string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLineItems_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueLineItems []*OrderLineItem + + // Act + obj.SetLineItems(fernTestValueLineItems) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTaxes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueTaxes []*OrderLineItemTax + + // Act + obj.SetTaxes(fernTestValueTaxes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDiscounts_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueDiscounts []*OrderLineItemDiscount + + // Act + obj.SetDiscounts(fernTestValueDiscounts) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetServiceCharges_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueServiceCharges []*OrderServiceCharge + + // Act + obj.SetServiceCharges(fernTestValueServiceCharges) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFulfillments_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueFulfillments []*Fulfillment + + // Act + obj.SetFulfillments(fernTestValueFulfillments) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReturns_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueReturns []*OrderReturn + + // Act + obj.SetReturns(fernTestValueReturns) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReturnAmounts_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueReturnAmounts *OrderMoneyAmounts + + // Act + obj.SetReturnAmounts(fernTestValueReturnAmounts) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNetAmounts_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueNetAmounts *OrderMoneyAmounts + + // Act + obj.SetNetAmounts(fernTestValueNetAmounts) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRoundingAdjustment_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueRoundingAdjustment *OrderRoundingAdjustment + + // Act + obj.SetRoundingAdjustment(fernTestValueRoundingAdjustment) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTenders_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueTenders []*Tender + + // Act + obj.SetTenders(fernTestValueTenders) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRefunds_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueRefunds []*Refund + + // Act + obj.SetRefunds(fernTestValueRefunds) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMetadata_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueMetadata map[string]*string + + // Act + obj.SetMetadata(fernTestValueMetadata) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetClosedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueClosedAt *string + + // Act + obj.SetClosedAt(fernTestValueClosedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetState_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueState *OrderState + + // Act + obj.SetState(fernTestValueState) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTotalMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueTotalMoney *Money + + // Act + obj.SetTotalMoney(fernTestValueTotalMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTotalTaxMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueTotalTaxMoney *Money + + // Act + obj.SetTotalTaxMoney(fernTestValueTotalTaxMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTotalDiscountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueTotalDiscountMoney *Money + + // Act + obj.SetTotalDiscountMoney(fernTestValueTotalDiscountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTotalTipMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueTotalTipMoney *Money + + // Act + obj.SetTotalTipMoney(fernTestValueTotalTipMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTotalServiceChargeMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueTotalServiceChargeMoney *Money + + // Act + obj.SetTotalServiceChargeMoney(fernTestValueTotalServiceChargeMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTicketName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueTicketName *string + + // Act + obj.SetTicketName(fernTestValueTicketName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPricingOptions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValuePricingOptions *OrderPricingOptions + + // Act + obj.SetPricingOptions(fernTestValuePricingOptions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRewards_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueRewards []*OrderReward + + // Act + obj.SetRewards(fernTestValueRewards) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNetAmountDueMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + var fernTestValueNetAmountDueMoney *Money + + // Act + obj.SetNetAmountDueMoney(fernTestValueNetAmountDueMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderCreated(t *testing.T) { + t.Run("SetOrderID", func(t *testing.T) { + obj := &OrderCreated{} + var fernTestValueOrderID *string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &OrderCreated{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &OrderCreated{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetState", func(t *testing.T) { + obj := &OrderCreated{} + var fernTestValueState *OrderState + obj.SetState(fernTestValueState) + assert.Equal(t, fernTestValueState, obj.State) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &OrderCreated{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderCreated(t *testing.T) { + t.Run("GetOrderID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreated{} + var expected *string + obj.OrderID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderID(), "getter should return the property value") + }) + + t.Run("GetOrderID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreated{} + obj.OrderID = nil + + // Act & Assert + assert.Nil(t, obj.GetOrderID(), "getter should return nil when property is nil") + }) + + t.Run("GetOrderID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCreated + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderID() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreated{} + var expected *int + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreated{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCreated + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreated{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreated{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCreated + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetState", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreated{} + var expected *OrderState + obj.State = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetState(), "getter should return the property value") + }) + + t.Run("GetState_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreated{} + obj.State = nil + + // Act & Assert + assert.Nil(t, obj.GetState(), "getter should return nil when property is nil") + }) + + t.Run("GetState_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCreated + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetState() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreated{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreated{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCreated + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderCreated(t *testing.T) { + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreated{} + var fernTestValueOrderID *string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreated{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreated{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetState_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreated{} + var fernTestValueState *OrderState + + // Act + obj.SetState(fernTestValueState) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreated{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &OrderCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &OrderCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &OrderCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &OrderCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &OrderCreatedEvent{} + var fernTestValueData *OrderCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedEvent{} + var expected *OrderCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedEvent{} + var fernTestValueData *OrderCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &OrderCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &OrderCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &OrderCreatedEventData{} + var fernTestValueObject *OrderCreatedObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedEventData{} + var expected *OrderCreatedObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedEventData{} + var fernTestValueObject *OrderCreatedObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderCreatedObject(t *testing.T) { + t.Run("SetOrderCreated", func(t *testing.T) { + obj := &OrderCreatedObject{} + var fernTestValueOrderCreated *OrderCreated + obj.SetOrderCreated(fernTestValueOrderCreated) + assert.Equal(t, fernTestValueOrderCreated, obj.OrderCreated) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderCreatedObject(t *testing.T) { + t.Run("GetOrderCreated", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedObject{} + var expected *OrderCreated + obj.OrderCreated = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderCreated(), "getter should return the property value") + }) + + t.Run("GetOrderCreated_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedObject{} + obj.OrderCreated = nil + + // Act & Assert + assert.Nil(t, obj.GetOrderCreated(), "getter should return nil when property is nil") + }) + + t.Run("GetOrderCreated_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCreatedObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderCreated() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderCreatedObject(t *testing.T) { + t.Run("SetOrderCreated_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedObject{} + var fernTestValueOrderCreated *OrderCreated + + // Act + obj.SetOrderCreated(fernTestValueOrderCreated) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionOwnedCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionOwnedCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionOwnedCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionOwnedCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedCreatedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionOwnedCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedCreatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedDeletedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedDeletedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedUpdatedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedUpdatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionVisibleCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionVisibleCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionVisibleCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionVisibleCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleCreatedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionVisibleCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleCreatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleDeletedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleDeletedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &OrderCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleUpdatedEvent{} + var expected *CustomAttributeDefinitionEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleUpdatedEvent{} + var fernTestValueData *CustomAttributeDefinitionEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &OrderCustomAttributeOwnedDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &OrderCustomAttributeOwnedDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &OrderCustomAttributeOwnedDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &OrderCustomAttributeOwnedDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &OrderCustomAttributeOwnedDeletedEvent{} + var fernTestValueData *CustomAttributeEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedDeletedEvent{} + var expected *CustomAttributeEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeOwnedDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedDeletedEvent{} + var fernTestValueData *CustomAttributeEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &OrderCustomAttributeOwnedUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &OrderCustomAttributeOwnedUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &OrderCustomAttributeOwnedUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &OrderCustomAttributeOwnedUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &OrderCustomAttributeOwnedUpdatedEvent{} + var fernTestValueData *CustomAttributeEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedUpdatedEvent{} + var expected *CustomAttributeEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeOwnedUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedUpdatedEvent{} + var fernTestValueData *CustomAttributeEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &OrderCustomAttributeVisibleDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &OrderCustomAttributeVisibleDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &OrderCustomAttributeVisibleDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &OrderCustomAttributeVisibleDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &OrderCustomAttributeVisibleDeletedEvent{} + var fernTestValueData *CustomAttributeEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleDeletedEvent{} + var expected *CustomAttributeEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeVisibleDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleDeletedEvent{} + var fernTestValueData *CustomAttributeEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &OrderCustomAttributeVisibleUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &OrderCustomAttributeVisibleUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &OrderCustomAttributeVisibleUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &OrderCustomAttributeVisibleUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &OrderCustomAttributeVisibleUpdatedEvent{} + var fernTestValueData *CustomAttributeEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleUpdatedEvent{} + var expected *CustomAttributeEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeVisibleUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleUpdatedEvent{} + var fernTestValueData *CustomAttributeEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderFulfillmentUpdated(t *testing.T) { + t.Run("SetOrderID", func(t *testing.T) { + obj := &OrderFulfillmentUpdated{} + var fernTestValueOrderID *string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &OrderFulfillmentUpdated{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &OrderFulfillmentUpdated{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetState", func(t *testing.T) { + obj := &OrderFulfillmentUpdated{} + var fernTestValueState *OrderState + obj.SetState(fernTestValueState) + assert.Equal(t, fernTestValueState, obj.State) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &OrderFulfillmentUpdated{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &OrderFulfillmentUpdated{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetFulfillmentUpdate", func(t *testing.T) { + obj := &OrderFulfillmentUpdated{} + var fernTestValueFulfillmentUpdate []*OrderFulfillmentUpdatedUpdate + obj.SetFulfillmentUpdate(fernTestValueFulfillmentUpdate) + assert.Equal(t, fernTestValueFulfillmentUpdate, obj.FulfillmentUpdate) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderFulfillmentUpdated(t *testing.T) { + t.Run("GetOrderID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdated{} + var expected *string + obj.OrderID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderID(), "getter should return the property value") + }) + + t.Run("GetOrderID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdated{} + obj.OrderID = nil + + // Act & Assert + assert.Nil(t, obj.GetOrderID(), "getter should return nil when property is nil") + }) + + t.Run("GetOrderID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdated + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderID() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdated{} + var expected *int + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdated{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdated + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdated{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdated{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdated + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetState", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdated{} + var expected *OrderState + obj.State = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetState(), "getter should return the property value") + }) + + t.Run("GetState_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdated{} + obj.State = nil + + // Act & Assert + assert.Nil(t, obj.GetState(), "getter should return nil when property is nil") + }) + + t.Run("GetState_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdated + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetState() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdated{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdated{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdated + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdated{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdated{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdated + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetFulfillmentUpdate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdated{} + var expected []*OrderFulfillmentUpdatedUpdate + obj.FulfillmentUpdate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFulfillmentUpdate(), "getter should return the property value") + }) + + t.Run("GetFulfillmentUpdate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdated{} + obj.FulfillmentUpdate = nil + + // Act & Assert + assert.Nil(t, obj.GetFulfillmentUpdate(), "getter should return nil when property is nil") + }) + + t.Run("GetFulfillmentUpdate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdated + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFulfillmentUpdate() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderFulfillmentUpdated(t *testing.T) { + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdated{} + var fernTestValueOrderID *string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdated{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdated{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetState_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdated{} + var fernTestValueState *OrderState + + // Act + obj.SetState(fernTestValueState) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdated{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdated{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetFulfillmentUpdate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdated{} + var fernTestValueFulfillmentUpdate []*OrderFulfillmentUpdatedUpdate + + // Act + obj.SetFulfillmentUpdate(fernTestValueFulfillmentUpdate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderFulfillmentUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &OrderFulfillmentUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &OrderFulfillmentUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &OrderFulfillmentUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &OrderFulfillmentUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &OrderFulfillmentUpdatedEvent{} + var fernTestValueData *OrderFulfillmentUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderFulfillmentUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedEvent{} + var expected *OrderFulfillmentUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderFulfillmentUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedEvent{} + var fernTestValueData *OrderFulfillmentUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderFulfillmentUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &OrderFulfillmentUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &OrderFulfillmentUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &OrderFulfillmentUpdatedEventData{} + var fernTestValueObject *OrderFulfillmentUpdatedObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderFulfillmentUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedEventData{} + var expected *OrderFulfillmentUpdatedObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderFulfillmentUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedEventData{} + var fernTestValueObject *OrderFulfillmentUpdatedObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderFulfillmentUpdatedObject(t *testing.T) { + t.Run("SetOrderFulfillmentUpdated", func(t *testing.T) { + obj := &OrderFulfillmentUpdatedObject{} + var fernTestValueOrderFulfillmentUpdated *OrderFulfillmentUpdated + obj.SetOrderFulfillmentUpdated(fernTestValueOrderFulfillmentUpdated) + assert.Equal(t, fernTestValueOrderFulfillmentUpdated, obj.OrderFulfillmentUpdated) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderFulfillmentUpdatedObject(t *testing.T) { + t.Run("GetOrderFulfillmentUpdated", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedObject{} + var expected *OrderFulfillmentUpdated + obj.OrderFulfillmentUpdated = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderFulfillmentUpdated(), "getter should return the property value") + }) + + t.Run("GetOrderFulfillmentUpdated_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedObject{} + obj.OrderFulfillmentUpdated = nil + + // Act & Assert + assert.Nil(t, obj.GetOrderFulfillmentUpdated(), "getter should return nil when property is nil") + }) + + t.Run("GetOrderFulfillmentUpdated_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdatedObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderFulfillmentUpdated() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderFulfillmentUpdatedObject(t *testing.T) { + t.Run("SetOrderFulfillmentUpdated_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedObject{} + var fernTestValueOrderFulfillmentUpdated *OrderFulfillmentUpdated + + // Act + obj.SetOrderFulfillmentUpdated(fernTestValueOrderFulfillmentUpdated) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderFulfillmentUpdatedUpdate(t *testing.T) { + t.Run("SetFulfillmentUID", func(t *testing.T) { + obj := &OrderFulfillmentUpdatedUpdate{} + var fernTestValueFulfillmentUID *string + obj.SetFulfillmentUID(fernTestValueFulfillmentUID) + assert.Equal(t, fernTestValueFulfillmentUID, obj.FulfillmentUID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOldState", func(t *testing.T) { + obj := &OrderFulfillmentUpdatedUpdate{} + var fernTestValueOldState *FulfillmentState + obj.SetOldState(fernTestValueOldState) + assert.Equal(t, fernTestValueOldState, obj.OldState) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNewState", func(t *testing.T) { + obj := &OrderFulfillmentUpdatedUpdate{} + var fernTestValueNewState *FulfillmentState + obj.SetNewState(fernTestValueNewState) + assert.Equal(t, fernTestValueNewState, obj.NewState) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderFulfillmentUpdatedUpdate(t *testing.T) { + t.Run("GetFulfillmentUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedUpdate{} + var expected *string + obj.FulfillmentUID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFulfillmentUID(), "getter should return the property value") + }) + + t.Run("GetFulfillmentUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedUpdate{} + obj.FulfillmentUID = nil + + // Act & Assert + assert.Nil(t, obj.GetFulfillmentUID(), "getter should return nil when property is nil") + }) + + t.Run("GetFulfillmentUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdatedUpdate + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFulfillmentUID() // Should return zero value + }) + + t.Run("GetOldState", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedUpdate{} + var expected *FulfillmentState + obj.OldState = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOldState(), "getter should return the property value") + }) + + t.Run("GetOldState_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedUpdate{} + obj.OldState = nil + + // Act & Assert + assert.Nil(t, obj.GetOldState(), "getter should return nil when property is nil") + }) + + t.Run("GetOldState_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdatedUpdate + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOldState() // Should return zero value + }) + + t.Run("GetNewState", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedUpdate{} + var expected *FulfillmentState + obj.NewState = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNewState(), "getter should return the property value") + }) + + t.Run("GetNewState_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedUpdate{} + obj.NewState = nil + + // Act & Assert + assert.Nil(t, obj.GetNewState(), "getter should return nil when property is nil") + }) + + t.Run("GetNewState_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdatedUpdate + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNewState() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderFulfillmentUpdatedUpdate(t *testing.T) { + t.Run("SetFulfillmentUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedUpdate{} + var fernTestValueFulfillmentUID *string + + // Act + obj.SetFulfillmentUID(fernTestValueFulfillmentUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOldState_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedUpdate{} + var fernTestValueOldState *FulfillmentState + + // Act + obj.SetOldState(fernTestValueOldState) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNewState_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedUpdate{} + var fernTestValueNewState *FulfillmentState + + // Act + obj.SetNewState(fernTestValueNewState) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderLineItem(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &OrderLineItem{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &OrderLineItem{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuantity", func(t *testing.T) { + obj := &OrderLineItem{} + var fernTestValueQuantity string + obj.SetQuantity(fernTestValueQuantity) + assert.Equal(t, fernTestValueQuantity, obj.Quantity) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuantityUnit", func(t *testing.T) { + obj := &OrderLineItem{} + var fernTestValueQuantityUnit *OrderQuantityUnit + obj.SetQuantityUnit(fernTestValueQuantityUnit) + assert.Equal(t, fernTestValueQuantityUnit, obj.QuantityUnit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNote", func(t *testing.T) { + obj := &OrderLineItem{} + var fernTestValueNote *string + obj.SetNote(fernTestValueNote) + assert.Equal(t, fernTestValueNote, obj.Note) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogObjectID", func(t *testing.T) { + obj := &OrderLineItem{} + var fernTestValueCatalogObjectID *string + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + assert.Equal(t, fernTestValueCatalogObjectID, obj.CatalogObjectID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogVersion", func(t *testing.T) { + obj := &OrderLineItem{} + var fernTestValueCatalogVersion *int64 + obj.SetCatalogVersion(fernTestValueCatalogVersion) + assert.Equal(t, fernTestValueCatalogVersion, obj.CatalogVersion) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVariationName", func(t *testing.T) { + obj := &OrderLineItem{} + var fernTestValueVariationName *string + obj.SetVariationName(fernTestValueVariationName) + assert.Equal(t, fernTestValueVariationName, obj.VariationName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetItemType", func(t *testing.T) { + obj := &OrderLineItem{} + var fernTestValueItemType *OrderLineItemItemType + obj.SetItemType(fernTestValueItemType) + assert.Equal(t, fernTestValueItemType, obj.ItemType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMetadata", func(t *testing.T) { + obj := &OrderLineItem{} + var fernTestValueMetadata map[string]*string + obj.SetMetadata(fernTestValueMetadata) + assert.Equal(t, fernTestValueMetadata, obj.Metadata) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetModifiers", func(t *testing.T) { + obj := &OrderLineItem{} + var fernTestValueModifiers []*OrderLineItemModifier + obj.SetModifiers(fernTestValueModifiers) + assert.Equal(t, fernTestValueModifiers, obj.Modifiers) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppliedTaxes", func(t *testing.T) { + obj := &OrderLineItem{} + var fernTestValueAppliedTaxes []*OrderLineItemAppliedTax + obj.SetAppliedTaxes(fernTestValueAppliedTaxes) + assert.Equal(t, fernTestValueAppliedTaxes, obj.AppliedTaxes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppliedDiscounts", func(t *testing.T) { + obj := &OrderLineItem{} + var fernTestValueAppliedDiscounts []*OrderLineItemAppliedDiscount + obj.SetAppliedDiscounts(fernTestValueAppliedDiscounts) + assert.Equal(t, fernTestValueAppliedDiscounts, obj.AppliedDiscounts) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppliedServiceCharges", func(t *testing.T) { + obj := &OrderLineItem{} + var fernTestValueAppliedServiceCharges []*OrderLineItemAppliedServiceCharge + obj.SetAppliedServiceCharges(fernTestValueAppliedServiceCharges) + assert.Equal(t, fernTestValueAppliedServiceCharges, obj.AppliedServiceCharges) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBasePriceMoney", func(t *testing.T) { + obj := &OrderLineItem{} + var fernTestValueBasePriceMoney *Money + obj.SetBasePriceMoney(fernTestValueBasePriceMoney) + assert.Equal(t, fernTestValueBasePriceMoney, obj.BasePriceMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVariationTotalPriceMoney", func(t *testing.T) { + obj := &OrderLineItem{} + var fernTestValueVariationTotalPriceMoney *Money + obj.SetVariationTotalPriceMoney(fernTestValueVariationTotalPriceMoney) + assert.Equal(t, fernTestValueVariationTotalPriceMoney, obj.VariationTotalPriceMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGrossSalesMoney", func(t *testing.T) { + obj := &OrderLineItem{} + var fernTestValueGrossSalesMoney *Money + obj.SetGrossSalesMoney(fernTestValueGrossSalesMoney) + assert.Equal(t, fernTestValueGrossSalesMoney, obj.GrossSalesMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTotalTaxMoney", func(t *testing.T) { + obj := &OrderLineItem{} + var fernTestValueTotalTaxMoney *Money + obj.SetTotalTaxMoney(fernTestValueTotalTaxMoney) + assert.Equal(t, fernTestValueTotalTaxMoney, obj.TotalTaxMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTotalDiscountMoney", func(t *testing.T) { + obj := &OrderLineItem{} + var fernTestValueTotalDiscountMoney *Money + obj.SetTotalDiscountMoney(fernTestValueTotalDiscountMoney) + assert.Equal(t, fernTestValueTotalDiscountMoney, obj.TotalDiscountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTotalMoney", func(t *testing.T) { + obj := &OrderLineItem{} + var fernTestValueTotalMoney *Money + obj.SetTotalMoney(fernTestValueTotalMoney) + assert.Equal(t, fernTestValueTotalMoney, obj.TotalMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPricingBlocklists", func(t *testing.T) { + obj := &OrderLineItem{} + var fernTestValuePricingBlocklists *OrderLineItemPricingBlocklists + obj.SetPricingBlocklists(fernTestValuePricingBlocklists) + assert.Equal(t, fernTestValuePricingBlocklists, obj.PricingBlocklists) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTotalServiceChargeMoney", func(t *testing.T) { + obj := &OrderLineItem{} + var fernTestValueTotalServiceChargeMoney *Money + obj.SetTotalServiceChargeMoney(fernTestValueTotalServiceChargeMoney) + assert.Equal(t, fernTestValueTotalServiceChargeMoney, obj.TotalServiceChargeMoney) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderLineItem(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetQuantity", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var expected string + obj.Quantity = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQuantity(), "getter should return the property value") + }) + + t.Run("GetQuantity_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQuantity() // Should return zero value + }) + + t.Run("GetQuantityUnit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var expected *OrderQuantityUnit + obj.QuantityUnit = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQuantityUnit(), "getter should return the property value") + }) + + t.Run("GetQuantityUnit_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + obj.QuantityUnit = nil + + // Act & Assert + assert.Nil(t, obj.GetQuantityUnit(), "getter should return nil when property is nil") + }) + + t.Run("GetQuantityUnit_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQuantityUnit() // Should return zero value + }) + + t.Run("GetNote", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var expected *string + obj.Note = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNote(), "getter should return the property value") + }) + + t.Run("GetNote_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + obj.Note = nil + + // Act & Assert + assert.Nil(t, obj.GetNote(), "getter should return nil when property is nil") + }) + + t.Run("GetNote_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNote() // Should return zero value + }) + + t.Run("GetCatalogObjectID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var expected *string + obj.CatalogObjectID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogObjectID(), "getter should return the property value") + }) + + t.Run("GetCatalogObjectID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + obj.CatalogObjectID = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogObjectID(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogObjectID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogObjectID() // Should return zero value + }) + + t.Run("GetCatalogVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var expected *int64 + obj.CatalogVersion = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogVersion(), "getter should return the property value") + }) + + t.Run("GetCatalogVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + obj.CatalogVersion = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogVersion() // Should return zero value + }) + + t.Run("GetVariationName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var expected *string + obj.VariationName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVariationName(), "getter should return the property value") + }) + + t.Run("GetVariationName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + obj.VariationName = nil + + // Act & Assert + assert.Nil(t, obj.GetVariationName(), "getter should return nil when property is nil") + }) + + t.Run("GetVariationName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVariationName() // Should return zero value + }) + + t.Run("GetItemType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var expected *OrderLineItemItemType + obj.ItemType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItemType(), "getter should return the property value") + }) + + t.Run("GetItemType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + obj.ItemType = nil + + // Act & Assert + assert.Nil(t, obj.GetItemType(), "getter should return nil when property is nil") + }) + + t.Run("GetItemType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItemType() // Should return zero value + }) + + t.Run("GetMetadata", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var expected map[string]*string + obj.Metadata = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMetadata(), "getter should return the property value") + }) + + t.Run("GetMetadata_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + obj.Metadata = nil + + // Act & Assert + assert.Nil(t, obj.GetMetadata(), "getter should return nil when property is nil") + }) + + t.Run("GetMetadata_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMetadata() // Should return zero value + }) + + t.Run("GetModifiers", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var expected []*OrderLineItemModifier + obj.Modifiers = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetModifiers(), "getter should return the property value") + }) + + t.Run("GetModifiers_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + obj.Modifiers = nil + + // Act & Assert + assert.Nil(t, obj.GetModifiers(), "getter should return nil when property is nil") + }) + + t.Run("GetModifiers_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetModifiers() // Should return zero value + }) + + t.Run("GetAppliedTaxes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var expected []*OrderLineItemAppliedTax + obj.AppliedTaxes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppliedTaxes(), "getter should return the property value") + }) + + t.Run("GetAppliedTaxes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + obj.AppliedTaxes = nil + + // Act & Assert + assert.Nil(t, obj.GetAppliedTaxes(), "getter should return nil when property is nil") + }) + + t.Run("GetAppliedTaxes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppliedTaxes() // Should return zero value + }) + + t.Run("GetAppliedDiscounts", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var expected []*OrderLineItemAppliedDiscount + obj.AppliedDiscounts = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppliedDiscounts(), "getter should return the property value") + }) + + t.Run("GetAppliedDiscounts_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + obj.AppliedDiscounts = nil + + // Act & Assert + assert.Nil(t, obj.GetAppliedDiscounts(), "getter should return nil when property is nil") + }) + + t.Run("GetAppliedDiscounts_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppliedDiscounts() // Should return zero value + }) + + t.Run("GetAppliedServiceCharges", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var expected []*OrderLineItemAppliedServiceCharge + obj.AppliedServiceCharges = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppliedServiceCharges(), "getter should return the property value") + }) + + t.Run("GetAppliedServiceCharges_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + obj.AppliedServiceCharges = nil + + // Act & Assert + assert.Nil(t, obj.GetAppliedServiceCharges(), "getter should return nil when property is nil") + }) + + t.Run("GetAppliedServiceCharges_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppliedServiceCharges() // Should return zero value + }) + + t.Run("GetBasePriceMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var expected *Money + obj.BasePriceMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBasePriceMoney(), "getter should return the property value") + }) + + t.Run("GetBasePriceMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + obj.BasePriceMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetBasePriceMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetBasePriceMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBasePriceMoney() // Should return zero value + }) + + t.Run("GetVariationTotalPriceMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var expected *Money + obj.VariationTotalPriceMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVariationTotalPriceMoney(), "getter should return the property value") + }) + + t.Run("GetVariationTotalPriceMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + obj.VariationTotalPriceMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetVariationTotalPriceMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetVariationTotalPriceMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVariationTotalPriceMoney() // Should return zero value + }) + + t.Run("GetGrossSalesMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var expected *Money + obj.GrossSalesMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGrossSalesMoney(), "getter should return the property value") + }) + + t.Run("GetGrossSalesMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + obj.GrossSalesMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetGrossSalesMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetGrossSalesMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGrossSalesMoney() // Should return zero value + }) + + t.Run("GetTotalTaxMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var expected *Money + obj.TotalTaxMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTotalTaxMoney(), "getter should return the property value") + }) + + t.Run("GetTotalTaxMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + obj.TotalTaxMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTotalTaxMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTotalTaxMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTotalTaxMoney() // Should return zero value + }) + + t.Run("GetTotalDiscountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var expected *Money + obj.TotalDiscountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTotalDiscountMoney(), "getter should return the property value") + }) + + t.Run("GetTotalDiscountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + obj.TotalDiscountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTotalDiscountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTotalDiscountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTotalDiscountMoney() // Should return zero value + }) + + t.Run("GetTotalMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var expected *Money + obj.TotalMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTotalMoney(), "getter should return the property value") + }) + + t.Run("GetTotalMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + obj.TotalMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTotalMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTotalMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTotalMoney() // Should return zero value + }) + + t.Run("GetPricingBlocklists", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var expected *OrderLineItemPricingBlocklists + obj.PricingBlocklists = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPricingBlocklists(), "getter should return the property value") + }) + + t.Run("GetPricingBlocklists_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + obj.PricingBlocklists = nil + + // Act & Assert + assert.Nil(t, obj.GetPricingBlocklists(), "getter should return nil when property is nil") + }) + + t.Run("GetPricingBlocklists_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPricingBlocklists() // Should return zero value + }) + + t.Run("GetTotalServiceChargeMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var expected *Money + obj.TotalServiceChargeMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTotalServiceChargeMoney(), "getter should return the property value") + }) + + t.Run("GetTotalServiceChargeMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + obj.TotalServiceChargeMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTotalServiceChargeMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTotalServiceChargeMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTotalServiceChargeMoney() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderLineItem(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuantity_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var fernTestValueQuantity string + + // Act + obj.SetQuantity(fernTestValueQuantity) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuantityUnit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var fernTestValueQuantityUnit *OrderQuantityUnit + + // Act + obj.SetQuantityUnit(fernTestValueQuantityUnit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNote_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var fernTestValueNote *string + + // Act + obj.SetNote(fernTestValueNote) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogObjectID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var fernTestValueCatalogObjectID *string + + // Act + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var fernTestValueCatalogVersion *int64 + + // Act + obj.SetCatalogVersion(fernTestValueCatalogVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVariationName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var fernTestValueVariationName *string + + // Act + obj.SetVariationName(fernTestValueVariationName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetItemType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var fernTestValueItemType *OrderLineItemItemType + + // Act + obj.SetItemType(fernTestValueItemType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMetadata_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var fernTestValueMetadata map[string]*string + + // Act + obj.SetMetadata(fernTestValueMetadata) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetModifiers_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var fernTestValueModifiers []*OrderLineItemModifier + + // Act + obj.SetModifiers(fernTestValueModifiers) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppliedTaxes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var fernTestValueAppliedTaxes []*OrderLineItemAppliedTax + + // Act + obj.SetAppliedTaxes(fernTestValueAppliedTaxes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppliedDiscounts_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var fernTestValueAppliedDiscounts []*OrderLineItemAppliedDiscount + + // Act + obj.SetAppliedDiscounts(fernTestValueAppliedDiscounts) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppliedServiceCharges_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var fernTestValueAppliedServiceCharges []*OrderLineItemAppliedServiceCharge + + // Act + obj.SetAppliedServiceCharges(fernTestValueAppliedServiceCharges) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBasePriceMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var fernTestValueBasePriceMoney *Money + + // Act + obj.SetBasePriceMoney(fernTestValueBasePriceMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVariationTotalPriceMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var fernTestValueVariationTotalPriceMoney *Money + + // Act + obj.SetVariationTotalPriceMoney(fernTestValueVariationTotalPriceMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGrossSalesMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var fernTestValueGrossSalesMoney *Money + + // Act + obj.SetGrossSalesMoney(fernTestValueGrossSalesMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTotalTaxMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var fernTestValueTotalTaxMoney *Money + + // Act + obj.SetTotalTaxMoney(fernTestValueTotalTaxMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTotalDiscountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var fernTestValueTotalDiscountMoney *Money + + // Act + obj.SetTotalDiscountMoney(fernTestValueTotalDiscountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTotalMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var fernTestValueTotalMoney *Money + + // Act + obj.SetTotalMoney(fernTestValueTotalMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPricingBlocklists_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var fernTestValuePricingBlocklists *OrderLineItemPricingBlocklists + + // Act + obj.SetPricingBlocklists(fernTestValuePricingBlocklists) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTotalServiceChargeMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + var fernTestValueTotalServiceChargeMoney *Money + + // Act + obj.SetTotalServiceChargeMoney(fernTestValueTotalServiceChargeMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderLineItemAppliedDiscount(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &OrderLineItemAppliedDiscount{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDiscountUID", func(t *testing.T) { + obj := &OrderLineItemAppliedDiscount{} + var fernTestValueDiscountUID string + obj.SetDiscountUID(fernTestValueDiscountUID) + assert.Equal(t, fernTestValueDiscountUID, obj.DiscountUID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppliedMoney", func(t *testing.T) { + obj := &OrderLineItemAppliedDiscount{} + var fernTestValueAppliedMoney *Money + obj.SetAppliedMoney(fernTestValueAppliedMoney) + assert.Equal(t, fernTestValueAppliedMoney, obj.AppliedMoney) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderLineItemAppliedDiscount(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedDiscount{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedDiscount{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemAppliedDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetDiscountUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedDiscount{} + var expected string + obj.DiscountUID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDiscountUID(), "getter should return the property value") + }) + + t.Run("GetDiscountUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemAppliedDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDiscountUID() // Should return zero value + }) + + t.Run("GetAppliedMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedDiscount{} + var expected *Money + obj.AppliedMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppliedMoney(), "getter should return the property value") + }) + + t.Run("GetAppliedMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedDiscount{} + obj.AppliedMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAppliedMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAppliedMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemAppliedDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppliedMoney() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderLineItemAppliedDiscount(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedDiscount{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDiscountUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedDiscount{} + var fernTestValueDiscountUID string + + // Act + obj.SetDiscountUID(fernTestValueDiscountUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppliedMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedDiscount{} + var fernTestValueAppliedMoney *Money + + // Act + obj.SetAppliedMoney(fernTestValueAppliedMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderLineItemAppliedServiceCharge(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &OrderLineItemAppliedServiceCharge{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetServiceChargeUID", func(t *testing.T) { + obj := &OrderLineItemAppliedServiceCharge{} + var fernTestValueServiceChargeUID string + obj.SetServiceChargeUID(fernTestValueServiceChargeUID) + assert.Equal(t, fernTestValueServiceChargeUID, obj.ServiceChargeUID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppliedMoney", func(t *testing.T) { + obj := &OrderLineItemAppliedServiceCharge{} + var fernTestValueAppliedMoney *Money + obj.SetAppliedMoney(fernTestValueAppliedMoney) + assert.Equal(t, fernTestValueAppliedMoney, obj.AppliedMoney) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderLineItemAppliedServiceCharge(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedServiceCharge{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedServiceCharge{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemAppliedServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetServiceChargeUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedServiceCharge{} + var expected string + obj.ServiceChargeUID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetServiceChargeUID(), "getter should return the property value") + }) + + t.Run("GetServiceChargeUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemAppliedServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetServiceChargeUID() // Should return zero value + }) + + t.Run("GetAppliedMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedServiceCharge{} + var expected *Money + obj.AppliedMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppliedMoney(), "getter should return the property value") + }) + + t.Run("GetAppliedMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedServiceCharge{} + obj.AppliedMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAppliedMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAppliedMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemAppliedServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppliedMoney() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderLineItemAppliedServiceCharge(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedServiceCharge{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetServiceChargeUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedServiceCharge{} + var fernTestValueServiceChargeUID string + + // Act + obj.SetServiceChargeUID(fernTestValueServiceChargeUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppliedMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedServiceCharge{} + var fernTestValueAppliedMoney *Money + + // Act + obj.SetAppliedMoney(fernTestValueAppliedMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderLineItemAppliedTax(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &OrderLineItemAppliedTax{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTaxUID", func(t *testing.T) { + obj := &OrderLineItemAppliedTax{} + var fernTestValueTaxUID string + obj.SetTaxUID(fernTestValueTaxUID) + assert.Equal(t, fernTestValueTaxUID, obj.TaxUID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppliedMoney", func(t *testing.T) { + obj := &OrderLineItemAppliedTax{} + var fernTestValueAppliedMoney *Money + obj.SetAppliedMoney(fernTestValueAppliedMoney) + assert.Equal(t, fernTestValueAppliedMoney, obj.AppliedMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAutoApplied", func(t *testing.T) { + obj := &OrderLineItemAppliedTax{} + var fernTestValueAutoApplied *bool + obj.SetAutoApplied(fernTestValueAutoApplied) + assert.Equal(t, fernTestValueAutoApplied, obj.AutoApplied) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderLineItemAppliedTax(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedTax{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedTax{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemAppliedTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetTaxUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedTax{} + var expected string + obj.TaxUID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTaxUID(), "getter should return the property value") + }) + + t.Run("GetTaxUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemAppliedTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTaxUID() // Should return zero value + }) + + t.Run("GetAppliedMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedTax{} + var expected *Money + obj.AppliedMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppliedMoney(), "getter should return the property value") + }) + + t.Run("GetAppliedMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedTax{} + obj.AppliedMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAppliedMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAppliedMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemAppliedTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppliedMoney() // Should return zero value + }) + + t.Run("GetAutoApplied", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedTax{} + var expected *bool + obj.AutoApplied = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAutoApplied(), "getter should return the property value") + }) + + t.Run("GetAutoApplied_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedTax{} + obj.AutoApplied = nil + + // Act & Assert + assert.Nil(t, obj.GetAutoApplied(), "getter should return nil when property is nil") + }) + + t.Run("GetAutoApplied_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemAppliedTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAutoApplied() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderLineItemAppliedTax(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedTax{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTaxUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedTax{} + var fernTestValueTaxUID string + + // Act + obj.SetTaxUID(fernTestValueTaxUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppliedMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedTax{} + var fernTestValueAppliedMoney *Money + + // Act + obj.SetAppliedMoney(fernTestValueAppliedMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAutoApplied_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedTax{} + var fernTestValueAutoApplied *bool + + // Act + obj.SetAutoApplied(fernTestValueAutoApplied) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderLineItemDiscount(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &OrderLineItemDiscount{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogObjectID", func(t *testing.T) { + obj := &OrderLineItemDiscount{} + var fernTestValueCatalogObjectID *string + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + assert.Equal(t, fernTestValueCatalogObjectID, obj.CatalogObjectID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogVersion", func(t *testing.T) { + obj := &OrderLineItemDiscount{} + var fernTestValueCatalogVersion *int64 + obj.SetCatalogVersion(fernTestValueCatalogVersion) + assert.Equal(t, fernTestValueCatalogVersion, obj.CatalogVersion) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &OrderLineItemDiscount{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &OrderLineItemDiscount{} + var fernTestValueType *OrderLineItemDiscountType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPercentage", func(t *testing.T) { + obj := &OrderLineItemDiscount{} + var fernTestValuePercentage *string + obj.SetPercentage(fernTestValuePercentage) + assert.Equal(t, fernTestValuePercentage, obj.Percentage) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &OrderLineItemDiscount{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppliedMoney", func(t *testing.T) { + obj := &OrderLineItemDiscount{} + var fernTestValueAppliedMoney *Money + obj.SetAppliedMoney(fernTestValueAppliedMoney) + assert.Equal(t, fernTestValueAppliedMoney, obj.AppliedMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMetadata", func(t *testing.T) { + obj := &OrderLineItemDiscount{} + var fernTestValueMetadata map[string]*string + obj.SetMetadata(fernTestValueMetadata) + assert.Equal(t, fernTestValueMetadata, obj.Metadata) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetScope", func(t *testing.T) { + obj := &OrderLineItemDiscount{} + var fernTestValueScope *OrderLineItemDiscountScope + obj.SetScope(fernTestValueScope) + assert.Equal(t, fernTestValueScope, obj.Scope) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRewardIDs", func(t *testing.T) { + obj := &OrderLineItemDiscount{} + var fernTestValueRewardIDs []string + obj.SetRewardIDs(fernTestValueRewardIDs) + assert.Equal(t, fernTestValueRewardIDs, obj.RewardIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPricingRuleID", func(t *testing.T) { + obj := &OrderLineItemDiscount{} + var fernTestValuePricingRuleID *string + obj.SetPricingRuleID(fernTestValuePricingRuleID) + assert.Equal(t, fernTestValuePricingRuleID, obj.PricingRuleID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderLineItemDiscount(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetCatalogObjectID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + var expected *string + obj.CatalogObjectID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogObjectID(), "getter should return the property value") + }) + + t.Run("GetCatalogObjectID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + obj.CatalogObjectID = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogObjectID(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogObjectID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogObjectID() // Should return zero value + }) + + t.Run("GetCatalogVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + var expected *int64 + obj.CatalogVersion = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogVersion(), "getter should return the property value") + }) + + t.Run("GetCatalogVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + obj.CatalogVersion = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogVersion() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + var expected *OrderLineItemDiscountType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetPercentage", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + var expected *string + obj.Percentage = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPercentage(), "getter should return the property value") + }) + + t.Run("GetPercentage_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + obj.Percentage = nil + + // Act & Assert + assert.Nil(t, obj.GetPercentage(), "getter should return nil when property is nil") + }) + + t.Run("GetPercentage_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPercentage() // Should return zero value + }) + + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + + t.Run("GetAppliedMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + var expected *Money + obj.AppliedMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppliedMoney(), "getter should return the property value") + }) + + t.Run("GetAppliedMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + obj.AppliedMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAppliedMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAppliedMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppliedMoney() // Should return zero value + }) + + t.Run("GetMetadata", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + var expected map[string]*string + obj.Metadata = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMetadata(), "getter should return the property value") + }) + + t.Run("GetMetadata_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + obj.Metadata = nil + + // Act & Assert + assert.Nil(t, obj.GetMetadata(), "getter should return nil when property is nil") + }) + + t.Run("GetMetadata_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMetadata() // Should return zero value + }) + + t.Run("GetScope", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + var expected *OrderLineItemDiscountScope + obj.Scope = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetScope(), "getter should return the property value") + }) + + t.Run("GetScope_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + obj.Scope = nil + + // Act & Assert + assert.Nil(t, obj.GetScope(), "getter should return nil when property is nil") + }) + + t.Run("GetScope_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetScope() // Should return zero value + }) + + t.Run("GetRewardIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + var expected []string + obj.RewardIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRewardIDs(), "getter should return the property value") + }) + + t.Run("GetRewardIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + obj.RewardIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetRewardIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetRewardIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRewardIDs() // Should return zero value + }) + + t.Run("GetPricingRuleID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + var expected *string + obj.PricingRuleID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPricingRuleID(), "getter should return the property value") + }) + + t.Run("GetPricingRuleID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + obj.PricingRuleID = nil + + // Act & Assert + assert.Nil(t, obj.GetPricingRuleID(), "getter should return nil when property is nil") + }) + + t.Run("GetPricingRuleID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPricingRuleID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderLineItemDiscount(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogObjectID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + var fernTestValueCatalogObjectID *string + + // Act + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + var fernTestValueCatalogVersion *int64 + + // Act + obj.SetCatalogVersion(fernTestValueCatalogVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + var fernTestValueType *OrderLineItemDiscountType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPercentage_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + var fernTestValuePercentage *string + + // Act + obj.SetPercentage(fernTestValuePercentage) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppliedMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + var fernTestValueAppliedMoney *Money + + // Act + obj.SetAppliedMoney(fernTestValueAppliedMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMetadata_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + var fernTestValueMetadata map[string]*string + + // Act + obj.SetMetadata(fernTestValueMetadata) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetScope_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + var fernTestValueScope *OrderLineItemDiscountScope + + // Act + obj.SetScope(fernTestValueScope) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRewardIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + var fernTestValueRewardIDs []string + + // Act + obj.SetRewardIDs(fernTestValueRewardIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPricingRuleID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + var fernTestValuePricingRuleID *string + + // Act + obj.SetPricingRuleID(fernTestValuePricingRuleID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderLineItemModifier(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &OrderLineItemModifier{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogObjectID", func(t *testing.T) { + obj := &OrderLineItemModifier{} + var fernTestValueCatalogObjectID *string + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + assert.Equal(t, fernTestValueCatalogObjectID, obj.CatalogObjectID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogVersion", func(t *testing.T) { + obj := &OrderLineItemModifier{} + var fernTestValueCatalogVersion *int64 + obj.SetCatalogVersion(fernTestValueCatalogVersion) + assert.Equal(t, fernTestValueCatalogVersion, obj.CatalogVersion) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &OrderLineItemModifier{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuantity", func(t *testing.T) { + obj := &OrderLineItemModifier{} + var fernTestValueQuantity *string + obj.SetQuantity(fernTestValueQuantity) + assert.Equal(t, fernTestValueQuantity, obj.Quantity) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBasePriceMoney", func(t *testing.T) { + obj := &OrderLineItemModifier{} + var fernTestValueBasePriceMoney *Money + obj.SetBasePriceMoney(fernTestValueBasePriceMoney) + assert.Equal(t, fernTestValueBasePriceMoney, obj.BasePriceMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTotalPriceMoney", func(t *testing.T) { + obj := &OrderLineItemModifier{} + var fernTestValueTotalPriceMoney *Money + obj.SetTotalPriceMoney(fernTestValueTotalPriceMoney) + assert.Equal(t, fernTestValueTotalPriceMoney, obj.TotalPriceMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMetadata", func(t *testing.T) { + obj := &OrderLineItemModifier{} + var fernTestValueMetadata map[string]*string + obj.SetMetadata(fernTestValueMetadata) + assert.Equal(t, fernTestValueMetadata, obj.Metadata) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderLineItemModifier(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemModifier{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemModifier{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetCatalogObjectID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemModifier{} + var expected *string + obj.CatalogObjectID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogObjectID(), "getter should return the property value") + }) + + t.Run("GetCatalogObjectID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemModifier{} + obj.CatalogObjectID = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogObjectID(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogObjectID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogObjectID() // Should return zero value + }) + + t.Run("GetCatalogVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemModifier{} + var expected *int64 + obj.CatalogVersion = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogVersion(), "getter should return the property value") + }) + + t.Run("GetCatalogVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemModifier{} + obj.CatalogVersion = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogVersion() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemModifier{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemModifier{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetQuantity", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemModifier{} + var expected *string + obj.Quantity = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQuantity(), "getter should return the property value") + }) + + t.Run("GetQuantity_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemModifier{} + obj.Quantity = nil + + // Act & Assert + assert.Nil(t, obj.GetQuantity(), "getter should return nil when property is nil") + }) + + t.Run("GetQuantity_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQuantity() // Should return zero value + }) + + t.Run("GetBasePriceMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemModifier{} + var expected *Money + obj.BasePriceMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBasePriceMoney(), "getter should return the property value") + }) + + t.Run("GetBasePriceMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemModifier{} + obj.BasePriceMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetBasePriceMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetBasePriceMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBasePriceMoney() // Should return zero value + }) + + t.Run("GetTotalPriceMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemModifier{} + var expected *Money + obj.TotalPriceMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTotalPriceMoney(), "getter should return the property value") + }) + + t.Run("GetTotalPriceMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemModifier{} + obj.TotalPriceMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTotalPriceMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTotalPriceMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTotalPriceMoney() // Should return zero value + }) + + t.Run("GetMetadata", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemModifier{} + var expected map[string]*string + obj.Metadata = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMetadata(), "getter should return the property value") + }) + + t.Run("GetMetadata_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemModifier{} + obj.Metadata = nil + + // Act & Assert + assert.Nil(t, obj.GetMetadata(), "getter should return nil when property is nil") + }) + + t.Run("GetMetadata_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMetadata() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderLineItemModifier(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemModifier{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogObjectID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemModifier{} + var fernTestValueCatalogObjectID *string + + // Act + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemModifier{} + var fernTestValueCatalogVersion *int64 + + // Act + obj.SetCatalogVersion(fernTestValueCatalogVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemModifier{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuantity_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemModifier{} + var fernTestValueQuantity *string + + // Act + obj.SetQuantity(fernTestValueQuantity) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBasePriceMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemModifier{} + var fernTestValueBasePriceMoney *Money + + // Act + obj.SetBasePriceMoney(fernTestValueBasePriceMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTotalPriceMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemModifier{} + var fernTestValueTotalPriceMoney *Money + + // Act + obj.SetTotalPriceMoney(fernTestValueTotalPriceMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMetadata_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemModifier{} + var fernTestValueMetadata map[string]*string + + // Act + obj.SetMetadata(fernTestValueMetadata) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderLineItemPricingBlocklists(t *testing.T) { + t.Run("SetBlockedDiscounts", func(t *testing.T) { + obj := &OrderLineItemPricingBlocklists{} + var fernTestValueBlockedDiscounts []*OrderLineItemPricingBlocklistsBlockedDiscount + obj.SetBlockedDiscounts(fernTestValueBlockedDiscounts) + assert.Equal(t, fernTestValueBlockedDiscounts, obj.BlockedDiscounts) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBlockedTaxes", func(t *testing.T) { + obj := &OrderLineItemPricingBlocklists{} + var fernTestValueBlockedTaxes []*OrderLineItemPricingBlocklistsBlockedTax + obj.SetBlockedTaxes(fernTestValueBlockedTaxes) + assert.Equal(t, fernTestValueBlockedTaxes, obj.BlockedTaxes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBlockedServiceCharges", func(t *testing.T) { + obj := &OrderLineItemPricingBlocklists{} + var fernTestValueBlockedServiceCharges []*OrderLineItemPricingBlocklistsBlockedServiceCharge + obj.SetBlockedServiceCharges(fernTestValueBlockedServiceCharges) + assert.Equal(t, fernTestValueBlockedServiceCharges, obj.BlockedServiceCharges) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderLineItemPricingBlocklists(t *testing.T) { + t.Run("GetBlockedDiscounts", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklists{} + var expected []*OrderLineItemPricingBlocklistsBlockedDiscount + obj.BlockedDiscounts = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBlockedDiscounts(), "getter should return the property value") + }) + + t.Run("GetBlockedDiscounts_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklists{} + obj.BlockedDiscounts = nil + + // Act & Assert + assert.Nil(t, obj.GetBlockedDiscounts(), "getter should return nil when property is nil") + }) + + t.Run("GetBlockedDiscounts_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemPricingBlocklists + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBlockedDiscounts() // Should return zero value + }) + + t.Run("GetBlockedTaxes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklists{} + var expected []*OrderLineItemPricingBlocklistsBlockedTax + obj.BlockedTaxes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBlockedTaxes(), "getter should return the property value") + }) + + t.Run("GetBlockedTaxes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklists{} + obj.BlockedTaxes = nil + + // Act & Assert + assert.Nil(t, obj.GetBlockedTaxes(), "getter should return nil when property is nil") + }) + + t.Run("GetBlockedTaxes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemPricingBlocklists + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBlockedTaxes() // Should return zero value + }) + + t.Run("GetBlockedServiceCharges", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklists{} + var expected []*OrderLineItemPricingBlocklistsBlockedServiceCharge + obj.BlockedServiceCharges = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBlockedServiceCharges(), "getter should return the property value") + }) + + t.Run("GetBlockedServiceCharges_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklists{} + obj.BlockedServiceCharges = nil + + // Act & Assert + assert.Nil(t, obj.GetBlockedServiceCharges(), "getter should return nil when property is nil") + }) + + t.Run("GetBlockedServiceCharges_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemPricingBlocklists + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBlockedServiceCharges() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderLineItemPricingBlocklists(t *testing.T) { + t.Run("SetBlockedDiscounts_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklists{} + var fernTestValueBlockedDiscounts []*OrderLineItemPricingBlocklistsBlockedDiscount + + // Act + obj.SetBlockedDiscounts(fernTestValueBlockedDiscounts) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBlockedTaxes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklists{} + var fernTestValueBlockedTaxes []*OrderLineItemPricingBlocklistsBlockedTax + + // Act + obj.SetBlockedTaxes(fernTestValueBlockedTaxes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBlockedServiceCharges_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklists{} + var fernTestValueBlockedServiceCharges []*OrderLineItemPricingBlocklistsBlockedServiceCharge + + // Act + obj.SetBlockedServiceCharges(fernTestValueBlockedServiceCharges) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderLineItemPricingBlocklistsBlockedDiscount(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &OrderLineItemPricingBlocklistsBlockedDiscount{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDiscountUID", func(t *testing.T) { + obj := &OrderLineItemPricingBlocklistsBlockedDiscount{} + var fernTestValueDiscountUID *string + obj.SetDiscountUID(fernTestValueDiscountUID) + assert.Equal(t, fernTestValueDiscountUID, obj.DiscountUID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDiscountCatalogObjectID", func(t *testing.T) { + obj := &OrderLineItemPricingBlocklistsBlockedDiscount{} + var fernTestValueDiscountCatalogObjectID *string + obj.SetDiscountCatalogObjectID(fernTestValueDiscountCatalogObjectID) + assert.Equal(t, fernTestValueDiscountCatalogObjectID, obj.DiscountCatalogObjectID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderLineItemPricingBlocklistsBlockedDiscount(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedDiscount{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedDiscount{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemPricingBlocklistsBlockedDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetDiscountUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedDiscount{} + var expected *string + obj.DiscountUID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDiscountUID(), "getter should return the property value") + }) + + t.Run("GetDiscountUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedDiscount{} + obj.DiscountUID = nil + + // Act & Assert + assert.Nil(t, obj.GetDiscountUID(), "getter should return nil when property is nil") + }) + + t.Run("GetDiscountUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemPricingBlocklistsBlockedDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDiscountUID() // Should return zero value + }) + + t.Run("GetDiscountCatalogObjectID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedDiscount{} + var expected *string + obj.DiscountCatalogObjectID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDiscountCatalogObjectID(), "getter should return the property value") + }) + + t.Run("GetDiscountCatalogObjectID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedDiscount{} + obj.DiscountCatalogObjectID = nil + + // Act & Assert + assert.Nil(t, obj.GetDiscountCatalogObjectID(), "getter should return nil when property is nil") + }) + + t.Run("GetDiscountCatalogObjectID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemPricingBlocklistsBlockedDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDiscountCatalogObjectID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderLineItemPricingBlocklistsBlockedDiscount(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedDiscount{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDiscountUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedDiscount{} + var fernTestValueDiscountUID *string + + // Act + obj.SetDiscountUID(fernTestValueDiscountUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDiscountCatalogObjectID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedDiscount{} + var fernTestValueDiscountCatalogObjectID *string + + // Act + obj.SetDiscountCatalogObjectID(fernTestValueDiscountCatalogObjectID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderLineItemPricingBlocklistsBlockedServiceCharge(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &OrderLineItemPricingBlocklistsBlockedServiceCharge{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetServiceChargeUID", func(t *testing.T) { + obj := &OrderLineItemPricingBlocklistsBlockedServiceCharge{} + var fernTestValueServiceChargeUID *string + obj.SetServiceChargeUID(fernTestValueServiceChargeUID) + assert.Equal(t, fernTestValueServiceChargeUID, obj.ServiceChargeUID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetServiceChargeCatalogObjectID", func(t *testing.T) { + obj := &OrderLineItemPricingBlocklistsBlockedServiceCharge{} + var fernTestValueServiceChargeCatalogObjectID *string + obj.SetServiceChargeCatalogObjectID(fernTestValueServiceChargeCatalogObjectID) + assert.Equal(t, fernTestValueServiceChargeCatalogObjectID, obj.ServiceChargeCatalogObjectID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderLineItemPricingBlocklistsBlockedServiceCharge(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedServiceCharge{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedServiceCharge{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemPricingBlocklistsBlockedServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetServiceChargeUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedServiceCharge{} + var expected *string + obj.ServiceChargeUID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetServiceChargeUID(), "getter should return the property value") + }) + + t.Run("GetServiceChargeUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedServiceCharge{} + obj.ServiceChargeUID = nil + + // Act & Assert + assert.Nil(t, obj.GetServiceChargeUID(), "getter should return nil when property is nil") + }) + + t.Run("GetServiceChargeUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemPricingBlocklistsBlockedServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetServiceChargeUID() // Should return zero value + }) + + t.Run("GetServiceChargeCatalogObjectID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedServiceCharge{} + var expected *string + obj.ServiceChargeCatalogObjectID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetServiceChargeCatalogObjectID(), "getter should return the property value") + }) + + t.Run("GetServiceChargeCatalogObjectID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedServiceCharge{} + obj.ServiceChargeCatalogObjectID = nil + + // Act & Assert + assert.Nil(t, obj.GetServiceChargeCatalogObjectID(), "getter should return nil when property is nil") + }) + + t.Run("GetServiceChargeCatalogObjectID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemPricingBlocklistsBlockedServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetServiceChargeCatalogObjectID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderLineItemPricingBlocklistsBlockedServiceCharge(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedServiceCharge{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetServiceChargeUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedServiceCharge{} + var fernTestValueServiceChargeUID *string + + // Act + obj.SetServiceChargeUID(fernTestValueServiceChargeUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetServiceChargeCatalogObjectID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedServiceCharge{} + var fernTestValueServiceChargeCatalogObjectID *string + + // Act + obj.SetServiceChargeCatalogObjectID(fernTestValueServiceChargeCatalogObjectID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderLineItemPricingBlocklistsBlockedTax(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &OrderLineItemPricingBlocklistsBlockedTax{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTaxUID", func(t *testing.T) { + obj := &OrderLineItemPricingBlocklistsBlockedTax{} + var fernTestValueTaxUID *string + obj.SetTaxUID(fernTestValueTaxUID) + assert.Equal(t, fernTestValueTaxUID, obj.TaxUID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTaxCatalogObjectID", func(t *testing.T) { + obj := &OrderLineItemPricingBlocklistsBlockedTax{} + var fernTestValueTaxCatalogObjectID *string + obj.SetTaxCatalogObjectID(fernTestValueTaxCatalogObjectID) + assert.Equal(t, fernTestValueTaxCatalogObjectID, obj.TaxCatalogObjectID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderLineItemPricingBlocklistsBlockedTax(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedTax{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedTax{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemPricingBlocklistsBlockedTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetTaxUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedTax{} + var expected *string + obj.TaxUID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTaxUID(), "getter should return the property value") + }) + + t.Run("GetTaxUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedTax{} + obj.TaxUID = nil + + // Act & Assert + assert.Nil(t, obj.GetTaxUID(), "getter should return nil when property is nil") + }) + + t.Run("GetTaxUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemPricingBlocklistsBlockedTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTaxUID() // Should return zero value + }) + + t.Run("GetTaxCatalogObjectID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedTax{} + var expected *string + obj.TaxCatalogObjectID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTaxCatalogObjectID(), "getter should return the property value") + }) + + t.Run("GetTaxCatalogObjectID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedTax{} + obj.TaxCatalogObjectID = nil + + // Act & Assert + assert.Nil(t, obj.GetTaxCatalogObjectID(), "getter should return nil when property is nil") + }) + + t.Run("GetTaxCatalogObjectID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemPricingBlocklistsBlockedTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTaxCatalogObjectID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderLineItemPricingBlocklistsBlockedTax(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedTax{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTaxUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedTax{} + var fernTestValueTaxUID *string + + // Act + obj.SetTaxUID(fernTestValueTaxUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTaxCatalogObjectID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedTax{} + var fernTestValueTaxCatalogObjectID *string + + // Act + obj.SetTaxCatalogObjectID(fernTestValueTaxCatalogObjectID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderLineItemTax(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &OrderLineItemTax{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogObjectID", func(t *testing.T) { + obj := &OrderLineItemTax{} + var fernTestValueCatalogObjectID *string + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + assert.Equal(t, fernTestValueCatalogObjectID, obj.CatalogObjectID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogVersion", func(t *testing.T) { + obj := &OrderLineItemTax{} + var fernTestValueCatalogVersion *int64 + obj.SetCatalogVersion(fernTestValueCatalogVersion) + assert.Equal(t, fernTestValueCatalogVersion, obj.CatalogVersion) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &OrderLineItemTax{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &OrderLineItemTax{} + var fernTestValueType *OrderLineItemTaxType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPercentage", func(t *testing.T) { + obj := &OrderLineItemTax{} + var fernTestValuePercentage *string + obj.SetPercentage(fernTestValuePercentage) + assert.Equal(t, fernTestValuePercentage, obj.Percentage) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMetadata", func(t *testing.T) { + obj := &OrderLineItemTax{} + var fernTestValueMetadata map[string]*string + obj.SetMetadata(fernTestValueMetadata) + assert.Equal(t, fernTestValueMetadata, obj.Metadata) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppliedMoney", func(t *testing.T) { + obj := &OrderLineItemTax{} + var fernTestValueAppliedMoney *Money + obj.SetAppliedMoney(fernTestValueAppliedMoney) + assert.Equal(t, fernTestValueAppliedMoney, obj.AppliedMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetScope", func(t *testing.T) { + obj := &OrderLineItemTax{} + var fernTestValueScope *OrderLineItemTaxScope + obj.SetScope(fernTestValueScope) + assert.Equal(t, fernTestValueScope, obj.Scope) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAutoApplied", func(t *testing.T) { + obj := &OrderLineItemTax{} + var fernTestValueAutoApplied *bool + obj.SetAutoApplied(fernTestValueAutoApplied) + assert.Equal(t, fernTestValueAutoApplied, obj.AutoApplied) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderLineItemTax(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetCatalogObjectID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + var expected *string + obj.CatalogObjectID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogObjectID(), "getter should return the property value") + }) + + t.Run("GetCatalogObjectID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + obj.CatalogObjectID = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogObjectID(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogObjectID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogObjectID() // Should return zero value + }) + + t.Run("GetCatalogVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + var expected *int64 + obj.CatalogVersion = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogVersion(), "getter should return the property value") + }) + + t.Run("GetCatalogVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + obj.CatalogVersion = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogVersion() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + var expected *OrderLineItemTaxType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetPercentage", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + var expected *string + obj.Percentage = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPercentage(), "getter should return the property value") + }) + + t.Run("GetPercentage_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + obj.Percentage = nil + + // Act & Assert + assert.Nil(t, obj.GetPercentage(), "getter should return nil when property is nil") + }) + + t.Run("GetPercentage_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPercentage() // Should return zero value + }) + + t.Run("GetMetadata", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + var expected map[string]*string + obj.Metadata = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMetadata(), "getter should return the property value") + }) + + t.Run("GetMetadata_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + obj.Metadata = nil + + // Act & Assert + assert.Nil(t, obj.GetMetadata(), "getter should return nil when property is nil") + }) + + t.Run("GetMetadata_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMetadata() // Should return zero value + }) + + t.Run("GetAppliedMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + var expected *Money + obj.AppliedMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppliedMoney(), "getter should return the property value") + }) + + t.Run("GetAppliedMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + obj.AppliedMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAppliedMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAppliedMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppliedMoney() // Should return zero value + }) + + t.Run("GetScope", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + var expected *OrderLineItemTaxScope + obj.Scope = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetScope(), "getter should return the property value") + }) + + t.Run("GetScope_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + obj.Scope = nil + + // Act & Assert + assert.Nil(t, obj.GetScope(), "getter should return nil when property is nil") + }) + + t.Run("GetScope_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetScope() // Should return zero value + }) + + t.Run("GetAutoApplied", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + var expected *bool + obj.AutoApplied = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAutoApplied(), "getter should return the property value") + }) + + t.Run("GetAutoApplied_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + obj.AutoApplied = nil + + // Act & Assert + assert.Nil(t, obj.GetAutoApplied(), "getter should return nil when property is nil") + }) + + t.Run("GetAutoApplied_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAutoApplied() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderLineItemTax(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogObjectID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + var fernTestValueCatalogObjectID *string + + // Act + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + var fernTestValueCatalogVersion *int64 + + // Act + obj.SetCatalogVersion(fernTestValueCatalogVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + var fernTestValueType *OrderLineItemTaxType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPercentage_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + var fernTestValuePercentage *string + + // Act + obj.SetPercentage(fernTestValuePercentage) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMetadata_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + var fernTestValueMetadata map[string]*string + + // Act + obj.SetMetadata(fernTestValueMetadata) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppliedMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + var fernTestValueAppliedMoney *Money + + // Act + obj.SetAppliedMoney(fernTestValueAppliedMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetScope_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + var fernTestValueScope *OrderLineItemTaxScope + + // Act + obj.SetScope(fernTestValueScope) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAutoApplied_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + var fernTestValueAutoApplied *bool + + // Act + obj.SetAutoApplied(fernTestValueAutoApplied) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderMoneyAmounts(t *testing.T) { + t.Run("SetTotalMoney", func(t *testing.T) { + obj := &OrderMoneyAmounts{} + var fernTestValueTotalMoney *Money + obj.SetTotalMoney(fernTestValueTotalMoney) + assert.Equal(t, fernTestValueTotalMoney, obj.TotalMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTaxMoney", func(t *testing.T) { + obj := &OrderMoneyAmounts{} + var fernTestValueTaxMoney *Money + obj.SetTaxMoney(fernTestValueTaxMoney) + assert.Equal(t, fernTestValueTaxMoney, obj.TaxMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDiscountMoney", func(t *testing.T) { + obj := &OrderMoneyAmounts{} + var fernTestValueDiscountMoney *Money + obj.SetDiscountMoney(fernTestValueDiscountMoney) + assert.Equal(t, fernTestValueDiscountMoney, obj.DiscountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTipMoney", func(t *testing.T) { + obj := &OrderMoneyAmounts{} + var fernTestValueTipMoney *Money + obj.SetTipMoney(fernTestValueTipMoney) + assert.Equal(t, fernTestValueTipMoney, obj.TipMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetServiceChargeMoney", func(t *testing.T) { + obj := &OrderMoneyAmounts{} + var fernTestValueServiceChargeMoney *Money + obj.SetServiceChargeMoney(fernTestValueServiceChargeMoney) + assert.Equal(t, fernTestValueServiceChargeMoney, obj.ServiceChargeMoney) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderMoneyAmounts(t *testing.T) { + t.Run("GetTotalMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderMoneyAmounts{} + var expected *Money + obj.TotalMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTotalMoney(), "getter should return the property value") + }) + + t.Run("GetTotalMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderMoneyAmounts{} + obj.TotalMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTotalMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTotalMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderMoneyAmounts + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTotalMoney() // Should return zero value + }) + + t.Run("GetTaxMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderMoneyAmounts{} + var expected *Money + obj.TaxMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTaxMoney(), "getter should return the property value") + }) + + t.Run("GetTaxMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderMoneyAmounts{} + obj.TaxMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTaxMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTaxMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderMoneyAmounts + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTaxMoney() // Should return zero value + }) + + t.Run("GetDiscountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderMoneyAmounts{} + var expected *Money + obj.DiscountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDiscountMoney(), "getter should return the property value") + }) + + t.Run("GetDiscountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderMoneyAmounts{} + obj.DiscountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetDiscountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetDiscountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderMoneyAmounts + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDiscountMoney() // Should return zero value + }) + + t.Run("GetTipMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderMoneyAmounts{} + var expected *Money + obj.TipMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTipMoney(), "getter should return the property value") + }) + + t.Run("GetTipMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderMoneyAmounts{} + obj.TipMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTipMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTipMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderMoneyAmounts + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTipMoney() // Should return zero value + }) + + t.Run("GetServiceChargeMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderMoneyAmounts{} + var expected *Money + obj.ServiceChargeMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetServiceChargeMoney(), "getter should return the property value") + }) + + t.Run("GetServiceChargeMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderMoneyAmounts{} + obj.ServiceChargeMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetServiceChargeMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetServiceChargeMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderMoneyAmounts + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetServiceChargeMoney() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderMoneyAmounts(t *testing.T) { + t.Run("SetTotalMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderMoneyAmounts{} + var fernTestValueTotalMoney *Money + + // Act + obj.SetTotalMoney(fernTestValueTotalMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTaxMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderMoneyAmounts{} + var fernTestValueTaxMoney *Money + + // Act + obj.SetTaxMoney(fernTestValueTaxMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDiscountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderMoneyAmounts{} + var fernTestValueDiscountMoney *Money + + // Act + obj.SetDiscountMoney(fernTestValueDiscountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTipMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderMoneyAmounts{} + var fernTestValueTipMoney *Money + + // Act + obj.SetTipMoney(fernTestValueTipMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetServiceChargeMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderMoneyAmounts{} + var fernTestValueServiceChargeMoney *Money + + // Act + obj.SetServiceChargeMoney(fernTestValueServiceChargeMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderPricingOptions(t *testing.T) { + t.Run("SetAutoApplyDiscounts", func(t *testing.T) { + obj := &OrderPricingOptions{} + var fernTestValueAutoApplyDiscounts *bool + obj.SetAutoApplyDiscounts(fernTestValueAutoApplyDiscounts) + assert.Equal(t, fernTestValueAutoApplyDiscounts, obj.AutoApplyDiscounts) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAutoApplyTaxes", func(t *testing.T) { + obj := &OrderPricingOptions{} + var fernTestValueAutoApplyTaxes *bool + obj.SetAutoApplyTaxes(fernTestValueAutoApplyTaxes) + assert.Equal(t, fernTestValueAutoApplyTaxes, obj.AutoApplyTaxes) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderPricingOptions(t *testing.T) { + t.Run("GetAutoApplyDiscounts", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderPricingOptions{} + var expected *bool + obj.AutoApplyDiscounts = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAutoApplyDiscounts(), "getter should return the property value") + }) + + t.Run("GetAutoApplyDiscounts_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderPricingOptions{} + obj.AutoApplyDiscounts = nil + + // Act & Assert + assert.Nil(t, obj.GetAutoApplyDiscounts(), "getter should return nil when property is nil") + }) + + t.Run("GetAutoApplyDiscounts_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderPricingOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAutoApplyDiscounts() // Should return zero value + }) + + t.Run("GetAutoApplyTaxes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderPricingOptions{} + var expected *bool + obj.AutoApplyTaxes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAutoApplyTaxes(), "getter should return the property value") + }) + + t.Run("GetAutoApplyTaxes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderPricingOptions{} + obj.AutoApplyTaxes = nil + + // Act & Assert + assert.Nil(t, obj.GetAutoApplyTaxes(), "getter should return nil when property is nil") + }) + + t.Run("GetAutoApplyTaxes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderPricingOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAutoApplyTaxes() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderPricingOptions(t *testing.T) { + t.Run("SetAutoApplyDiscounts_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderPricingOptions{} + var fernTestValueAutoApplyDiscounts *bool + + // Act + obj.SetAutoApplyDiscounts(fernTestValueAutoApplyDiscounts) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAutoApplyTaxes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderPricingOptions{} + var fernTestValueAutoApplyTaxes *bool + + // Act + obj.SetAutoApplyTaxes(fernTestValueAutoApplyTaxes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderQuantityUnit(t *testing.T) { + t.Run("SetMeasurementUnit", func(t *testing.T) { + obj := &OrderQuantityUnit{} + var fernTestValueMeasurementUnit *MeasurementUnit + obj.SetMeasurementUnit(fernTestValueMeasurementUnit) + assert.Equal(t, fernTestValueMeasurementUnit, obj.MeasurementUnit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPrecision", func(t *testing.T) { + obj := &OrderQuantityUnit{} + var fernTestValuePrecision *int + obj.SetPrecision(fernTestValuePrecision) + assert.Equal(t, fernTestValuePrecision, obj.Precision) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogObjectID", func(t *testing.T) { + obj := &OrderQuantityUnit{} + var fernTestValueCatalogObjectID *string + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + assert.Equal(t, fernTestValueCatalogObjectID, obj.CatalogObjectID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogVersion", func(t *testing.T) { + obj := &OrderQuantityUnit{} + var fernTestValueCatalogVersion *int64 + obj.SetCatalogVersion(fernTestValueCatalogVersion) + assert.Equal(t, fernTestValueCatalogVersion, obj.CatalogVersion) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderQuantityUnit(t *testing.T) { + t.Run("GetMeasurementUnit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderQuantityUnit{} + var expected *MeasurementUnit + obj.MeasurementUnit = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMeasurementUnit(), "getter should return the property value") + }) + + t.Run("GetMeasurementUnit_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderQuantityUnit{} + obj.MeasurementUnit = nil + + // Act & Assert + assert.Nil(t, obj.GetMeasurementUnit(), "getter should return nil when property is nil") + }) + + t.Run("GetMeasurementUnit_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderQuantityUnit + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMeasurementUnit() // Should return zero value + }) + + t.Run("GetPrecision", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderQuantityUnit{} + var expected *int + obj.Precision = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPrecision(), "getter should return the property value") + }) + + t.Run("GetPrecision_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderQuantityUnit{} + obj.Precision = nil + + // Act & Assert + assert.Nil(t, obj.GetPrecision(), "getter should return nil when property is nil") + }) + + t.Run("GetPrecision_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderQuantityUnit + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPrecision() // Should return zero value + }) + + t.Run("GetCatalogObjectID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderQuantityUnit{} + var expected *string + obj.CatalogObjectID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogObjectID(), "getter should return the property value") + }) + + t.Run("GetCatalogObjectID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderQuantityUnit{} + obj.CatalogObjectID = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogObjectID(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogObjectID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderQuantityUnit + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogObjectID() // Should return zero value + }) + + t.Run("GetCatalogVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderQuantityUnit{} + var expected *int64 + obj.CatalogVersion = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogVersion(), "getter should return the property value") + }) + + t.Run("GetCatalogVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderQuantityUnit{} + obj.CatalogVersion = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderQuantityUnit + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogVersion() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderQuantityUnit(t *testing.T) { + t.Run("SetMeasurementUnit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderQuantityUnit{} + var fernTestValueMeasurementUnit *MeasurementUnit + + // Act + obj.SetMeasurementUnit(fernTestValueMeasurementUnit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPrecision_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderQuantityUnit{} + var fernTestValuePrecision *int + + // Act + obj.SetPrecision(fernTestValuePrecision) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogObjectID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderQuantityUnit{} + var fernTestValueCatalogObjectID *string + + // Act + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderQuantityUnit{} + var fernTestValueCatalogVersion *int64 + + // Act + obj.SetCatalogVersion(fernTestValueCatalogVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderReturn(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &OrderReturn{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSourceOrderID", func(t *testing.T) { + obj := &OrderReturn{} + var fernTestValueSourceOrderID *string + obj.SetSourceOrderID(fernTestValueSourceOrderID) + assert.Equal(t, fernTestValueSourceOrderID, obj.SourceOrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReturnLineItems", func(t *testing.T) { + obj := &OrderReturn{} + var fernTestValueReturnLineItems []*OrderReturnLineItem + obj.SetReturnLineItems(fernTestValueReturnLineItems) + assert.Equal(t, fernTestValueReturnLineItems, obj.ReturnLineItems) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReturnServiceCharges", func(t *testing.T) { + obj := &OrderReturn{} + var fernTestValueReturnServiceCharges []*OrderReturnServiceCharge + obj.SetReturnServiceCharges(fernTestValueReturnServiceCharges) + assert.Equal(t, fernTestValueReturnServiceCharges, obj.ReturnServiceCharges) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReturnTaxes", func(t *testing.T) { + obj := &OrderReturn{} + var fernTestValueReturnTaxes []*OrderReturnTax + obj.SetReturnTaxes(fernTestValueReturnTaxes) + assert.Equal(t, fernTestValueReturnTaxes, obj.ReturnTaxes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReturnDiscounts", func(t *testing.T) { + obj := &OrderReturn{} + var fernTestValueReturnDiscounts []*OrderReturnDiscount + obj.SetReturnDiscounts(fernTestValueReturnDiscounts) + assert.Equal(t, fernTestValueReturnDiscounts, obj.ReturnDiscounts) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReturnTips", func(t *testing.T) { + obj := &OrderReturn{} + var fernTestValueReturnTips []*OrderReturnTip + obj.SetReturnTips(fernTestValueReturnTips) + assert.Equal(t, fernTestValueReturnTips, obj.ReturnTips) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRoundingAdjustment", func(t *testing.T) { + obj := &OrderReturn{} + var fernTestValueRoundingAdjustment *OrderRoundingAdjustment + obj.SetRoundingAdjustment(fernTestValueRoundingAdjustment) + assert.Equal(t, fernTestValueRoundingAdjustment, obj.RoundingAdjustment) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReturnAmounts", func(t *testing.T) { + obj := &OrderReturn{} + var fernTestValueReturnAmounts *OrderMoneyAmounts + obj.SetReturnAmounts(fernTestValueReturnAmounts) + assert.Equal(t, fernTestValueReturnAmounts, obj.ReturnAmounts) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderReturn(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturn{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturn{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturn + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetSourceOrderID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturn{} + var expected *string + obj.SourceOrderID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSourceOrderID(), "getter should return the property value") + }) + + t.Run("GetSourceOrderID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturn{} + obj.SourceOrderID = nil + + // Act & Assert + assert.Nil(t, obj.GetSourceOrderID(), "getter should return nil when property is nil") + }) + + t.Run("GetSourceOrderID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturn + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSourceOrderID() // Should return zero value + }) + + t.Run("GetReturnLineItems", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturn{} + var expected []*OrderReturnLineItem + obj.ReturnLineItems = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReturnLineItems(), "getter should return the property value") + }) + + t.Run("GetReturnLineItems_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturn{} + obj.ReturnLineItems = nil + + // Act & Assert + assert.Nil(t, obj.GetReturnLineItems(), "getter should return nil when property is nil") + }) + + t.Run("GetReturnLineItems_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturn + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReturnLineItems() // Should return zero value + }) + + t.Run("GetReturnServiceCharges", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturn{} + var expected []*OrderReturnServiceCharge + obj.ReturnServiceCharges = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReturnServiceCharges(), "getter should return the property value") + }) + + t.Run("GetReturnServiceCharges_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturn{} + obj.ReturnServiceCharges = nil + + // Act & Assert + assert.Nil(t, obj.GetReturnServiceCharges(), "getter should return nil when property is nil") + }) + + t.Run("GetReturnServiceCharges_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturn + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReturnServiceCharges() // Should return zero value + }) + + t.Run("GetReturnTaxes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturn{} + var expected []*OrderReturnTax + obj.ReturnTaxes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReturnTaxes(), "getter should return the property value") + }) + + t.Run("GetReturnTaxes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturn{} + obj.ReturnTaxes = nil + + // Act & Assert + assert.Nil(t, obj.GetReturnTaxes(), "getter should return nil when property is nil") + }) + + t.Run("GetReturnTaxes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturn + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReturnTaxes() // Should return zero value + }) + + t.Run("GetReturnDiscounts", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturn{} + var expected []*OrderReturnDiscount + obj.ReturnDiscounts = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReturnDiscounts(), "getter should return the property value") + }) + + t.Run("GetReturnDiscounts_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturn{} + obj.ReturnDiscounts = nil + + // Act & Assert + assert.Nil(t, obj.GetReturnDiscounts(), "getter should return nil when property is nil") + }) + + t.Run("GetReturnDiscounts_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturn + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReturnDiscounts() // Should return zero value + }) + + t.Run("GetReturnTips", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturn{} + var expected []*OrderReturnTip + obj.ReturnTips = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReturnTips(), "getter should return the property value") + }) + + t.Run("GetReturnTips_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturn{} + obj.ReturnTips = nil + + // Act & Assert + assert.Nil(t, obj.GetReturnTips(), "getter should return nil when property is nil") + }) + + t.Run("GetReturnTips_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturn + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReturnTips() // Should return zero value + }) + + t.Run("GetRoundingAdjustment", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturn{} + var expected *OrderRoundingAdjustment + obj.RoundingAdjustment = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRoundingAdjustment(), "getter should return the property value") + }) + + t.Run("GetRoundingAdjustment_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturn{} + obj.RoundingAdjustment = nil + + // Act & Assert + assert.Nil(t, obj.GetRoundingAdjustment(), "getter should return nil when property is nil") + }) + + t.Run("GetRoundingAdjustment_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturn + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRoundingAdjustment() // Should return zero value + }) + + t.Run("GetReturnAmounts", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturn{} + var expected *OrderMoneyAmounts + obj.ReturnAmounts = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReturnAmounts(), "getter should return the property value") + }) + + t.Run("GetReturnAmounts_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturn{} + obj.ReturnAmounts = nil + + // Act & Assert + assert.Nil(t, obj.GetReturnAmounts(), "getter should return nil when property is nil") + }) + + t.Run("GetReturnAmounts_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturn + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReturnAmounts() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderReturn(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturn{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSourceOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturn{} + var fernTestValueSourceOrderID *string + + // Act + obj.SetSourceOrderID(fernTestValueSourceOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReturnLineItems_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturn{} + var fernTestValueReturnLineItems []*OrderReturnLineItem + + // Act + obj.SetReturnLineItems(fernTestValueReturnLineItems) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReturnServiceCharges_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturn{} + var fernTestValueReturnServiceCharges []*OrderReturnServiceCharge + + // Act + obj.SetReturnServiceCharges(fernTestValueReturnServiceCharges) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReturnTaxes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturn{} + var fernTestValueReturnTaxes []*OrderReturnTax + + // Act + obj.SetReturnTaxes(fernTestValueReturnTaxes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReturnDiscounts_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturn{} + var fernTestValueReturnDiscounts []*OrderReturnDiscount + + // Act + obj.SetReturnDiscounts(fernTestValueReturnDiscounts) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReturnTips_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturn{} + var fernTestValueReturnTips []*OrderReturnTip + + // Act + obj.SetReturnTips(fernTestValueReturnTips) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRoundingAdjustment_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturn{} + var fernTestValueRoundingAdjustment *OrderRoundingAdjustment + + // Act + obj.SetRoundingAdjustment(fernTestValueRoundingAdjustment) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReturnAmounts_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturn{} + var fernTestValueReturnAmounts *OrderMoneyAmounts + + // Act + obj.SetReturnAmounts(fernTestValueReturnAmounts) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderReturnDiscount(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &OrderReturnDiscount{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSourceDiscountUID", func(t *testing.T) { + obj := &OrderReturnDiscount{} + var fernTestValueSourceDiscountUID *string + obj.SetSourceDiscountUID(fernTestValueSourceDiscountUID) + assert.Equal(t, fernTestValueSourceDiscountUID, obj.SourceDiscountUID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogObjectID", func(t *testing.T) { + obj := &OrderReturnDiscount{} + var fernTestValueCatalogObjectID *string + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + assert.Equal(t, fernTestValueCatalogObjectID, obj.CatalogObjectID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogVersion", func(t *testing.T) { + obj := &OrderReturnDiscount{} + var fernTestValueCatalogVersion *int64 + obj.SetCatalogVersion(fernTestValueCatalogVersion) + assert.Equal(t, fernTestValueCatalogVersion, obj.CatalogVersion) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &OrderReturnDiscount{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &OrderReturnDiscount{} + var fernTestValueType *OrderLineItemDiscountType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPercentage", func(t *testing.T) { + obj := &OrderReturnDiscount{} + var fernTestValuePercentage *string + obj.SetPercentage(fernTestValuePercentage) + assert.Equal(t, fernTestValuePercentage, obj.Percentage) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &OrderReturnDiscount{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppliedMoney", func(t *testing.T) { + obj := &OrderReturnDiscount{} + var fernTestValueAppliedMoney *Money + obj.SetAppliedMoney(fernTestValueAppliedMoney) + assert.Equal(t, fernTestValueAppliedMoney, obj.AppliedMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetScope", func(t *testing.T) { + obj := &OrderReturnDiscount{} + var fernTestValueScope *OrderLineItemDiscountScope + obj.SetScope(fernTestValueScope) + assert.Equal(t, fernTestValueScope, obj.Scope) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderReturnDiscount(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetSourceDiscountUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + var expected *string + obj.SourceDiscountUID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSourceDiscountUID(), "getter should return the property value") + }) + + t.Run("GetSourceDiscountUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + obj.SourceDiscountUID = nil + + // Act & Assert + assert.Nil(t, obj.GetSourceDiscountUID(), "getter should return nil when property is nil") + }) + + t.Run("GetSourceDiscountUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSourceDiscountUID() // Should return zero value + }) + + t.Run("GetCatalogObjectID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + var expected *string + obj.CatalogObjectID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogObjectID(), "getter should return the property value") + }) + + t.Run("GetCatalogObjectID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + obj.CatalogObjectID = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogObjectID(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogObjectID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogObjectID() // Should return zero value + }) + + t.Run("GetCatalogVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + var expected *int64 + obj.CatalogVersion = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogVersion(), "getter should return the property value") + }) + + t.Run("GetCatalogVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + obj.CatalogVersion = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogVersion() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + var expected *OrderLineItemDiscountType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetPercentage", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + var expected *string + obj.Percentage = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPercentage(), "getter should return the property value") + }) + + t.Run("GetPercentage_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + obj.Percentage = nil + + // Act & Assert + assert.Nil(t, obj.GetPercentage(), "getter should return nil when property is nil") + }) + + t.Run("GetPercentage_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPercentage() // Should return zero value + }) + + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + + t.Run("GetAppliedMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + var expected *Money + obj.AppliedMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppliedMoney(), "getter should return the property value") + }) + + t.Run("GetAppliedMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + obj.AppliedMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAppliedMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAppliedMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppliedMoney() // Should return zero value + }) + + t.Run("GetScope", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + var expected *OrderLineItemDiscountScope + obj.Scope = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetScope(), "getter should return the property value") + }) + + t.Run("GetScope_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + obj.Scope = nil + + // Act & Assert + assert.Nil(t, obj.GetScope(), "getter should return nil when property is nil") + }) + + t.Run("GetScope_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnDiscount + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetScope() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderReturnDiscount(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSourceDiscountUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + var fernTestValueSourceDiscountUID *string + + // Act + obj.SetSourceDiscountUID(fernTestValueSourceDiscountUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogObjectID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + var fernTestValueCatalogObjectID *string + + // Act + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + var fernTestValueCatalogVersion *int64 + + // Act + obj.SetCatalogVersion(fernTestValueCatalogVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + var fernTestValueType *OrderLineItemDiscountType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPercentage_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + var fernTestValuePercentage *string + + // Act + obj.SetPercentage(fernTestValuePercentage) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppliedMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + var fernTestValueAppliedMoney *Money + + // Act + obj.SetAppliedMoney(fernTestValueAppliedMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetScope_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + var fernTestValueScope *OrderLineItemDiscountScope + + // Act + obj.SetScope(fernTestValueScope) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderReturnLineItem(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &OrderReturnLineItem{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSourceLineItemUID", func(t *testing.T) { + obj := &OrderReturnLineItem{} + var fernTestValueSourceLineItemUID *string + obj.SetSourceLineItemUID(fernTestValueSourceLineItemUID) + assert.Equal(t, fernTestValueSourceLineItemUID, obj.SourceLineItemUID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &OrderReturnLineItem{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuantity", func(t *testing.T) { + obj := &OrderReturnLineItem{} + var fernTestValueQuantity string + obj.SetQuantity(fernTestValueQuantity) + assert.Equal(t, fernTestValueQuantity, obj.Quantity) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuantityUnit", func(t *testing.T) { + obj := &OrderReturnLineItem{} + var fernTestValueQuantityUnit *OrderQuantityUnit + obj.SetQuantityUnit(fernTestValueQuantityUnit) + assert.Equal(t, fernTestValueQuantityUnit, obj.QuantityUnit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNote", func(t *testing.T) { + obj := &OrderReturnLineItem{} + var fernTestValueNote *string + obj.SetNote(fernTestValueNote) + assert.Equal(t, fernTestValueNote, obj.Note) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogObjectID", func(t *testing.T) { + obj := &OrderReturnLineItem{} + var fernTestValueCatalogObjectID *string + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + assert.Equal(t, fernTestValueCatalogObjectID, obj.CatalogObjectID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogVersion", func(t *testing.T) { + obj := &OrderReturnLineItem{} + var fernTestValueCatalogVersion *int64 + obj.SetCatalogVersion(fernTestValueCatalogVersion) + assert.Equal(t, fernTestValueCatalogVersion, obj.CatalogVersion) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVariationName", func(t *testing.T) { + obj := &OrderReturnLineItem{} + var fernTestValueVariationName *string + obj.SetVariationName(fernTestValueVariationName) + assert.Equal(t, fernTestValueVariationName, obj.VariationName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetItemType", func(t *testing.T) { + obj := &OrderReturnLineItem{} + var fernTestValueItemType *OrderLineItemItemType + obj.SetItemType(fernTestValueItemType) + assert.Equal(t, fernTestValueItemType, obj.ItemType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReturnModifiers", func(t *testing.T) { + obj := &OrderReturnLineItem{} + var fernTestValueReturnModifiers []*OrderReturnLineItemModifier + obj.SetReturnModifiers(fernTestValueReturnModifiers) + assert.Equal(t, fernTestValueReturnModifiers, obj.ReturnModifiers) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppliedTaxes", func(t *testing.T) { + obj := &OrderReturnLineItem{} + var fernTestValueAppliedTaxes []*OrderLineItemAppliedTax + obj.SetAppliedTaxes(fernTestValueAppliedTaxes) + assert.Equal(t, fernTestValueAppliedTaxes, obj.AppliedTaxes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppliedDiscounts", func(t *testing.T) { + obj := &OrderReturnLineItem{} + var fernTestValueAppliedDiscounts []*OrderLineItemAppliedDiscount + obj.SetAppliedDiscounts(fernTestValueAppliedDiscounts) + assert.Equal(t, fernTestValueAppliedDiscounts, obj.AppliedDiscounts) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBasePriceMoney", func(t *testing.T) { + obj := &OrderReturnLineItem{} + var fernTestValueBasePriceMoney *Money + obj.SetBasePriceMoney(fernTestValueBasePriceMoney) + assert.Equal(t, fernTestValueBasePriceMoney, obj.BasePriceMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVariationTotalPriceMoney", func(t *testing.T) { + obj := &OrderReturnLineItem{} + var fernTestValueVariationTotalPriceMoney *Money + obj.SetVariationTotalPriceMoney(fernTestValueVariationTotalPriceMoney) + assert.Equal(t, fernTestValueVariationTotalPriceMoney, obj.VariationTotalPriceMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGrossReturnMoney", func(t *testing.T) { + obj := &OrderReturnLineItem{} + var fernTestValueGrossReturnMoney *Money + obj.SetGrossReturnMoney(fernTestValueGrossReturnMoney) + assert.Equal(t, fernTestValueGrossReturnMoney, obj.GrossReturnMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTotalTaxMoney", func(t *testing.T) { + obj := &OrderReturnLineItem{} + var fernTestValueTotalTaxMoney *Money + obj.SetTotalTaxMoney(fernTestValueTotalTaxMoney) + assert.Equal(t, fernTestValueTotalTaxMoney, obj.TotalTaxMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTotalDiscountMoney", func(t *testing.T) { + obj := &OrderReturnLineItem{} + var fernTestValueTotalDiscountMoney *Money + obj.SetTotalDiscountMoney(fernTestValueTotalDiscountMoney) + assert.Equal(t, fernTestValueTotalDiscountMoney, obj.TotalDiscountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTotalMoney", func(t *testing.T) { + obj := &OrderReturnLineItem{} + var fernTestValueTotalMoney *Money + obj.SetTotalMoney(fernTestValueTotalMoney) + assert.Equal(t, fernTestValueTotalMoney, obj.TotalMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppliedServiceCharges", func(t *testing.T) { + obj := &OrderReturnLineItem{} + var fernTestValueAppliedServiceCharges []*OrderLineItemAppliedServiceCharge + obj.SetAppliedServiceCharges(fernTestValueAppliedServiceCharges) + assert.Equal(t, fernTestValueAppliedServiceCharges, obj.AppliedServiceCharges) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTotalServiceChargeMoney", func(t *testing.T) { + obj := &OrderReturnLineItem{} + var fernTestValueTotalServiceChargeMoney *Money + obj.SetTotalServiceChargeMoney(fernTestValueTotalServiceChargeMoney) + assert.Equal(t, fernTestValueTotalServiceChargeMoney, obj.TotalServiceChargeMoney) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderReturnLineItem(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetSourceLineItemUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var expected *string + obj.SourceLineItemUID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSourceLineItemUID(), "getter should return the property value") + }) + + t.Run("GetSourceLineItemUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + obj.SourceLineItemUID = nil + + // Act & Assert + assert.Nil(t, obj.GetSourceLineItemUID(), "getter should return nil when property is nil") + }) + + t.Run("GetSourceLineItemUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSourceLineItemUID() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetQuantity", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var expected string + obj.Quantity = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQuantity(), "getter should return the property value") + }) + + t.Run("GetQuantity_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQuantity() // Should return zero value + }) + + t.Run("GetQuantityUnit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var expected *OrderQuantityUnit + obj.QuantityUnit = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQuantityUnit(), "getter should return the property value") + }) + + t.Run("GetQuantityUnit_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + obj.QuantityUnit = nil + + // Act & Assert + assert.Nil(t, obj.GetQuantityUnit(), "getter should return nil when property is nil") + }) + + t.Run("GetQuantityUnit_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQuantityUnit() // Should return zero value + }) + + t.Run("GetNote", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var expected *string + obj.Note = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNote(), "getter should return the property value") + }) + + t.Run("GetNote_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + obj.Note = nil + + // Act & Assert + assert.Nil(t, obj.GetNote(), "getter should return nil when property is nil") + }) + + t.Run("GetNote_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNote() // Should return zero value + }) + + t.Run("GetCatalogObjectID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var expected *string + obj.CatalogObjectID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogObjectID(), "getter should return the property value") + }) + + t.Run("GetCatalogObjectID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + obj.CatalogObjectID = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogObjectID(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogObjectID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogObjectID() // Should return zero value + }) + + t.Run("GetCatalogVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var expected *int64 + obj.CatalogVersion = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogVersion(), "getter should return the property value") + }) + + t.Run("GetCatalogVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + obj.CatalogVersion = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogVersion() // Should return zero value + }) + + t.Run("GetVariationName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var expected *string + obj.VariationName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVariationName(), "getter should return the property value") + }) + + t.Run("GetVariationName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + obj.VariationName = nil + + // Act & Assert + assert.Nil(t, obj.GetVariationName(), "getter should return nil when property is nil") + }) + + t.Run("GetVariationName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVariationName() // Should return zero value + }) + + t.Run("GetItemType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var expected *OrderLineItemItemType + obj.ItemType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetItemType(), "getter should return the property value") + }) + + t.Run("GetItemType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + obj.ItemType = nil + + // Act & Assert + assert.Nil(t, obj.GetItemType(), "getter should return nil when property is nil") + }) + + t.Run("GetItemType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetItemType() // Should return zero value + }) + + t.Run("GetReturnModifiers", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var expected []*OrderReturnLineItemModifier + obj.ReturnModifiers = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReturnModifiers(), "getter should return the property value") + }) + + t.Run("GetReturnModifiers_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + obj.ReturnModifiers = nil + + // Act & Assert + assert.Nil(t, obj.GetReturnModifiers(), "getter should return nil when property is nil") + }) + + t.Run("GetReturnModifiers_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReturnModifiers() // Should return zero value + }) + + t.Run("GetAppliedTaxes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var expected []*OrderLineItemAppliedTax + obj.AppliedTaxes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppliedTaxes(), "getter should return the property value") + }) + + t.Run("GetAppliedTaxes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + obj.AppliedTaxes = nil + + // Act & Assert + assert.Nil(t, obj.GetAppliedTaxes(), "getter should return nil when property is nil") + }) + + t.Run("GetAppliedTaxes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppliedTaxes() // Should return zero value + }) + + t.Run("GetAppliedDiscounts", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var expected []*OrderLineItemAppliedDiscount + obj.AppliedDiscounts = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppliedDiscounts(), "getter should return the property value") + }) + + t.Run("GetAppliedDiscounts_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + obj.AppliedDiscounts = nil + + // Act & Assert + assert.Nil(t, obj.GetAppliedDiscounts(), "getter should return nil when property is nil") + }) + + t.Run("GetAppliedDiscounts_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppliedDiscounts() // Should return zero value + }) + + t.Run("GetBasePriceMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var expected *Money + obj.BasePriceMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBasePriceMoney(), "getter should return the property value") + }) + + t.Run("GetBasePriceMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + obj.BasePriceMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetBasePriceMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetBasePriceMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBasePriceMoney() // Should return zero value + }) + + t.Run("GetVariationTotalPriceMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var expected *Money + obj.VariationTotalPriceMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVariationTotalPriceMoney(), "getter should return the property value") + }) + + t.Run("GetVariationTotalPriceMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + obj.VariationTotalPriceMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetVariationTotalPriceMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetVariationTotalPriceMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVariationTotalPriceMoney() // Should return zero value + }) + + t.Run("GetGrossReturnMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var expected *Money + obj.GrossReturnMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGrossReturnMoney(), "getter should return the property value") + }) + + t.Run("GetGrossReturnMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + obj.GrossReturnMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetGrossReturnMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetGrossReturnMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGrossReturnMoney() // Should return zero value + }) + + t.Run("GetTotalTaxMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var expected *Money + obj.TotalTaxMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTotalTaxMoney(), "getter should return the property value") + }) + + t.Run("GetTotalTaxMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + obj.TotalTaxMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTotalTaxMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTotalTaxMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTotalTaxMoney() // Should return zero value + }) + + t.Run("GetTotalDiscountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var expected *Money + obj.TotalDiscountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTotalDiscountMoney(), "getter should return the property value") + }) + + t.Run("GetTotalDiscountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + obj.TotalDiscountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTotalDiscountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTotalDiscountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTotalDiscountMoney() // Should return zero value + }) + + t.Run("GetTotalMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var expected *Money + obj.TotalMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTotalMoney(), "getter should return the property value") + }) + + t.Run("GetTotalMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + obj.TotalMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTotalMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTotalMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTotalMoney() // Should return zero value + }) + + t.Run("GetAppliedServiceCharges", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var expected []*OrderLineItemAppliedServiceCharge + obj.AppliedServiceCharges = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppliedServiceCharges(), "getter should return the property value") + }) + + t.Run("GetAppliedServiceCharges_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + obj.AppliedServiceCharges = nil + + // Act & Assert + assert.Nil(t, obj.GetAppliedServiceCharges(), "getter should return nil when property is nil") + }) + + t.Run("GetAppliedServiceCharges_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppliedServiceCharges() // Should return zero value + }) + + t.Run("GetTotalServiceChargeMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var expected *Money + obj.TotalServiceChargeMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTotalServiceChargeMoney(), "getter should return the property value") + }) + + t.Run("GetTotalServiceChargeMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + obj.TotalServiceChargeMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTotalServiceChargeMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTotalServiceChargeMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItem + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTotalServiceChargeMoney() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderReturnLineItem(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSourceLineItemUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var fernTestValueSourceLineItemUID *string + + // Act + obj.SetSourceLineItemUID(fernTestValueSourceLineItemUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuantity_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var fernTestValueQuantity string + + // Act + obj.SetQuantity(fernTestValueQuantity) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuantityUnit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var fernTestValueQuantityUnit *OrderQuantityUnit + + // Act + obj.SetQuantityUnit(fernTestValueQuantityUnit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNote_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var fernTestValueNote *string + + // Act + obj.SetNote(fernTestValueNote) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogObjectID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var fernTestValueCatalogObjectID *string + + // Act + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var fernTestValueCatalogVersion *int64 + + // Act + obj.SetCatalogVersion(fernTestValueCatalogVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVariationName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var fernTestValueVariationName *string + + // Act + obj.SetVariationName(fernTestValueVariationName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetItemType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var fernTestValueItemType *OrderLineItemItemType + + // Act + obj.SetItemType(fernTestValueItemType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReturnModifiers_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var fernTestValueReturnModifiers []*OrderReturnLineItemModifier + + // Act + obj.SetReturnModifiers(fernTestValueReturnModifiers) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppliedTaxes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var fernTestValueAppliedTaxes []*OrderLineItemAppliedTax + + // Act + obj.SetAppliedTaxes(fernTestValueAppliedTaxes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppliedDiscounts_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var fernTestValueAppliedDiscounts []*OrderLineItemAppliedDiscount + + // Act + obj.SetAppliedDiscounts(fernTestValueAppliedDiscounts) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBasePriceMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var fernTestValueBasePriceMoney *Money + + // Act + obj.SetBasePriceMoney(fernTestValueBasePriceMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVariationTotalPriceMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var fernTestValueVariationTotalPriceMoney *Money + + // Act + obj.SetVariationTotalPriceMoney(fernTestValueVariationTotalPriceMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGrossReturnMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var fernTestValueGrossReturnMoney *Money + + // Act + obj.SetGrossReturnMoney(fernTestValueGrossReturnMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTotalTaxMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var fernTestValueTotalTaxMoney *Money + + // Act + obj.SetTotalTaxMoney(fernTestValueTotalTaxMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTotalDiscountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var fernTestValueTotalDiscountMoney *Money + + // Act + obj.SetTotalDiscountMoney(fernTestValueTotalDiscountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTotalMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var fernTestValueTotalMoney *Money + + // Act + obj.SetTotalMoney(fernTestValueTotalMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppliedServiceCharges_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var fernTestValueAppliedServiceCharges []*OrderLineItemAppliedServiceCharge + + // Act + obj.SetAppliedServiceCharges(fernTestValueAppliedServiceCharges) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTotalServiceChargeMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + var fernTestValueTotalServiceChargeMoney *Money + + // Act + obj.SetTotalServiceChargeMoney(fernTestValueTotalServiceChargeMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderReturnLineItemModifier(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &OrderReturnLineItemModifier{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSourceModifierUID", func(t *testing.T) { + obj := &OrderReturnLineItemModifier{} + var fernTestValueSourceModifierUID *string + obj.SetSourceModifierUID(fernTestValueSourceModifierUID) + assert.Equal(t, fernTestValueSourceModifierUID, obj.SourceModifierUID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogObjectID", func(t *testing.T) { + obj := &OrderReturnLineItemModifier{} + var fernTestValueCatalogObjectID *string + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + assert.Equal(t, fernTestValueCatalogObjectID, obj.CatalogObjectID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogVersion", func(t *testing.T) { + obj := &OrderReturnLineItemModifier{} + var fernTestValueCatalogVersion *int64 + obj.SetCatalogVersion(fernTestValueCatalogVersion) + assert.Equal(t, fernTestValueCatalogVersion, obj.CatalogVersion) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &OrderReturnLineItemModifier{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBasePriceMoney", func(t *testing.T) { + obj := &OrderReturnLineItemModifier{} + var fernTestValueBasePriceMoney *Money + obj.SetBasePriceMoney(fernTestValueBasePriceMoney) + assert.Equal(t, fernTestValueBasePriceMoney, obj.BasePriceMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTotalPriceMoney", func(t *testing.T) { + obj := &OrderReturnLineItemModifier{} + var fernTestValueTotalPriceMoney *Money + obj.SetTotalPriceMoney(fernTestValueTotalPriceMoney) + assert.Equal(t, fernTestValueTotalPriceMoney, obj.TotalPriceMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQuantity", func(t *testing.T) { + obj := &OrderReturnLineItemModifier{} + var fernTestValueQuantity *string + obj.SetQuantity(fernTestValueQuantity) + assert.Equal(t, fernTestValueQuantity, obj.Quantity) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderReturnLineItemModifier(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItemModifier{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItemModifier{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItemModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetSourceModifierUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItemModifier{} + var expected *string + obj.SourceModifierUID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSourceModifierUID(), "getter should return the property value") + }) + + t.Run("GetSourceModifierUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItemModifier{} + obj.SourceModifierUID = nil + + // Act & Assert + assert.Nil(t, obj.GetSourceModifierUID(), "getter should return nil when property is nil") + }) + + t.Run("GetSourceModifierUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItemModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSourceModifierUID() // Should return zero value + }) + + t.Run("GetCatalogObjectID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItemModifier{} + var expected *string + obj.CatalogObjectID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogObjectID(), "getter should return the property value") + }) + + t.Run("GetCatalogObjectID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItemModifier{} + obj.CatalogObjectID = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogObjectID(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogObjectID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItemModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogObjectID() // Should return zero value + }) + + t.Run("GetCatalogVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItemModifier{} + var expected *int64 + obj.CatalogVersion = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogVersion(), "getter should return the property value") + }) + + t.Run("GetCatalogVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItemModifier{} + obj.CatalogVersion = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItemModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogVersion() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItemModifier{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItemModifier{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItemModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetBasePriceMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItemModifier{} + var expected *Money + obj.BasePriceMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBasePriceMoney(), "getter should return the property value") + }) + + t.Run("GetBasePriceMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItemModifier{} + obj.BasePriceMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetBasePriceMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetBasePriceMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItemModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBasePriceMoney() // Should return zero value + }) + + t.Run("GetTotalPriceMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItemModifier{} + var expected *Money + obj.TotalPriceMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTotalPriceMoney(), "getter should return the property value") + }) + + t.Run("GetTotalPriceMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItemModifier{} + obj.TotalPriceMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTotalPriceMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTotalPriceMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItemModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTotalPriceMoney() // Should return zero value + }) + + t.Run("GetQuantity", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItemModifier{} + var expected *string + obj.Quantity = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQuantity(), "getter should return the property value") + }) + + t.Run("GetQuantity_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItemModifier{} + obj.Quantity = nil + + // Act & Assert + assert.Nil(t, obj.GetQuantity(), "getter should return nil when property is nil") + }) + + t.Run("GetQuantity_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItemModifier + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQuantity() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderReturnLineItemModifier(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItemModifier{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSourceModifierUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItemModifier{} + var fernTestValueSourceModifierUID *string + + // Act + obj.SetSourceModifierUID(fernTestValueSourceModifierUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogObjectID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItemModifier{} + var fernTestValueCatalogObjectID *string + + // Act + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItemModifier{} + var fernTestValueCatalogVersion *int64 + + // Act + obj.SetCatalogVersion(fernTestValueCatalogVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItemModifier{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBasePriceMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItemModifier{} + var fernTestValueBasePriceMoney *Money + + // Act + obj.SetBasePriceMoney(fernTestValueBasePriceMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTotalPriceMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItemModifier{} + var fernTestValueTotalPriceMoney *Money + + // Act + obj.SetTotalPriceMoney(fernTestValueTotalPriceMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQuantity_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItemModifier{} + var fernTestValueQuantity *string + + // Act + obj.SetQuantity(fernTestValueQuantity) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderReturnServiceCharge(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &OrderReturnServiceCharge{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSourceServiceChargeUID", func(t *testing.T) { + obj := &OrderReturnServiceCharge{} + var fernTestValueSourceServiceChargeUID *string + obj.SetSourceServiceChargeUID(fernTestValueSourceServiceChargeUID) + assert.Equal(t, fernTestValueSourceServiceChargeUID, obj.SourceServiceChargeUID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &OrderReturnServiceCharge{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogObjectID", func(t *testing.T) { + obj := &OrderReturnServiceCharge{} + var fernTestValueCatalogObjectID *string + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + assert.Equal(t, fernTestValueCatalogObjectID, obj.CatalogObjectID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogVersion", func(t *testing.T) { + obj := &OrderReturnServiceCharge{} + var fernTestValueCatalogVersion *int64 + obj.SetCatalogVersion(fernTestValueCatalogVersion) + assert.Equal(t, fernTestValueCatalogVersion, obj.CatalogVersion) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPercentage", func(t *testing.T) { + obj := &OrderReturnServiceCharge{} + var fernTestValuePercentage *string + obj.SetPercentage(fernTestValuePercentage) + assert.Equal(t, fernTestValuePercentage, obj.Percentage) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &OrderReturnServiceCharge{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppliedMoney", func(t *testing.T) { + obj := &OrderReturnServiceCharge{} + var fernTestValueAppliedMoney *Money + obj.SetAppliedMoney(fernTestValueAppliedMoney) + assert.Equal(t, fernTestValueAppliedMoney, obj.AppliedMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTotalMoney", func(t *testing.T) { + obj := &OrderReturnServiceCharge{} + var fernTestValueTotalMoney *Money + obj.SetTotalMoney(fernTestValueTotalMoney) + assert.Equal(t, fernTestValueTotalMoney, obj.TotalMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTotalTaxMoney", func(t *testing.T) { + obj := &OrderReturnServiceCharge{} + var fernTestValueTotalTaxMoney *Money + obj.SetTotalTaxMoney(fernTestValueTotalTaxMoney) + assert.Equal(t, fernTestValueTotalTaxMoney, obj.TotalTaxMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCalculationPhase", func(t *testing.T) { + obj := &OrderReturnServiceCharge{} + var fernTestValueCalculationPhase *OrderServiceChargeCalculationPhase + obj.SetCalculationPhase(fernTestValueCalculationPhase) + assert.Equal(t, fernTestValueCalculationPhase, obj.CalculationPhase) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTaxable", func(t *testing.T) { + obj := &OrderReturnServiceCharge{} + var fernTestValueTaxable *bool + obj.SetTaxable(fernTestValueTaxable) + assert.Equal(t, fernTestValueTaxable, obj.Taxable) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppliedTaxes", func(t *testing.T) { + obj := &OrderReturnServiceCharge{} + var fernTestValueAppliedTaxes []*OrderLineItemAppliedTax + obj.SetAppliedTaxes(fernTestValueAppliedTaxes) + assert.Equal(t, fernTestValueAppliedTaxes, obj.AppliedTaxes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTreatmentType", func(t *testing.T) { + obj := &OrderReturnServiceCharge{} + var fernTestValueTreatmentType *OrderServiceChargeTreatmentType + obj.SetTreatmentType(fernTestValueTreatmentType) + assert.Equal(t, fernTestValueTreatmentType, obj.TreatmentType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetScope", func(t *testing.T) { + obj := &OrderReturnServiceCharge{} + var fernTestValueScope *OrderServiceChargeScope + obj.SetScope(fernTestValueScope) + assert.Equal(t, fernTestValueScope, obj.Scope) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &OrderReturnServiceCharge{} + var fernTestValueType *OrderServiceChargeType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderReturnServiceCharge(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetSourceServiceChargeUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var expected *string + obj.SourceServiceChargeUID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSourceServiceChargeUID(), "getter should return the property value") + }) + + t.Run("GetSourceServiceChargeUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + obj.SourceServiceChargeUID = nil + + // Act & Assert + assert.Nil(t, obj.GetSourceServiceChargeUID(), "getter should return nil when property is nil") + }) + + t.Run("GetSourceServiceChargeUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSourceServiceChargeUID() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetCatalogObjectID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var expected *string + obj.CatalogObjectID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogObjectID(), "getter should return the property value") + }) + + t.Run("GetCatalogObjectID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + obj.CatalogObjectID = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogObjectID(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogObjectID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogObjectID() // Should return zero value + }) + + t.Run("GetCatalogVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var expected *int64 + obj.CatalogVersion = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogVersion(), "getter should return the property value") + }) + + t.Run("GetCatalogVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + obj.CatalogVersion = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogVersion() // Should return zero value + }) + + t.Run("GetPercentage", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var expected *string + obj.Percentage = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPercentage(), "getter should return the property value") + }) + + t.Run("GetPercentage_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + obj.Percentage = nil + + // Act & Assert + assert.Nil(t, obj.GetPercentage(), "getter should return nil when property is nil") + }) + + t.Run("GetPercentage_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPercentage() // Should return zero value + }) + + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + + t.Run("GetAppliedMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var expected *Money + obj.AppliedMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppliedMoney(), "getter should return the property value") + }) + + t.Run("GetAppliedMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + obj.AppliedMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAppliedMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAppliedMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppliedMoney() // Should return zero value + }) + + t.Run("GetTotalMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var expected *Money + obj.TotalMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTotalMoney(), "getter should return the property value") + }) + + t.Run("GetTotalMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + obj.TotalMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTotalMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTotalMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTotalMoney() // Should return zero value + }) + + t.Run("GetTotalTaxMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var expected *Money + obj.TotalTaxMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTotalTaxMoney(), "getter should return the property value") + }) + + t.Run("GetTotalTaxMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + obj.TotalTaxMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTotalTaxMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTotalTaxMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTotalTaxMoney() // Should return zero value + }) + + t.Run("GetCalculationPhase", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var expected *OrderServiceChargeCalculationPhase + obj.CalculationPhase = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCalculationPhase(), "getter should return the property value") + }) + + t.Run("GetCalculationPhase_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + obj.CalculationPhase = nil + + // Act & Assert + assert.Nil(t, obj.GetCalculationPhase(), "getter should return nil when property is nil") + }) + + t.Run("GetCalculationPhase_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCalculationPhase() // Should return zero value + }) + + t.Run("GetTaxable", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var expected *bool + obj.Taxable = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTaxable(), "getter should return the property value") + }) + + t.Run("GetTaxable_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + obj.Taxable = nil + + // Act & Assert + assert.Nil(t, obj.GetTaxable(), "getter should return nil when property is nil") + }) + + t.Run("GetTaxable_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTaxable() // Should return zero value + }) + + t.Run("GetAppliedTaxes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var expected []*OrderLineItemAppliedTax + obj.AppliedTaxes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppliedTaxes(), "getter should return the property value") + }) + + t.Run("GetAppliedTaxes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + obj.AppliedTaxes = nil + + // Act & Assert + assert.Nil(t, obj.GetAppliedTaxes(), "getter should return nil when property is nil") + }) + + t.Run("GetAppliedTaxes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppliedTaxes() // Should return zero value + }) + + t.Run("GetTreatmentType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var expected *OrderServiceChargeTreatmentType + obj.TreatmentType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTreatmentType(), "getter should return the property value") + }) + + t.Run("GetTreatmentType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + obj.TreatmentType = nil + + // Act & Assert + assert.Nil(t, obj.GetTreatmentType(), "getter should return nil when property is nil") + }) + + t.Run("GetTreatmentType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTreatmentType() // Should return zero value + }) + + t.Run("GetScope", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var expected *OrderServiceChargeScope + obj.Scope = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetScope(), "getter should return the property value") + }) + + t.Run("GetScope_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + obj.Scope = nil + + // Act & Assert + assert.Nil(t, obj.GetScope(), "getter should return nil when property is nil") + }) + + t.Run("GetScope_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetScope() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var expected *OrderServiceChargeType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderReturnServiceCharge(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSourceServiceChargeUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var fernTestValueSourceServiceChargeUID *string + + // Act + obj.SetSourceServiceChargeUID(fernTestValueSourceServiceChargeUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogObjectID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var fernTestValueCatalogObjectID *string + + // Act + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var fernTestValueCatalogVersion *int64 + + // Act + obj.SetCatalogVersion(fernTestValueCatalogVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPercentage_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var fernTestValuePercentage *string + + // Act + obj.SetPercentage(fernTestValuePercentage) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppliedMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var fernTestValueAppliedMoney *Money + + // Act + obj.SetAppliedMoney(fernTestValueAppliedMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTotalMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var fernTestValueTotalMoney *Money + + // Act + obj.SetTotalMoney(fernTestValueTotalMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTotalTaxMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var fernTestValueTotalTaxMoney *Money + + // Act + obj.SetTotalTaxMoney(fernTestValueTotalTaxMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCalculationPhase_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var fernTestValueCalculationPhase *OrderServiceChargeCalculationPhase + + // Act + obj.SetCalculationPhase(fernTestValueCalculationPhase) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTaxable_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var fernTestValueTaxable *bool + + // Act + obj.SetTaxable(fernTestValueTaxable) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppliedTaxes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var fernTestValueAppliedTaxes []*OrderLineItemAppliedTax + + // Act + obj.SetAppliedTaxes(fernTestValueAppliedTaxes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTreatmentType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var fernTestValueTreatmentType *OrderServiceChargeTreatmentType + + // Act + obj.SetTreatmentType(fernTestValueTreatmentType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetScope_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var fernTestValueScope *OrderServiceChargeScope + + // Act + obj.SetScope(fernTestValueScope) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + var fernTestValueType *OrderServiceChargeType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderReturnTax(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &OrderReturnTax{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSourceTaxUID", func(t *testing.T) { + obj := &OrderReturnTax{} + var fernTestValueSourceTaxUID *string + obj.SetSourceTaxUID(fernTestValueSourceTaxUID) + assert.Equal(t, fernTestValueSourceTaxUID, obj.SourceTaxUID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogObjectID", func(t *testing.T) { + obj := &OrderReturnTax{} + var fernTestValueCatalogObjectID *string + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + assert.Equal(t, fernTestValueCatalogObjectID, obj.CatalogObjectID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogVersion", func(t *testing.T) { + obj := &OrderReturnTax{} + var fernTestValueCatalogVersion *int64 + obj.SetCatalogVersion(fernTestValueCatalogVersion) + assert.Equal(t, fernTestValueCatalogVersion, obj.CatalogVersion) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &OrderReturnTax{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &OrderReturnTax{} + var fernTestValueType *OrderLineItemTaxType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPercentage", func(t *testing.T) { + obj := &OrderReturnTax{} + var fernTestValuePercentage *string + obj.SetPercentage(fernTestValuePercentage) + assert.Equal(t, fernTestValuePercentage, obj.Percentage) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppliedMoney", func(t *testing.T) { + obj := &OrderReturnTax{} + var fernTestValueAppliedMoney *Money + obj.SetAppliedMoney(fernTestValueAppliedMoney) + assert.Equal(t, fernTestValueAppliedMoney, obj.AppliedMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetScope", func(t *testing.T) { + obj := &OrderReturnTax{} + var fernTestValueScope *OrderLineItemTaxScope + obj.SetScope(fernTestValueScope) + assert.Equal(t, fernTestValueScope, obj.Scope) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderReturnTax(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTax{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTax{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetSourceTaxUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTax{} + var expected *string + obj.SourceTaxUID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSourceTaxUID(), "getter should return the property value") + }) + + t.Run("GetSourceTaxUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTax{} + obj.SourceTaxUID = nil + + // Act & Assert + assert.Nil(t, obj.GetSourceTaxUID(), "getter should return nil when property is nil") + }) + + t.Run("GetSourceTaxUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSourceTaxUID() // Should return zero value + }) + + t.Run("GetCatalogObjectID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTax{} + var expected *string + obj.CatalogObjectID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogObjectID(), "getter should return the property value") + }) + + t.Run("GetCatalogObjectID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTax{} + obj.CatalogObjectID = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogObjectID(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogObjectID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogObjectID() // Should return zero value + }) + + t.Run("GetCatalogVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTax{} + var expected *int64 + obj.CatalogVersion = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogVersion(), "getter should return the property value") + }) + + t.Run("GetCatalogVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTax{} + obj.CatalogVersion = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogVersion() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTax{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTax{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTax{} + var expected *OrderLineItemTaxType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTax{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetPercentage", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTax{} + var expected *string + obj.Percentage = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPercentage(), "getter should return the property value") + }) + + t.Run("GetPercentage_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTax{} + obj.Percentage = nil + + // Act & Assert + assert.Nil(t, obj.GetPercentage(), "getter should return nil when property is nil") + }) + + t.Run("GetPercentage_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPercentage() // Should return zero value + }) + + t.Run("GetAppliedMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTax{} + var expected *Money + obj.AppliedMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppliedMoney(), "getter should return the property value") + }) + + t.Run("GetAppliedMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTax{} + obj.AppliedMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAppliedMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAppliedMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppliedMoney() // Should return zero value + }) + + t.Run("GetScope", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTax{} + var expected *OrderLineItemTaxScope + obj.Scope = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetScope(), "getter should return the property value") + }) + + t.Run("GetScope_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTax{} + obj.Scope = nil + + // Act & Assert + assert.Nil(t, obj.GetScope(), "getter should return nil when property is nil") + }) + + t.Run("GetScope_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnTax + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetScope() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderReturnTax(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTax{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSourceTaxUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTax{} + var fernTestValueSourceTaxUID *string + + // Act + obj.SetSourceTaxUID(fernTestValueSourceTaxUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogObjectID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTax{} + var fernTestValueCatalogObjectID *string + + // Act + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTax{} + var fernTestValueCatalogVersion *int64 + + // Act + obj.SetCatalogVersion(fernTestValueCatalogVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTax{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTax{} + var fernTestValueType *OrderLineItemTaxType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPercentage_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTax{} + var fernTestValuePercentage *string + + // Act + obj.SetPercentage(fernTestValuePercentage) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppliedMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTax{} + var fernTestValueAppliedMoney *Money + + // Act + obj.SetAppliedMoney(fernTestValueAppliedMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetScope_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTax{} + var fernTestValueScope *OrderLineItemTaxScope + + // Act + obj.SetScope(fernTestValueScope) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderReturnTip(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &OrderReturnTip{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppliedMoney", func(t *testing.T) { + obj := &OrderReturnTip{} + var fernTestValueAppliedMoney *Money + obj.SetAppliedMoney(fernTestValueAppliedMoney) + assert.Equal(t, fernTestValueAppliedMoney, obj.AppliedMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSourceTenderUID", func(t *testing.T) { + obj := &OrderReturnTip{} + var fernTestValueSourceTenderUID *string + obj.SetSourceTenderUID(fernTestValueSourceTenderUID) + assert.Equal(t, fernTestValueSourceTenderUID, obj.SourceTenderUID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSourceTenderID", func(t *testing.T) { + obj := &OrderReturnTip{} + var fernTestValueSourceTenderID *string + obj.SetSourceTenderID(fernTestValueSourceTenderID) + assert.Equal(t, fernTestValueSourceTenderID, obj.SourceTenderID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderReturnTip(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTip{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTip{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnTip + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetAppliedMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTip{} + var expected *Money + obj.AppliedMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppliedMoney(), "getter should return the property value") + }) + + t.Run("GetAppliedMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTip{} + obj.AppliedMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAppliedMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAppliedMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnTip + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppliedMoney() // Should return zero value + }) + + t.Run("GetSourceTenderUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTip{} + var expected *string + obj.SourceTenderUID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSourceTenderUID(), "getter should return the property value") + }) + + t.Run("GetSourceTenderUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTip{} + obj.SourceTenderUID = nil + + // Act & Assert + assert.Nil(t, obj.GetSourceTenderUID(), "getter should return nil when property is nil") + }) + + t.Run("GetSourceTenderUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnTip + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSourceTenderUID() // Should return zero value + }) + + t.Run("GetSourceTenderID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTip{} + var expected *string + obj.SourceTenderID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSourceTenderID(), "getter should return the property value") + }) + + t.Run("GetSourceTenderID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTip{} + obj.SourceTenderID = nil + + // Act & Assert + assert.Nil(t, obj.GetSourceTenderID(), "getter should return nil when property is nil") + }) + + t.Run("GetSourceTenderID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnTip + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSourceTenderID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderReturnTip(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTip{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppliedMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTip{} + var fernTestValueAppliedMoney *Money + + // Act + obj.SetAppliedMoney(fernTestValueAppliedMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSourceTenderUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTip{} + var fernTestValueSourceTenderUID *string + + // Act + obj.SetSourceTenderUID(fernTestValueSourceTenderUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSourceTenderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTip{} + var fernTestValueSourceTenderID *string + + // Act + obj.SetSourceTenderID(fernTestValueSourceTenderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderReward(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &OrderReward{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRewardTierID", func(t *testing.T) { + obj := &OrderReward{} + var fernTestValueRewardTierID string + obj.SetRewardTierID(fernTestValueRewardTierID) + assert.Equal(t, fernTestValueRewardTierID, obj.RewardTierID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderReward(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReward{} + var expected string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReward + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetRewardTierID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReward{} + var expected string + obj.RewardTierID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRewardTierID(), "getter should return the property value") + }) + + t.Run("GetRewardTierID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReward + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRewardTierID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderReward(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReward{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRewardTierID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReward{} + var fernTestValueRewardTierID string + + // Act + obj.SetRewardTierID(fernTestValueRewardTierID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderRoundingAdjustment(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &OrderRoundingAdjustment{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &OrderRoundingAdjustment{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &OrderRoundingAdjustment{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderRoundingAdjustment(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderRoundingAdjustment{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderRoundingAdjustment{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderRoundingAdjustment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderRoundingAdjustment{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderRoundingAdjustment{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderRoundingAdjustment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderRoundingAdjustment{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderRoundingAdjustment{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderRoundingAdjustment + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderRoundingAdjustment(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderRoundingAdjustment{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderRoundingAdjustment{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderRoundingAdjustment{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderServiceCharge(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &OrderServiceCharge{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &OrderServiceCharge{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogObjectID", func(t *testing.T) { + obj := &OrderServiceCharge{} + var fernTestValueCatalogObjectID *string + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + assert.Equal(t, fernTestValueCatalogObjectID, obj.CatalogObjectID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogVersion", func(t *testing.T) { + obj := &OrderServiceCharge{} + var fernTestValueCatalogVersion *int64 + obj.SetCatalogVersion(fernTestValueCatalogVersion) + assert.Equal(t, fernTestValueCatalogVersion, obj.CatalogVersion) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPercentage", func(t *testing.T) { + obj := &OrderServiceCharge{} + var fernTestValuePercentage *string + obj.SetPercentage(fernTestValuePercentage) + assert.Equal(t, fernTestValuePercentage, obj.Percentage) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &OrderServiceCharge{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppliedMoney", func(t *testing.T) { + obj := &OrderServiceCharge{} + var fernTestValueAppliedMoney *Money + obj.SetAppliedMoney(fernTestValueAppliedMoney) + assert.Equal(t, fernTestValueAppliedMoney, obj.AppliedMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTotalMoney", func(t *testing.T) { + obj := &OrderServiceCharge{} + var fernTestValueTotalMoney *Money + obj.SetTotalMoney(fernTestValueTotalMoney) + assert.Equal(t, fernTestValueTotalMoney, obj.TotalMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTotalTaxMoney", func(t *testing.T) { + obj := &OrderServiceCharge{} + var fernTestValueTotalTaxMoney *Money + obj.SetTotalTaxMoney(fernTestValueTotalTaxMoney) + assert.Equal(t, fernTestValueTotalTaxMoney, obj.TotalTaxMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCalculationPhase", func(t *testing.T) { + obj := &OrderServiceCharge{} + var fernTestValueCalculationPhase *OrderServiceChargeCalculationPhase + obj.SetCalculationPhase(fernTestValueCalculationPhase) + assert.Equal(t, fernTestValueCalculationPhase, obj.CalculationPhase) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTaxable", func(t *testing.T) { + obj := &OrderServiceCharge{} + var fernTestValueTaxable *bool + obj.SetTaxable(fernTestValueTaxable) + assert.Equal(t, fernTestValueTaxable, obj.Taxable) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppliedTaxes", func(t *testing.T) { + obj := &OrderServiceCharge{} + var fernTestValueAppliedTaxes []*OrderLineItemAppliedTax + obj.SetAppliedTaxes(fernTestValueAppliedTaxes) + assert.Equal(t, fernTestValueAppliedTaxes, obj.AppliedTaxes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMetadata", func(t *testing.T) { + obj := &OrderServiceCharge{} + var fernTestValueMetadata map[string]*string + obj.SetMetadata(fernTestValueMetadata) + assert.Equal(t, fernTestValueMetadata, obj.Metadata) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &OrderServiceCharge{} + var fernTestValueType *OrderServiceChargeType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTreatmentType", func(t *testing.T) { + obj := &OrderServiceCharge{} + var fernTestValueTreatmentType *OrderServiceChargeTreatmentType + obj.SetTreatmentType(fernTestValueTreatmentType) + assert.Equal(t, fernTestValueTreatmentType, obj.TreatmentType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetScope", func(t *testing.T) { + obj := &OrderServiceCharge{} + var fernTestValueScope *OrderServiceChargeScope + obj.SetScope(fernTestValueScope) + assert.Equal(t, fernTestValueScope, obj.Scope) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderServiceCharge(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetCatalogObjectID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var expected *string + obj.CatalogObjectID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogObjectID(), "getter should return the property value") + }) + + t.Run("GetCatalogObjectID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + obj.CatalogObjectID = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogObjectID(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogObjectID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogObjectID() // Should return zero value + }) + + t.Run("GetCatalogVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var expected *int64 + obj.CatalogVersion = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogVersion(), "getter should return the property value") + }) + + t.Run("GetCatalogVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + obj.CatalogVersion = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogVersion() // Should return zero value + }) + + t.Run("GetPercentage", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var expected *string + obj.Percentage = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPercentage(), "getter should return the property value") + }) + + t.Run("GetPercentage_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + obj.Percentage = nil + + // Act & Assert + assert.Nil(t, obj.GetPercentage(), "getter should return nil when property is nil") + }) + + t.Run("GetPercentage_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPercentage() // Should return zero value + }) + + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + + t.Run("GetAppliedMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var expected *Money + obj.AppliedMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppliedMoney(), "getter should return the property value") + }) + + t.Run("GetAppliedMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + obj.AppliedMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAppliedMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAppliedMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppliedMoney() // Should return zero value + }) + + t.Run("GetTotalMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var expected *Money + obj.TotalMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTotalMoney(), "getter should return the property value") + }) + + t.Run("GetTotalMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + obj.TotalMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTotalMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTotalMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTotalMoney() // Should return zero value + }) + + t.Run("GetTotalTaxMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var expected *Money + obj.TotalTaxMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTotalTaxMoney(), "getter should return the property value") + }) + + t.Run("GetTotalTaxMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + obj.TotalTaxMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTotalTaxMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTotalTaxMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTotalTaxMoney() // Should return zero value + }) + + t.Run("GetCalculationPhase", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var expected *OrderServiceChargeCalculationPhase + obj.CalculationPhase = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCalculationPhase(), "getter should return the property value") + }) + + t.Run("GetCalculationPhase_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + obj.CalculationPhase = nil + + // Act & Assert + assert.Nil(t, obj.GetCalculationPhase(), "getter should return nil when property is nil") + }) + + t.Run("GetCalculationPhase_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCalculationPhase() // Should return zero value + }) + + t.Run("GetTaxable", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var expected *bool + obj.Taxable = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTaxable(), "getter should return the property value") + }) + + t.Run("GetTaxable_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + obj.Taxable = nil + + // Act & Assert + assert.Nil(t, obj.GetTaxable(), "getter should return nil when property is nil") + }) + + t.Run("GetTaxable_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTaxable() // Should return zero value + }) + + t.Run("GetAppliedTaxes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var expected []*OrderLineItemAppliedTax + obj.AppliedTaxes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppliedTaxes(), "getter should return the property value") + }) + + t.Run("GetAppliedTaxes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + obj.AppliedTaxes = nil + + // Act & Assert + assert.Nil(t, obj.GetAppliedTaxes(), "getter should return nil when property is nil") + }) + + t.Run("GetAppliedTaxes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppliedTaxes() // Should return zero value + }) + + t.Run("GetMetadata", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var expected map[string]*string + obj.Metadata = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMetadata(), "getter should return the property value") + }) + + t.Run("GetMetadata_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + obj.Metadata = nil + + // Act & Assert + assert.Nil(t, obj.GetMetadata(), "getter should return nil when property is nil") + }) + + t.Run("GetMetadata_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMetadata() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var expected *OrderServiceChargeType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetTreatmentType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var expected *OrderServiceChargeTreatmentType + obj.TreatmentType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTreatmentType(), "getter should return the property value") + }) + + t.Run("GetTreatmentType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + obj.TreatmentType = nil + + // Act & Assert + assert.Nil(t, obj.GetTreatmentType(), "getter should return nil when property is nil") + }) + + t.Run("GetTreatmentType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTreatmentType() // Should return zero value + }) + + t.Run("GetScope", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var expected *OrderServiceChargeScope + obj.Scope = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetScope(), "getter should return the property value") + }) + + t.Run("GetScope_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + obj.Scope = nil + + // Act & Assert + assert.Nil(t, obj.GetScope(), "getter should return nil when property is nil") + }) + + t.Run("GetScope_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderServiceCharge + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetScope() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderServiceCharge(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogObjectID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var fernTestValueCatalogObjectID *string + + // Act + obj.SetCatalogObjectID(fernTestValueCatalogObjectID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var fernTestValueCatalogVersion *int64 + + // Act + obj.SetCatalogVersion(fernTestValueCatalogVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPercentage_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var fernTestValuePercentage *string + + // Act + obj.SetPercentage(fernTestValuePercentage) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppliedMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var fernTestValueAppliedMoney *Money + + // Act + obj.SetAppliedMoney(fernTestValueAppliedMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTotalMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var fernTestValueTotalMoney *Money + + // Act + obj.SetTotalMoney(fernTestValueTotalMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTotalTaxMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var fernTestValueTotalTaxMoney *Money + + // Act + obj.SetTotalTaxMoney(fernTestValueTotalTaxMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCalculationPhase_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var fernTestValueCalculationPhase *OrderServiceChargeCalculationPhase + + // Act + obj.SetCalculationPhase(fernTestValueCalculationPhase) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTaxable_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var fernTestValueTaxable *bool + + // Act + obj.SetTaxable(fernTestValueTaxable) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppliedTaxes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var fernTestValueAppliedTaxes []*OrderLineItemAppliedTax + + // Act + obj.SetAppliedTaxes(fernTestValueAppliedTaxes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMetadata_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var fernTestValueMetadata map[string]*string + + // Act + obj.SetMetadata(fernTestValueMetadata) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var fernTestValueType *OrderServiceChargeType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTreatmentType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var fernTestValueTreatmentType *OrderServiceChargeTreatmentType + + // Act + obj.SetTreatmentType(fernTestValueTreatmentType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetScope_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + var fernTestValueScope *OrderServiceChargeScope + + // Act + obj.SetScope(fernTestValueScope) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderSource(t *testing.T) { + t.Run("SetName", func(t *testing.T) { + obj := &OrderSource{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderSource(t *testing.T) { + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderSource{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderSource{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderSource + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderSource(t *testing.T) { + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderSource{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderUpdated(t *testing.T) { + t.Run("SetOrderID", func(t *testing.T) { + obj := &OrderUpdated{} + var fernTestValueOrderID *string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &OrderUpdated{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &OrderUpdated{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetState", func(t *testing.T) { + obj := &OrderUpdated{} + var fernTestValueState *OrderState + obj.SetState(fernTestValueState) + assert.Equal(t, fernTestValueState, obj.State) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &OrderUpdated{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &OrderUpdated{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderUpdated(t *testing.T) { + t.Run("GetOrderID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdated{} + var expected *string + obj.OrderID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderID(), "getter should return the property value") + }) + + t.Run("GetOrderID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdated{} + obj.OrderID = nil + + // Act & Assert + assert.Nil(t, obj.GetOrderID(), "getter should return nil when property is nil") + }) + + t.Run("GetOrderID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderUpdated + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderID() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdated{} + var expected *int + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdated{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderUpdated + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdated{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdated{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderUpdated + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetState", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdated{} + var expected *OrderState + obj.State = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetState(), "getter should return the property value") + }) + + t.Run("GetState_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdated{} + obj.State = nil + + // Act & Assert + assert.Nil(t, obj.GetState(), "getter should return nil when property is nil") + }) + + t.Run("GetState_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderUpdated + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetState() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdated{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdated{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderUpdated + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdated{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdated{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderUpdated + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderUpdated(t *testing.T) { + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdated{} + var fernTestValueOrderID *string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdated{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdated{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetState_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdated{} + var fernTestValueState *OrderState + + // Act + obj.SetState(fernTestValueState) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdated{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdated{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &OrderUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &OrderUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &OrderUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &OrderUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &OrderUpdatedEvent{} + var fernTestValueData *OrderUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedEvent{} + var expected *OrderUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedEvent{} + var fernTestValueData *OrderUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &OrderUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &OrderUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &OrderUpdatedEventData{} + var fernTestValueObject *OrderUpdatedObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedEventData{} + var expected *OrderUpdatedObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedEventData{} + var fernTestValueObject *OrderUpdatedObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersOrderUpdatedObject(t *testing.T) { + t.Run("SetOrderUpdated", func(t *testing.T) { + obj := &OrderUpdatedObject{} + var fernTestValueOrderUpdated *OrderUpdated + obj.SetOrderUpdated(fernTestValueOrderUpdated) + assert.Equal(t, fernTestValueOrderUpdated, obj.OrderUpdated) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersOrderUpdatedObject(t *testing.T) { + t.Run("GetOrderUpdated", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedObject{} + var expected *OrderUpdated + obj.OrderUpdated = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderUpdated(), "getter should return the property value") + }) + + t.Run("GetOrderUpdated_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedObject{} + obj.OrderUpdated = nil + + // Act & Assert + assert.Nil(t, obj.GetOrderUpdated(), "getter should return nil when property is nil") + }) + + t.Run("GetOrderUpdated_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderUpdatedObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderUpdated() // Should return zero value + }) + +} + +func TestSettersMarkExplicitOrderUpdatedObject(t *testing.T) { + t.Run("SetOrderUpdated_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedObject{} + var fernTestValueOrderUpdated *OrderUpdated + + // Act + obj.SetOrderUpdated(fernTestValueOrderUpdated) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &PaymentCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &PaymentCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &PaymentCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &PaymentCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &PaymentCreatedEvent{} + var fernTestValueData *PaymentCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEvent{} + var expected *PaymentCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEvent{} + var fernTestValueData *PaymentCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &PaymentCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &PaymentCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &PaymentCreatedEventData{} + var fernTestValueObject *PaymentCreatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEventData{} + var expected *PaymentCreatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEventData{} + var fernTestValueObject *PaymentCreatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentCreatedEventObject(t *testing.T) { + t.Run("SetPayment", func(t *testing.T) { + obj := &PaymentCreatedEventObject{} + var fernTestValuePayment *Payment + obj.SetPayment(fernTestValuePayment) + assert.Equal(t, fernTestValuePayment, obj.Payment) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentCreatedEventObject(t *testing.T) { + t.Run("GetPayment", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEventObject{} + var expected *Payment + obj.Payment = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPayment(), "getter should return the property value") + }) + + t.Run("GetPayment_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEventObject{} + obj.Payment = nil + + // Act & Assert + assert.Nil(t, obj.GetPayment(), "getter should return nil when property is nil") + }) + + t.Run("GetPayment_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentCreatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPayment() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentCreatedEventObject(t *testing.T) { + t.Run("SetPayment_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEventObject{} + var fernTestValuePayment *Payment + + // Act + obj.SetPayment(fernTestValuePayment) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentLink(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &PaymentLink{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &PaymentLink{} + var fernTestValueVersion int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDescription", func(t *testing.T) { + obj := &PaymentLink{} + var fernTestValueDescription *string + obj.SetDescription(fernTestValueDescription) + assert.Equal(t, fernTestValueDescription, obj.Description) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrderID", func(t *testing.T) { + obj := &PaymentLink{} + var fernTestValueOrderID *string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCheckoutOptions", func(t *testing.T) { + obj := &PaymentLink{} + var fernTestValueCheckoutOptions *CheckoutOptions + obj.SetCheckoutOptions(fernTestValueCheckoutOptions) + assert.Equal(t, fernTestValueCheckoutOptions, obj.CheckoutOptions) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPrePopulatedData", func(t *testing.T) { + obj := &PaymentLink{} + var fernTestValuePrePopulatedData *PrePopulatedData + obj.SetPrePopulatedData(fernTestValuePrePopulatedData) + assert.Equal(t, fernTestValuePrePopulatedData, obj.PrePopulatedData) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetURL", func(t *testing.T) { + obj := &PaymentLink{} + var fernTestValueURL *string + obj.SetURL(fernTestValueURL) + assert.Equal(t, fernTestValueURL, obj.URL) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLongURL", func(t *testing.T) { + obj := &PaymentLink{} + var fernTestValueLongURL *string + obj.SetLongURL(fernTestValueLongURL) + assert.Equal(t, fernTestValueLongURL, obj.LongURL) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &PaymentLink{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &PaymentLink{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPaymentNote", func(t *testing.T) { + obj := &PaymentLink{} + var fernTestValuePaymentNote *string + obj.SetPaymentNote(fernTestValuePaymentNote) + assert.Equal(t, fernTestValuePaymentNote, obj.PaymentNote) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentLink(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentLink + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + var expected int + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentLink + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetDescription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + var expected *string + obj.Description = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDescription(), "getter should return the property value") + }) + + t.Run("GetDescription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + obj.Description = nil + + // Act & Assert + assert.Nil(t, obj.GetDescription(), "getter should return nil when property is nil") + }) + + t.Run("GetDescription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentLink + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDescription() // Should return zero value + }) + + t.Run("GetOrderID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + var expected *string + obj.OrderID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderID(), "getter should return the property value") + }) + + t.Run("GetOrderID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + obj.OrderID = nil + + // Act & Assert + assert.Nil(t, obj.GetOrderID(), "getter should return nil when property is nil") + }) + + t.Run("GetOrderID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentLink + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderID() // Should return zero value + }) + + t.Run("GetCheckoutOptions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + var expected *CheckoutOptions + obj.CheckoutOptions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCheckoutOptions(), "getter should return the property value") + }) + + t.Run("GetCheckoutOptions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + obj.CheckoutOptions = nil + + // Act & Assert + assert.Nil(t, obj.GetCheckoutOptions(), "getter should return nil when property is nil") + }) + + t.Run("GetCheckoutOptions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentLink + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCheckoutOptions() // Should return zero value + }) + + t.Run("GetPrePopulatedData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + var expected *PrePopulatedData + obj.PrePopulatedData = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPrePopulatedData(), "getter should return the property value") + }) + + t.Run("GetPrePopulatedData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + obj.PrePopulatedData = nil + + // Act & Assert + assert.Nil(t, obj.GetPrePopulatedData(), "getter should return nil when property is nil") + }) + + t.Run("GetPrePopulatedData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentLink + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPrePopulatedData() // Should return zero value + }) + + t.Run("GetURL", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + var expected *string + obj.URL = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetURL(), "getter should return the property value") + }) + + t.Run("GetURL_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + obj.URL = nil + + // Act & Assert + assert.Nil(t, obj.GetURL(), "getter should return nil when property is nil") + }) + + t.Run("GetURL_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentLink + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetURL() // Should return zero value + }) + + t.Run("GetLongURL", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + var expected *string + obj.LongURL = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLongURL(), "getter should return the property value") + }) + + t.Run("GetLongURL_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + obj.LongURL = nil + + // Act & Assert + assert.Nil(t, obj.GetLongURL(), "getter should return nil when property is nil") + }) + + t.Run("GetLongURL_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentLink + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLongURL() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentLink + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentLink + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetPaymentNote", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + var expected *string + obj.PaymentNote = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentNote(), "getter should return the property value") + }) + + t.Run("GetPaymentNote_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + obj.PaymentNote = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentNote(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentNote_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentLink + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentNote() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentLink(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + var fernTestValueVersion int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDescription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + var fernTestValueDescription *string + + // Act + obj.SetDescription(fernTestValueDescription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + var fernTestValueOrderID *string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCheckoutOptions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + var fernTestValueCheckoutOptions *CheckoutOptions + + // Act + obj.SetCheckoutOptions(fernTestValueCheckoutOptions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPrePopulatedData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + var fernTestValuePrePopulatedData *PrePopulatedData + + // Act + obj.SetPrePopulatedData(fernTestValuePrePopulatedData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetURL_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + var fernTestValueURL *string + + // Act + obj.SetURL(fernTestValueURL) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLongURL_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + var fernTestValueLongURL *string + + // Act + obj.SetLongURL(fernTestValueLongURL) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPaymentNote_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + var fernTestValuePaymentNote *string + + // Act + obj.SetPaymentNote(fernTestValuePaymentNote) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentLinkRelatedResources(t *testing.T) { + t.Run("SetOrders", func(t *testing.T) { + obj := &PaymentLinkRelatedResources{} + var fernTestValueOrders []*Order + obj.SetOrders(fernTestValueOrders) + assert.Equal(t, fernTestValueOrders, obj.Orders) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSubscriptionPlans", func(t *testing.T) { + obj := &PaymentLinkRelatedResources{} + var fernTestValueSubscriptionPlans []*CatalogObject + obj.SetSubscriptionPlans(fernTestValueSubscriptionPlans) + assert.Equal(t, fernTestValueSubscriptionPlans, obj.SubscriptionPlans) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentLinkRelatedResources(t *testing.T) { + t.Run("GetOrders", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLinkRelatedResources{} + var expected []*Order + obj.Orders = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrders(), "getter should return the property value") + }) + + t.Run("GetOrders_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLinkRelatedResources{} + obj.Orders = nil + + // Act & Assert + assert.Nil(t, obj.GetOrders(), "getter should return nil when property is nil") + }) + + t.Run("GetOrders_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentLinkRelatedResources + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrders() // Should return zero value + }) + + t.Run("GetSubscriptionPlans", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLinkRelatedResources{} + var expected []*CatalogObject + obj.SubscriptionPlans = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscriptionPlans(), "getter should return the property value") + }) + + t.Run("GetSubscriptionPlans_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLinkRelatedResources{} + obj.SubscriptionPlans = nil + + // Act & Assert + assert.Nil(t, obj.GetSubscriptionPlans(), "getter should return nil when property is nil") + }) + + t.Run("GetSubscriptionPlans_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentLinkRelatedResources + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscriptionPlans() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentLinkRelatedResources(t *testing.T) { + t.Run("SetOrders_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLinkRelatedResources{} + var fernTestValueOrders []*Order + + // Act + obj.SetOrders(fernTestValueOrders) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSubscriptionPlans_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLinkRelatedResources{} + var fernTestValueSubscriptionPlans []*CatalogObject + + // Act + obj.SetSubscriptionPlans(fernTestValueSubscriptionPlans) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentOptions(t *testing.T) { + t.Run("SetAutocomplete", func(t *testing.T) { + obj := &PaymentOptions{} + var fernTestValueAutocomplete *bool + obj.SetAutocomplete(fernTestValueAutocomplete) + assert.Equal(t, fernTestValueAutocomplete, obj.Autocomplete) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDelayDuration", func(t *testing.T) { + obj := &PaymentOptions{} + var fernTestValueDelayDuration *string + obj.SetDelayDuration(fernTestValueDelayDuration) + assert.Equal(t, fernTestValueDelayDuration, obj.DelayDuration) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAcceptPartialAuthorization", func(t *testing.T) { + obj := &PaymentOptions{} + var fernTestValueAcceptPartialAuthorization *bool + obj.SetAcceptPartialAuthorization(fernTestValueAcceptPartialAuthorization) + assert.Equal(t, fernTestValueAcceptPartialAuthorization, obj.AcceptPartialAuthorization) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDelayAction", func(t *testing.T) { + obj := &PaymentOptions{} + var fernTestValueDelayAction *PaymentOptionsDelayAction + obj.SetDelayAction(fernTestValueDelayAction) + assert.Equal(t, fernTestValueDelayAction, obj.DelayAction) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentOptions(t *testing.T) { + t.Run("GetAutocomplete", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentOptions{} + var expected *bool + obj.Autocomplete = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAutocomplete(), "getter should return the property value") + }) + + t.Run("GetAutocomplete_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentOptions{} + obj.Autocomplete = nil + + // Act & Assert + assert.Nil(t, obj.GetAutocomplete(), "getter should return nil when property is nil") + }) + + t.Run("GetAutocomplete_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAutocomplete() // Should return zero value + }) + + t.Run("GetDelayDuration", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentOptions{} + var expected *string + obj.DelayDuration = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDelayDuration(), "getter should return the property value") + }) + + t.Run("GetDelayDuration_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentOptions{} + obj.DelayDuration = nil + + // Act & Assert + assert.Nil(t, obj.GetDelayDuration(), "getter should return nil when property is nil") + }) + + t.Run("GetDelayDuration_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDelayDuration() // Should return zero value + }) + + t.Run("GetAcceptPartialAuthorization", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentOptions{} + var expected *bool + obj.AcceptPartialAuthorization = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAcceptPartialAuthorization(), "getter should return the property value") + }) + + t.Run("GetAcceptPartialAuthorization_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentOptions{} + obj.AcceptPartialAuthorization = nil + + // Act & Assert + assert.Nil(t, obj.GetAcceptPartialAuthorization(), "getter should return nil when property is nil") + }) + + t.Run("GetAcceptPartialAuthorization_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAcceptPartialAuthorization() // Should return zero value + }) + + t.Run("GetDelayAction", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentOptions{} + var expected *PaymentOptionsDelayAction + obj.DelayAction = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDelayAction(), "getter should return the property value") + }) + + t.Run("GetDelayAction_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentOptions{} + obj.DelayAction = nil + + // Act & Assert + assert.Nil(t, obj.GetDelayAction(), "getter should return nil when property is nil") + }) + + t.Run("GetDelayAction_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDelayAction() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentOptions(t *testing.T) { + t.Run("SetAutocomplete_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentOptions{} + var fernTestValueAutocomplete *bool + + // Act + obj.SetAutocomplete(fernTestValueAutocomplete) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDelayDuration_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentOptions{} + var fernTestValueDelayDuration *string + + // Act + obj.SetDelayDuration(fernTestValueDelayDuration) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAcceptPartialAuthorization_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentOptions{} + var fernTestValueAcceptPartialAuthorization *bool + + // Act + obj.SetAcceptPartialAuthorization(fernTestValueAcceptPartialAuthorization) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDelayAction_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentOptions{} + var fernTestValueDelayAction *PaymentOptionsDelayAction + + // Act + obj.SetDelayAction(fernTestValueDelayAction) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &PaymentUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &PaymentUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &PaymentUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &PaymentUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &PaymentUpdatedEvent{} + var fernTestValueData *PaymentUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEvent{} + var expected *PaymentUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEvent{} + var fernTestValueData *PaymentUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &PaymentUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &PaymentUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &PaymentUpdatedEventData{} + var fernTestValueObject *PaymentUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEventData{} + var expected *PaymentUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEventData{} + var fernTestValueObject *PaymentUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPaymentUpdatedEventObject(t *testing.T) { + t.Run("SetPayment", func(t *testing.T) { + obj := &PaymentUpdatedEventObject{} + var fernTestValuePayment *Payment + obj.SetPayment(fernTestValuePayment) + assert.Equal(t, fernTestValuePayment, obj.Payment) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPaymentUpdatedEventObject(t *testing.T) { + t.Run("GetPayment", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEventObject{} + var expected *Payment + obj.Payment = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPayment(), "getter should return the property value") + }) + + t.Run("GetPayment_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEventObject{} + obj.Payment = nil + + // Act & Assert + assert.Nil(t, obj.GetPayment(), "getter should return nil when property is nil") + }) + + t.Run("GetPayment_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPayment() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPaymentUpdatedEventObject(t *testing.T) { + t.Run("SetPayment_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEventObject{} + var fernTestValuePayment *Payment + + // Act + obj.SetPayment(fernTestValuePayment) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPayoutFailedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &PayoutFailedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &PayoutFailedEvent{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &PayoutFailedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &PayoutFailedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &PayoutFailedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &PayoutFailedEvent{} + var fernTestValueData *PayoutFailedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPayoutFailedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutFailedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEvent{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEvent{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutFailedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutFailedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutFailedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutFailedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEvent{} + var expected *PayoutFailedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutFailedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPayoutFailedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEvent{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEvent{} + var fernTestValueData *PayoutFailedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPayoutFailedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &PayoutFailedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &PayoutFailedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &PayoutFailedEventData{} + var fernTestValueObject *PayoutFailedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPayoutFailedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutFailedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutFailedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEventData{} + var expected *PayoutFailedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutFailedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPayoutFailedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEventData{} + var fernTestValueObject *PayoutFailedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPayoutFailedEventObject(t *testing.T) { + t.Run("SetPayout", func(t *testing.T) { + obj := &PayoutFailedEventObject{} + var fernTestValuePayout *Payout + obj.SetPayout(fernTestValuePayout) + assert.Equal(t, fernTestValuePayout, obj.Payout) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPayoutFailedEventObject(t *testing.T) { + t.Run("GetPayout", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEventObject{} + var expected *Payout + obj.Payout = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPayout(), "getter should return the property value") + }) + + t.Run("GetPayout_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEventObject{} + obj.Payout = nil + + // Act & Assert + assert.Nil(t, obj.GetPayout(), "getter should return nil when property is nil") + }) + + t.Run("GetPayout_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutFailedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPayout() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPayoutFailedEventObject(t *testing.T) { + t.Run("SetPayout_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEventObject{} + var fernTestValuePayout *Payout + + // Act + obj.SetPayout(fernTestValuePayout) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPayoutPaidEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &PayoutPaidEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &PayoutPaidEvent{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &PayoutPaidEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &PayoutPaidEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &PayoutPaidEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &PayoutPaidEvent{} + var fernTestValueData *PayoutPaidEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPayoutPaidEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutPaidEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEvent{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEvent{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutPaidEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutPaidEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutPaidEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutPaidEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEvent{} + var expected *PayoutPaidEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutPaidEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPayoutPaidEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEvent{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEvent{} + var fernTestValueData *PayoutPaidEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPayoutPaidEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &PayoutPaidEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &PayoutPaidEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &PayoutPaidEventData{} + var fernTestValueObject *PayoutPaidEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPayoutPaidEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutPaidEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutPaidEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEventData{} + var expected *PayoutPaidEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutPaidEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPayoutPaidEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEventData{} + var fernTestValueObject *PayoutPaidEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPayoutPaidEventObject(t *testing.T) { + t.Run("SetPayout", func(t *testing.T) { + obj := &PayoutPaidEventObject{} + var fernTestValuePayout *Payout + obj.SetPayout(fernTestValuePayout) + assert.Equal(t, fernTestValuePayout, obj.Payout) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPayoutPaidEventObject(t *testing.T) { + t.Run("GetPayout", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEventObject{} + var expected *Payout + obj.Payout = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPayout(), "getter should return the property value") + }) + + t.Run("GetPayout_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEventObject{} + obj.Payout = nil + + // Act & Assert + assert.Nil(t, obj.GetPayout(), "getter should return nil when property is nil") + }) + + t.Run("GetPayout_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutPaidEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPayout() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPayoutPaidEventObject(t *testing.T) { + t.Run("SetPayout_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEventObject{} + var fernTestValuePayout *Payout + + // Act + obj.SetPayout(fernTestValuePayout) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPayoutSentEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &PayoutSentEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &PayoutSentEvent{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &PayoutSentEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &PayoutSentEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &PayoutSentEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &PayoutSentEvent{} + var fernTestValueData *PayoutSentEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPayoutSentEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutSentEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEvent{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEvent{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutSentEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutSentEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutSentEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutSentEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEvent{} + var expected *PayoutSentEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutSentEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPayoutSentEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEvent{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEvent{} + var fernTestValueData *PayoutSentEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPayoutSentEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &PayoutSentEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &PayoutSentEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &PayoutSentEventData{} + var fernTestValueObject *PayoutSentEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPayoutSentEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutSentEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutSentEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEventData{} + var expected *PayoutSentEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutSentEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPayoutSentEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEventData{} + var fernTestValueObject *PayoutSentEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPayoutSentEventObject(t *testing.T) { + t.Run("SetPayout", func(t *testing.T) { + obj := &PayoutSentEventObject{} + var fernTestValuePayout *Payout + obj.SetPayout(fernTestValuePayout) + assert.Equal(t, fernTestValuePayout, obj.Payout) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPayoutSentEventObject(t *testing.T) { + t.Run("GetPayout", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEventObject{} + var expected *Payout + obj.Payout = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPayout(), "getter should return the property value") + }) + + t.Run("GetPayout_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEventObject{} + obj.Payout = nil + + // Act & Assert + assert.Nil(t, obj.GetPayout(), "getter should return nil when property is nil") + }) + + t.Run("GetPayout_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutSentEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPayout() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPayoutSentEventObject(t *testing.T) { + t.Run("SetPayout_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEventObject{} + var fernTestValuePayout *Payout + + // Act + obj.SetPayout(fernTestValuePayout) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersPrePopulatedData(t *testing.T) { + t.Run("SetBuyerEmail", func(t *testing.T) { + obj := &PrePopulatedData{} + var fernTestValueBuyerEmail *string + obj.SetBuyerEmail(fernTestValueBuyerEmail) + assert.Equal(t, fernTestValueBuyerEmail, obj.BuyerEmail) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBuyerPhoneNumber", func(t *testing.T) { + obj := &PrePopulatedData{} + var fernTestValueBuyerPhoneNumber *string + obj.SetBuyerPhoneNumber(fernTestValueBuyerPhoneNumber) + assert.Equal(t, fernTestValueBuyerPhoneNumber, obj.BuyerPhoneNumber) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBuyerAddress", func(t *testing.T) { + obj := &PrePopulatedData{} + var fernTestValueBuyerAddress *Address + obj.SetBuyerAddress(fernTestValueBuyerAddress) + assert.Equal(t, fernTestValueBuyerAddress, obj.BuyerAddress) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersPrePopulatedData(t *testing.T) { + t.Run("GetBuyerEmail", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PrePopulatedData{} + var expected *string + obj.BuyerEmail = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBuyerEmail(), "getter should return the property value") + }) + + t.Run("GetBuyerEmail_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PrePopulatedData{} + obj.BuyerEmail = nil + + // Act & Assert + assert.Nil(t, obj.GetBuyerEmail(), "getter should return nil when property is nil") + }) + + t.Run("GetBuyerEmail_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PrePopulatedData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBuyerEmail() // Should return zero value + }) + + t.Run("GetBuyerPhoneNumber", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PrePopulatedData{} + var expected *string + obj.BuyerPhoneNumber = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBuyerPhoneNumber(), "getter should return the property value") + }) + + t.Run("GetBuyerPhoneNumber_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PrePopulatedData{} + obj.BuyerPhoneNumber = nil + + // Act & Assert + assert.Nil(t, obj.GetBuyerPhoneNumber(), "getter should return nil when property is nil") + }) + + t.Run("GetBuyerPhoneNumber_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PrePopulatedData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBuyerPhoneNumber() // Should return zero value + }) + + t.Run("GetBuyerAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PrePopulatedData{} + var expected *Address + obj.BuyerAddress = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBuyerAddress(), "getter should return the property value") + }) + + t.Run("GetBuyerAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PrePopulatedData{} + obj.BuyerAddress = nil + + // Act & Assert + assert.Nil(t, obj.GetBuyerAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetBuyerAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PrePopulatedData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBuyerAddress() // Should return zero value + }) + +} + +func TestSettersMarkExplicitPrePopulatedData(t *testing.T) { + t.Run("SetBuyerEmail_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PrePopulatedData{} + var fernTestValueBuyerEmail *string + + // Act + obj.SetBuyerEmail(fernTestValueBuyerEmail) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBuyerPhoneNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PrePopulatedData{} + var fernTestValueBuyerPhoneNumber *string + + // Act + obj.SetBuyerPhoneNumber(fernTestValueBuyerPhoneNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBuyerAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PrePopulatedData{} + var fernTestValueBuyerAddress *Address + + // Act + obj.SetBuyerAddress(fernTestValueBuyerAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersProcessingFee(t *testing.T) { + t.Run("SetEffectiveAt", func(t *testing.T) { + obj := &ProcessingFee{} + var fernTestValueEffectiveAt *string + obj.SetEffectiveAt(fernTestValueEffectiveAt) + assert.Equal(t, fernTestValueEffectiveAt, obj.EffectiveAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &ProcessingFee{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &ProcessingFee{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersProcessingFee(t *testing.T) { + t.Run("GetEffectiveAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ProcessingFee{} + var expected *string + obj.EffectiveAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEffectiveAt(), "getter should return the property value") + }) + + t.Run("GetEffectiveAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ProcessingFee{} + obj.EffectiveAt = nil + + // Act & Assert + assert.Nil(t, obj.GetEffectiveAt(), "getter should return nil when property is nil") + }) + + t.Run("GetEffectiveAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ProcessingFee + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEffectiveAt() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ProcessingFee{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ProcessingFee{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ProcessingFee + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ProcessingFee{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ProcessingFee{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ProcessingFee + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + +} + +func TestSettersMarkExplicitProcessingFee(t *testing.T) { + t.Run("SetEffectiveAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ProcessingFee{} + var fernTestValueEffectiveAt *string + + // Act + obj.SetEffectiveAt(fernTestValueEffectiveAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ProcessingFee{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ProcessingFee{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersQrCodeOptions(t *testing.T) { + t.Run("SetTitle", func(t *testing.T) { + obj := &QrCodeOptions{} + var fernTestValueTitle string + obj.SetTitle(fernTestValueTitle) + assert.Equal(t, fernTestValueTitle, obj.Title) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBody", func(t *testing.T) { + obj := &QrCodeOptions{} + var fernTestValueBody string + obj.SetBody(fernTestValueBody) + assert.Equal(t, fernTestValueBody, obj.Body) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBarcodeContents", func(t *testing.T) { + obj := &QrCodeOptions{} + var fernTestValueBarcodeContents string + obj.SetBarcodeContents(fernTestValueBarcodeContents) + assert.Equal(t, fernTestValueBarcodeContents, obj.BarcodeContents) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersQrCodeOptions(t *testing.T) { + t.Run("GetTitle", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &QrCodeOptions{} + var expected string + obj.Title = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTitle(), "getter should return the property value") + }) + + t.Run("GetTitle_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *QrCodeOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTitle() // Should return zero value + }) + + t.Run("GetBody", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &QrCodeOptions{} + var expected string + obj.Body = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBody(), "getter should return the property value") + }) + + t.Run("GetBody_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *QrCodeOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBody() // Should return zero value + }) + + t.Run("GetBarcodeContents", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &QrCodeOptions{} + var expected string + obj.BarcodeContents = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBarcodeContents(), "getter should return the property value") + }) + + t.Run("GetBarcodeContents_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *QrCodeOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBarcodeContents() // Should return zero value + }) + +} + +func TestSettersMarkExplicitQrCodeOptions(t *testing.T) { + t.Run("SetTitle_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &QrCodeOptions{} + var fernTestValueTitle string + + // Act + obj.SetTitle(fernTestValueTitle) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBody_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &QrCodeOptions{} + var fernTestValueBody string + + // Act + obj.SetBody(fernTestValueBody) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBarcodeContents_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &QrCodeOptions{} + var fernTestValueBarcodeContents string + + // Act + obj.SetBarcodeContents(fernTestValueBarcodeContents) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersQuickPay(t *testing.T) { + t.Run("SetName", func(t *testing.T) { + obj := &QuickPay{} + var fernTestValueName string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPriceMoney", func(t *testing.T) { + obj := &QuickPay{} + var fernTestValuePriceMoney *Money + obj.SetPriceMoney(fernTestValuePriceMoney) + assert.Equal(t, fernTestValuePriceMoney, obj.PriceMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &QuickPay{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersQuickPay(t *testing.T) { + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &QuickPay{} + var expected string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *QuickPay + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetPriceMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &QuickPay{} + var expected *Money + obj.PriceMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPriceMoney(), "getter should return the property value") + }) + + t.Run("GetPriceMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &QuickPay{} + obj.PriceMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetPriceMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetPriceMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *QuickPay + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPriceMoney() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &QuickPay{} + var expected string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *QuickPay + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitQuickPay(t *testing.T) { + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &QuickPay{} + var fernTestValueName string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPriceMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &QuickPay{} + var fernTestValuePriceMoney *Money + + // Act + obj.SetPriceMoney(fernTestValuePriceMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &QuickPay{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersReceiptOptions(t *testing.T) { + t.Run("SetPaymentID", func(t *testing.T) { + obj := &ReceiptOptions{} + var fernTestValuePaymentID string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPrintOnly", func(t *testing.T) { + obj := &ReceiptOptions{} + var fernTestValuePrintOnly *bool + obj.SetPrintOnly(fernTestValuePrintOnly) + assert.Equal(t, fernTestValuePrintOnly, obj.PrintOnly) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsDuplicate", func(t *testing.T) { + obj := &ReceiptOptions{} + var fernTestValueIsDuplicate *bool + obj.SetIsDuplicate(fernTestValueIsDuplicate) + assert.Equal(t, fernTestValueIsDuplicate, obj.IsDuplicate) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersReceiptOptions(t *testing.T) { + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ReceiptOptions{} + var expected string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ReceiptOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + + t.Run("GetPrintOnly", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ReceiptOptions{} + var expected *bool + obj.PrintOnly = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPrintOnly(), "getter should return the property value") + }) + + t.Run("GetPrintOnly_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ReceiptOptions{} + obj.PrintOnly = nil + + // Act & Assert + assert.Nil(t, obj.GetPrintOnly(), "getter should return nil when property is nil") + }) + + t.Run("GetPrintOnly_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ReceiptOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPrintOnly() // Should return zero value + }) + + t.Run("GetIsDuplicate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ReceiptOptions{} + var expected *bool + obj.IsDuplicate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsDuplicate(), "getter should return the property value") + }) + + t.Run("GetIsDuplicate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ReceiptOptions{} + obj.IsDuplicate = nil + + // Act & Assert + assert.Nil(t, obj.GetIsDuplicate(), "getter should return nil when property is nil") + }) + + t.Run("GetIsDuplicate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ReceiptOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsDuplicate() // Should return zero value + }) + +} + +func TestSettersMarkExplicitReceiptOptions(t *testing.T) { + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ReceiptOptions{} + var fernTestValuePaymentID string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPrintOnly_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ReceiptOptions{} + var fernTestValuePrintOnly *bool + + // Act + obj.SetPrintOnly(fernTestValuePrintOnly) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsDuplicate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ReceiptOptions{} + var fernTestValueIsDuplicate *bool + + // Act + obj.SetIsDuplicate(fernTestValueIsDuplicate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRedeemLoyaltyRewardResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &RedeemLoyaltyRewardResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEvent", func(t *testing.T) { + obj := &RedeemLoyaltyRewardResponse{} + var fernTestValueEvent *LoyaltyEvent + obj.SetEvent(fernTestValueEvent) + assert.Equal(t, fernTestValueEvent, obj.Event) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRedeemLoyaltyRewardResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RedeemLoyaltyRewardResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RedeemLoyaltyRewardResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RedeemLoyaltyRewardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetEvent", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RedeemLoyaltyRewardResponse{} + var expected *LoyaltyEvent + obj.Event = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEvent(), "getter should return the property value") + }) + + t.Run("GetEvent_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RedeemLoyaltyRewardResponse{} + obj.Event = nil + + // Act & Assert + assert.Nil(t, obj.GetEvent(), "getter should return nil when property is nil") + }) + + t.Run("GetEvent_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RedeemLoyaltyRewardResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEvent() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRedeemLoyaltyRewardResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RedeemLoyaltyRewardResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEvent_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RedeemLoyaltyRewardResponse{} + var fernTestValueEvent *LoyaltyEvent + + // Act + obj.SetEvent(fernTestValueEvent) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRefund(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &Refund{} + var fernTestValueID string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &Refund{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTransactionID", func(t *testing.T) { + obj := &Refund{} + var fernTestValueTransactionID *string + obj.SetTransactionID(fernTestValueTransactionID) + assert.Equal(t, fernTestValueTransactionID, obj.TransactionID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTenderID", func(t *testing.T) { + obj := &Refund{} + var fernTestValueTenderID *string + obj.SetTenderID(fernTestValueTenderID) + assert.Equal(t, fernTestValueTenderID, obj.TenderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &Refund{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReason", func(t *testing.T) { + obj := &Refund{} + var fernTestValueReason string + obj.SetReason(fernTestValueReason) + assert.Equal(t, fernTestValueReason, obj.Reason) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &Refund{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &Refund{} + var fernTestValueStatus RefundStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetProcessingFeeMoney", func(t *testing.T) { + obj := &Refund{} + var fernTestValueProcessingFeeMoney *Money + obj.SetProcessingFeeMoney(fernTestValueProcessingFeeMoney) + assert.Equal(t, fernTestValueProcessingFeeMoney, obj.ProcessingFeeMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAdditionalRecipients", func(t *testing.T) { + obj := &Refund{} + var fernTestValueAdditionalRecipients []*AdditionalRecipient + obj.SetAdditionalRecipients(fernTestValueAdditionalRecipients) + assert.Equal(t, fernTestValueAdditionalRecipients, obj.AdditionalRecipients) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRefund(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Refund{} + var expected string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Refund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Refund{} + var expected string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Refund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetTransactionID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Refund{} + var expected *string + obj.TransactionID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTransactionID(), "getter should return the property value") + }) + + t.Run("GetTransactionID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Refund{} + obj.TransactionID = nil + + // Act & Assert + assert.Nil(t, obj.GetTransactionID(), "getter should return nil when property is nil") + }) + + t.Run("GetTransactionID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Refund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTransactionID() // Should return zero value + }) + + t.Run("GetTenderID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Refund{} + var expected *string + obj.TenderID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTenderID(), "getter should return the property value") + }) + + t.Run("GetTenderID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Refund{} + obj.TenderID = nil + + // Act & Assert + assert.Nil(t, obj.GetTenderID(), "getter should return nil when property is nil") + }) + + t.Run("GetTenderID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Refund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTenderID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Refund{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Refund{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Refund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetReason", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Refund{} + var expected string + obj.Reason = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReason(), "getter should return the property value") + }) + + t.Run("GetReason_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Refund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReason() // Should return zero value + }) + + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Refund{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Refund{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Refund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Refund{} + var expected RefundStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Refund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetProcessingFeeMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Refund{} + var expected *Money + obj.ProcessingFeeMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetProcessingFeeMoney(), "getter should return the property value") + }) + + t.Run("GetProcessingFeeMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Refund{} + obj.ProcessingFeeMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetProcessingFeeMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetProcessingFeeMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Refund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetProcessingFeeMoney() // Should return zero value + }) + + t.Run("GetAdditionalRecipients", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Refund{} + var expected []*AdditionalRecipient + obj.AdditionalRecipients = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAdditionalRecipients(), "getter should return the property value") + }) + + t.Run("GetAdditionalRecipients_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Refund{} + obj.AdditionalRecipients = nil + + // Act & Assert + assert.Nil(t, obj.GetAdditionalRecipients(), "getter should return nil when property is nil") + }) + + t.Run("GetAdditionalRecipients_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Refund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAdditionalRecipients() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRefund(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Refund{} + var fernTestValueID string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Refund{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTransactionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Refund{} + var fernTestValueTransactionID *string + + // Act + obj.SetTransactionID(fernTestValueTransactionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTenderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Refund{} + var fernTestValueTenderID *string + + // Act + obj.SetTenderID(fernTestValueTenderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Refund{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReason_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Refund{} + var fernTestValueReason string + + // Act + obj.SetReason(fernTestValueReason) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Refund{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Refund{} + var fernTestValueStatus RefundStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetProcessingFeeMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Refund{} + var fernTestValueProcessingFeeMoney *Money + + // Act + obj.SetProcessingFeeMoney(fernTestValueProcessingFeeMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAdditionalRecipients_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Refund{} + var fernTestValueAdditionalRecipients []*AdditionalRecipient + + // Act + obj.SetAdditionalRecipients(fernTestValueAdditionalRecipients) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRefundCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &RefundCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &RefundCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &RefundCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &RefundCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &RefundCreatedEvent{} + var fernTestValueData *RefundCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRefundCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEvent{} + var expected *RefundCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRefundCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEvent{} + var fernTestValueData *RefundCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRefundCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &RefundCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &RefundCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &RefundCreatedEventData{} + var fernTestValueObject *RefundCreatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRefundCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEventData{} + var expected *RefundCreatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRefundCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEventData{} + var fernTestValueObject *RefundCreatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRefundCreatedEventObject(t *testing.T) { + t.Run("SetRefund", func(t *testing.T) { + obj := &RefundCreatedEventObject{} + var fernTestValueRefund *PaymentRefund + obj.SetRefund(fernTestValueRefund) + assert.Equal(t, fernTestValueRefund, obj.Refund) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRefundCreatedEventObject(t *testing.T) { + t.Run("GetRefund", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEventObject{} + var expected *PaymentRefund + obj.Refund = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRefund(), "getter should return the property value") + }) + + t.Run("GetRefund_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEventObject{} + obj.Refund = nil + + // Act & Assert + assert.Nil(t, obj.GetRefund(), "getter should return nil when property is nil") + }) + + t.Run("GetRefund_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundCreatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRefund() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRefundCreatedEventObject(t *testing.T) { + t.Run("SetRefund_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEventObject{} + var fernTestValueRefund *PaymentRefund + + // Act + obj.SetRefund(fernTestValueRefund) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRefundUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &RefundUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &RefundUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &RefundUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &RefundUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &RefundUpdatedEvent{} + var fernTestValueData *RefundUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRefundUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEvent{} + var expected *RefundUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRefundUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEvent{} + var fernTestValueData *RefundUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRefundUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &RefundUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &RefundUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &RefundUpdatedEventData{} + var fernTestValueObject *RefundUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRefundUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEventData{} + var expected *RefundUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRefundUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEventData{} + var fernTestValueObject *RefundUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRefundUpdatedEventObject(t *testing.T) { + t.Run("SetRefund", func(t *testing.T) { + obj := &RefundUpdatedEventObject{} + var fernTestValueRefund *PaymentRefund + obj.SetRefund(fernTestValueRefund) + assert.Equal(t, fernTestValueRefund, obj.Refund) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRefundUpdatedEventObject(t *testing.T) { + t.Run("GetRefund", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEventObject{} + var expected *PaymentRefund + obj.Refund = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRefund(), "getter should return the property value") + }) + + t.Run("GetRefund_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEventObject{} + obj.Refund = nil + + // Act & Assert + assert.Nil(t, obj.GetRefund(), "getter should return nil when property is nil") + }) + + t.Run("GetRefund_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRefund() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRefundUpdatedEventObject(t *testing.T) { + t.Run("SetRefund_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEventObject{} + var fernTestValueRefund *PaymentRefund + + // Act + obj.SetRefund(fernTestValueRefund) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRemoveGroupFromCustomerResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &RemoveGroupFromCustomerResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRemoveGroupFromCustomerResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RemoveGroupFromCustomerResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RemoveGroupFromCustomerResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RemoveGroupFromCustomerResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRemoveGroupFromCustomerResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RemoveGroupFromCustomerResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRetrieveBookingCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition", func(t *testing.T) { + obj := &RetrieveBookingCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + assert.Equal(t, fernTestValueCustomAttributeDefinition, obj.CustomAttributeDefinition) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &RetrieveBookingCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRetrieveBookingCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetCustomAttributeDefinition", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveBookingCustomAttributeDefinitionResponse{} + var expected *CustomAttributeDefinition + obj.CustomAttributeDefinition = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeDefinition(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeDefinition_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveBookingCustomAttributeDefinitionResponse{} + obj.CustomAttributeDefinition = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeDefinition(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeDefinition_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveBookingCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeDefinition() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveBookingCustomAttributeDefinitionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveBookingCustomAttributeDefinitionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveBookingCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRetrieveBookingCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveBookingCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + + // Act + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveBookingCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRetrieveBookingCustomAttributeResponse(t *testing.T) { + t.Run("SetCustomAttribute", func(t *testing.T) { + obj := &RetrieveBookingCustomAttributeResponse{} + var fernTestValueCustomAttribute *CustomAttribute + obj.SetCustomAttribute(fernTestValueCustomAttribute) + assert.Equal(t, fernTestValueCustomAttribute, obj.CustomAttribute) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &RetrieveBookingCustomAttributeResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRetrieveBookingCustomAttributeResponse(t *testing.T) { + t.Run("GetCustomAttribute", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveBookingCustomAttributeResponse{} + var expected *CustomAttribute + obj.CustomAttribute = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttribute(), "getter should return the property value") + }) + + t.Run("GetCustomAttribute_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveBookingCustomAttributeResponse{} + obj.CustomAttribute = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttribute(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttribute_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveBookingCustomAttributeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttribute() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveBookingCustomAttributeResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveBookingCustomAttributeResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveBookingCustomAttributeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRetrieveBookingCustomAttributeResponse(t *testing.T) { + t.Run("SetCustomAttribute_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveBookingCustomAttributeResponse{} + var fernTestValueCustomAttribute *CustomAttribute + + // Act + obj.SetCustomAttribute(fernTestValueCustomAttribute) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveBookingCustomAttributeResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRetrieveLocationCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition", func(t *testing.T) { + obj := &RetrieveLocationCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + assert.Equal(t, fernTestValueCustomAttributeDefinition, obj.CustomAttributeDefinition) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &RetrieveLocationCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRetrieveLocationCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetCustomAttributeDefinition", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationCustomAttributeDefinitionResponse{} + var expected *CustomAttributeDefinition + obj.CustomAttributeDefinition = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeDefinition(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeDefinition_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationCustomAttributeDefinitionResponse{} + obj.CustomAttributeDefinition = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeDefinition(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeDefinition_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveLocationCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeDefinition() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationCustomAttributeDefinitionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationCustomAttributeDefinitionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveLocationCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRetrieveLocationCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + + // Act + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRetrieveLocationCustomAttributeResponse(t *testing.T) { + t.Run("SetCustomAttribute", func(t *testing.T) { + obj := &RetrieveLocationCustomAttributeResponse{} + var fernTestValueCustomAttribute *CustomAttribute + obj.SetCustomAttribute(fernTestValueCustomAttribute) + assert.Equal(t, fernTestValueCustomAttribute, obj.CustomAttribute) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &RetrieveLocationCustomAttributeResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRetrieveLocationCustomAttributeResponse(t *testing.T) { + t.Run("GetCustomAttribute", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationCustomAttributeResponse{} + var expected *CustomAttribute + obj.CustomAttribute = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttribute(), "getter should return the property value") + }) + + t.Run("GetCustomAttribute_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationCustomAttributeResponse{} + obj.CustomAttribute = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttribute(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttribute_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveLocationCustomAttributeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttribute() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationCustomAttributeResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationCustomAttributeResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveLocationCustomAttributeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRetrieveLocationCustomAttributeResponse(t *testing.T) { + t.Run("SetCustomAttribute_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationCustomAttributeResponse{} + var fernTestValueCustomAttribute *CustomAttribute + + // Act + obj.SetCustomAttribute(fernTestValueCustomAttribute) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationCustomAttributeResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRetrieveMerchantCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition", func(t *testing.T) { + obj := &RetrieveMerchantCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + assert.Equal(t, fernTestValueCustomAttributeDefinition, obj.CustomAttributeDefinition) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &RetrieveMerchantCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRetrieveMerchantCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetCustomAttributeDefinition", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveMerchantCustomAttributeDefinitionResponse{} + var expected *CustomAttributeDefinition + obj.CustomAttributeDefinition = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeDefinition(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeDefinition_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveMerchantCustomAttributeDefinitionResponse{} + obj.CustomAttributeDefinition = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeDefinition(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeDefinition_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveMerchantCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeDefinition() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveMerchantCustomAttributeDefinitionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveMerchantCustomAttributeDefinitionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveMerchantCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRetrieveMerchantCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveMerchantCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + + // Act + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveMerchantCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRetrieveMerchantCustomAttributeResponse(t *testing.T) { + t.Run("SetCustomAttribute", func(t *testing.T) { + obj := &RetrieveMerchantCustomAttributeResponse{} + var fernTestValueCustomAttribute *CustomAttribute + obj.SetCustomAttribute(fernTestValueCustomAttribute) + assert.Equal(t, fernTestValueCustomAttribute, obj.CustomAttribute) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &RetrieveMerchantCustomAttributeResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRetrieveMerchantCustomAttributeResponse(t *testing.T) { + t.Run("GetCustomAttribute", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveMerchantCustomAttributeResponse{} + var expected *CustomAttribute + obj.CustomAttribute = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttribute(), "getter should return the property value") + }) + + t.Run("GetCustomAttribute_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveMerchantCustomAttributeResponse{} + obj.CustomAttribute = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttribute(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttribute_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveMerchantCustomAttributeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttribute() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveMerchantCustomAttributeResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveMerchantCustomAttributeResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveMerchantCustomAttributeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRetrieveMerchantCustomAttributeResponse(t *testing.T) { + t.Run("SetCustomAttribute_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveMerchantCustomAttributeResponse{} + var fernTestValueCustomAttribute *CustomAttribute + + // Act + obj.SetCustomAttribute(fernTestValueCustomAttribute) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveMerchantCustomAttributeResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRetrieveOrderCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition", func(t *testing.T) { + obj := &RetrieveOrderCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + assert.Equal(t, fernTestValueCustomAttributeDefinition, obj.CustomAttributeDefinition) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &RetrieveOrderCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRetrieveOrderCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetCustomAttributeDefinition", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveOrderCustomAttributeDefinitionResponse{} + var expected *CustomAttributeDefinition + obj.CustomAttributeDefinition = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeDefinition(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeDefinition_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveOrderCustomAttributeDefinitionResponse{} + obj.CustomAttributeDefinition = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeDefinition(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeDefinition_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveOrderCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeDefinition() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveOrderCustomAttributeDefinitionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveOrderCustomAttributeDefinitionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveOrderCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRetrieveOrderCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveOrderCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + + // Act + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveOrderCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersRetrieveOrderCustomAttributeResponse(t *testing.T) { + t.Run("SetCustomAttribute", func(t *testing.T) { + obj := &RetrieveOrderCustomAttributeResponse{} + var fernTestValueCustomAttribute *CustomAttribute + obj.SetCustomAttribute(fernTestValueCustomAttribute) + assert.Equal(t, fernTestValueCustomAttribute, obj.CustomAttribute) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &RetrieveOrderCustomAttributeResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersRetrieveOrderCustomAttributeResponse(t *testing.T) { + t.Run("GetCustomAttribute", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveOrderCustomAttributeResponse{} + var expected *CustomAttribute + obj.CustomAttribute = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttribute(), "getter should return the property value") + }) + + t.Run("GetCustomAttribute_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveOrderCustomAttributeResponse{} + obj.CustomAttribute = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttribute(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttribute_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveOrderCustomAttributeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttribute() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveOrderCustomAttributeResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveOrderCustomAttributeResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveOrderCustomAttributeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitRetrieveOrderCustomAttributeResponse(t *testing.T) { + t.Run("SetCustomAttribute_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveOrderCustomAttributeResponse{} + var fernTestValueCustomAttribute *CustomAttribute + + // Act + obj.SetCustomAttribute(fernTestValueCustomAttribute) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveOrderCustomAttributeResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSaveCardOptions(t *testing.T) { + t.Run("SetCustomerID", func(t *testing.T) { + obj := &SaveCardOptions{} + var fernTestValueCustomerID string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCardID", func(t *testing.T) { + obj := &SaveCardOptions{} + var fernTestValueCardID *string + obj.SetCardID(fernTestValueCardID) + assert.Equal(t, fernTestValueCardID, obj.CardID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReferenceID", func(t *testing.T) { + obj := &SaveCardOptions{} + var fernTestValueReferenceID *string + obj.SetReferenceID(fernTestValueReferenceID) + assert.Equal(t, fernTestValueReferenceID, obj.ReferenceID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSaveCardOptions(t *testing.T) { + t.Run("GetCustomerID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SaveCardOptions{} + var expected string + obj.CustomerID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomerID(), "getter should return the property value") + }) + + t.Run("GetCustomerID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SaveCardOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomerID() // Should return zero value + }) + + t.Run("GetCardID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SaveCardOptions{} + var expected *string + obj.CardID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCardID(), "getter should return the property value") + }) + + t.Run("GetCardID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SaveCardOptions{} + obj.CardID = nil + + // Act & Assert + assert.Nil(t, obj.GetCardID(), "getter should return nil when property is nil") + }) + + t.Run("GetCardID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SaveCardOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCardID() // Should return zero value + }) + + t.Run("GetReferenceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SaveCardOptions{} + var expected *string + obj.ReferenceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReferenceID(), "getter should return the property value") + }) + + t.Run("GetReferenceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SaveCardOptions{} + obj.ReferenceID = nil + + // Act & Assert + assert.Nil(t, obj.GetReferenceID(), "getter should return nil when property is nil") + }) + + t.Run("GetReferenceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SaveCardOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReferenceID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSaveCardOptions(t *testing.T) { + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SaveCardOptions{} + var fernTestValueCustomerID string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCardID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SaveCardOptions{} + var fernTestValueCardID *string + + // Act + obj.SetCardID(fernTestValueCardID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReferenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SaveCardOptions{} + var fernTestValueReferenceID *string + + // Act + obj.SetReferenceID(fernTestValueReferenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchLoyaltyAccountsRequestLoyaltyAccountQuery(t *testing.T) { + t.Run("SetMappings", func(t *testing.T) { + obj := &SearchLoyaltyAccountsRequestLoyaltyAccountQuery{} + var fernTestValueMappings []*LoyaltyAccountMapping + obj.SetMappings(fernTestValueMappings) + assert.Equal(t, fernTestValueMappings, obj.Mappings) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerIDs", func(t *testing.T) { + obj := &SearchLoyaltyAccountsRequestLoyaltyAccountQuery{} + var fernTestValueCustomerIDs []string + obj.SetCustomerIDs(fernTestValueCustomerIDs) + assert.Equal(t, fernTestValueCustomerIDs, obj.CustomerIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchLoyaltyAccountsRequestLoyaltyAccountQuery(t *testing.T) { + t.Run("GetMappings", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyAccountsRequestLoyaltyAccountQuery{} + var expected []*LoyaltyAccountMapping + obj.Mappings = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMappings(), "getter should return the property value") + }) + + t.Run("GetMappings_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyAccountsRequestLoyaltyAccountQuery{} + obj.Mappings = nil + + // Act & Assert + assert.Nil(t, obj.GetMappings(), "getter should return nil when property is nil") + }) + + t.Run("GetMappings_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchLoyaltyAccountsRequestLoyaltyAccountQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMappings() // Should return zero value + }) + + t.Run("GetCustomerIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyAccountsRequestLoyaltyAccountQuery{} + var expected []string + obj.CustomerIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomerIDs(), "getter should return the property value") + }) + + t.Run("GetCustomerIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyAccountsRequestLoyaltyAccountQuery{} + obj.CustomerIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomerIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomerIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchLoyaltyAccountsRequestLoyaltyAccountQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomerIDs() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchLoyaltyAccountsRequestLoyaltyAccountQuery(t *testing.T) { + t.Run("SetMappings_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyAccountsRequestLoyaltyAccountQuery{} + var fernTestValueMappings []*LoyaltyAccountMapping + + // Act + obj.SetMappings(fernTestValueMappings) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyAccountsRequestLoyaltyAccountQuery{} + var fernTestValueCustomerIDs []string + + // Act + obj.SetCustomerIDs(fernTestValueCustomerIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchLoyaltyAccountsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &SearchLoyaltyAccountsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLoyaltyAccounts", func(t *testing.T) { + obj := &SearchLoyaltyAccountsResponse{} + var fernTestValueLoyaltyAccounts []*LoyaltyAccount + obj.SetLoyaltyAccounts(fernTestValueLoyaltyAccounts) + assert.Equal(t, fernTestValueLoyaltyAccounts, obj.LoyaltyAccounts) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchLoyaltyAccountsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchLoyaltyAccountsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyAccountsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyAccountsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchLoyaltyAccountsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetLoyaltyAccounts", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyAccountsResponse{} + var expected []*LoyaltyAccount + obj.LoyaltyAccounts = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyAccounts(), "getter should return the property value") + }) + + t.Run("GetLoyaltyAccounts_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyAccountsResponse{} + obj.LoyaltyAccounts = nil + + // Act & Assert + assert.Nil(t, obj.GetLoyaltyAccounts(), "getter should return nil when property is nil") + }) + + t.Run("GetLoyaltyAccounts_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchLoyaltyAccountsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyAccounts() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyAccountsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyAccountsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchLoyaltyAccountsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchLoyaltyAccountsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyAccountsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLoyaltyAccounts_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyAccountsResponse{} + var fernTestValueLoyaltyAccounts []*LoyaltyAccount + + // Act + obj.SetLoyaltyAccounts(fernTestValueLoyaltyAccounts) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyAccountsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchLoyaltyRewardsRequestLoyaltyRewardQuery(t *testing.T) { + t.Run("SetLoyaltyAccountID", func(t *testing.T) { + obj := &SearchLoyaltyRewardsRequestLoyaltyRewardQuery{} + var fernTestValueLoyaltyAccountID string + obj.SetLoyaltyAccountID(fernTestValueLoyaltyAccountID) + assert.Equal(t, fernTestValueLoyaltyAccountID, obj.LoyaltyAccountID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &SearchLoyaltyRewardsRequestLoyaltyRewardQuery{} + var fernTestValueStatus *LoyaltyRewardStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchLoyaltyRewardsRequestLoyaltyRewardQuery(t *testing.T) { + t.Run("GetLoyaltyAccountID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyRewardsRequestLoyaltyRewardQuery{} + var expected string + obj.LoyaltyAccountID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLoyaltyAccountID(), "getter should return the property value") + }) + + t.Run("GetLoyaltyAccountID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchLoyaltyRewardsRequestLoyaltyRewardQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLoyaltyAccountID() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyRewardsRequestLoyaltyRewardQuery{} + var expected *LoyaltyRewardStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyRewardsRequestLoyaltyRewardQuery{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchLoyaltyRewardsRequestLoyaltyRewardQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchLoyaltyRewardsRequestLoyaltyRewardQuery(t *testing.T) { + t.Run("SetLoyaltyAccountID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyRewardsRequestLoyaltyRewardQuery{} + var fernTestValueLoyaltyAccountID string + + // Act + obj.SetLoyaltyAccountID(fernTestValueLoyaltyAccountID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyRewardsRequestLoyaltyRewardQuery{} + var fernTestValueStatus *LoyaltyRewardStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchLoyaltyRewardsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &SearchLoyaltyRewardsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRewards", func(t *testing.T) { + obj := &SearchLoyaltyRewardsResponse{} + var fernTestValueRewards []*LoyaltyReward + obj.SetRewards(fernTestValueRewards) + assert.Equal(t, fernTestValueRewards, obj.Rewards) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchLoyaltyRewardsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchLoyaltyRewardsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyRewardsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyRewardsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchLoyaltyRewardsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetRewards", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyRewardsResponse{} + var expected []*LoyaltyReward + obj.Rewards = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRewards(), "getter should return the property value") + }) + + t.Run("GetRewards_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyRewardsResponse{} + obj.Rewards = nil + + // Act & Assert + assert.Nil(t, obj.GetRewards(), "getter should return nil when property is nil") + }) + + t.Run("GetRewards_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchLoyaltyRewardsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRewards() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyRewardsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyRewardsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchLoyaltyRewardsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchLoyaltyRewardsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyRewardsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRewards_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyRewardsResponse{} + var fernTestValueRewards []*LoyaltyReward + + // Act + obj.SetRewards(fernTestValueRewards) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyRewardsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchShiftsResponse(t *testing.T) { + t.Run("SetShifts", func(t *testing.T) { + obj := &SearchShiftsResponse{} + var fernTestValueShifts []*Shift + obj.SetShifts(fernTestValueShifts) + assert.Equal(t, fernTestValueShifts, obj.Shifts) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchShiftsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &SearchShiftsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchShiftsResponse(t *testing.T) { + t.Run("GetShifts", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchShiftsResponse{} + var expected []*Shift + obj.Shifts = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetShifts(), "getter should return the property value") + }) + + t.Run("GetShifts_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchShiftsResponse{} + obj.Shifts = nil + + // Act & Assert + assert.Nil(t, obj.GetShifts(), "getter should return nil when property is nil") + }) + + t.Run("GetShifts_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchShiftsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetShifts() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchShiftsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchShiftsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchShiftsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchShiftsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchShiftsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchShiftsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchShiftsResponse(t *testing.T) { + t.Run("SetShifts_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchShiftsResponse{} + var fernTestValueShifts []*Shift + + // Act + obj.SetShifts(fernTestValueShifts) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchShiftsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchShiftsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchTerminalActionsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &SearchTerminalActionsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAction", func(t *testing.T) { + obj := &SearchTerminalActionsResponse{} + var fernTestValueAction []*TerminalAction + obj.SetAction(fernTestValueAction) + assert.Equal(t, fernTestValueAction, obj.Action) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchTerminalActionsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchTerminalActionsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalActionsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalActionsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTerminalActionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetAction", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalActionsResponse{} + var expected []*TerminalAction + obj.Action = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAction(), "getter should return the property value") + }) + + t.Run("GetAction_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalActionsResponse{} + obj.Action = nil + + // Act & Assert + assert.Nil(t, obj.GetAction(), "getter should return nil when property is nil") + }) + + t.Run("GetAction_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTerminalActionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAction() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalActionsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalActionsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTerminalActionsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchTerminalActionsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalActionsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAction_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalActionsResponse{} + var fernTestValueAction []*TerminalAction + + // Act + obj.SetAction(fernTestValueAction) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalActionsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchTerminalCheckoutsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &SearchTerminalCheckoutsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCheckouts", func(t *testing.T) { + obj := &SearchTerminalCheckoutsResponse{} + var fernTestValueCheckouts []*TerminalCheckout + obj.SetCheckouts(fernTestValueCheckouts) + assert.Equal(t, fernTestValueCheckouts, obj.Checkouts) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchTerminalCheckoutsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchTerminalCheckoutsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalCheckoutsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalCheckoutsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTerminalCheckoutsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetCheckouts", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalCheckoutsResponse{} + var expected []*TerminalCheckout + obj.Checkouts = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCheckouts(), "getter should return the property value") + }) + + t.Run("GetCheckouts_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalCheckoutsResponse{} + obj.Checkouts = nil + + // Act & Assert + assert.Nil(t, obj.GetCheckouts(), "getter should return nil when property is nil") + }) + + t.Run("GetCheckouts_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTerminalCheckoutsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCheckouts() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalCheckoutsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalCheckoutsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTerminalCheckoutsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchTerminalCheckoutsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalCheckoutsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCheckouts_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalCheckoutsResponse{} + var fernTestValueCheckouts []*TerminalCheckout + + // Act + obj.SetCheckouts(fernTestValueCheckouts) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalCheckoutsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchTerminalRefundsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &SearchTerminalRefundsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRefunds", func(t *testing.T) { + obj := &SearchTerminalRefundsResponse{} + var fernTestValueRefunds []*TerminalRefund + obj.SetRefunds(fernTestValueRefunds) + assert.Equal(t, fernTestValueRefunds, obj.Refunds) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchTerminalRefundsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchTerminalRefundsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalRefundsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalRefundsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTerminalRefundsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetRefunds", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalRefundsResponse{} + var expected []*TerminalRefund + obj.Refunds = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRefunds(), "getter should return the property value") + }) + + t.Run("GetRefunds_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalRefundsResponse{} + obj.Refunds = nil + + // Act & Assert + assert.Nil(t, obj.GetRefunds(), "getter should return nil when property is nil") + }) + + t.Run("GetRefunds_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTerminalRefundsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRefunds() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalRefundsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalRefundsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTerminalRefundsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchTerminalRefundsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalRefundsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRefunds_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalRefundsResponse{} + var fernTestValueRefunds []*TerminalRefund + + // Act + obj.SetRefunds(fernTestValueRefunds) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalRefundsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSelectOption(t *testing.T) { + t.Run("SetReferenceID", func(t *testing.T) { + obj := &SelectOption{} + var fernTestValueReferenceID string + obj.SetReferenceID(fernTestValueReferenceID) + assert.Equal(t, fernTestValueReferenceID, obj.ReferenceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTitle", func(t *testing.T) { + obj := &SelectOption{} + var fernTestValueTitle string + obj.SetTitle(fernTestValueTitle) + assert.Equal(t, fernTestValueTitle, obj.Title) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSelectOption(t *testing.T) { + t.Run("GetReferenceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SelectOption{} + var expected string + obj.ReferenceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReferenceID(), "getter should return the property value") + }) + + t.Run("GetReferenceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SelectOption + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReferenceID() // Should return zero value + }) + + t.Run("GetTitle", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SelectOption{} + var expected string + obj.Title = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTitle(), "getter should return the property value") + }) + + t.Run("GetTitle_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SelectOption + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTitle() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSelectOption(t *testing.T) { + t.Run("SetReferenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SelectOption{} + var fernTestValueReferenceID string + + // Act + obj.SetReferenceID(fernTestValueReferenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTitle_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SelectOption{} + var fernTestValueTitle string + + // Act + obj.SetTitle(fernTestValueTitle) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSelectOptions(t *testing.T) { + t.Run("SetTitle", func(t *testing.T) { + obj := &SelectOptions{} + var fernTestValueTitle string + obj.SetTitle(fernTestValueTitle) + assert.Equal(t, fernTestValueTitle, obj.Title) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBody", func(t *testing.T) { + obj := &SelectOptions{} + var fernTestValueBody string + obj.SetBody(fernTestValueBody) + assert.Equal(t, fernTestValueBody, obj.Body) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOptions", func(t *testing.T) { + obj := &SelectOptions{} + var fernTestValueOptions []*SelectOption + obj.SetOptions(fernTestValueOptions) + assert.Equal(t, fernTestValueOptions, obj.Options) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSelectedOption", func(t *testing.T) { + obj := &SelectOptions{} + var fernTestValueSelectedOption *SelectOption + obj.SetSelectedOption(fernTestValueSelectedOption) + assert.Equal(t, fernTestValueSelectedOption, obj.SelectedOption) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSelectOptions(t *testing.T) { + t.Run("GetTitle", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SelectOptions{} + var expected string + obj.Title = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTitle(), "getter should return the property value") + }) + + t.Run("GetTitle_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SelectOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTitle() // Should return zero value + }) + + t.Run("GetBody", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SelectOptions{} + var expected string + obj.Body = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBody(), "getter should return the property value") + }) + + t.Run("GetBody_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SelectOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBody() // Should return zero value + }) + + t.Run("GetOptions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SelectOptions{} + var expected []*SelectOption + obj.Options = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOptions(), "getter should return the property value") + }) + + t.Run("GetOptions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SelectOptions{} + obj.Options = nil + + // Act & Assert + assert.Nil(t, obj.GetOptions(), "getter should return nil when property is nil") + }) + + t.Run("GetOptions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SelectOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOptions() // Should return zero value + }) + + t.Run("GetSelectedOption", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SelectOptions{} + var expected *SelectOption + obj.SelectedOption = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSelectedOption(), "getter should return the property value") + }) + + t.Run("GetSelectedOption_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SelectOptions{} + obj.SelectedOption = nil + + // Act & Assert + assert.Nil(t, obj.GetSelectedOption(), "getter should return nil when property is nil") + }) + + t.Run("GetSelectedOption_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SelectOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSelectedOption() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSelectOptions(t *testing.T) { + t.Run("SetTitle_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SelectOptions{} + var fernTestValueTitle string + + // Act + obj.SetTitle(fernTestValueTitle) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBody_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SelectOptions{} + var fernTestValueBody string + + // Act + obj.SetBody(fernTestValueBody) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOptions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SelectOptions{} + var fernTestValueOptions []*SelectOption + + // Act + obj.SetOptions(fernTestValueOptions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSelectedOption_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SelectOptions{} + var fernTestValueSelectedOption *SelectOption + + // Act + obj.SetSelectedOption(fernTestValueSelectedOption) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersShift(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &Shift{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEmployeeID", func(t *testing.T) { + obj := &Shift{} + var fernTestValueEmployeeID *string + obj.SetEmployeeID(fernTestValueEmployeeID) + assert.Equal(t, fernTestValueEmployeeID, obj.EmployeeID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &Shift{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTimezone", func(t *testing.T) { + obj := &Shift{} + var fernTestValueTimezone *string + obj.SetTimezone(fernTestValueTimezone) + assert.Equal(t, fernTestValueTimezone, obj.Timezone) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStartAt", func(t *testing.T) { + obj := &Shift{} + var fernTestValueStartAt string + obj.SetStartAt(fernTestValueStartAt) + assert.Equal(t, fernTestValueStartAt, obj.StartAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEndAt", func(t *testing.T) { + obj := &Shift{} + var fernTestValueEndAt *string + obj.SetEndAt(fernTestValueEndAt) + assert.Equal(t, fernTestValueEndAt, obj.EndAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetWage", func(t *testing.T) { + obj := &Shift{} + var fernTestValueWage *ShiftWage + obj.SetWage(fernTestValueWage) + assert.Equal(t, fernTestValueWage, obj.Wage) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBreaks", func(t *testing.T) { + obj := &Shift{} + var fernTestValueBreaks []*Break + obj.SetBreaks(fernTestValueBreaks) + assert.Equal(t, fernTestValueBreaks, obj.Breaks) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &Shift{} + var fernTestValueStatus *ShiftStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &Shift{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &Shift{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &Shift{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTeamMemberID", func(t *testing.T) { + obj := &Shift{} + var fernTestValueTeamMemberID *string + obj.SetTeamMemberID(fernTestValueTeamMemberID) + assert.Equal(t, fernTestValueTeamMemberID, obj.TeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeclaredCashTipMoney", func(t *testing.T) { + obj := &Shift{} + var fernTestValueDeclaredCashTipMoney *Money + obj.SetDeclaredCashTipMoney(fernTestValueDeclaredCashTipMoney) + assert.Equal(t, fernTestValueDeclaredCashTipMoney, obj.DeclaredCashTipMoney) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersShift(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Shift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetEmployeeID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + var expected *string + obj.EmployeeID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEmployeeID(), "getter should return the property value") + }) + + t.Run("GetEmployeeID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + obj.EmployeeID = nil + + // Act & Assert + assert.Nil(t, obj.GetEmployeeID(), "getter should return nil when property is nil") + }) + + t.Run("GetEmployeeID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Shift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEmployeeID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + var expected string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Shift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetTimezone", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + var expected *string + obj.Timezone = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTimezone(), "getter should return the property value") + }) + + t.Run("GetTimezone_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + obj.Timezone = nil + + // Act & Assert + assert.Nil(t, obj.GetTimezone(), "getter should return nil when property is nil") + }) + + t.Run("GetTimezone_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Shift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTimezone() // Should return zero value + }) + + t.Run("GetStartAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + var expected string + obj.StartAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStartAt(), "getter should return the property value") + }) + + t.Run("GetStartAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Shift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStartAt() // Should return zero value + }) + + t.Run("GetEndAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + var expected *string + obj.EndAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEndAt(), "getter should return the property value") + }) + + t.Run("GetEndAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + obj.EndAt = nil + + // Act & Assert + assert.Nil(t, obj.GetEndAt(), "getter should return nil when property is nil") + }) + + t.Run("GetEndAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Shift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEndAt() // Should return zero value + }) + + t.Run("GetWage", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + var expected *ShiftWage + obj.Wage = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetWage(), "getter should return the property value") + }) + + t.Run("GetWage_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + obj.Wage = nil + + // Act & Assert + assert.Nil(t, obj.GetWage(), "getter should return nil when property is nil") + }) + + t.Run("GetWage_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Shift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetWage() // Should return zero value + }) + + t.Run("GetBreaks", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + var expected []*Break + obj.Breaks = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBreaks(), "getter should return the property value") + }) + + t.Run("GetBreaks_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + obj.Breaks = nil + + // Act & Assert + assert.Nil(t, obj.GetBreaks(), "getter should return nil when property is nil") + }) + + t.Run("GetBreaks_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Shift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBreaks() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + var expected *ShiftStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Shift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + var expected *int + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Shift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Shift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Shift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetTeamMemberID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + var expected *string + obj.TeamMemberID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMemberID(), "getter should return the property value") + }) + + t.Run("GetTeamMemberID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + obj.TeamMemberID = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMemberID(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMemberID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Shift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMemberID() // Should return zero value + }) + + t.Run("GetDeclaredCashTipMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + var expected *Money + obj.DeclaredCashTipMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeclaredCashTipMoney(), "getter should return the property value") + }) + + t.Run("GetDeclaredCashTipMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + obj.DeclaredCashTipMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetDeclaredCashTipMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetDeclaredCashTipMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Shift + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeclaredCashTipMoney() // Should return zero value + }) + +} + +func TestSettersMarkExplicitShift(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEmployeeID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + var fernTestValueEmployeeID *string + + // Act + obj.SetEmployeeID(fernTestValueEmployeeID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTimezone_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + var fernTestValueTimezone *string + + // Act + obj.SetTimezone(fernTestValueTimezone) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStartAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + var fernTestValueStartAt string + + // Act + obj.SetStartAt(fernTestValueStartAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEndAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + var fernTestValueEndAt *string + + // Act + obj.SetEndAt(fernTestValueEndAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetWage_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + var fernTestValueWage *ShiftWage + + // Act + obj.SetWage(fernTestValueWage) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBreaks_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + var fernTestValueBreaks []*Break + + // Act + obj.SetBreaks(fernTestValueBreaks) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + var fernTestValueStatus *ShiftStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + var fernTestValueTeamMemberID *string + + // Act + obj.SetTeamMemberID(fernTestValueTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeclaredCashTipMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + var fernTestValueDeclaredCashTipMoney *Money + + // Act + obj.SetDeclaredCashTipMoney(fernTestValueDeclaredCashTipMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersShiftFilter(t *testing.T) { + t.Run("SetLocationIDs", func(t *testing.T) { + obj := &ShiftFilter{} + var fernTestValueLocationIDs []string + obj.SetLocationIDs(fernTestValueLocationIDs) + assert.Equal(t, fernTestValueLocationIDs, obj.LocationIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEmployeeIDs", func(t *testing.T) { + obj := &ShiftFilter{} + var fernTestValueEmployeeIDs []string + obj.SetEmployeeIDs(fernTestValueEmployeeIDs) + assert.Equal(t, fernTestValueEmployeeIDs, obj.EmployeeIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &ShiftFilter{} + var fernTestValueStatus *ShiftFilterStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStart", func(t *testing.T) { + obj := &ShiftFilter{} + var fernTestValueStart *TimeRange + obj.SetStart(fernTestValueStart) + assert.Equal(t, fernTestValueStart, obj.Start) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEnd", func(t *testing.T) { + obj := &ShiftFilter{} + var fernTestValueEnd *TimeRange + obj.SetEnd(fernTestValueEnd) + assert.Equal(t, fernTestValueEnd, obj.End) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetWorkday", func(t *testing.T) { + obj := &ShiftFilter{} + var fernTestValueWorkday *ShiftWorkday + obj.SetWorkday(fernTestValueWorkday) + assert.Equal(t, fernTestValueWorkday, obj.Workday) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTeamMemberIDs", func(t *testing.T) { + obj := &ShiftFilter{} + var fernTestValueTeamMemberIDs []string + obj.SetTeamMemberIDs(fernTestValueTeamMemberIDs) + assert.Equal(t, fernTestValueTeamMemberIDs, obj.TeamMemberIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersShiftFilter(t *testing.T) { + t.Run("GetLocationIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftFilter{} + var expected []string + obj.LocationIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationIDs(), "getter should return the property value") + }) + + t.Run("GetLocationIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftFilter{} + obj.LocationIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShiftFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationIDs() // Should return zero value + }) + + t.Run("GetEmployeeIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftFilter{} + var expected []string + obj.EmployeeIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEmployeeIDs(), "getter should return the property value") + }) + + t.Run("GetEmployeeIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftFilter{} + obj.EmployeeIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetEmployeeIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetEmployeeIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShiftFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEmployeeIDs() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftFilter{} + var expected *ShiftFilterStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftFilter{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShiftFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetStart", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftFilter{} + var expected *TimeRange + obj.Start = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStart(), "getter should return the property value") + }) + + t.Run("GetStart_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftFilter{} + obj.Start = nil + + // Act & Assert + assert.Nil(t, obj.GetStart(), "getter should return nil when property is nil") + }) + + t.Run("GetStart_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShiftFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStart() // Should return zero value + }) + + t.Run("GetEnd", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftFilter{} + var expected *TimeRange + obj.End = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEnd(), "getter should return the property value") + }) + + t.Run("GetEnd_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftFilter{} + obj.End = nil + + // Act & Assert + assert.Nil(t, obj.GetEnd(), "getter should return nil when property is nil") + }) + + t.Run("GetEnd_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShiftFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEnd() // Should return zero value + }) + + t.Run("GetWorkday", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftFilter{} + var expected *ShiftWorkday + obj.Workday = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetWorkday(), "getter should return the property value") + }) + + t.Run("GetWorkday_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftFilter{} + obj.Workday = nil + + // Act & Assert + assert.Nil(t, obj.GetWorkday(), "getter should return nil when property is nil") + }) + + t.Run("GetWorkday_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShiftFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetWorkday() // Should return zero value + }) + + t.Run("GetTeamMemberIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftFilter{} + var expected []string + obj.TeamMemberIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMemberIDs(), "getter should return the property value") + }) + + t.Run("GetTeamMemberIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftFilter{} + obj.TeamMemberIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMemberIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMemberIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShiftFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMemberIDs() // Should return zero value + }) + +} + +func TestSettersMarkExplicitShiftFilter(t *testing.T) { + t.Run("SetLocationIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftFilter{} + var fernTestValueLocationIDs []string + + // Act + obj.SetLocationIDs(fernTestValueLocationIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEmployeeIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftFilter{} + var fernTestValueEmployeeIDs []string + + // Act + obj.SetEmployeeIDs(fernTestValueEmployeeIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftFilter{} + var fernTestValueStatus *ShiftFilterStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStart_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftFilter{} + var fernTestValueStart *TimeRange + + // Act + obj.SetStart(fernTestValueStart) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEnd_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftFilter{} + var fernTestValueEnd *TimeRange + + // Act + obj.SetEnd(fernTestValueEnd) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetWorkday_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftFilter{} + var fernTestValueWorkday *ShiftWorkday + + // Act + obj.SetWorkday(fernTestValueWorkday) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTeamMemberIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftFilter{} + var fernTestValueTeamMemberIDs []string + + // Act + obj.SetTeamMemberIDs(fernTestValueTeamMemberIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersShiftQuery(t *testing.T) { + t.Run("SetFilter", func(t *testing.T) { + obj := &ShiftQuery{} + var fernTestValueFilter *ShiftFilter + obj.SetFilter(fernTestValueFilter) + assert.Equal(t, fernTestValueFilter, obj.Filter) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSort", func(t *testing.T) { + obj := &ShiftQuery{} + var fernTestValueSort *ShiftSort + obj.SetSort(fernTestValueSort) + assert.Equal(t, fernTestValueSort, obj.Sort) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersShiftQuery(t *testing.T) { + t.Run("GetFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftQuery{} + var expected *ShiftFilter + obj.Filter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFilter(), "getter should return the property value") + }) + + t.Run("GetFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftQuery{} + obj.Filter = nil + + // Act & Assert + assert.Nil(t, obj.GetFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShiftQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFilter() // Should return zero value + }) + + t.Run("GetSort", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftQuery{} + var expected *ShiftSort + obj.Sort = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSort(), "getter should return the property value") + }) + + t.Run("GetSort_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftQuery{} + obj.Sort = nil + + // Act & Assert + assert.Nil(t, obj.GetSort(), "getter should return nil when property is nil") + }) + + t.Run("GetSort_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShiftQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSort() // Should return zero value + }) + +} + +func TestSettersMarkExplicitShiftQuery(t *testing.T) { + t.Run("SetFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftQuery{} + var fernTestValueFilter *ShiftFilter + + // Act + obj.SetFilter(fernTestValueFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSort_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftQuery{} + var fernTestValueSort *ShiftSort + + // Act + obj.SetSort(fernTestValueSort) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersShiftSort(t *testing.T) { + t.Run("SetField", func(t *testing.T) { + obj := &ShiftSort{} + var fernTestValueField *ShiftSortField + obj.SetField(fernTestValueField) + assert.Equal(t, fernTestValueField, obj.Field) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrder", func(t *testing.T) { + obj := &ShiftSort{} + var fernTestValueOrder *SortOrder + obj.SetOrder(fernTestValueOrder) + assert.Equal(t, fernTestValueOrder, obj.Order) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersShiftSort(t *testing.T) { + t.Run("GetField", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftSort{} + var expected *ShiftSortField + obj.Field = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetField(), "getter should return the property value") + }) + + t.Run("GetField_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftSort{} + obj.Field = nil + + // Act & Assert + assert.Nil(t, obj.GetField(), "getter should return nil when property is nil") + }) + + t.Run("GetField_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShiftSort + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetField() // Should return zero value + }) + + t.Run("GetOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftSort{} + var expected *SortOrder + obj.Order = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrder(), "getter should return the property value") + }) + + t.Run("GetOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftSort{} + obj.Order = nil + + // Act & Assert + assert.Nil(t, obj.GetOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShiftSort + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrder() // Should return zero value + }) + +} + +func TestSettersMarkExplicitShiftSort(t *testing.T) { + t.Run("SetField_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftSort{} + var fernTestValueField *ShiftSortField + + // Act + obj.SetField(fernTestValueField) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftSort{} + var fernTestValueOrder *SortOrder + + // Act + obj.SetOrder(fernTestValueOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersShiftWage(t *testing.T) { + t.Run("SetTitle", func(t *testing.T) { + obj := &ShiftWage{} + var fernTestValueTitle *string + obj.SetTitle(fernTestValueTitle) + assert.Equal(t, fernTestValueTitle, obj.Title) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetHourlyRate", func(t *testing.T) { + obj := &ShiftWage{} + var fernTestValueHourlyRate *Money + obj.SetHourlyRate(fernTestValueHourlyRate) + assert.Equal(t, fernTestValueHourlyRate, obj.HourlyRate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetJobID", func(t *testing.T) { + obj := &ShiftWage{} + var fernTestValueJobID *string + obj.SetJobID(fernTestValueJobID) + assert.Equal(t, fernTestValueJobID, obj.JobID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTipEligible", func(t *testing.T) { + obj := &ShiftWage{} + var fernTestValueTipEligible *bool + obj.SetTipEligible(fernTestValueTipEligible) + assert.Equal(t, fernTestValueTipEligible, obj.TipEligible) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersShiftWage(t *testing.T) { + t.Run("GetTitle", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftWage{} + var expected *string + obj.Title = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTitle(), "getter should return the property value") + }) + + t.Run("GetTitle_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftWage{} + obj.Title = nil + + // Act & Assert + assert.Nil(t, obj.GetTitle(), "getter should return nil when property is nil") + }) + + t.Run("GetTitle_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShiftWage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTitle() // Should return zero value + }) + + t.Run("GetHourlyRate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftWage{} + var expected *Money + obj.HourlyRate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetHourlyRate(), "getter should return the property value") + }) + + t.Run("GetHourlyRate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftWage{} + obj.HourlyRate = nil + + // Act & Assert + assert.Nil(t, obj.GetHourlyRate(), "getter should return nil when property is nil") + }) + + t.Run("GetHourlyRate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShiftWage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetHourlyRate() // Should return zero value + }) + + t.Run("GetJobID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftWage{} + var expected *string + obj.JobID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetJobID(), "getter should return the property value") + }) + + t.Run("GetJobID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftWage{} + obj.JobID = nil + + // Act & Assert + assert.Nil(t, obj.GetJobID(), "getter should return nil when property is nil") + }) + + t.Run("GetJobID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShiftWage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetJobID() // Should return zero value + }) + + t.Run("GetTipEligible", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftWage{} + var expected *bool + obj.TipEligible = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTipEligible(), "getter should return the property value") + }) + + t.Run("GetTipEligible_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftWage{} + obj.TipEligible = nil + + // Act & Assert + assert.Nil(t, obj.GetTipEligible(), "getter should return nil when property is nil") + }) + + t.Run("GetTipEligible_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShiftWage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTipEligible() // Should return zero value + }) + +} + +func TestSettersMarkExplicitShiftWage(t *testing.T) { + t.Run("SetTitle_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftWage{} + var fernTestValueTitle *string + + // Act + obj.SetTitle(fernTestValueTitle) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetHourlyRate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftWage{} + var fernTestValueHourlyRate *Money + + // Act + obj.SetHourlyRate(fernTestValueHourlyRate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetJobID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftWage{} + var fernTestValueJobID *string + + // Act + obj.SetJobID(fernTestValueJobID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTipEligible_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftWage{} + var fernTestValueTipEligible *bool + + // Act + obj.SetTipEligible(fernTestValueTipEligible) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersShiftWorkday(t *testing.T) { + t.Run("SetDateRange", func(t *testing.T) { + obj := &ShiftWorkday{} + var fernTestValueDateRange *DateRange + obj.SetDateRange(fernTestValueDateRange) + assert.Equal(t, fernTestValueDateRange, obj.DateRange) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetMatchShiftsBy", func(t *testing.T) { + obj := &ShiftWorkday{} + var fernTestValueMatchShiftsBy *ShiftWorkdayMatcher + obj.SetMatchShiftsBy(fernTestValueMatchShiftsBy) + assert.Equal(t, fernTestValueMatchShiftsBy, obj.MatchShiftsBy) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDefaultTimezone", func(t *testing.T) { + obj := &ShiftWorkday{} + var fernTestValueDefaultTimezone *string + obj.SetDefaultTimezone(fernTestValueDefaultTimezone) + assert.Equal(t, fernTestValueDefaultTimezone, obj.DefaultTimezone) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersShiftWorkday(t *testing.T) { + t.Run("GetDateRange", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftWorkday{} + var expected *DateRange + obj.DateRange = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDateRange(), "getter should return the property value") + }) + + t.Run("GetDateRange_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftWorkday{} + obj.DateRange = nil + + // Act & Assert + assert.Nil(t, obj.GetDateRange(), "getter should return nil when property is nil") + }) + + t.Run("GetDateRange_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShiftWorkday + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDateRange() // Should return zero value + }) + + t.Run("GetMatchShiftsBy", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftWorkday{} + var expected *ShiftWorkdayMatcher + obj.MatchShiftsBy = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMatchShiftsBy(), "getter should return the property value") + }) + + t.Run("GetMatchShiftsBy_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftWorkday{} + obj.MatchShiftsBy = nil + + // Act & Assert + assert.Nil(t, obj.GetMatchShiftsBy(), "getter should return nil when property is nil") + }) + + t.Run("GetMatchShiftsBy_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShiftWorkday + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMatchShiftsBy() // Should return zero value + }) + + t.Run("GetDefaultTimezone", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftWorkday{} + var expected *string + obj.DefaultTimezone = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDefaultTimezone(), "getter should return the property value") + }) + + t.Run("GetDefaultTimezone_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftWorkday{} + obj.DefaultTimezone = nil + + // Act & Assert + assert.Nil(t, obj.GetDefaultTimezone(), "getter should return nil when property is nil") + }) + + t.Run("GetDefaultTimezone_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShiftWorkday + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDefaultTimezone() // Should return zero value + }) + +} + +func TestSettersMarkExplicitShiftWorkday(t *testing.T) { + t.Run("SetDateRange_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftWorkday{} + var fernTestValueDateRange *DateRange + + // Act + obj.SetDateRange(fernTestValueDateRange) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetMatchShiftsBy_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftWorkday{} + var fernTestValueMatchShiftsBy *ShiftWorkdayMatcher + + // Act + obj.SetMatchShiftsBy(fernTestValueMatchShiftsBy) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDefaultTimezone_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftWorkday{} + var fernTestValueDefaultTimezone *string + + // Act + obj.SetDefaultTimezone(fernTestValueDefaultTimezone) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersShippingFee(t *testing.T) { + t.Run("SetName", func(t *testing.T) { + obj := &ShippingFee{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCharge", func(t *testing.T) { + obj := &ShippingFee{} + var fernTestValueCharge *Money + obj.SetCharge(fernTestValueCharge) + assert.Equal(t, fernTestValueCharge, obj.Charge) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersShippingFee(t *testing.T) { + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShippingFee{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShippingFee{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShippingFee + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetCharge", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShippingFee{} + var expected *Money + obj.Charge = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCharge(), "getter should return the property value") + }) + + t.Run("GetCharge_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShippingFee{} + obj.Charge = nil + + // Act & Assert + assert.Nil(t, obj.GetCharge(), "getter should return nil when property is nil") + }) + + t.Run("GetCharge_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShippingFee + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCharge() // Should return zero value + }) + +} + +func TestSettersMarkExplicitShippingFee(t *testing.T) { + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShippingFee{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCharge_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShippingFee{} + var fernTestValueCharge *Money + + // Act + obj.SetCharge(fernTestValueCharge) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSignatureImage(t *testing.T) { + t.Run("SetImageType", func(t *testing.T) { + obj := &SignatureImage{} + var fernTestValueImageType *string + obj.SetImageType(fernTestValueImageType) + assert.Equal(t, fernTestValueImageType, obj.ImageType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &SignatureImage{} + var fernTestValueData *string + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSignatureImage(t *testing.T) { + t.Run("GetImageType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SignatureImage{} + var expected *string + obj.ImageType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImageType(), "getter should return the property value") + }) + + t.Run("GetImageType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SignatureImage{} + obj.ImageType = nil + + // Act & Assert + assert.Nil(t, obj.GetImageType(), "getter should return nil when property is nil") + }) + + t.Run("GetImageType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SignatureImage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImageType() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SignatureImage{} + var expected *string + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SignatureImage{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SignatureImage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSignatureImage(t *testing.T) { + t.Run("SetImageType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SignatureImage{} + var fernTestValueImageType *string + + // Act + obj.SetImageType(fernTestValueImageType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SignatureImage{} + var fernTestValueData *string + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSignatureOptions(t *testing.T) { + t.Run("SetTitle", func(t *testing.T) { + obj := &SignatureOptions{} + var fernTestValueTitle string + obj.SetTitle(fernTestValueTitle) + assert.Equal(t, fernTestValueTitle, obj.Title) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBody", func(t *testing.T) { + obj := &SignatureOptions{} + var fernTestValueBody string + obj.SetBody(fernTestValueBody) + assert.Equal(t, fernTestValueBody, obj.Body) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSignature", func(t *testing.T) { + obj := &SignatureOptions{} + var fernTestValueSignature []*SignatureImage + obj.SetSignature(fernTestValueSignature) + assert.Equal(t, fernTestValueSignature, obj.Signature) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSignatureOptions(t *testing.T) { + t.Run("GetTitle", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SignatureOptions{} + var expected string + obj.Title = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTitle(), "getter should return the property value") + }) + + t.Run("GetTitle_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SignatureOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTitle() // Should return zero value + }) + + t.Run("GetBody", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SignatureOptions{} + var expected string + obj.Body = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBody(), "getter should return the property value") + }) + + t.Run("GetBody_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SignatureOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBody() // Should return zero value + }) + + t.Run("GetSignature", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SignatureOptions{} + var expected []*SignatureImage + obj.Signature = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSignature(), "getter should return the property value") + }) + + t.Run("GetSignature_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SignatureOptions{} + obj.Signature = nil + + // Act & Assert + assert.Nil(t, obj.GetSignature(), "getter should return nil when property is nil") + }) + + t.Run("GetSignature_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SignatureOptions + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSignature() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSignatureOptions(t *testing.T) { + t.Run("SetTitle_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SignatureOptions{} + var fernTestValueTitle string + + // Act + obj.SetTitle(fernTestValueTitle) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBody_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SignatureOptions{} + var fernTestValueBody string + + // Act + obj.SetBody(fernTestValueBody) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSignature_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SignatureOptions{} + var fernTestValueSignature []*SignatureImage + + // Act + obj.SetSignature(fernTestValueSignature) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSourceApplication(t *testing.T) { + t.Run("SetProduct", func(t *testing.T) { + obj := &SourceApplication{} + var fernTestValueProduct *Product + obj.SetProduct(fernTestValueProduct) + assert.Equal(t, fernTestValueProduct, obj.Product) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetApplicationID", func(t *testing.T) { + obj := &SourceApplication{} + var fernTestValueApplicationID *string + obj.SetApplicationID(fernTestValueApplicationID) + assert.Equal(t, fernTestValueApplicationID, obj.ApplicationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &SourceApplication{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSourceApplication(t *testing.T) { + t.Run("GetProduct", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SourceApplication{} + var expected *Product + obj.Product = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetProduct(), "getter should return the property value") + }) + + t.Run("GetProduct_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SourceApplication{} + obj.Product = nil + + // Act & Assert + assert.Nil(t, obj.GetProduct(), "getter should return nil when property is nil") + }) + + t.Run("GetProduct_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SourceApplication + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetProduct() // Should return zero value + }) + + t.Run("GetApplicationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SourceApplication{} + var expected *string + obj.ApplicationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetApplicationID(), "getter should return the property value") + }) + + t.Run("GetApplicationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SourceApplication{} + obj.ApplicationID = nil + + // Act & Assert + assert.Nil(t, obj.GetApplicationID(), "getter should return nil when property is nil") + }) + + t.Run("GetApplicationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SourceApplication + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetApplicationID() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SourceApplication{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SourceApplication{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SourceApplication + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSourceApplication(t *testing.T) { + t.Run("SetProduct_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SourceApplication{} + var fernTestValueProduct *Product + + // Act + obj.SetProduct(fernTestValueProduct) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetApplicationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SourceApplication{} + var fernTestValueApplicationID *string + + // Act + obj.SetApplicationID(fernTestValueApplicationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SourceApplication{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSubscriptionCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &SubscriptionCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &SubscriptionCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &SubscriptionCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &SubscriptionCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &SubscriptionCreatedEvent{} + var fernTestValueData *SubscriptionCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSubscriptionCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEvent{} + var expected *SubscriptionCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSubscriptionCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEvent{} + var fernTestValueData *SubscriptionCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSubscriptionCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &SubscriptionCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &SubscriptionCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &SubscriptionCreatedEventData{} + var fernTestValueObject *SubscriptionCreatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSubscriptionCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEventData{} + var expected *SubscriptionCreatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSubscriptionCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEventData{} + var fernTestValueObject *SubscriptionCreatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSubscriptionCreatedEventObject(t *testing.T) { + t.Run("SetSubscription", func(t *testing.T) { + obj := &SubscriptionCreatedEventObject{} + var fernTestValueSubscription *Subscription + obj.SetSubscription(fernTestValueSubscription) + assert.Equal(t, fernTestValueSubscription, obj.Subscription) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSubscriptionCreatedEventObject(t *testing.T) { + t.Run("GetSubscription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEventObject{} + var expected *Subscription + obj.Subscription = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscription(), "getter should return the property value") + }) + + t.Run("GetSubscription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEventObject{} + obj.Subscription = nil + + // Act & Assert + assert.Nil(t, obj.GetSubscription(), "getter should return nil when property is nil") + }) + + t.Run("GetSubscription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionCreatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscription() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSubscriptionCreatedEventObject(t *testing.T) { + t.Run("SetSubscription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEventObject{} + var fernTestValueSubscription *Subscription + + // Act + obj.SetSubscription(fernTestValueSubscription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSubscriptionPhase(t *testing.T) { + t.Run("SetUID", func(t *testing.T) { + obj := &SubscriptionPhase{} + var fernTestValueUID *string + obj.SetUID(fernTestValueUID) + assert.Equal(t, fernTestValueUID, obj.UID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCadence", func(t *testing.T) { + obj := &SubscriptionPhase{} + var fernTestValueCadence SubscriptionCadence + obj.SetCadence(fernTestValueCadence) + assert.Equal(t, fernTestValueCadence, obj.Cadence) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPeriods", func(t *testing.T) { + obj := &SubscriptionPhase{} + var fernTestValuePeriods *int + obj.SetPeriods(fernTestValuePeriods) + assert.Equal(t, fernTestValuePeriods, obj.Periods) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRecurringPriceMoney", func(t *testing.T) { + obj := &SubscriptionPhase{} + var fernTestValueRecurringPriceMoney *Money + obj.SetRecurringPriceMoney(fernTestValueRecurringPriceMoney) + assert.Equal(t, fernTestValueRecurringPriceMoney, obj.RecurringPriceMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrdinal", func(t *testing.T) { + obj := &SubscriptionPhase{} + var fernTestValueOrdinal *int64 + obj.SetOrdinal(fernTestValueOrdinal) + assert.Equal(t, fernTestValueOrdinal, obj.Ordinal) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPricing", func(t *testing.T) { + obj := &SubscriptionPhase{} + var fernTestValuePricing *SubscriptionPricing + obj.SetPricing(fernTestValuePricing) + assert.Equal(t, fernTestValuePricing, obj.Pricing) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSubscriptionPhase(t *testing.T) { + t.Run("GetUID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionPhase{} + var expected *string + obj.UID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUID(), "getter should return the property value") + }) + + t.Run("GetUID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionPhase{} + obj.UID = nil + + // Act & Assert + assert.Nil(t, obj.GetUID(), "getter should return nil when property is nil") + }) + + t.Run("GetUID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionPhase + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUID() // Should return zero value + }) + + t.Run("GetCadence", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionPhase{} + var expected SubscriptionCadence + obj.Cadence = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCadence(), "getter should return the property value") + }) + + t.Run("GetCadence_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionPhase + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCadence() // Should return zero value + }) + + t.Run("GetPeriods", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionPhase{} + var expected *int + obj.Periods = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPeriods(), "getter should return the property value") + }) + + t.Run("GetPeriods_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionPhase{} + obj.Periods = nil + + // Act & Assert + assert.Nil(t, obj.GetPeriods(), "getter should return nil when property is nil") + }) + + t.Run("GetPeriods_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionPhase + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPeriods() // Should return zero value + }) + + t.Run("GetRecurringPriceMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionPhase{} + var expected *Money + obj.RecurringPriceMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRecurringPriceMoney(), "getter should return the property value") + }) + + t.Run("GetRecurringPriceMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionPhase{} + obj.RecurringPriceMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetRecurringPriceMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetRecurringPriceMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionPhase + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRecurringPriceMoney() // Should return zero value + }) + + t.Run("GetOrdinal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionPhase{} + var expected *int64 + obj.Ordinal = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrdinal(), "getter should return the property value") + }) + + t.Run("GetOrdinal_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionPhase{} + obj.Ordinal = nil + + // Act & Assert + assert.Nil(t, obj.GetOrdinal(), "getter should return nil when property is nil") + }) + + t.Run("GetOrdinal_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionPhase + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrdinal() // Should return zero value + }) + + t.Run("GetPricing", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionPhase{} + var expected *SubscriptionPricing + obj.Pricing = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPricing(), "getter should return the property value") + }) + + t.Run("GetPricing_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionPhase{} + obj.Pricing = nil + + // Act & Assert + assert.Nil(t, obj.GetPricing(), "getter should return nil when property is nil") + }) + + t.Run("GetPricing_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionPhase + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPricing() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSubscriptionPhase(t *testing.T) { + t.Run("SetUID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionPhase{} + var fernTestValueUID *string + + // Act + obj.SetUID(fernTestValueUID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCadence_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionPhase{} + var fernTestValueCadence SubscriptionCadence + + // Act + obj.SetCadence(fernTestValueCadence) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPeriods_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionPhase{} + var fernTestValuePeriods *int + + // Act + obj.SetPeriods(fernTestValuePeriods) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRecurringPriceMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionPhase{} + var fernTestValueRecurringPriceMoney *Money + + // Act + obj.SetRecurringPriceMoney(fernTestValueRecurringPriceMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrdinal_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionPhase{} + var fernTestValueOrdinal *int64 + + // Act + obj.SetOrdinal(fernTestValueOrdinal) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPricing_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionPhase{} + var fernTestValuePricing *SubscriptionPricing + + // Act + obj.SetPricing(fernTestValuePricing) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSubscriptionPricing(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &SubscriptionPricing{} + var fernTestValueType *SubscriptionPricingType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDiscountIDs", func(t *testing.T) { + obj := &SubscriptionPricing{} + var fernTestValueDiscountIDs []string + obj.SetDiscountIDs(fernTestValueDiscountIDs) + assert.Equal(t, fernTestValueDiscountIDs, obj.DiscountIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPriceMoney", func(t *testing.T) { + obj := &SubscriptionPricing{} + var fernTestValuePriceMoney *Money + obj.SetPriceMoney(fernTestValuePriceMoney) + assert.Equal(t, fernTestValuePriceMoney, obj.PriceMoney) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSubscriptionPricing(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionPricing{} + var expected *SubscriptionPricingType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionPricing{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionPricing + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetDiscountIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionPricing{} + var expected []string + obj.DiscountIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDiscountIDs(), "getter should return the property value") + }) + + t.Run("GetDiscountIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionPricing{} + obj.DiscountIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetDiscountIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetDiscountIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionPricing + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDiscountIDs() // Should return zero value + }) + + t.Run("GetPriceMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionPricing{} + var expected *Money + obj.PriceMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPriceMoney(), "getter should return the property value") + }) + + t.Run("GetPriceMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionPricing{} + obj.PriceMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetPriceMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetPriceMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionPricing + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPriceMoney() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSubscriptionPricing(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionPricing{} + var fernTestValueType *SubscriptionPricingType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDiscountIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionPricing{} + var fernTestValueDiscountIDs []string + + // Act + obj.SetDiscountIDs(fernTestValueDiscountIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPriceMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionPricing{} + var fernTestValuePriceMoney *Money + + // Act + obj.SetPriceMoney(fernTestValuePriceMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSubscriptionTestResult(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &SubscriptionTestResult{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatusCode", func(t *testing.T) { + obj := &SubscriptionTestResult{} + var fernTestValueStatusCode *int + obj.SetStatusCode(fernTestValueStatusCode) + assert.Equal(t, fernTestValueStatusCode, obj.StatusCode) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPayload", func(t *testing.T) { + obj := &SubscriptionTestResult{} + var fernTestValuePayload map[string]interface{} + obj.SetPayload(fernTestValuePayload) + assert.Equal(t, fernTestValuePayload, obj.Payload) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &SubscriptionTestResult{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &SubscriptionTestResult{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNotificationURL", func(t *testing.T) { + obj := &SubscriptionTestResult{} + var fernTestValueNotificationURL *string + obj.SetNotificationURL(fernTestValueNotificationURL) + assert.Equal(t, fernTestValueNotificationURL, obj.NotificationURL) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPassesFilter", func(t *testing.T) { + obj := &SubscriptionTestResult{} + var fernTestValuePassesFilter *bool + obj.SetPassesFilter(fernTestValuePassesFilter) + assert.Equal(t, fernTestValuePassesFilter, obj.PassesFilter) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSubscriptionTestResult(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionTestResult{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionTestResult{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionTestResult + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetStatusCode", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionTestResult{} + var expected *int + obj.StatusCode = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatusCode(), "getter should return the property value") + }) + + t.Run("GetStatusCode_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionTestResult{} + obj.StatusCode = nil + + // Act & Assert + assert.Nil(t, obj.GetStatusCode(), "getter should return nil when property is nil") + }) + + t.Run("GetStatusCode_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionTestResult + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatusCode() // Should return zero value + }) + + t.Run("GetPayload", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionTestResult{} + var expected map[string]interface{} + obj.Payload = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPayload(), "getter should return the property value") + }) + + t.Run("GetPayload_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionTestResult{} + obj.Payload = nil + + // Act & Assert + assert.Nil(t, obj.GetPayload(), "getter should return nil when property is nil") + }) + + t.Run("GetPayload_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionTestResult + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPayload() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionTestResult{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionTestResult{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionTestResult + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionTestResult{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionTestResult{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionTestResult + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetNotificationURL", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionTestResult{} + var expected *string + obj.NotificationURL = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNotificationURL(), "getter should return the property value") + }) + + t.Run("GetNotificationURL_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionTestResult{} + obj.NotificationURL = nil + + // Act & Assert + assert.Nil(t, obj.GetNotificationURL(), "getter should return nil when property is nil") + }) + + t.Run("GetNotificationURL_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionTestResult + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNotificationURL() // Should return zero value + }) + + t.Run("GetPassesFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionTestResult{} + var expected *bool + obj.PassesFilter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPassesFilter(), "getter should return the property value") + }) + + t.Run("GetPassesFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionTestResult{} + obj.PassesFilter = nil + + // Act & Assert + assert.Nil(t, obj.GetPassesFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetPassesFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionTestResult + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPassesFilter() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSubscriptionTestResult(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionTestResult{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatusCode_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionTestResult{} + var fernTestValueStatusCode *int + + // Act + obj.SetStatusCode(fernTestValueStatusCode) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPayload_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionTestResult{} + var fernTestValuePayload map[string]interface{} + + // Act + obj.SetPayload(fernTestValuePayload) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionTestResult{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionTestResult{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNotificationURL_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionTestResult{} + var fernTestValueNotificationURL *string + + // Act + obj.SetNotificationURL(fernTestValueNotificationURL) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPassesFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionTestResult{} + var fernTestValuePassesFilter *bool + + // Act + obj.SetPassesFilter(fernTestValuePassesFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSubscriptionUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &SubscriptionUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &SubscriptionUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &SubscriptionUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &SubscriptionUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &SubscriptionUpdatedEvent{} + var fernTestValueData *SubscriptionUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSubscriptionUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEvent{} + var expected *SubscriptionUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSubscriptionUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEvent{} + var fernTestValueData *SubscriptionUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSubscriptionUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &SubscriptionUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &SubscriptionUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &SubscriptionUpdatedEventData{} + var fernTestValueObject *SubscriptionUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSubscriptionUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEventData{} + var expected *SubscriptionUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSubscriptionUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEventData{} + var fernTestValueObject *SubscriptionUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSubscriptionUpdatedEventObject(t *testing.T) { + t.Run("SetSubscription", func(t *testing.T) { + obj := &SubscriptionUpdatedEventObject{} + var fernTestValueSubscription *Subscription + obj.SetSubscription(fernTestValueSubscription) + assert.Equal(t, fernTestValueSubscription, obj.Subscription) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSubscriptionUpdatedEventObject(t *testing.T) { + t.Run("GetSubscription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEventObject{} + var expected *Subscription + obj.Subscription = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscription(), "getter should return the property value") + }) + + t.Run("GetSubscription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEventObject{} + obj.Subscription = nil + + // Act & Assert + assert.Nil(t, obj.GetSubscription(), "getter should return nil when property is nil") + }) + + t.Run("GetSubscription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscription() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSubscriptionUpdatedEventObject(t *testing.T) { + t.Run("SetSubscription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEventObject{} + var fernTestValueSubscription *Subscription + + // Act + obj.SetSubscription(fernTestValueSubscription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTeamMemberBookingProfile(t *testing.T) { + t.Run("SetTeamMemberID", func(t *testing.T) { + obj := &TeamMemberBookingProfile{} + var fernTestValueTeamMemberID *string + obj.SetTeamMemberID(fernTestValueTeamMemberID) + assert.Equal(t, fernTestValueTeamMemberID, obj.TeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDescription", func(t *testing.T) { + obj := &TeamMemberBookingProfile{} + var fernTestValueDescription *string + obj.SetDescription(fernTestValueDescription) + assert.Equal(t, fernTestValueDescription, obj.Description) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDisplayName", func(t *testing.T) { + obj := &TeamMemberBookingProfile{} + var fernTestValueDisplayName *string + obj.SetDisplayName(fernTestValueDisplayName) + assert.Equal(t, fernTestValueDisplayName, obj.DisplayName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsBookable", func(t *testing.T) { + obj := &TeamMemberBookingProfile{} + var fernTestValueIsBookable *bool + obj.SetIsBookable(fernTestValueIsBookable) + assert.Equal(t, fernTestValueIsBookable, obj.IsBookable) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetProfileImageURL", func(t *testing.T) { + obj := &TeamMemberBookingProfile{} + var fernTestValueProfileImageURL *string + obj.SetProfileImageURL(fernTestValueProfileImageURL) + assert.Equal(t, fernTestValueProfileImageURL, obj.ProfileImageURL) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTeamMemberBookingProfile(t *testing.T) { + t.Run("GetTeamMemberID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberBookingProfile{} + var expected *string + obj.TeamMemberID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMemberID(), "getter should return the property value") + }) + + t.Run("GetTeamMemberID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberBookingProfile{} + obj.TeamMemberID = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMemberID(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMemberID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberBookingProfile + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMemberID() // Should return zero value + }) + + t.Run("GetDescription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberBookingProfile{} + var expected *string + obj.Description = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDescription(), "getter should return the property value") + }) + + t.Run("GetDescription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberBookingProfile{} + obj.Description = nil + + // Act & Assert + assert.Nil(t, obj.GetDescription(), "getter should return nil when property is nil") + }) + + t.Run("GetDescription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberBookingProfile + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDescription() // Should return zero value + }) + + t.Run("GetDisplayName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberBookingProfile{} + var expected *string + obj.DisplayName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDisplayName(), "getter should return the property value") + }) + + t.Run("GetDisplayName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberBookingProfile{} + obj.DisplayName = nil + + // Act & Assert + assert.Nil(t, obj.GetDisplayName(), "getter should return nil when property is nil") + }) + + t.Run("GetDisplayName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberBookingProfile + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDisplayName() // Should return zero value + }) + + t.Run("GetIsBookable", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberBookingProfile{} + var expected *bool + obj.IsBookable = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsBookable(), "getter should return the property value") + }) + + t.Run("GetIsBookable_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberBookingProfile{} + obj.IsBookable = nil + + // Act & Assert + assert.Nil(t, obj.GetIsBookable(), "getter should return nil when property is nil") + }) + + t.Run("GetIsBookable_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberBookingProfile + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsBookable() // Should return zero value + }) + + t.Run("GetProfileImageURL", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberBookingProfile{} + var expected *string + obj.ProfileImageURL = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetProfileImageURL(), "getter should return the property value") + }) + + t.Run("GetProfileImageURL_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberBookingProfile{} + obj.ProfileImageURL = nil + + // Act & Assert + assert.Nil(t, obj.GetProfileImageURL(), "getter should return nil when property is nil") + }) + + t.Run("GetProfileImageURL_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberBookingProfile + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetProfileImageURL() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTeamMemberBookingProfile(t *testing.T) { + t.Run("SetTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberBookingProfile{} + var fernTestValueTeamMemberID *string + + // Act + obj.SetTeamMemberID(fernTestValueTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDescription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberBookingProfile{} + var fernTestValueDescription *string + + // Act + obj.SetDescription(fernTestValueDescription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDisplayName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberBookingProfile{} + var fernTestValueDisplayName *string + + // Act + obj.SetDisplayName(fernTestValueDisplayName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsBookable_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberBookingProfile{} + var fernTestValueIsBookable *bool + + // Act + obj.SetIsBookable(fernTestValueIsBookable) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetProfileImageURL_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberBookingProfile{} + var fernTestValueProfileImageURL *string + + // Act + obj.SetProfileImageURL(fernTestValueProfileImageURL) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTeamMemberCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &TeamMemberCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &TeamMemberCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &TeamMemberCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &TeamMemberCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &TeamMemberCreatedEvent{} + var fernTestValueData *TeamMemberCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTeamMemberCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEvent{} + var expected *TeamMemberCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTeamMemberCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEvent{} + var fernTestValueData *TeamMemberCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTeamMemberCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &TeamMemberCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &TeamMemberCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &TeamMemberCreatedEventData{} + var fernTestValueObject *TeamMemberCreatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTeamMemberCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEventData{} + var expected *TeamMemberCreatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTeamMemberCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEventData{} + var fernTestValueObject *TeamMemberCreatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTeamMemberCreatedEventObject(t *testing.T) { + t.Run("SetTeamMember", func(t *testing.T) { + obj := &TeamMemberCreatedEventObject{} + var fernTestValueTeamMember *TeamMember + obj.SetTeamMember(fernTestValueTeamMember) + assert.Equal(t, fernTestValueTeamMember, obj.TeamMember) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTeamMemberCreatedEventObject(t *testing.T) { + t.Run("GetTeamMember", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEventObject{} + var expected *TeamMember + obj.TeamMember = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMember(), "getter should return the property value") + }) + + t.Run("GetTeamMember_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEventObject{} + obj.TeamMember = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMember(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMember_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberCreatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMember() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTeamMemberCreatedEventObject(t *testing.T) { + t.Run("SetTeamMember_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEventObject{} + var fernTestValueTeamMember *TeamMember + + // Act + obj.SetTeamMember(fernTestValueTeamMember) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTeamMemberUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &TeamMemberUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &TeamMemberUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &TeamMemberUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &TeamMemberUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &TeamMemberUpdatedEvent{} + var fernTestValueData *TeamMemberUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTeamMemberUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEvent{} + var expected *TeamMemberUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTeamMemberUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEvent{} + var fernTestValueData *TeamMemberUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTeamMemberUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &TeamMemberUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &TeamMemberUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &TeamMemberUpdatedEventData{} + var fernTestValueObject *TeamMemberUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTeamMemberUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEventData{} + var expected *TeamMemberUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTeamMemberUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEventData{} + var fernTestValueObject *TeamMemberUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTeamMemberUpdatedEventObject(t *testing.T) { + t.Run("SetTeamMember", func(t *testing.T) { + obj := &TeamMemberUpdatedEventObject{} + var fernTestValueTeamMember *TeamMember + obj.SetTeamMember(fernTestValueTeamMember) + assert.Equal(t, fernTestValueTeamMember, obj.TeamMember) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTeamMemberUpdatedEventObject(t *testing.T) { + t.Run("GetTeamMember", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEventObject{} + var expected *TeamMember + obj.TeamMember = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMember(), "getter should return the property value") + }) + + t.Run("GetTeamMember_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEventObject{} + obj.TeamMember = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMember(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMember_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMember() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTeamMemberUpdatedEventObject(t *testing.T) { + t.Run("SetTeamMember_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEventObject{} + var fernTestValueTeamMember *TeamMember + + // Act + obj.SetTeamMember(fernTestValueTeamMember) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTeamMemberWage(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &TeamMemberWage{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTeamMemberID", func(t *testing.T) { + obj := &TeamMemberWage{} + var fernTestValueTeamMemberID *string + obj.SetTeamMemberID(fernTestValueTeamMemberID) + assert.Equal(t, fernTestValueTeamMemberID, obj.TeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTitle", func(t *testing.T) { + obj := &TeamMemberWage{} + var fernTestValueTitle *string + obj.SetTitle(fernTestValueTitle) + assert.Equal(t, fernTestValueTitle, obj.Title) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetHourlyRate", func(t *testing.T) { + obj := &TeamMemberWage{} + var fernTestValueHourlyRate *Money + obj.SetHourlyRate(fernTestValueHourlyRate) + assert.Equal(t, fernTestValueHourlyRate, obj.HourlyRate) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetJobID", func(t *testing.T) { + obj := &TeamMemberWage{} + var fernTestValueJobID *string + obj.SetJobID(fernTestValueJobID) + assert.Equal(t, fernTestValueJobID, obj.JobID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTipEligible", func(t *testing.T) { + obj := &TeamMemberWage{} + var fernTestValueTipEligible *bool + obj.SetTipEligible(fernTestValueTipEligible) + assert.Equal(t, fernTestValueTipEligible, obj.TipEligible) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTeamMemberWage(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWage{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWage{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberWage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetTeamMemberID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWage{} + var expected *string + obj.TeamMemberID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMemberID(), "getter should return the property value") + }) + + t.Run("GetTeamMemberID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWage{} + obj.TeamMemberID = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMemberID(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMemberID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberWage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMemberID() // Should return zero value + }) + + t.Run("GetTitle", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWage{} + var expected *string + obj.Title = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTitle(), "getter should return the property value") + }) + + t.Run("GetTitle_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWage{} + obj.Title = nil + + // Act & Assert + assert.Nil(t, obj.GetTitle(), "getter should return nil when property is nil") + }) + + t.Run("GetTitle_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberWage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTitle() // Should return zero value + }) + + t.Run("GetHourlyRate", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWage{} + var expected *Money + obj.HourlyRate = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetHourlyRate(), "getter should return the property value") + }) + + t.Run("GetHourlyRate_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWage{} + obj.HourlyRate = nil + + // Act & Assert + assert.Nil(t, obj.GetHourlyRate(), "getter should return nil when property is nil") + }) + + t.Run("GetHourlyRate_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberWage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetHourlyRate() // Should return zero value + }) + + t.Run("GetJobID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWage{} + var expected *string + obj.JobID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetJobID(), "getter should return the property value") + }) + + t.Run("GetJobID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWage{} + obj.JobID = nil + + // Act & Assert + assert.Nil(t, obj.GetJobID(), "getter should return nil when property is nil") + }) + + t.Run("GetJobID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberWage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetJobID() // Should return zero value + }) + + t.Run("GetTipEligible", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWage{} + var expected *bool + obj.TipEligible = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTipEligible(), "getter should return the property value") + }) + + t.Run("GetTipEligible_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWage{} + obj.TipEligible = nil + + // Act & Assert + assert.Nil(t, obj.GetTipEligible(), "getter should return nil when property is nil") + }) + + t.Run("GetTipEligible_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberWage + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTipEligible() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTeamMemberWage(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWage{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWage{} + var fernTestValueTeamMemberID *string + + // Act + obj.SetTeamMemberID(fernTestValueTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTitle_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWage{} + var fernTestValueTitle *string + + // Act + obj.SetTitle(fernTestValueTitle) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetHourlyRate_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWage{} + var fernTestValueHourlyRate *Money + + // Act + obj.SetHourlyRate(fernTestValueHourlyRate) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetJobID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWage{} + var fernTestValueJobID *string + + // Act + obj.SetJobID(fernTestValueJobID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTipEligible_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWage{} + var fernTestValueTipEligible *bool + + // Act + obj.SetTipEligible(fernTestValueTipEligible) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTeamMemberWageSettingUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &TeamMemberWageSettingUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &TeamMemberWageSettingUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &TeamMemberWageSettingUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &TeamMemberWageSettingUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &TeamMemberWageSettingUpdatedEvent{} + var fernTestValueData *TeamMemberWageSettingUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTeamMemberWageSettingUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberWageSettingUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberWageSettingUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberWageSettingUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberWageSettingUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEvent{} + var expected *TeamMemberWageSettingUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberWageSettingUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTeamMemberWageSettingUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEvent{} + var fernTestValueData *TeamMemberWageSettingUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTeamMemberWageSettingUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &TeamMemberWageSettingUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &TeamMemberWageSettingUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &TeamMemberWageSettingUpdatedEventData{} + var fernTestValueObject *TeamMemberWageSettingUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTeamMemberWageSettingUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberWageSettingUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberWageSettingUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEventData{} + var expected *TeamMemberWageSettingUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberWageSettingUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTeamMemberWageSettingUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEventData{} + var fernTestValueObject *TeamMemberWageSettingUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTeamMemberWageSettingUpdatedEventObject(t *testing.T) { + t.Run("SetWageSetting", func(t *testing.T) { + obj := &TeamMemberWageSettingUpdatedEventObject{} + var fernTestValueWageSetting *WageSetting + obj.SetWageSetting(fernTestValueWageSetting) + assert.Equal(t, fernTestValueWageSetting, obj.WageSetting) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTeamMemberWageSettingUpdatedEventObject(t *testing.T) { + t.Run("GetWageSetting", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEventObject{} + var expected *WageSetting + obj.WageSetting = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetWageSetting(), "getter should return the property value") + }) + + t.Run("GetWageSetting_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEventObject{} + obj.WageSetting = nil + + // Act & Assert + assert.Nil(t, obj.GetWageSetting(), "getter should return nil when property is nil") + }) + + t.Run("GetWageSetting_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberWageSettingUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetWageSetting() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTeamMemberWageSettingUpdatedEventObject(t *testing.T) { + t.Run("SetWageSetting_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEventObject{} + var fernTestValueWageSetting *WageSetting + + // Act + obj.SetWageSetting(fernTestValueWageSetting) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTender(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &Tender{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &Tender{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTransactionID", func(t *testing.T) { + obj := &Tender{} + var fernTestValueTransactionID *string + obj.SetTransactionID(fernTestValueTransactionID) + assert.Equal(t, fernTestValueTransactionID, obj.TransactionID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &Tender{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNote", func(t *testing.T) { + obj := &Tender{} + var fernTestValueNote *string + obj.SetNote(fernTestValueNote) + assert.Equal(t, fernTestValueNote, obj.Note) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &Tender{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTipMoney", func(t *testing.T) { + obj := &Tender{} + var fernTestValueTipMoney *Money + obj.SetTipMoney(fernTestValueTipMoney) + assert.Equal(t, fernTestValueTipMoney, obj.TipMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetProcessingFeeMoney", func(t *testing.T) { + obj := &Tender{} + var fernTestValueProcessingFeeMoney *Money + obj.SetProcessingFeeMoney(fernTestValueProcessingFeeMoney) + assert.Equal(t, fernTestValueProcessingFeeMoney, obj.ProcessingFeeMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerID", func(t *testing.T) { + obj := &Tender{} + var fernTestValueCustomerID *string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &Tender{} + var fernTestValueType TenderType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCardDetails", func(t *testing.T) { + obj := &Tender{} + var fernTestValueCardDetails *TenderCardDetails + obj.SetCardDetails(fernTestValueCardDetails) + assert.Equal(t, fernTestValueCardDetails, obj.CardDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCashDetails", func(t *testing.T) { + obj := &Tender{} + var fernTestValueCashDetails *TenderCashDetails + obj.SetCashDetails(fernTestValueCashDetails) + assert.Equal(t, fernTestValueCashDetails, obj.CashDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBankAccountDetails", func(t *testing.T) { + obj := &Tender{} + var fernTestValueBankAccountDetails *TenderBankAccountDetails + obj.SetBankAccountDetails(fernTestValueBankAccountDetails) + assert.Equal(t, fernTestValueBankAccountDetails, obj.BankAccountDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBuyNowPayLaterDetails", func(t *testing.T) { + obj := &Tender{} + var fernTestValueBuyNowPayLaterDetails *TenderBuyNowPayLaterDetails + obj.SetBuyNowPayLaterDetails(fernTestValueBuyNowPayLaterDetails) + assert.Equal(t, fernTestValueBuyNowPayLaterDetails, obj.BuyNowPayLaterDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSquareAccountDetails", func(t *testing.T) { + obj := &Tender{} + var fernTestValueSquareAccountDetails *TenderSquareAccountDetails + obj.SetSquareAccountDetails(fernTestValueSquareAccountDetails) + assert.Equal(t, fernTestValueSquareAccountDetails, obj.SquareAccountDetails) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAdditionalRecipients", func(t *testing.T) { + obj := &Tender{} + var fernTestValueAdditionalRecipients []*AdditionalRecipient + obj.SetAdditionalRecipients(fernTestValueAdditionalRecipients) + assert.Equal(t, fernTestValueAdditionalRecipients, obj.AdditionalRecipients) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPaymentID", func(t *testing.T) { + obj := &Tender{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTender(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetTransactionID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var expected *string + obj.TransactionID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTransactionID(), "getter should return the property value") + }) + + t.Run("GetTransactionID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + obj.TransactionID = nil + + // Act & Assert + assert.Nil(t, obj.GetTransactionID(), "getter should return nil when property is nil") + }) + + t.Run("GetTransactionID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTransactionID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetNote", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var expected *string + obj.Note = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNote(), "getter should return the property value") + }) + + t.Run("GetNote_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + obj.Note = nil + + // Act & Assert + assert.Nil(t, obj.GetNote(), "getter should return nil when property is nil") + }) + + t.Run("GetNote_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNote() // Should return zero value + }) + + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + + t.Run("GetTipMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var expected *Money + obj.TipMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTipMoney(), "getter should return the property value") + }) + + t.Run("GetTipMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + obj.TipMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTipMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTipMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTipMoney() // Should return zero value + }) + + t.Run("GetProcessingFeeMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var expected *Money + obj.ProcessingFeeMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetProcessingFeeMoney(), "getter should return the property value") + }) + + t.Run("GetProcessingFeeMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + obj.ProcessingFeeMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetProcessingFeeMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetProcessingFeeMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetProcessingFeeMoney() // Should return zero value + }) + + t.Run("GetCustomerID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var expected *string + obj.CustomerID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomerID(), "getter should return the property value") + }) + + t.Run("GetCustomerID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + obj.CustomerID = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomerID(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomerID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomerID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var expected TenderType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetCardDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var expected *TenderCardDetails + obj.CardDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCardDetails(), "getter should return the property value") + }) + + t.Run("GetCardDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + obj.CardDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetCardDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetCardDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCardDetails() // Should return zero value + }) + + t.Run("GetCashDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var expected *TenderCashDetails + obj.CashDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCashDetails(), "getter should return the property value") + }) + + t.Run("GetCashDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + obj.CashDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetCashDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetCashDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCashDetails() // Should return zero value + }) + + t.Run("GetBankAccountDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var expected *TenderBankAccountDetails + obj.BankAccountDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBankAccountDetails(), "getter should return the property value") + }) + + t.Run("GetBankAccountDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + obj.BankAccountDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetBankAccountDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetBankAccountDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBankAccountDetails() // Should return zero value + }) + + t.Run("GetBuyNowPayLaterDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var expected *TenderBuyNowPayLaterDetails + obj.BuyNowPayLaterDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBuyNowPayLaterDetails(), "getter should return the property value") + }) + + t.Run("GetBuyNowPayLaterDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + obj.BuyNowPayLaterDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetBuyNowPayLaterDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetBuyNowPayLaterDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBuyNowPayLaterDetails() // Should return zero value + }) + + t.Run("GetSquareAccountDetails", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var expected *TenderSquareAccountDetails + obj.SquareAccountDetails = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSquareAccountDetails(), "getter should return the property value") + }) + + t.Run("GetSquareAccountDetails_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + obj.SquareAccountDetails = nil + + // Act & Assert + assert.Nil(t, obj.GetSquareAccountDetails(), "getter should return nil when property is nil") + }) + + t.Run("GetSquareAccountDetails_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSquareAccountDetails() // Should return zero value + }) + + t.Run("GetAdditionalRecipients", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var expected []*AdditionalRecipient + obj.AdditionalRecipients = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAdditionalRecipients(), "getter should return the property value") + }) + + t.Run("GetAdditionalRecipients_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + obj.AdditionalRecipients = nil + + // Act & Assert + assert.Nil(t, obj.GetAdditionalRecipients(), "getter should return nil when property is nil") + }) + + t.Run("GetAdditionalRecipients_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAdditionalRecipients() // Should return zero value + }) + + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTender(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTransactionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var fernTestValueTransactionID *string + + // Act + obj.SetTransactionID(fernTestValueTransactionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNote_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var fernTestValueNote *string + + // Act + obj.SetNote(fernTestValueNote) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTipMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var fernTestValueTipMoney *Money + + // Act + obj.SetTipMoney(fernTestValueTipMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetProcessingFeeMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var fernTestValueProcessingFeeMoney *Money + + // Act + obj.SetProcessingFeeMoney(fernTestValueProcessingFeeMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var fernTestValueCustomerID *string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var fernTestValueType TenderType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCardDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var fernTestValueCardDetails *TenderCardDetails + + // Act + obj.SetCardDetails(fernTestValueCardDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCashDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var fernTestValueCashDetails *TenderCashDetails + + // Act + obj.SetCashDetails(fernTestValueCashDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBankAccountDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var fernTestValueBankAccountDetails *TenderBankAccountDetails + + // Act + obj.SetBankAccountDetails(fernTestValueBankAccountDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBuyNowPayLaterDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var fernTestValueBuyNowPayLaterDetails *TenderBuyNowPayLaterDetails + + // Act + obj.SetBuyNowPayLaterDetails(fernTestValueBuyNowPayLaterDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSquareAccountDetails_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var fernTestValueSquareAccountDetails *TenderSquareAccountDetails + + // Act + obj.SetSquareAccountDetails(fernTestValueSquareAccountDetails) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAdditionalRecipients_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var fernTestValueAdditionalRecipients []*AdditionalRecipient + + // Act + obj.SetAdditionalRecipients(fernTestValueAdditionalRecipients) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTenderBankAccountDetails(t *testing.T) { + t.Run("SetStatus", func(t *testing.T) { + obj := &TenderBankAccountDetails{} + var fernTestValueStatus *TenderBankAccountDetailsStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTenderBankAccountDetails(t *testing.T) { + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderBankAccountDetails{} + var expected *TenderBankAccountDetailsStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderBankAccountDetails{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TenderBankAccountDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTenderBankAccountDetails(t *testing.T) { + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderBankAccountDetails{} + var fernTestValueStatus *TenderBankAccountDetailsStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTenderBuyNowPayLaterDetails(t *testing.T) { + t.Run("SetBuyNowPayLaterBrand", func(t *testing.T) { + obj := &TenderBuyNowPayLaterDetails{} + var fernTestValueBuyNowPayLaterBrand *TenderBuyNowPayLaterDetailsBrand + obj.SetBuyNowPayLaterBrand(fernTestValueBuyNowPayLaterBrand) + assert.Equal(t, fernTestValueBuyNowPayLaterBrand, obj.BuyNowPayLaterBrand) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &TenderBuyNowPayLaterDetails{} + var fernTestValueStatus *TenderBuyNowPayLaterDetailsStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTenderBuyNowPayLaterDetails(t *testing.T) { + t.Run("GetBuyNowPayLaterBrand", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderBuyNowPayLaterDetails{} + var expected *TenderBuyNowPayLaterDetailsBrand + obj.BuyNowPayLaterBrand = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBuyNowPayLaterBrand(), "getter should return the property value") + }) + + t.Run("GetBuyNowPayLaterBrand_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderBuyNowPayLaterDetails{} + obj.BuyNowPayLaterBrand = nil + + // Act & Assert + assert.Nil(t, obj.GetBuyNowPayLaterBrand(), "getter should return nil when property is nil") + }) + + t.Run("GetBuyNowPayLaterBrand_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TenderBuyNowPayLaterDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBuyNowPayLaterBrand() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderBuyNowPayLaterDetails{} + var expected *TenderBuyNowPayLaterDetailsStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderBuyNowPayLaterDetails{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TenderBuyNowPayLaterDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTenderBuyNowPayLaterDetails(t *testing.T) { + t.Run("SetBuyNowPayLaterBrand_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderBuyNowPayLaterDetails{} + var fernTestValueBuyNowPayLaterBrand *TenderBuyNowPayLaterDetailsBrand + + // Act + obj.SetBuyNowPayLaterBrand(fernTestValueBuyNowPayLaterBrand) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderBuyNowPayLaterDetails{} + var fernTestValueStatus *TenderBuyNowPayLaterDetailsStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTenderCardDetails(t *testing.T) { + t.Run("SetStatus", func(t *testing.T) { + obj := &TenderCardDetails{} + var fernTestValueStatus *TenderCardDetailsStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCard", func(t *testing.T) { + obj := &TenderCardDetails{} + var fernTestValueCard *Card + obj.SetCard(fernTestValueCard) + assert.Equal(t, fernTestValueCard, obj.Card) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEntryMethod", func(t *testing.T) { + obj := &TenderCardDetails{} + var fernTestValueEntryMethod *TenderCardDetailsEntryMethod + obj.SetEntryMethod(fernTestValueEntryMethod) + assert.Equal(t, fernTestValueEntryMethod, obj.EntryMethod) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTenderCardDetails(t *testing.T) { + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderCardDetails{} + var expected *TenderCardDetailsStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderCardDetails{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TenderCardDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetCard", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderCardDetails{} + var expected *Card + obj.Card = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCard(), "getter should return the property value") + }) + + t.Run("GetCard_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderCardDetails{} + obj.Card = nil + + // Act & Assert + assert.Nil(t, obj.GetCard(), "getter should return nil when property is nil") + }) + + t.Run("GetCard_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TenderCardDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCard() // Should return zero value + }) + + t.Run("GetEntryMethod", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderCardDetails{} + var expected *TenderCardDetailsEntryMethod + obj.EntryMethod = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEntryMethod(), "getter should return the property value") + }) + + t.Run("GetEntryMethod_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderCardDetails{} + obj.EntryMethod = nil + + // Act & Assert + assert.Nil(t, obj.GetEntryMethod(), "getter should return nil when property is nil") + }) + + t.Run("GetEntryMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TenderCardDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEntryMethod() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTenderCardDetails(t *testing.T) { + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderCardDetails{} + var fernTestValueStatus *TenderCardDetailsStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCard_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderCardDetails{} + var fernTestValueCard *Card + + // Act + obj.SetCard(fernTestValueCard) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEntryMethod_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderCardDetails{} + var fernTestValueEntryMethod *TenderCardDetailsEntryMethod + + // Act + obj.SetEntryMethod(fernTestValueEntryMethod) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTenderCashDetails(t *testing.T) { + t.Run("SetBuyerTenderedMoney", func(t *testing.T) { + obj := &TenderCashDetails{} + var fernTestValueBuyerTenderedMoney *Money + obj.SetBuyerTenderedMoney(fernTestValueBuyerTenderedMoney) + assert.Equal(t, fernTestValueBuyerTenderedMoney, obj.BuyerTenderedMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetChangeBackMoney", func(t *testing.T) { + obj := &TenderCashDetails{} + var fernTestValueChangeBackMoney *Money + obj.SetChangeBackMoney(fernTestValueChangeBackMoney) + assert.Equal(t, fernTestValueChangeBackMoney, obj.ChangeBackMoney) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTenderCashDetails(t *testing.T) { + t.Run("GetBuyerTenderedMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderCashDetails{} + var expected *Money + obj.BuyerTenderedMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBuyerTenderedMoney(), "getter should return the property value") + }) + + t.Run("GetBuyerTenderedMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderCashDetails{} + obj.BuyerTenderedMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetBuyerTenderedMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetBuyerTenderedMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TenderCashDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBuyerTenderedMoney() // Should return zero value + }) + + t.Run("GetChangeBackMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderCashDetails{} + var expected *Money + obj.ChangeBackMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetChangeBackMoney(), "getter should return the property value") + }) + + t.Run("GetChangeBackMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderCashDetails{} + obj.ChangeBackMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetChangeBackMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetChangeBackMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TenderCashDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetChangeBackMoney() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTenderCashDetails(t *testing.T) { + t.Run("SetBuyerTenderedMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderCashDetails{} + var fernTestValueBuyerTenderedMoney *Money + + // Act + obj.SetBuyerTenderedMoney(fernTestValueBuyerTenderedMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetChangeBackMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderCashDetails{} + var fernTestValueChangeBackMoney *Money + + // Act + obj.SetChangeBackMoney(fernTestValueChangeBackMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTenderSquareAccountDetails(t *testing.T) { + t.Run("SetStatus", func(t *testing.T) { + obj := &TenderSquareAccountDetails{} + var fernTestValueStatus *TenderSquareAccountDetailsStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTenderSquareAccountDetails(t *testing.T) { + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderSquareAccountDetails{} + var expected *TenderSquareAccountDetailsStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderSquareAccountDetails{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TenderSquareAccountDetails + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTenderSquareAccountDetails(t *testing.T) { + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderSquareAccountDetails{} + var fernTestValueStatus *TenderSquareAccountDetailsStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalAction(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &TerminalAction{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeviceID", func(t *testing.T) { + obj := &TerminalAction{} + var fernTestValueDeviceID *string + obj.SetDeviceID(fernTestValueDeviceID) + assert.Equal(t, fernTestValueDeviceID, obj.DeviceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeadlineDuration", func(t *testing.T) { + obj := &TerminalAction{} + var fernTestValueDeadlineDuration *string + obj.SetDeadlineDuration(fernTestValueDeadlineDuration) + assert.Equal(t, fernTestValueDeadlineDuration, obj.DeadlineDuration) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &TerminalAction{} + var fernTestValueStatus *string + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCancelReason", func(t *testing.T) { + obj := &TerminalAction{} + var fernTestValueCancelReason *ActionCancelReason + obj.SetCancelReason(fernTestValueCancelReason) + assert.Equal(t, fernTestValueCancelReason, obj.CancelReason) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &TerminalAction{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &TerminalAction{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppID", func(t *testing.T) { + obj := &TerminalAction{} + var fernTestValueAppID *string + obj.SetAppID(fernTestValueAppID) + assert.Equal(t, fernTestValueAppID, obj.AppID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &TerminalAction{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &TerminalAction{} + var fernTestValueType *TerminalActionActionType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetQrCodeOptions", func(t *testing.T) { + obj := &TerminalAction{} + var fernTestValueQrCodeOptions *QrCodeOptions + obj.SetQrCodeOptions(fernTestValueQrCodeOptions) + assert.Equal(t, fernTestValueQrCodeOptions, obj.QrCodeOptions) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSaveCardOptions", func(t *testing.T) { + obj := &TerminalAction{} + var fernTestValueSaveCardOptions *SaveCardOptions + obj.SetSaveCardOptions(fernTestValueSaveCardOptions) + assert.Equal(t, fernTestValueSaveCardOptions, obj.SaveCardOptions) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSignatureOptions", func(t *testing.T) { + obj := &TerminalAction{} + var fernTestValueSignatureOptions *SignatureOptions + obj.SetSignatureOptions(fernTestValueSignatureOptions) + assert.Equal(t, fernTestValueSignatureOptions, obj.SignatureOptions) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetConfirmationOptions", func(t *testing.T) { + obj := &TerminalAction{} + var fernTestValueConfirmationOptions *ConfirmationOptions + obj.SetConfirmationOptions(fernTestValueConfirmationOptions) + assert.Equal(t, fernTestValueConfirmationOptions, obj.ConfirmationOptions) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReceiptOptions", func(t *testing.T) { + obj := &TerminalAction{} + var fernTestValueReceiptOptions *ReceiptOptions + obj.SetReceiptOptions(fernTestValueReceiptOptions) + assert.Equal(t, fernTestValueReceiptOptions, obj.ReceiptOptions) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDataCollectionOptions", func(t *testing.T) { + obj := &TerminalAction{} + var fernTestValueDataCollectionOptions *DataCollectionOptions + obj.SetDataCollectionOptions(fernTestValueDataCollectionOptions) + assert.Equal(t, fernTestValueDataCollectionOptions, obj.DataCollectionOptions) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSelectOptions", func(t *testing.T) { + obj := &TerminalAction{} + var fernTestValueSelectOptions *SelectOptions + obj.SetSelectOptions(fernTestValueSelectOptions) + assert.Equal(t, fernTestValueSelectOptions, obj.SelectOptions) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeviceMetadata", func(t *testing.T) { + obj := &TerminalAction{} + var fernTestValueDeviceMetadata *DeviceMetadata + obj.SetDeviceMetadata(fernTestValueDeviceMetadata) + assert.Equal(t, fernTestValueDeviceMetadata, obj.DeviceMetadata) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAwaitNextAction", func(t *testing.T) { + obj := &TerminalAction{} + var fernTestValueAwaitNextAction *bool + obj.SetAwaitNextAction(fernTestValueAwaitNextAction) + assert.Equal(t, fernTestValueAwaitNextAction, obj.AwaitNextAction) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAwaitNextActionDuration", func(t *testing.T) { + obj := &TerminalAction{} + var fernTestValueAwaitNextActionDuration *string + obj.SetAwaitNextActionDuration(fernTestValueAwaitNextActionDuration) + assert.Equal(t, fernTestValueAwaitNextActionDuration, obj.AwaitNextActionDuration) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalAction(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalAction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetDeviceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var expected *string + obj.DeviceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeviceID(), "getter should return the property value") + }) + + t.Run("GetDeviceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + obj.DeviceID = nil + + // Act & Assert + assert.Nil(t, obj.GetDeviceID(), "getter should return nil when property is nil") + }) + + t.Run("GetDeviceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalAction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeviceID() // Should return zero value + }) + + t.Run("GetDeadlineDuration", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var expected *string + obj.DeadlineDuration = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeadlineDuration(), "getter should return the property value") + }) + + t.Run("GetDeadlineDuration_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + obj.DeadlineDuration = nil + + // Act & Assert + assert.Nil(t, obj.GetDeadlineDuration(), "getter should return nil when property is nil") + }) + + t.Run("GetDeadlineDuration_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalAction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeadlineDuration() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var expected *string + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalAction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetCancelReason", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var expected *ActionCancelReason + obj.CancelReason = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCancelReason(), "getter should return the property value") + }) + + t.Run("GetCancelReason_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + obj.CancelReason = nil + + // Act & Assert + assert.Nil(t, obj.GetCancelReason(), "getter should return nil when property is nil") + }) + + t.Run("GetCancelReason_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalAction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCancelReason() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalAction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalAction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetAppID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var expected *string + obj.AppID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppID(), "getter should return the property value") + }) + + t.Run("GetAppID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + obj.AppID = nil + + // Act & Assert + assert.Nil(t, obj.GetAppID(), "getter should return nil when property is nil") + }) + + t.Run("GetAppID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalAction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalAction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var expected *TerminalActionActionType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalAction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetQrCodeOptions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var expected *QrCodeOptions + obj.QrCodeOptions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetQrCodeOptions(), "getter should return the property value") + }) + + t.Run("GetQrCodeOptions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + obj.QrCodeOptions = nil + + // Act & Assert + assert.Nil(t, obj.GetQrCodeOptions(), "getter should return nil when property is nil") + }) + + t.Run("GetQrCodeOptions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalAction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetQrCodeOptions() // Should return zero value + }) + + t.Run("GetSaveCardOptions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var expected *SaveCardOptions + obj.SaveCardOptions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSaveCardOptions(), "getter should return the property value") + }) + + t.Run("GetSaveCardOptions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + obj.SaveCardOptions = nil + + // Act & Assert + assert.Nil(t, obj.GetSaveCardOptions(), "getter should return nil when property is nil") + }) + + t.Run("GetSaveCardOptions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalAction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSaveCardOptions() // Should return zero value + }) + + t.Run("GetSignatureOptions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var expected *SignatureOptions + obj.SignatureOptions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSignatureOptions(), "getter should return the property value") + }) + + t.Run("GetSignatureOptions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + obj.SignatureOptions = nil + + // Act & Assert + assert.Nil(t, obj.GetSignatureOptions(), "getter should return nil when property is nil") + }) + + t.Run("GetSignatureOptions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalAction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSignatureOptions() // Should return zero value + }) + + t.Run("GetConfirmationOptions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var expected *ConfirmationOptions + obj.ConfirmationOptions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetConfirmationOptions(), "getter should return the property value") + }) + + t.Run("GetConfirmationOptions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + obj.ConfirmationOptions = nil + + // Act & Assert + assert.Nil(t, obj.GetConfirmationOptions(), "getter should return nil when property is nil") + }) + + t.Run("GetConfirmationOptions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalAction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetConfirmationOptions() // Should return zero value + }) + + t.Run("GetReceiptOptions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var expected *ReceiptOptions + obj.ReceiptOptions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReceiptOptions(), "getter should return the property value") + }) + + t.Run("GetReceiptOptions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + obj.ReceiptOptions = nil + + // Act & Assert + assert.Nil(t, obj.GetReceiptOptions(), "getter should return nil when property is nil") + }) + + t.Run("GetReceiptOptions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalAction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReceiptOptions() // Should return zero value + }) + + t.Run("GetDataCollectionOptions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var expected *DataCollectionOptions + obj.DataCollectionOptions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDataCollectionOptions(), "getter should return the property value") + }) + + t.Run("GetDataCollectionOptions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + obj.DataCollectionOptions = nil + + // Act & Assert + assert.Nil(t, obj.GetDataCollectionOptions(), "getter should return nil when property is nil") + }) + + t.Run("GetDataCollectionOptions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalAction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDataCollectionOptions() // Should return zero value + }) + + t.Run("GetSelectOptions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var expected *SelectOptions + obj.SelectOptions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSelectOptions(), "getter should return the property value") + }) + + t.Run("GetSelectOptions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + obj.SelectOptions = nil + + // Act & Assert + assert.Nil(t, obj.GetSelectOptions(), "getter should return nil when property is nil") + }) + + t.Run("GetSelectOptions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalAction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSelectOptions() // Should return zero value + }) + + t.Run("GetDeviceMetadata", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var expected *DeviceMetadata + obj.DeviceMetadata = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeviceMetadata(), "getter should return the property value") + }) + + t.Run("GetDeviceMetadata_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + obj.DeviceMetadata = nil + + // Act & Assert + assert.Nil(t, obj.GetDeviceMetadata(), "getter should return nil when property is nil") + }) + + t.Run("GetDeviceMetadata_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalAction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeviceMetadata() // Should return zero value + }) + + t.Run("GetAwaitNextAction", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var expected *bool + obj.AwaitNextAction = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAwaitNextAction(), "getter should return the property value") + }) + + t.Run("GetAwaitNextAction_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + obj.AwaitNextAction = nil + + // Act & Assert + assert.Nil(t, obj.GetAwaitNextAction(), "getter should return nil when property is nil") + }) + + t.Run("GetAwaitNextAction_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalAction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAwaitNextAction() // Should return zero value + }) + + t.Run("GetAwaitNextActionDuration", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var expected *string + obj.AwaitNextActionDuration = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAwaitNextActionDuration(), "getter should return the property value") + }) + + t.Run("GetAwaitNextActionDuration_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + obj.AwaitNextActionDuration = nil + + // Act & Assert + assert.Nil(t, obj.GetAwaitNextActionDuration(), "getter should return nil when property is nil") + }) + + t.Run("GetAwaitNextActionDuration_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalAction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAwaitNextActionDuration() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalAction(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeviceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var fernTestValueDeviceID *string + + // Act + obj.SetDeviceID(fernTestValueDeviceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeadlineDuration_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var fernTestValueDeadlineDuration *string + + // Act + obj.SetDeadlineDuration(fernTestValueDeadlineDuration) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var fernTestValueStatus *string + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCancelReason_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var fernTestValueCancelReason *ActionCancelReason + + // Act + obj.SetCancelReason(fernTestValueCancelReason) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var fernTestValueAppID *string + + // Act + obj.SetAppID(fernTestValueAppID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var fernTestValueType *TerminalActionActionType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetQrCodeOptions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var fernTestValueQrCodeOptions *QrCodeOptions + + // Act + obj.SetQrCodeOptions(fernTestValueQrCodeOptions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSaveCardOptions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var fernTestValueSaveCardOptions *SaveCardOptions + + // Act + obj.SetSaveCardOptions(fernTestValueSaveCardOptions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSignatureOptions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var fernTestValueSignatureOptions *SignatureOptions + + // Act + obj.SetSignatureOptions(fernTestValueSignatureOptions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetConfirmationOptions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var fernTestValueConfirmationOptions *ConfirmationOptions + + // Act + obj.SetConfirmationOptions(fernTestValueConfirmationOptions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReceiptOptions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var fernTestValueReceiptOptions *ReceiptOptions + + // Act + obj.SetReceiptOptions(fernTestValueReceiptOptions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDataCollectionOptions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var fernTestValueDataCollectionOptions *DataCollectionOptions + + // Act + obj.SetDataCollectionOptions(fernTestValueDataCollectionOptions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSelectOptions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var fernTestValueSelectOptions *SelectOptions + + // Act + obj.SetSelectOptions(fernTestValueSelectOptions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeviceMetadata_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var fernTestValueDeviceMetadata *DeviceMetadata + + // Act + obj.SetDeviceMetadata(fernTestValueDeviceMetadata) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAwaitNextAction_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var fernTestValueAwaitNextAction *bool + + // Act + obj.SetAwaitNextAction(fernTestValueAwaitNextAction) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAwaitNextActionDuration_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + var fernTestValueAwaitNextActionDuration *string + + // Act + obj.SetAwaitNextActionDuration(fernTestValueAwaitNextActionDuration) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalActionCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &TerminalActionCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &TerminalActionCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &TerminalActionCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &TerminalActionCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &TerminalActionCreatedEvent{} + var fernTestValueData *TerminalActionCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalActionCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEvent{} + var expected *TerminalActionCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalActionCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEvent{} + var fernTestValueData *TerminalActionCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalActionCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &TerminalActionCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &TerminalActionCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &TerminalActionCreatedEventData{} + var fernTestValueObject *TerminalActionCreatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalActionCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEventData{} + var expected *TerminalActionCreatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalActionCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEventData{} + var fernTestValueObject *TerminalActionCreatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalActionCreatedEventObject(t *testing.T) { + t.Run("SetAction", func(t *testing.T) { + obj := &TerminalActionCreatedEventObject{} + var fernTestValueAction *TerminalAction + obj.SetAction(fernTestValueAction) + assert.Equal(t, fernTestValueAction, obj.Action) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalActionCreatedEventObject(t *testing.T) { + t.Run("GetAction", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEventObject{} + var expected *TerminalAction + obj.Action = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAction(), "getter should return the property value") + }) + + t.Run("GetAction_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEventObject{} + obj.Action = nil + + // Act & Assert + assert.Nil(t, obj.GetAction(), "getter should return nil when property is nil") + }) + + t.Run("GetAction_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionCreatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAction() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalActionCreatedEventObject(t *testing.T) { + t.Run("SetAction_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEventObject{} + var fernTestValueAction *TerminalAction + + // Act + obj.SetAction(fernTestValueAction) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalActionQuery(t *testing.T) { + t.Run("SetFilter", func(t *testing.T) { + obj := &TerminalActionQuery{} + var fernTestValueFilter *TerminalActionQueryFilter + obj.SetFilter(fernTestValueFilter) + assert.Equal(t, fernTestValueFilter, obj.Filter) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSort", func(t *testing.T) { + obj := &TerminalActionQuery{} + var fernTestValueSort *TerminalActionQuerySort + obj.SetSort(fernTestValueSort) + assert.Equal(t, fernTestValueSort, obj.Sort) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalActionQuery(t *testing.T) { + t.Run("GetFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionQuery{} + var expected *TerminalActionQueryFilter + obj.Filter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFilter(), "getter should return the property value") + }) + + t.Run("GetFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionQuery{} + obj.Filter = nil + + // Act & Assert + assert.Nil(t, obj.GetFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFilter() // Should return zero value + }) + + t.Run("GetSort", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionQuery{} + var expected *TerminalActionQuerySort + obj.Sort = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSort(), "getter should return the property value") + }) + + t.Run("GetSort_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionQuery{} + obj.Sort = nil + + // Act & Assert + assert.Nil(t, obj.GetSort(), "getter should return nil when property is nil") + }) + + t.Run("GetSort_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSort() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalActionQuery(t *testing.T) { + t.Run("SetFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionQuery{} + var fernTestValueFilter *TerminalActionQueryFilter + + // Act + obj.SetFilter(fernTestValueFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSort_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionQuery{} + var fernTestValueSort *TerminalActionQuerySort + + // Act + obj.SetSort(fernTestValueSort) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalActionQueryFilter(t *testing.T) { + t.Run("SetDeviceID", func(t *testing.T) { + obj := &TerminalActionQueryFilter{} + var fernTestValueDeviceID *string + obj.SetDeviceID(fernTestValueDeviceID) + assert.Equal(t, fernTestValueDeviceID, obj.DeviceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &TerminalActionQueryFilter{} + var fernTestValueCreatedAt *TimeRange + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &TerminalActionQueryFilter{} + var fernTestValueStatus *string + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &TerminalActionQueryFilter{} + var fernTestValueType *TerminalActionActionType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalActionQueryFilter(t *testing.T) { + t.Run("GetDeviceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionQueryFilter{} + var expected *string + obj.DeviceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeviceID(), "getter should return the property value") + }) + + t.Run("GetDeviceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionQueryFilter{} + obj.DeviceID = nil + + // Act & Assert + assert.Nil(t, obj.GetDeviceID(), "getter should return nil when property is nil") + }) + + t.Run("GetDeviceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionQueryFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeviceID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionQueryFilter{} + var expected *TimeRange + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionQueryFilter{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionQueryFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionQueryFilter{} + var expected *string + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionQueryFilter{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionQueryFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionQueryFilter{} + var expected *TerminalActionActionType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionQueryFilter{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionQueryFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalActionQueryFilter(t *testing.T) { + t.Run("SetDeviceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionQueryFilter{} + var fernTestValueDeviceID *string + + // Act + obj.SetDeviceID(fernTestValueDeviceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionQueryFilter{} + var fernTestValueCreatedAt *TimeRange + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionQueryFilter{} + var fernTestValueStatus *string + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionQueryFilter{} + var fernTestValueType *TerminalActionActionType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalActionQuerySort(t *testing.T) { + t.Run("SetSortOrder", func(t *testing.T) { + obj := &TerminalActionQuerySort{} + var fernTestValueSortOrder *SortOrder + obj.SetSortOrder(fernTestValueSortOrder) + assert.Equal(t, fernTestValueSortOrder, obj.SortOrder) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalActionQuerySort(t *testing.T) { + t.Run("GetSortOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionQuerySort{} + var expected *SortOrder + obj.SortOrder = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSortOrder(), "getter should return the property value") + }) + + t.Run("GetSortOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionQuerySort{} + obj.SortOrder = nil + + // Act & Assert + assert.Nil(t, obj.GetSortOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetSortOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionQuerySort + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSortOrder() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalActionQuerySort(t *testing.T) { + t.Run("SetSortOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionQuerySort{} + var fernTestValueSortOrder *SortOrder + + // Act + obj.SetSortOrder(fernTestValueSortOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalActionUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &TerminalActionUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &TerminalActionUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &TerminalActionUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &TerminalActionUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &TerminalActionUpdatedEvent{} + var fernTestValueData *TerminalActionUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalActionUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEvent{} + var expected *TerminalActionUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalActionUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEvent{} + var fernTestValueData *TerminalActionUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalActionUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &TerminalActionUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &TerminalActionUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &TerminalActionUpdatedEventData{} + var fernTestValueObject *TerminalActionUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalActionUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEventData{} + var expected *TerminalActionUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalActionUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEventData{} + var fernTestValueObject *TerminalActionUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalActionUpdatedEventObject(t *testing.T) { + t.Run("SetAction", func(t *testing.T) { + obj := &TerminalActionUpdatedEventObject{} + var fernTestValueAction *TerminalAction + obj.SetAction(fernTestValueAction) + assert.Equal(t, fernTestValueAction, obj.Action) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalActionUpdatedEventObject(t *testing.T) { + t.Run("GetAction", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEventObject{} + var expected *TerminalAction + obj.Action = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAction(), "getter should return the property value") + }) + + t.Run("GetAction_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEventObject{} + obj.Action = nil + + // Act & Assert + assert.Nil(t, obj.GetAction(), "getter should return nil when property is nil") + }) + + t.Run("GetAction_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAction() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalActionUpdatedEventObject(t *testing.T) { + t.Run("SetAction_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEventObject{} + var fernTestValueAction *TerminalAction + + // Act + obj.SetAction(fernTestValueAction) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalCheckout(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &TerminalCheckout{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &TerminalCheckout{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReferenceID", func(t *testing.T) { + obj := &TerminalCheckout{} + var fernTestValueReferenceID *string + obj.SetReferenceID(fernTestValueReferenceID) + assert.Equal(t, fernTestValueReferenceID, obj.ReferenceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNote", func(t *testing.T) { + obj := &TerminalCheckout{} + var fernTestValueNote *string + obj.SetNote(fernTestValueNote) + assert.Equal(t, fernTestValueNote, obj.Note) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrderID", func(t *testing.T) { + obj := &TerminalCheckout{} + var fernTestValueOrderID *string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPaymentOptions", func(t *testing.T) { + obj := &TerminalCheckout{} + var fernTestValuePaymentOptions *PaymentOptions + obj.SetPaymentOptions(fernTestValuePaymentOptions) + assert.Equal(t, fernTestValuePaymentOptions, obj.PaymentOptions) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeviceOptions", func(t *testing.T) { + obj := &TerminalCheckout{} + var fernTestValueDeviceOptions *DeviceCheckoutOptions + obj.SetDeviceOptions(fernTestValueDeviceOptions) + assert.Equal(t, fernTestValueDeviceOptions, obj.DeviceOptions) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeadlineDuration", func(t *testing.T) { + obj := &TerminalCheckout{} + var fernTestValueDeadlineDuration *string + obj.SetDeadlineDuration(fernTestValueDeadlineDuration) + assert.Equal(t, fernTestValueDeadlineDuration, obj.DeadlineDuration) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &TerminalCheckout{} + var fernTestValueStatus *string + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCancelReason", func(t *testing.T) { + obj := &TerminalCheckout{} + var fernTestValueCancelReason *ActionCancelReason + obj.SetCancelReason(fernTestValueCancelReason) + assert.Equal(t, fernTestValueCancelReason, obj.CancelReason) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPaymentIDs", func(t *testing.T) { + obj := &TerminalCheckout{} + var fernTestValuePaymentIDs []string + obj.SetPaymentIDs(fernTestValuePaymentIDs) + assert.Equal(t, fernTestValuePaymentIDs, obj.PaymentIDs) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &TerminalCheckout{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &TerminalCheckout{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppID", func(t *testing.T) { + obj := &TerminalCheckout{} + var fernTestValueAppID *string + obj.SetAppID(fernTestValueAppID) + assert.Equal(t, fernTestValueAppID, obj.AppID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &TerminalCheckout{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPaymentType", func(t *testing.T) { + obj := &TerminalCheckout{} + var fernTestValuePaymentType *CheckoutOptionsPaymentType + obj.SetPaymentType(fernTestValuePaymentType) + assert.Equal(t, fernTestValuePaymentType, obj.PaymentType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTeamMemberID", func(t *testing.T) { + obj := &TerminalCheckout{} + var fernTestValueTeamMemberID *string + obj.SetTeamMemberID(fernTestValueTeamMemberID) + assert.Equal(t, fernTestValueTeamMemberID, obj.TeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomerID", func(t *testing.T) { + obj := &TerminalCheckout{} + var fernTestValueCustomerID *string + obj.SetCustomerID(fernTestValueCustomerID) + assert.Equal(t, fernTestValueCustomerID, obj.CustomerID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppFeeMoney", func(t *testing.T) { + obj := &TerminalCheckout{} + var fernTestValueAppFeeMoney *Money + obj.SetAppFeeMoney(fernTestValueAppFeeMoney) + assert.Equal(t, fernTestValueAppFeeMoney, obj.AppFeeMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatementDescriptionIdentifier", func(t *testing.T) { + obj := &TerminalCheckout{} + var fernTestValueStatementDescriptionIdentifier *string + obj.SetStatementDescriptionIdentifier(fernTestValueStatementDescriptionIdentifier) + assert.Equal(t, fernTestValueStatementDescriptionIdentifier, obj.StatementDescriptionIdentifier) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTipMoney", func(t *testing.T) { + obj := &TerminalCheckout{} + var fernTestValueTipMoney *Money + obj.SetTipMoney(fernTestValueTipMoney) + assert.Equal(t, fernTestValueTipMoney, obj.TipMoney) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalCheckout(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + + t.Run("GetReferenceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var expected *string + obj.ReferenceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReferenceID(), "getter should return the property value") + }) + + t.Run("GetReferenceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + obj.ReferenceID = nil + + // Act & Assert + assert.Nil(t, obj.GetReferenceID(), "getter should return nil when property is nil") + }) + + t.Run("GetReferenceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReferenceID() // Should return zero value + }) + + t.Run("GetNote", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var expected *string + obj.Note = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNote(), "getter should return the property value") + }) + + t.Run("GetNote_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + obj.Note = nil + + // Act & Assert + assert.Nil(t, obj.GetNote(), "getter should return nil when property is nil") + }) + + t.Run("GetNote_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNote() // Should return zero value + }) + + t.Run("GetOrderID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var expected *string + obj.OrderID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderID(), "getter should return the property value") + }) + + t.Run("GetOrderID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + obj.OrderID = nil + + // Act & Assert + assert.Nil(t, obj.GetOrderID(), "getter should return nil when property is nil") + }) + + t.Run("GetOrderID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderID() // Should return zero value + }) + + t.Run("GetPaymentOptions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var expected *PaymentOptions + obj.PaymentOptions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentOptions(), "getter should return the property value") + }) + + t.Run("GetPaymentOptions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + obj.PaymentOptions = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentOptions(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentOptions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentOptions() // Should return zero value + }) + + t.Run("GetDeviceOptions", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var expected *DeviceCheckoutOptions + obj.DeviceOptions = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeviceOptions(), "getter should return the property value") + }) + + t.Run("GetDeviceOptions_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + obj.DeviceOptions = nil + + // Act & Assert + assert.Nil(t, obj.GetDeviceOptions(), "getter should return nil when property is nil") + }) + + t.Run("GetDeviceOptions_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeviceOptions() // Should return zero value + }) + + t.Run("GetDeadlineDuration", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var expected *string + obj.DeadlineDuration = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeadlineDuration(), "getter should return the property value") + }) + + t.Run("GetDeadlineDuration_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + obj.DeadlineDuration = nil + + // Act & Assert + assert.Nil(t, obj.GetDeadlineDuration(), "getter should return nil when property is nil") + }) + + t.Run("GetDeadlineDuration_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeadlineDuration() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var expected *string + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetCancelReason", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var expected *ActionCancelReason + obj.CancelReason = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCancelReason(), "getter should return the property value") + }) + + t.Run("GetCancelReason_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + obj.CancelReason = nil + + // Act & Assert + assert.Nil(t, obj.GetCancelReason(), "getter should return nil when property is nil") + }) + + t.Run("GetCancelReason_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCancelReason() // Should return zero value + }) + + t.Run("GetPaymentIDs", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var expected []string + obj.PaymentIDs = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentIDs(), "getter should return the property value") + }) + + t.Run("GetPaymentIDs_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + obj.PaymentIDs = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentIDs(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentIDs_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentIDs() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetAppID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var expected *string + obj.AppID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppID(), "getter should return the property value") + }) + + t.Run("GetAppID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + obj.AppID = nil + + // Act & Assert + assert.Nil(t, obj.GetAppID(), "getter should return nil when property is nil") + }) + + t.Run("GetAppID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetPaymentType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var expected *CheckoutOptionsPaymentType + obj.PaymentType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentType(), "getter should return the property value") + }) + + t.Run("GetPaymentType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + obj.PaymentType = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentType(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentType() // Should return zero value + }) + + t.Run("GetTeamMemberID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var expected *string + obj.TeamMemberID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMemberID(), "getter should return the property value") + }) + + t.Run("GetTeamMemberID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + obj.TeamMemberID = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMemberID(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMemberID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMemberID() // Should return zero value + }) + + t.Run("GetCustomerID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var expected *string + obj.CustomerID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomerID(), "getter should return the property value") + }) + + t.Run("GetCustomerID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + obj.CustomerID = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomerID(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomerID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomerID() // Should return zero value + }) + + t.Run("GetAppFeeMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var expected *Money + obj.AppFeeMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppFeeMoney(), "getter should return the property value") + }) + + t.Run("GetAppFeeMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + obj.AppFeeMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAppFeeMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAppFeeMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppFeeMoney() // Should return zero value + }) + + t.Run("GetStatementDescriptionIdentifier", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var expected *string + obj.StatementDescriptionIdentifier = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatementDescriptionIdentifier(), "getter should return the property value") + }) + + t.Run("GetStatementDescriptionIdentifier_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + obj.StatementDescriptionIdentifier = nil + + // Act & Assert + assert.Nil(t, obj.GetStatementDescriptionIdentifier(), "getter should return nil when property is nil") + }) + + t.Run("GetStatementDescriptionIdentifier_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatementDescriptionIdentifier() // Should return zero value + }) + + t.Run("GetTipMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var expected *Money + obj.TipMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTipMoney(), "getter should return the property value") + }) + + t.Run("GetTipMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + obj.TipMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTipMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTipMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckout + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTipMoney() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalCheckout(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReferenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var fernTestValueReferenceID *string + + // Act + obj.SetReferenceID(fernTestValueReferenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNote_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var fernTestValueNote *string + + // Act + obj.SetNote(fernTestValueNote) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var fernTestValueOrderID *string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPaymentOptions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var fernTestValuePaymentOptions *PaymentOptions + + // Act + obj.SetPaymentOptions(fernTestValuePaymentOptions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeviceOptions_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var fernTestValueDeviceOptions *DeviceCheckoutOptions + + // Act + obj.SetDeviceOptions(fernTestValueDeviceOptions) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeadlineDuration_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var fernTestValueDeadlineDuration *string + + // Act + obj.SetDeadlineDuration(fernTestValueDeadlineDuration) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var fernTestValueStatus *string + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCancelReason_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var fernTestValueCancelReason *ActionCancelReason + + // Act + obj.SetCancelReason(fernTestValueCancelReason) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPaymentIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var fernTestValuePaymentIDs []string + + // Act + obj.SetPaymentIDs(fernTestValuePaymentIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var fernTestValueAppID *string + + // Act + obj.SetAppID(fernTestValueAppID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPaymentType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var fernTestValuePaymentType *CheckoutOptionsPaymentType + + // Act + obj.SetPaymentType(fernTestValuePaymentType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var fernTestValueTeamMemberID *string + + // Act + obj.SetTeamMemberID(fernTestValueTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomerID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var fernTestValueCustomerID *string + + // Act + obj.SetCustomerID(fernTestValueCustomerID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppFeeMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var fernTestValueAppFeeMoney *Money + + // Act + obj.SetAppFeeMoney(fernTestValueAppFeeMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatementDescriptionIdentifier_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var fernTestValueStatementDescriptionIdentifier *string + + // Act + obj.SetStatementDescriptionIdentifier(fernTestValueStatementDescriptionIdentifier) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTipMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + var fernTestValueTipMoney *Money + + // Act + obj.SetTipMoney(fernTestValueTipMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalCheckoutCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &TerminalCheckoutCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &TerminalCheckoutCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &TerminalCheckoutCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &TerminalCheckoutCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &TerminalCheckoutCreatedEvent{} + var fernTestValueData *TerminalCheckoutCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalCheckoutCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEvent{} + var expected *TerminalCheckoutCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalCheckoutCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEvent{} + var fernTestValueData *TerminalCheckoutCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalCheckoutCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &TerminalCheckoutCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &TerminalCheckoutCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &TerminalCheckoutCreatedEventData{} + var fernTestValueObject *TerminalCheckoutCreatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalCheckoutCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEventData{} + var expected *TerminalCheckoutCreatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalCheckoutCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEventData{} + var fernTestValueObject *TerminalCheckoutCreatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalCheckoutCreatedEventObject(t *testing.T) { + t.Run("SetCheckout", func(t *testing.T) { + obj := &TerminalCheckoutCreatedEventObject{} + var fernTestValueCheckout *TerminalCheckout + obj.SetCheckout(fernTestValueCheckout) + assert.Equal(t, fernTestValueCheckout, obj.Checkout) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalCheckoutCreatedEventObject(t *testing.T) { + t.Run("GetCheckout", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEventObject{} + var expected *TerminalCheckout + obj.Checkout = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCheckout(), "getter should return the property value") + }) + + t.Run("GetCheckout_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEventObject{} + obj.Checkout = nil + + // Act & Assert + assert.Nil(t, obj.GetCheckout(), "getter should return nil when property is nil") + }) + + t.Run("GetCheckout_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutCreatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCheckout() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalCheckoutCreatedEventObject(t *testing.T) { + t.Run("SetCheckout_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEventObject{} + var fernTestValueCheckout *TerminalCheckout + + // Act + obj.SetCheckout(fernTestValueCheckout) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalCheckoutQuery(t *testing.T) { + t.Run("SetFilter", func(t *testing.T) { + obj := &TerminalCheckoutQuery{} + var fernTestValueFilter *TerminalCheckoutQueryFilter + obj.SetFilter(fernTestValueFilter) + assert.Equal(t, fernTestValueFilter, obj.Filter) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSort", func(t *testing.T) { + obj := &TerminalCheckoutQuery{} + var fernTestValueSort *TerminalCheckoutQuerySort + obj.SetSort(fernTestValueSort) + assert.Equal(t, fernTestValueSort, obj.Sort) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalCheckoutQuery(t *testing.T) { + t.Run("GetFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutQuery{} + var expected *TerminalCheckoutQueryFilter + obj.Filter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFilter(), "getter should return the property value") + }) + + t.Run("GetFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutQuery{} + obj.Filter = nil + + // Act & Assert + assert.Nil(t, obj.GetFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFilter() // Should return zero value + }) + + t.Run("GetSort", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutQuery{} + var expected *TerminalCheckoutQuerySort + obj.Sort = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSort(), "getter should return the property value") + }) + + t.Run("GetSort_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutQuery{} + obj.Sort = nil + + // Act & Assert + assert.Nil(t, obj.GetSort(), "getter should return nil when property is nil") + }) + + t.Run("GetSort_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSort() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalCheckoutQuery(t *testing.T) { + t.Run("SetFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutQuery{} + var fernTestValueFilter *TerminalCheckoutQueryFilter + + // Act + obj.SetFilter(fernTestValueFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSort_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutQuery{} + var fernTestValueSort *TerminalCheckoutQuerySort + + // Act + obj.SetSort(fernTestValueSort) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalCheckoutQueryFilter(t *testing.T) { + t.Run("SetDeviceID", func(t *testing.T) { + obj := &TerminalCheckoutQueryFilter{} + var fernTestValueDeviceID *string + obj.SetDeviceID(fernTestValueDeviceID) + assert.Equal(t, fernTestValueDeviceID, obj.DeviceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &TerminalCheckoutQueryFilter{} + var fernTestValueCreatedAt *TimeRange + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &TerminalCheckoutQueryFilter{} + var fernTestValueStatus *string + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalCheckoutQueryFilter(t *testing.T) { + t.Run("GetDeviceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutQueryFilter{} + var expected *string + obj.DeviceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeviceID(), "getter should return the property value") + }) + + t.Run("GetDeviceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutQueryFilter{} + obj.DeviceID = nil + + // Act & Assert + assert.Nil(t, obj.GetDeviceID(), "getter should return nil when property is nil") + }) + + t.Run("GetDeviceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutQueryFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeviceID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutQueryFilter{} + var expected *TimeRange + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutQueryFilter{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutQueryFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutQueryFilter{} + var expected *string + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutQueryFilter{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutQueryFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalCheckoutQueryFilter(t *testing.T) { + t.Run("SetDeviceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutQueryFilter{} + var fernTestValueDeviceID *string + + // Act + obj.SetDeviceID(fernTestValueDeviceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutQueryFilter{} + var fernTestValueCreatedAt *TimeRange + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutQueryFilter{} + var fernTestValueStatus *string + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalCheckoutQuerySort(t *testing.T) { + t.Run("SetSortOrder", func(t *testing.T) { + obj := &TerminalCheckoutQuerySort{} + var fernTestValueSortOrder *SortOrder + obj.SetSortOrder(fernTestValueSortOrder) + assert.Equal(t, fernTestValueSortOrder, obj.SortOrder) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalCheckoutQuerySort(t *testing.T) { + t.Run("GetSortOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutQuerySort{} + var expected *SortOrder + obj.SortOrder = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSortOrder(), "getter should return the property value") + }) + + t.Run("GetSortOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutQuerySort{} + obj.SortOrder = nil + + // Act & Assert + assert.Nil(t, obj.GetSortOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetSortOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutQuerySort + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSortOrder() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalCheckoutQuerySort(t *testing.T) { + t.Run("SetSortOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutQuerySort{} + var fernTestValueSortOrder *SortOrder + + // Act + obj.SetSortOrder(fernTestValueSortOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalCheckoutUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &TerminalCheckoutUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &TerminalCheckoutUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &TerminalCheckoutUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &TerminalCheckoutUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &TerminalCheckoutUpdatedEvent{} + var fernTestValueData *TerminalCheckoutUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalCheckoutUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEvent{} + var expected *TerminalCheckoutUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalCheckoutUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEvent{} + var fernTestValueData *TerminalCheckoutUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalCheckoutUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &TerminalCheckoutUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &TerminalCheckoutUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &TerminalCheckoutUpdatedEventData{} + var fernTestValueObject *TerminalCheckoutUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalCheckoutUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEventData{} + var expected *TerminalCheckoutUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalCheckoutUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEventData{} + var fernTestValueObject *TerminalCheckoutUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalCheckoutUpdatedEventObject(t *testing.T) { + t.Run("SetCheckout", func(t *testing.T) { + obj := &TerminalCheckoutUpdatedEventObject{} + var fernTestValueCheckout *TerminalCheckout + obj.SetCheckout(fernTestValueCheckout) + assert.Equal(t, fernTestValueCheckout, obj.Checkout) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalCheckoutUpdatedEventObject(t *testing.T) { + t.Run("GetCheckout", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEventObject{} + var expected *TerminalCheckout + obj.Checkout = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCheckout(), "getter should return the property value") + }) + + t.Run("GetCheckout_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEventObject{} + obj.Checkout = nil + + // Act & Assert + assert.Nil(t, obj.GetCheckout(), "getter should return nil when property is nil") + }) + + t.Run("GetCheckout_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCheckout() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalCheckoutUpdatedEventObject(t *testing.T) { + t.Run("SetCheckout_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEventObject{} + var fernTestValueCheckout *TerminalCheckout + + // Act + obj.SetCheckout(fernTestValueCheckout) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalRefund(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &TerminalRefund{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRefundID", func(t *testing.T) { + obj := &TerminalRefund{} + var fernTestValueRefundID *string + obj.SetRefundID(fernTestValueRefundID) + assert.Equal(t, fernTestValueRefundID, obj.RefundID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPaymentID", func(t *testing.T) { + obj := &TerminalRefund{} + var fernTestValuePaymentID string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrderID", func(t *testing.T) { + obj := &TerminalRefund{} + var fernTestValueOrderID *string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAmountMoney", func(t *testing.T) { + obj := &TerminalRefund{} + var fernTestValueAmountMoney *Money + obj.SetAmountMoney(fernTestValueAmountMoney) + assert.Equal(t, fernTestValueAmountMoney, obj.AmountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReason", func(t *testing.T) { + obj := &TerminalRefund{} + var fernTestValueReason string + obj.SetReason(fernTestValueReason) + assert.Equal(t, fernTestValueReason, obj.Reason) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeviceID", func(t *testing.T) { + obj := &TerminalRefund{} + var fernTestValueDeviceID string + obj.SetDeviceID(fernTestValueDeviceID) + assert.Equal(t, fernTestValueDeviceID, obj.DeviceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeadlineDuration", func(t *testing.T) { + obj := &TerminalRefund{} + var fernTestValueDeadlineDuration *string + obj.SetDeadlineDuration(fernTestValueDeadlineDuration) + assert.Equal(t, fernTestValueDeadlineDuration, obj.DeadlineDuration) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &TerminalRefund{} + var fernTestValueStatus *string + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCancelReason", func(t *testing.T) { + obj := &TerminalRefund{} + var fernTestValueCancelReason *ActionCancelReason + obj.SetCancelReason(fernTestValueCancelReason) + assert.Equal(t, fernTestValueCancelReason, obj.CancelReason) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &TerminalRefund{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &TerminalRefund{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAppID", func(t *testing.T) { + obj := &TerminalRefund{} + var fernTestValueAppID *string + obj.SetAppID(fernTestValueAppID) + assert.Equal(t, fernTestValueAppID, obj.AppID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &TerminalRefund{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalRefund(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetRefundID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + var expected *string + obj.RefundID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRefundID(), "getter should return the property value") + }) + + t.Run("GetRefundID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + obj.RefundID = nil + + // Act & Assert + assert.Nil(t, obj.GetRefundID(), "getter should return nil when property is nil") + }) + + t.Run("GetRefundID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRefundID() // Should return zero value + }) + + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + var expected string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + + t.Run("GetOrderID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + var expected *string + obj.OrderID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderID(), "getter should return the property value") + }) + + t.Run("GetOrderID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + obj.OrderID = nil + + // Act & Assert + assert.Nil(t, obj.GetOrderID(), "getter should return nil when property is nil") + }) + + t.Run("GetOrderID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderID() // Should return zero value + }) + + t.Run("GetAmountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + var expected *Money + obj.AmountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmountMoney(), "getter should return the property value") + }) + + t.Run("GetAmountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + obj.AmountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetAmountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetAmountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmountMoney() // Should return zero value + }) + + t.Run("GetReason", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + var expected string + obj.Reason = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReason(), "getter should return the property value") + }) + + t.Run("GetReason_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReason() // Should return zero value + }) + + t.Run("GetDeviceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + var expected string + obj.DeviceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeviceID(), "getter should return the property value") + }) + + t.Run("GetDeviceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeviceID() // Should return zero value + }) + + t.Run("GetDeadlineDuration", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + var expected *string + obj.DeadlineDuration = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeadlineDuration(), "getter should return the property value") + }) + + t.Run("GetDeadlineDuration_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + obj.DeadlineDuration = nil + + // Act & Assert + assert.Nil(t, obj.GetDeadlineDuration(), "getter should return nil when property is nil") + }) + + t.Run("GetDeadlineDuration_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeadlineDuration() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + var expected *string + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + + t.Run("GetCancelReason", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + var expected *ActionCancelReason + obj.CancelReason = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCancelReason(), "getter should return the property value") + }) + + t.Run("GetCancelReason_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + obj.CancelReason = nil + + // Act & Assert + assert.Nil(t, obj.GetCancelReason(), "getter should return nil when property is nil") + }) + + t.Run("GetCancelReason_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCancelReason() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetAppID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + var expected *string + obj.AppID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAppID(), "getter should return the property value") + }) + + t.Run("GetAppID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + obj.AppID = nil + + // Act & Assert + assert.Nil(t, obj.GetAppID(), "getter should return nil when property is nil") + }) + + t.Run("GetAppID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAppID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefund + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalRefund(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRefundID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + var fernTestValueRefundID *string + + // Act + obj.SetRefundID(fernTestValueRefundID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + var fernTestValuePaymentID string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + var fernTestValueOrderID *string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAmountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + var fernTestValueAmountMoney *Money + + // Act + obj.SetAmountMoney(fernTestValueAmountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReason_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + var fernTestValueReason string + + // Act + obj.SetReason(fernTestValueReason) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeviceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + var fernTestValueDeviceID string + + // Act + obj.SetDeviceID(fernTestValueDeviceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeadlineDuration_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + var fernTestValueDeadlineDuration *string + + // Act + obj.SetDeadlineDuration(fernTestValueDeadlineDuration) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + var fernTestValueStatus *string + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCancelReason_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + var fernTestValueCancelReason *ActionCancelReason + + // Act + obj.SetCancelReason(fernTestValueCancelReason) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAppID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + var fernTestValueAppID *string + + // Act + obj.SetAppID(fernTestValueAppID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalRefundCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &TerminalRefundCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &TerminalRefundCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &TerminalRefundCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &TerminalRefundCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &TerminalRefundCreatedEvent{} + var fernTestValueData *TerminalRefundCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalRefundCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEvent{} + var expected *TerminalRefundCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalRefundCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEvent{} + var fernTestValueData *TerminalRefundCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalRefundCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &TerminalRefundCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &TerminalRefundCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &TerminalRefundCreatedEventData{} + var fernTestValueObject *TerminalRefundCreatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalRefundCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEventData{} + var expected *TerminalRefundCreatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalRefundCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEventData{} + var fernTestValueObject *TerminalRefundCreatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalRefundCreatedEventObject(t *testing.T) { + t.Run("SetRefund", func(t *testing.T) { + obj := &TerminalRefundCreatedEventObject{} + var fernTestValueRefund *TerminalRefund + obj.SetRefund(fernTestValueRefund) + assert.Equal(t, fernTestValueRefund, obj.Refund) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalRefundCreatedEventObject(t *testing.T) { + t.Run("GetRefund", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEventObject{} + var expected *TerminalRefund + obj.Refund = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRefund(), "getter should return the property value") + }) + + t.Run("GetRefund_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEventObject{} + obj.Refund = nil + + // Act & Assert + assert.Nil(t, obj.GetRefund(), "getter should return nil when property is nil") + }) + + t.Run("GetRefund_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundCreatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRefund() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalRefundCreatedEventObject(t *testing.T) { + t.Run("SetRefund_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEventObject{} + var fernTestValueRefund *TerminalRefund + + // Act + obj.SetRefund(fernTestValueRefund) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalRefundQuery(t *testing.T) { + t.Run("SetFilter", func(t *testing.T) { + obj := &TerminalRefundQuery{} + var fernTestValueFilter *TerminalRefundQueryFilter + obj.SetFilter(fernTestValueFilter) + assert.Equal(t, fernTestValueFilter, obj.Filter) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSort", func(t *testing.T) { + obj := &TerminalRefundQuery{} + var fernTestValueSort *TerminalRefundQuerySort + obj.SetSort(fernTestValueSort) + assert.Equal(t, fernTestValueSort, obj.Sort) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalRefundQuery(t *testing.T) { + t.Run("GetFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundQuery{} + var expected *TerminalRefundQueryFilter + obj.Filter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetFilter(), "getter should return the property value") + }) + + t.Run("GetFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundQuery{} + obj.Filter = nil + + // Act & Assert + assert.Nil(t, obj.GetFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetFilter() // Should return zero value + }) + + t.Run("GetSort", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundQuery{} + var expected *TerminalRefundQuerySort + obj.Sort = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSort(), "getter should return the property value") + }) + + t.Run("GetSort_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundQuery{} + obj.Sort = nil + + // Act & Assert + assert.Nil(t, obj.GetSort(), "getter should return nil when property is nil") + }) + + t.Run("GetSort_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundQuery + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSort() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalRefundQuery(t *testing.T) { + t.Run("SetFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundQuery{} + var fernTestValueFilter *TerminalRefundQueryFilter + + // Act + obj.SetFilter(fernTestValueFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSort_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundQuery{} + var fernTestValueSort *TerminalRefundQuerySort + + // Act + obj.SetSort(fernTestValueSort) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalRefundQueryFilter(t *testing.T) { + t.Run("SetDeviceID", func(t *testing.T) { + obj := &TerminalRefundQueryFilter{} + var fernTestValueDeviceID *string + obj.SetDeviceID(fernTestValueDeviceID) + assert.Equal(t, fernTestValueDeviceID, obj.DeviceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &TerminalRefundQueryFilter{} + var fernTestValueCreatedAt *TimeRange + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &TerminalRefundQueryFilter{} + var fernTestValueStatus *string + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalRefundQueryFilter(t *testing.T) { + t.Run("GetDeviceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundQueryFilter{} + var expected *string + obj.DeviceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeviceID(), "getter should return the property value") + }) + + t.Run("GetDeviceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundQueryFilter{} + obj.DeviceID = nil + + // Act & Assert + assert.Nil(t, obj.GetDeviceID(), "getter should return nil when property is nil") + }) + + t.Run("GetDeviceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundQueryFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeviceID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundQueryFilter{} + var expected *TimeRange + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundQueryFilter{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundQueryFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundQueryFilter{} + var expected *string + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundQueryFilter{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundQueryFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalRefundQueryFilter(t *testing.T) { + t.Run("SetDeviceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundQueryFilter{} + var fernTestValueDeviceID *string + + // Act + obj.SetDeviceID(fernTestValueDeviceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundQueryFilter{} + var fernTestValueCreatedAt *TimeRange + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundQueryFilter{} + var fernTestValueStatus *string + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalRefundQuerySort(t *testing.T) { + t.Run("SetSortOrder", func(t *testing.T) { + obj := &TerminalRefundQuerySort{} + var fernTestValueSortOrder *string + obj.SetSortOrder(fernTestValueSortOrder) + assert.Equal(t, fernTestValueSortOrder, obj.SortOrder) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalRefundQuerySort(t *testing.T) { + t.Run("GetSortOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundQuerySort{} + var expected *string + obj.SortOrder = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSortOrder(), "getter should return the property value") + }) + + t.Run("GetSortOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundQuerySort{} + obj.SortOrder = nil + + // Act & Assert + assert.Nil(t, obj.GetSortOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetSortOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundQuerySort + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSortOrder() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalRefundQuerySort(t *testing.T) { + t.Run("SetSortOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundQuerySort{} + var fernTestValueSortOrder *string + + // Act + obj.SetSortOrder(fernTestValueSortOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalRefundUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &TerminalRefundUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &TerminalRefundUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &TerminalRefundUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &TerminalRefundUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &TerminalRefundUpdatedEvent{} + var fernTestValueData *TerminalRefundUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalRefundUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEvent{} + var expected *TerminalRefundUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalRefundUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEvent{} + var fernTestValueData *TerminalRefundUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalRefundUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &TerminalRefundUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &TerminalRefundUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &TerminalRefundUpdatedEventData{} + var fernTestValueObject *TerminalRefundUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalRefundUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEventData{} + var expected *TerminalRefundUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalRefundUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEventData{} + var fernTestValueObject *TerminalRefundUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTerminalRefundUpdatedEventObject(t *testing.T) { + t.Run("SetRefund", func(t *testing.T) { + obj := &TerminalRefundUpdatedEventObject{} + var fernTestValueRefund *TerminalRefund + obj.SetRefund(fernTestValueRefund) + assert.Equal(t, fernTestValueRefund, obj.Refund) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTerminalRefundUpdatedEventObject(t *testing.T) { + t.Run("GetRefund", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEventObject{} + var expected *TerminalRefund + obj.Refund = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRefund(), "getter should return the property value") + }) + + t.Run("GetRefund_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEventObject{} + obj.Refund = nil + + // Act & Assert + assert.Nil(t, obj.GetRefund(), "getter should return nil when property is nil") + }) + + t.Run("GetRefund_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRefund() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTerminalRefundUpdatedEventObject(t *testing.T) { + t.Run("SetRefund_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEventObject{} + var fernTestValueRefund *TerminalRefund + + // Act + obj.SetRefund(fernTestValueRefund) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTestWebhookSubscriptionResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &TestWebhookSubscriptionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSubscriptionTestResult", func(t *testing.T) { + obj := &TestWebhookSubscriptionResponse{} + var fernTestValueSubscriptionTestResult *SubscriptionTestResult + obj.SetSubscriptionTestResult(fernTestValueSubscriptionTestResult) + assert.Equal(t, fernTestValueSubscriptionTestResult, obj.SubscriptionTestResult) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNotificationURL", func(t *testing.T) { + obj := &TestWebhookSubscriptionResponse{} + var fernTestValueNotificationURL *string + obj.SetNotificationURL(fernTestValueNotificationURL) + assert.Equal(t, fernTestValueNotificationURL, obj.NotificationURL) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatusCode", func(t *testing.T) { + obj := &TestWebhookSubscriptionResponse{} + var fernTestValueStatusCode *int + obj.SetStatusCode(fernTestValueStatusCode) + assert.Equal(t, fernTestValueStatusCode, obj.StatusCode) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPassesFilter", func(t *testing.T) { + obj := &TestWebhookSubscriptionResponse{} + var fernTestValuePassesFilter *bool + obj.SetPassesFilter(fernTestValuePassesFilter) + assert.Equal(t, fernTestValuePassesFilter, obj.PassesFilter) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPayload", func(t *testing.T) { + obj := &TestWebhookSubscriptionResponse{} + var fernTestValuePayload map[string]interface{} + obj.SetPayload(fernTestValuePayload) + assert.Equal(t, fernTestValuePayload, obj.Payload) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTestWebhookSubscriptionResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TestWebhookSubscriptionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TestWebhookSubscriptionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TestWebhookSubscriptionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetSubscriptionTestResult", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TestWebhookSubscriptionResponse{} + var expected *SubscriptionTestResult + obj.SubscriptionTestResult = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscriptionTestResult(), "getter should return the property value") + }) + + t.Run("GetSubscriptionTestResult_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TestWebhookSubscriptionResponse{} + obj.SubscriptionTestResult = nil + + // Act & Assert + assert.Nil(t, obj.GetSubscriptionTestResult(), "getter should return nil when property is nil") + }) + + t.Run("GetSubscriptionTestResult_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TestWebhookSubscriptionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscriptionTestResult() // Should return zero value + }) + + t.Run("GetNotificationURL", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TestWebhookSubscriptionResponse{} + var expected *string + obj.NotificationURL = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNotificationURL(), "getter should return the property value") + }) + + t.Run("GetNotificationURL_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TestWebhookSubscriptionResponse{} + obj.NotificationURL = nil + + // Act & Assert + assert.Nil(t, obj.GetNotificationURL(), "getter should return nil when property is nil") + }) + + t.Run("GetNotificationURL_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TestWebhookSubscriptionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNotificationURL() // Should return zero value + }) + + t.Run("GetStatusCode", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TestWebhookSubscriptionResponse{} + var expected *int + obj.StatusCode = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatusCode(), "getter should return the property value") + }) + + t.Run("GetStatusCode_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TestWebhookSubscriptionResponse{} + obj.StatusCode = nil + + // Act & Assert + assert.Nil(t, obj.GetStatusCode(), "getter should return nil when property is nil") + }) + + t.Run("GetStatusCode_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TestWebhookSubscriptionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatusCode() // Should return zero value + }) + + t.Run("GetPassesFilter", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TestWebhookSubscriptionResponse{} + var expected *bool + obj.PassesFilter = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPassesFilter(), "getter should return the property value") + }) + + t.Run("GetPassesFilter_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TestWebhookSubscriptionResponse{} + obj.PassesFilter = nil + + // Act & Assert + assert.Nil(t, obj.GetPassesFilter(), "getter should return nil when property is nil") + }) + + t.Run("GetPassesFilter_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TestWebhookSubscriptionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPassesFilter() // Should return zero value + }) + + t.Run("GetPayload", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TestWebhookSubscriptionResponse{} + var expected map[string]interface{} + obj.Payload = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPayload(), "getter should return the property value") + }) + + t.Run("GetPayload_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TestWebhookSubscriptionResponse{} + obj.Payload = nil + + // Act & Assert + assert.Nil(t, obj.GetPayload(), "getter should return nil when property is nil") + }) + + t.Run("GetPayload_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TestWebhookSubscriptionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPayload() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTestWebhookSubscriptionResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TestWebhookSubscriptionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSubscriptionTestResult_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TestWebhookSubscriptionResponse{} + var fernTestValueSubscriptionTestResult *SubscriptionTestResult + + // Act + obj.SetSubscriptionTestResult(fernTestValueSubscriptionTestResult) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNotificationURL_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TestWebhookSubscriptionResponse{} + var fernTestValueNotificationURL *string + + // Act + obj.SetNotificationURL(fernTestValueNotificationURL) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatusCode_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TestWebhookSubscriptionResponse{} + var fernTestValueStatusCode *int + + // Act + obj.SetStatusCode(fernTestValueStatusCode) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPassesFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TestWebhookSubscriptionResponse{} + var fernTestValuePassesFilter *bool + + // Act + obj.SetPassesFilter(fernTestValuePassesFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPayload_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TestWebhookSubscriptionResponse{} + var fernTestValuePayload map[string]interface{} + + // Act + obj.SetPayload(fernTestValuePayload) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTimeRange(t *testing.T) { + t.Run("SetStartAt", func(t *testing.T) { + obj := &TimeRange{} + var fernTestValueStartAt *string + obj.SetStartAt(fernTestValueStartAt) + assert.Equal(t, fernTestValueStartAt, obj.StartAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEndAt", func(t *testing.T) { + obj := &TimeRange{} + var fernTestValueEndAt *string + obj.SetEndAt(fernTestValueEndAt) + assert.Equal(t, fernTestValueEndAt, obj.EndAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTimeRange(t *testing.T) { + t.Run("GetStartAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimeRange{} + var expected *string + obj.StartAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStartAt(), "getter should return the property value") + }) + + t.Run("GetStartAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimeRange{} + obj.StartAt = nil + + // Act & Assert + assert.Nil(t, obj.GetStartAt(), "getter should return nil when property is nil") + }) + + t.Run("GetStartAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimeRange + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStartAt() // Should return zero value + }) + + t.Run("GetEndAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimeRange{} + var expected *string + obj.EndAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEndAt(), "getter should return the property value") + }) + + t.Run("GetEndAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimeRange{} + obj.EndAt = nil + + // Act & Assert + assert.Nil(t, obj.GetEndAt(), "getter should return nil when property is nil") + }) + + t.Run("GetEndAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimeRange + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEndAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTimeRange(t *testing.T) { + t.Run("SetStartAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimeRange{} + var fernTestValueStartAt *string + + // Act + obj.SetStartAt(fernTestValueStartAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEndAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimeRange{} + var fernTestValueEndAt *string + + // Act + obj.SetEndAt(fernTestValueEndAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTipSettings(t *testing.T) { + t.Run("SetAllowTipping", func(t *testing.T) { + obj := &TipSettings{} + var fernTestValueAllowTipping *bool + obj.SetAllowTipping(fernTestValueAllowTipping) + assert.Equal(t, fernTestValueAllowTipping, obj.AllowTipping) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSeparateTipScreen", func(t *testing.T) { + obj := &TipSettings{} + var fernTestValueSeparateTipScreen *bool + obj.SetSeparateTipScreen(fernTestValueSeparateTipScreen) + assert.Equal(t, fernTestValueSeparateTipScreen, obj.SeparateTipScreen) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCustomTipField", func(t *testing.T) { + obj := &TipSettings{} + var fernTestValueCustomTipField *bool + obj.SetCustomTipField(fernTestValueCustomTipField) + assert.Equal(t, fernTestValueCustomTipField, obj.CustomTipField) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTipPercentages", func(t *testing.T) { + obj := &TipSettings{} + var fernTestValueTipPercentages []int + obj.SetTipPercentages(fernTestValueTipPercentages) + assert.Equal(t, fernTestValueTipPercentages, obj.TipPercentages) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSmartTipping", func(t *testing.T) { + obj := &TipSettings{} + var fernTestValueSmartTipping *bool + obj.SetSmartTipping(fernTestValueSmartTipping) + assert.Equal(t, fernTestValueSmartTipping, obj.SmartTipping) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTipSettings(t *testing.T) { + t.Run("GetAllowTipping", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TipSettings{} + var expected *bool + obj.AllowTipping = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAllowTipping(), "getter should return the property value") + }) + + t.Run("GetAllowTipping_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TipSettings{} + obj.AllowTipping = nil + + // Act & Assert + assert.Nil(t, obj.GetAllowTipping(), "getter should return nil when property is nil") + }) + + t.Run("GetAllowTipping_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TipSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAllowTipping() // Should return zero value + }) + + t.Run("GetSeparateTipScreen", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TipSettings{} + var expected *bool + obj.SeparateTipScreen = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSeparateTipScreen(), "getter should return the property value") + }) + + t.Run("GetSeparateTipScreen_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TipSettings{} + obj.SeparateTipScreen = nil + + // Act & Assert + assert.Nil(t, obj.GetSeparateTipScreen(), "getter should return nil when property is nil") + }) + + t.Run("GetSeparateTipScreen_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TipSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSeparateTipScreen() // Should return zero value + }) + + t.Run("GetCustomTipField", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TipSettings{} + var expected *bool + obj.CustomTipField = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomTipField(), "getter should return the property value") + }) + + t.Run("GetCustomTipField_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TipSettings{} + obj.CustomTipField = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomTipField(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomTipField_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TipSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomTipField() // Should return zero value + }) + + t.Run("GetTipPercentages", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TipSettings{} + var expected []int + obj.TipPercentages = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTipPercentages(), "getter should return the property value") + }) + + t.Run("GetTipPercentages_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TipSettings{} + obj.TipPercentages = nil + + // Act & Assert + assert.Nil(t, obj.GetTipPercentages(), "getter should return nil when property is nil") + }) + + t.Run("GetTipPercentages_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TipSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTipPercentages() // Should return zero value + }) + + t.Run("GetSmartTipping", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TipSettings{} + var expected *bool + obj.SmartTipping = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSmartTipping(), "getter should return the property value") + }) + + t.Run("GetSmartTipping_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TipSettings{} + obj.SmartTipping = nil + + // Act & Assert + assert.Nil(t, obj.GetSmartTipping(), "getter should return nil when property is nil") + }) + + t.Run("GetSmartTipping_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TipSettings + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSmartTipping() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTipSettings(t *testing.T) { + t.Run("SetAllowTipping_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TipSettings{} + var fernTestValueAllowTipping *bool + + // Act + obj.SetAllowTipping(fernTestValueAllowTipping) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSeparateTipScreen_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TipSettings{} + var fernTestValueSeparateTipScreen *bool + + // Act + obj.SetSeparateTipScreen(fernTestValueSeparateTipScreen) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCustomTipField_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TipSettings{} + var fernTestValueCustomTipField *bool + + // Act + obj.SetCustomTipField(fernTestValueCustomTipField) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTipPercentages_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TipSettings{} + var fernTestValueTipPercentages []int + + // Act + obj.SetTipPercentages(fernTestValueTipPercentages) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSmartTipping_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TipSettings{} + var fernTestValueSmartTipping *bool + + // Act + obj.SetSmartTipping(fernTestValueSmartTipping) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTransaction(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &Transaction{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &Transaction{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &Transaction{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTenders", func(t *testing.T) { + obj := &Transaction{} + var fernTestValueTenders []*Tender + obj.SetTenders(fernTestValueTenders) + assert.Equal(t, fernTestValueTenders, obj.Tenders) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRefunds", func(t *testing.T) { + obj := &Transaction{} + var fernTestValueRefunds []*Refund + obj.SetRefunds(fernTestValueRefunds) + assert.Equal(t, fernTestValueRefunds, obj.Refunds) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReferenceID", func(t *testing.T) { + obj := &Transaction{} + var fernTestValueReferenceID *string + obj.SetReferenceID(fernTestValueReferenceID) + assert.Equal(t, fernTestValueReferenceID, obj.ReferenceID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetProduct", func(t *testing.T) { + obj := &Transaction{} + var fernTestValueProduct *TransactionProduct + obj.SetProduct(fernTestValueProduct) + assert.Equal(t, fernTestValueProduct, obj.Product) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetClientID", func(t *testing.T) { + obj := &Transaction{} + var fernTestValueClientID *string + obj.SetClientID(fernTestValueClientID) + assert.Equal(t, fernTestValueClientID, obj.ClientID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetShippingAddress", func(t *testing.T) { + obj := &Transaction{} + var fernTestValueShippingAddress *Address + obj.SetShippingAddress(fernTestValueShippingAddress) + assert.Equal(t, fernTestValueShippingAddress, obj.ShippingAddress) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrderID", func(t *testing.T) { + obj := &Transaction{} + var fernTestValueOrderID *string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTransaction(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Transaction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Transaction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Transaction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetTenders", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + var expected []*Tender + obj.Tenders = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTenders(), "getter should return the property value") + }) + + t.Run("GetTenders_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + obj.Tenders = nil + + // Act & Assert + assert.Nil(t, obj.GetTenders(), "getter should return nil when property is nil") + }) + + t.Run("GetTenders_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Transaction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTenders() // Should return zero value + }) + + t.Run("GetRefunds", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + var expected []*Refund + obj.Refunds = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRefunds(), "getter should return the property value") + }) + + t.Run("GetRefunds_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + obj.Refunds = nil + + // Act & Assert + assert.Nil(t, obj.GetRefunds(), "getter should return nil when property is nil") + }) + + t.Run("GetRefunds_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Transaction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRefunds() // Should return zero value + }) + + t.Run("GetReferenceID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + var expected *string + obj.ReferenceID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReferenceID(), "getter should return the property value") + }) + + t.Run("GetReferenceID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + obj.ReferenceID = nil + + // Act & Assert + assert.Nil(t, obj.GetReferenceID(), "getter should return nil when property is nil") + }) + + t.Run("GetReferenceID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Transaction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReferenceID() // Should return zero value + }) + + t.Run("GetProduct", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + var expected *TransactionProduct + obj.Product = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetProduct(), "getter should return the property value") + }) + + t.Run("GetProduct_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + obj.Product = nil + + // Act & Assert + assert.Nil(t, obj.GetProduct(), "getter should return nil when property is nil") + }) + + t.Run("GetProduct_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Transaction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetProduct() // Should return zero value + }) + + t.Run("GetClientID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + var expected *string + obj.ClientID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetClientID(), "getter should return the property value") + }) + + t.Run("GetClientID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + obj.ClientID = nil + + // Act & Assert + assert.Nil(t, obj.GetClientID(), "getter should return nil when property is nil") + }) + + t.Run("GetClientID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Transaction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetClientID() // Should return zero value + }) + + t.Run("GetShippingAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + var expected *Address + obj.ShippingAddress = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetShippingAddress(), "getter should return the property value") + }) + + t.Run("GetShippingAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + obj.ShippingAddress = nil + + // Act & Assert + assert.Nil(t, obj.GetShippingAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetShippingAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Transaction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetShippingAddress() // Should return zero value + }) + + t.Run("GetOrderID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + var expected *string + obj.OrderID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderID(), "getter should return the property value") + }) + + t.Run("GetOrderID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + obj.OrderID = nil + + // Act & Assert + assert.Nil(t, obj.GetOrderID(), "getter should return nil when property is nil") + }) + + t.Run("GetOrderID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Transaction + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderID() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTransaction(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTenders_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + var fernTestValueTenders []*Tender + + // Act + obj.SetTenders(fernTestValueTenders) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRefunds_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + var fernTestValueRefunds []*Refund + + // Act + obj.SetRefunds(fernTestValueRefunds) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReferenceID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + var fernTestValueReferenceID *string + + // Act + obj.SetReferenceID(fernTestValueReferenceID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetProduct_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + var fernTestValueProduct *TransactionProduct + + // Act + obj.SetProduct(fernTestValueProduct) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetClientID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + var fernTestValueClientID *string + + // Act + obj.SetClientID(fernTestValueClientID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetShippingAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + var fernTestValueShippingAddress *Address + + // Act + obj.SetShippingAddress(fernTestValueShippingAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + var fernTestValueOrderID *string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTransferOrderCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &TransferOrderCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &TransferOrderCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &TransferOrderCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &TransferOrderCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &TransferOrderCreatedEvent{} + var fernTestValueData *TransferOrderCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTransferOrderCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEvent{} + var expected *TransferOrderCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTransferOrderCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEvent{} + var fernTestValueData *TransferOrderCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTransferOrderCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &TransferOrderCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &TransferOrderCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &TransferOrderCreatedEventData{} + var fernTestValueObject *TransferOrderCreatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTransferOrderCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEventData{} + var expected *TransferOrderCreatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTransferOrderCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEventData{} + var fernTestValueObject *TransferOrderCreatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTransferOrderCreatedEventObject(t *testing.T) { + t.Run("SetTransferOrder", func(t *testing.T) { + obj := &TransferOrderCreatedEventObject{} + var fernTestValueTransferOrder *TransferOrder + obj.SetTransferOrder(fernTestValueTransferOrder) + assert.Equal(t, fernTestValueTransferOrder, obj.TransferOrder) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTransferOrderCreatedEventObject(t *testing.T) { + t.Run("GetTransferOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEventObject{} + var expected *TransferOrder + obj.TransferOrder = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTransferOrder(), "getter should return the property value") + }) + + t.Run("GetTransferOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEventObject{} + obj.TransferOrder = nil + + // Act & Assert + assert.Nil(t, obj.GetTransferOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetTransferOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderCreatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTransferOrder() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTransferOrderCreatedEventObject(t *testing.T) { + t.Run("SetTransferOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEventObject{} + var fernTestValueTransferOrder *TransferOrder + + // Act + obj.SetTransferOrder(fernTestValueTransferOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTransferOrderDeletedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &TransferOrderDeletedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &TransferOrderDeletedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &TransferOrderDeletedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &TransferOrderDeletedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &TransferOrderDeletedEvent{} + var fernTestValueData *TransferOrderDeletedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTransferOrderDeletedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderDeletedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderDeletedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderDeletedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderDeletedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderDeletedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderDeletedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderDeletedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderDeletedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderDeletedEvent{} + var expected *TransferOrderDeletedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderDeletedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderDeletedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTransferOrderDeletedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderDeletedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderDeletedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderDeletedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderDeletedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderDeletedEvent{} + var fernTestValueData *TransferOrderDeletedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTransferOrderDeletedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &TransferOrderDeletedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &TransferOrderDeletedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetDeleted", func(t *testing.T) { + obj := &TransferOrderDeletedEventData{} + var fernTestValueDeleted *bool + obj.SetDeleted(fernTestValueDeleted) + assert.Equal(t, fernTestValueDeleted, obj.Deleted) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTransferOrderDeletedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderDeletedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderDeletedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderDeletedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderDeletedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderDeletedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderDeletedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetDeleted", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderDeletedEventData{} + var expected *bool + obj.Deleted = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetDeleted(), "getter should return the property value") + }) + + t.Run("GetDeleted_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderDeletedEventData{} + obj.Deleted = nil + + // Act & Assert + assert.Nil(t, obj.GetDeleted(), "getter should return nil when property is nil") + }) + + t.Run("GetDeleted_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderDeletedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetDeleted() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTransferOrderDeletedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderDeletedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderDeletedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetDeleted_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderDeletedEventData{} + var fernTestValueDeleted *bool + + // Act + obj.SetDeleted(fernTestValueDeleted) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTransferOrderUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &TransferOrderUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &TransferOrderUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &TransferOrderUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &TransferOrderUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &TransferOrderUpdatedEvent{} + var fernTestValueData *TransferOrderUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTransferOrderUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEvent{} + var expected *TransferOrderUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTransferOrderUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEvent{} + var fernTestValueData *TransferOrderUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTransferOrderUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &TransferOrderUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &TransferOrderUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &TransferOrderUpdatedEventData{} + var fernTestValueObject *TransferOrderUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTransferOrderUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEventData{} + var expected *TransferOrderUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTransferOrderUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEventData{} + var fernTestValueObject *TransferOrderUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTransferOrderUpdatedEventObject(t *testing.T) { + t.Run("SetTransferOrder", func(t *testing.T) { + obj := &TransferOrderUpdatedEventObject{} + var fernTestValueTransferOrder *TransferOrder + obj.SetTransferOrder(fernTestValueTransferOrder) + assert.Equal(t, fernTestValueTransferOrder, obj.TransferOrder) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersTransferOrderUpdatedEventObject(t *testing.T) { + t.Run("GetTransferOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEventObject{} + var expected *TransferOrder + obj.TransferOrder = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTransferOrder(), "getter should return the property value") + }) + + t.Run("GetTransferOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEventObject{} + obj.TransferOrder = nil + + // Act & Assert + assert.Nil(t, obj.GetTransferOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetTransferOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTransferOrder() // Should return zero value + }) + +} + +func TestSettersMarkExplicitTransferOrderUpdatedEventObject(t *testing.T) { + t.Run("SetTransferOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEventObject{} + var fernTestValueTransferOrder *TransferOrder + + // Act + obj.SetTransferOrder(fernTestValueTransferOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateBookingCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition", func(t *testing.T) { + obj := &UpdateBookingCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + assert.Equal(t, fernTestValueCustomAttributeDefinition, obj.CustomAttributeDefinition) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateBookingCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateBookingCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetCustomAttributeDefinition", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateBookingCustomAttributeDefinitionResponse{} + var expected *CustomAttributeDefinition + obj.CustomAttributeDefinition = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeDefinition(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeDefinition_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateBookingCustomAttributeDefinitionResponse{} + obj.CustomAttributeDefinition = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeDefinition(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeDefinition_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateBookingCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeDefinition() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateBookingCustomAttributeDefinitionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateBookingCustomAttributeDefinitionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateBookingCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateBookingCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateBookingCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + + // Act + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateBookingCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateBreakTypeResponse(t *testing.T) { + t.Run("SetBreakType", func(t *testing.T) { + obj := &UpdateBreakTypeResponse{} + var fernTestValueBreakType *BreakType + obj.SetBreakType(fernTestValueBreakType) + assert.Equal(t, fernTestValueBreakType, obj.BreakType) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateBreakTypeResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateBreakTypeResponse(t *testing.T) { + t.Run("GetBreakType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateBreakTypeResponse{} + var expected *BreakType + obj.BreakType = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBreakType(), "getter should return the property value") + }) + + t.Run("GetBreakType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateBreakTypeResponse{} + obj.BreakType = nil + + // Act & Assert + assert.Nil(t, obj.GetBreakType(), "getter should return nil when property is nil") + }) + + t.Run("GetBreakType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateBreakTypeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBreakType() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateBreakTypeResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateBreakTypeResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateBreakTypeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateBreakTypeResponse(t *testing.T) { + t.Run("SetBreakType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateBreakTypeResponse{} + var fernTestValueBreakType *BreakType + + // Act + obj.SetBreakType(fernTestValueBreakType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateBreakTypeResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateCatalogImageRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &UpdateCatalogImageRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateCatalogImageRequest(t *testing.T) { + t.Run("GetIdempotencyKey", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCatalogImageRequest{} + var expected string + obj.IdempotencyKey = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIdempotencyKey(), "getter should return the property value") + }) + + t.Run("GetIdempotencyKey_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateCatalogImageRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIdempotencyKey() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateCatalogImageRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCatalogImageRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateCatalogImageResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateCatalogImageResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetImage", func(t *testing.T) { + obj := &UpdateCatalogImageResponse{} + var fernTestValueImage *CatalogObject + obj.SetImage(fernTestValueImage) + assert.Equal(t, fernTestValueImage, obj.Image) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateCatalogImageResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCatalogImageResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCatalogImageResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateCatalogImageResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetImage", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCatalogImageResponse{} + var expected *CatalogObject + obj.Image = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetImage(), "getter should return the property value") + }) + + t.Run("GetImage_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCatalogImageResponse{} + obj.Image = nil + + // Act & Assert + assert.Nil(t, obj.GetImage(), "getter should return nil when property is nil") + }) + + t.Run("GetImage_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateCatalogImageResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetImage() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateCatalogImageResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCatalogImageResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetImage_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCatalogImageResponse{} + var fernTestValueImage *CatalogObject + + // Act + obj.SetImage(fernTestValueImage) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateCustomerCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition", func(t *testing.T) { + obj := &UpdateCustomerCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + assert.Equal(t, fernTestValueCustomAttributeDefinition, obj.CustomAttributeDefinition) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateCustomerCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateCustomerCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetCustomAttributeDefinition", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerCustomAttributeDefinitionResponse{} + var expected *CustomAttributeDefinition + obj.CustomAttributeDefinition = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeDefinition(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeDefinition_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerCustomAttributeDefinitionResponse{} + obj.CustomAttributeDefinition = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeDefinition(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeDefinition_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateCustomerCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeDefinition() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerCustomAttributeDefinitionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerCustomAttributeDefinitionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateCustomerCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateCustomerCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + + // Act + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateCustomerGroupResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateCustomerGroupResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetGroup", func(t *testing.T) { + obj := &UpdateCustomerGroupResponse{} + var fernTestValueGroup *CustomerGroup + obj.SetGroup(fernTestValueGroup) + assert.Equal(t, fernTestValueGroup, obj.Group) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateCustomerGroupResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerGroupResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerGroupResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateCustomerGroupResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetGroup", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerGroupResponse{} + var expected *CustomerGroup + obj.Group = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetGroup(), "getter should return the property value") + }) + + t.Run("GetGroup_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerGroupResponse{} + obj.Group = nil + + // Act & Assert + assert.Nil(t, obj.GetGroup(), "getter should return nil when property is nil") + }) + + t.Run("GetGroup_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateCustomerGroupResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetGroup() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateCustomerGroupResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerGroupResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetGroup_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerGroupResponse{} + var fernTestValueGroup *CustomerGroup + + // Act + obj.SetGroup(fernTestValueGroup) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateLocationCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition", func(t *testing.T) { + obj := &UpdateLocationCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + assert.Equal(t, fernTestValueCustomAttributeDefinition, obj.CustomAttributeDefinition) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateLocationCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateLocationCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetCustomAttributeDefinition", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateLocationCustomAttributeDefinitionResponse{} + var expected *CustomAttributeDefinition + obj.CustomAttributeDefinition = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeDefinition(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeDefinition_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateLocationCustomAttributeDefinitionResponse{} + obj.CustomAttributeDefinition = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeDefinition(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeDefinition_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateLocationCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeDefinition() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateLocationCustomAttributeDefinitionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateLocationCustomAttributeDefinitionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateLocationCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateLocationCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateLocationCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + + // Act + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateLocationCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateMerchantCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition", func(t *testing.T) { + obj := &UpdateMerchantCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + assert.Equal(t, fernTestValueCustomAttributeDefinition, obj.CustomAttributeDefinition) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateMerchantCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateMerchantCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetCustomAttributeDefinition", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateMerchantCustomAttributeDefinitionResponse{} + var expected *CustomAttributeDefinition + obj.CustomAttributeDefinition = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeDefinition(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeDefinition_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateMerchantCustomAttributeDefinitionResponse{} + obj.CustomAttributeDefinition = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeDefinition(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeDefinition_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateMerchantCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeDefinition() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateMerchantCustomAttributeDefinitionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateMerchantCustomAttributeDefinitionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateMerchantCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateMerchantCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateMerchantCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + + // Act + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateMerchantCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateOrderCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition", func(t *testing.T) { + obj := &UpdateOrderCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + assert.Equal(t, fernTestValueCustomAttributeDefinition, obj.CustomAttributeDefinition) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateOrderCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateOrderCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetCustomAttributeDefinition", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateOrderCustomAttributeDefinitionResponse{} + var expected *CustomAttributeDefinition + obj.CustomAttributeDefinition = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttributeDefinition(), "getter should return the property value") + }) + + t.Run("GetCustomAttributeDefinition_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateOrderCustomAttributeDefinitionResponse{} + obj.CustomAttributeDefinition = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttributeDefinition(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttributeDefinition_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateOrderCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttributeDefinition() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateOrderCustomAttributeDefinitionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateOrderCustomAttributeDefinitionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateOrderCustomAttributeDefinitionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateOrderCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("SetCustomAttributeDefinition_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateOrderCustomAttributeDefinitionResponse{} + var fernTestValueCustomAttributeDefinition *CustomAttributeDefinition + + // Act + obj.SetCustomAttributeDefinition(fernTestValueCustomAttributeDefinition) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateOrderCustomAttributeDefinitionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdatePaymentLinkResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdatePaymentLinkResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPaymentLink", func(t *testing.T) { + obj := &UpdatePaymentLinkResponse{} + var fernTestValuePaymentLink *PaymentLink + obj.SetPaymentLink(fernTestValuePaymentLink) + assert.Equal(t, fernTestValuePaymentLink, obj.PaymentLink) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdatePaymentLinkResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdatePaymentLinkResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdatePaymentLinkResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdatePaymentLinkResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetPaymentLink", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdatePaymentLinkResponse{} + var expected *PaymentLink + obj.PaymentLink = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentLink(), "getter should return the property value") + }) + + t.Run("GetPaymentLink_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdatePaymentLinkResponse{} + obj.PaymentLink = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentLink(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentLink_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdatePaymentLinkResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentLink() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdatePaymentLinkResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdatePaymentLinkResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPaymentLink_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdatePaymentLinkResponse{} + var fernTestValuePaymentLink *PaymentLink + + // Act + obj.SetPaymentLink(fernTestValuePaymentLink) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateShiftResponse(t *testing.T) { + t.Run("SetShift", func(t *testing.T) { + obj := &UpdateShiftResponse{} + var fernTestValueShift *Shift + obj.SetShift(fernTestValueShift) + assert.Equal(t, fernTestValueShift, obj.Shift) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateShiftResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateShiftResponse(t *testing.T) { + t.Run("GetShift", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateShiftResponse{} + var expected *Shift + obj.Shift = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetShift(), "getter should return the property value") + }) + + t.Run("GetShift_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateShiftResponse{} + obj.Shift = nil + + // Act & Assert + assert.Nil(t, obj.GetShift(), "getter should return nil when property is nil") + }) + + t.Run("GetShift_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateShiftResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetShift() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateShiftResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateShiftResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateShiftResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateShiftResponse(t *testing.T) { + t.Run("SetShift_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateShiftResponse{} + var fernTestValueShift *Shift + + // Act + obj.SetShift(fernTestValueShift) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateShiftResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateWageSettingResponse(t *testing.T) { + t.Run("SetWageSetting", func(t *testing.T) { + obj := &UpdateWageSettingResponse{} + var fernTestValueWageSetting *WageSetting + obj.SetWageSetting(fernTestValueWageSetting) + assert.Equal(t, fernTestValueWageSetting, obj.WageSetting) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateWageSettingResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateWageSettingResponse(t *testing.T) { + t.Run("GetWageSetting", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWageSettingResponse{} + var expected *WageSetting + obj.WageSetting = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetWageSetting(), "getter should return the property value") + }) + + t.Run("GetWageSetting_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWageSettingResponse{} + obj.WageSetting = nil + + // Act & Assert + assert.Nil(t, obj.GetWageSetting(), "getter should return nil when property is nil") + }) + + t.Run("GetWageSetting_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateWageSettingResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetWageSetting() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWageSettingResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWageSettingResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateWageSettingResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateWageSettingResponse(t *testing.T) { + t.Run("SetWageSetting_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWageSettingResponse{} + var fernTestValueWageSetting *WageSetting + + // Act + obj.SetWageSetting(fernTestValueWageSetting) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWageSettingResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateWebhookSubscriptionResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateWebhookSubscriptionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSubscription", func(t *testing.T) { + obj := &UpdateWebhookSubscriptionResponse{} + var fernTestValueSubscription *WebhookSubscription + obj.SetSubscription(fernTestValueSubscription) + assert.Equal(t, fernTestValueSubscription, obj.Subscription) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateWebhookSubscriptionResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWebhookSubscriptionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWebhookSubscriptionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateWebhookSubscriptionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetSubscription", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWebhookSubscriptionResponse{} + var expected *WebhookSubscription + obj.Subscription = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubscription(), "getter should return the property value") + }) + + t.Run("GetSubscription_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWebhookSubscriptionResponse{} + obj.Subscription = nil + + // Act & Assert + assert.Nil(t, obj.GetSubscription(), "getter should return nil when property is nil") + }) + + t.Run("GetSubscription_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateWebhookSubscriptionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubscription() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateWebhookSubscriptionResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWebhookSubscriptionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSubscription_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWebhookSubscriptionResponse{} + var fernTestValueSubscription *WebhookSubscription + + // Act + obj.SetSubscription(fernTestValueSubscription) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateWebhookSubscriptionSignatureKeyResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateWebhookSubscriptionSignatureKeyResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSignatureKey", func(t *testing.T) { + obj := &UpdateWebhookSubscriptionSignatureKeyResponse{} + var fernTestValueSignatureKey *string + obj.SetSignatureKey(fernTestValueSignatureKey) + assert.Equal(t, fernTestValueSignatureKey, obj.SignatureKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateWebhookSubscriptionSignatureKeyResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWebhookSubscriptionSignatureKeyResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWebhookSubscriptionSignatureKeyResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateWebhookSubscriptionSignatureKeyResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetSignatureKey", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWebhookSubscriptionSignatureKeyResponse{} + var expected *string + obj.SignatureKey = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSignatureKey(), "getter should return the property value") + }) + + t.Run("GetSignatureKey_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWebhookSubscriptionSignatureKeyResponse{} + obj.SignatureKey = nil + + // Act & Assert + assert.Nil(t, obj.GetSignatureKey(), "getter should return nil when property is nil") + }) + + t.Run("GetSignatureKey_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateWebhookSubscriptionSignatureKeyResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSignatureKey() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateWebhookSubscriptionSignatureKeyResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWebhookSubscriptionSignatureKeyResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSignatureKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWebhookSubscriptionSignatureKeyResponse{} + var fernTestValueSignatureKey *string + + // Act + obj.SetSignatureKey(fernTestValueSignatureKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateWorkweekConfigResponse(t *testing.T) { + t.Run("SetWorkweekConfig", func(t *testing.T) { + obj := &UpdateWorkweekConfigResponse{} + var fernTestValueWorkweekConfig *WorkweekConfig + obj.SetWorkweekConfig(fernTestValueWorkweekConfig) + assert.Equal(t, fernTestValueWorkweekConfig, obj.WorkweekConfig) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateWorkweekConfigResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateWorkweekConfigResponse(t *testing.T) { + t.Run("GetWorkweekConfig", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWorkweekConfigResponse{} + var expected *WorkweekConfig + obj.WorkweekConfig = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetWorkweekConfig(), "getter should return the property value") + }) + + t.Run("GetWorkweekConfig_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWorkweekConfigResponse{} + obj.WorkweekConfig = nil + + // Act & Assert + assert.Nil(t, obj.GetWorkweekConfig(), "getter should return nil when property is nil") + }) + + t.Run("GetWorkweekConfig_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateWorkweekConfigResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetWorkweekConfig() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWorkweekConfigResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWorkweekConfigResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateWorkweekConfigResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateWorkweekConfigResponse(t *testing.T) { + t.Run("SetWorkweekConfig_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWorkweekConfigResponse{} + var fernTestValueWorkweekConfig *WorkweekConfig + + // Act + obj.SetWorkweekConfig(fernTestValueWorkweekConfig) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWorkweekConfigResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpsertBookingCustomAttributeResponse(t *testing.T) { + t.Run("SetCustomAttribute", func(t *testing.T) { + obj := &UpsertBookingCustomAttributeResponse{} + var fernTestValueCustomAttribute *CustomAttribute + obj.SetCustomAttribute(fernTestValueCustomAttribute) + assert.Equal(t, fernTestValueCustomAttribute, obj.CustomAttribute) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &UpsertBookingCustomAttributeResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpsertBookingCustomAttributeResponse(t *testing.T) { + t.Run("GetCustomAttribute", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertBookingCustomAttributeResponse{} + var expected *CustomAttribute + obj.CustomAttribute = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttribute(), "getter should return the property value") + }) + + t.Run("GetCustomAttribute_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertBookingCustomAttributeResponse{} + obj.CustomAttribute = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttribute(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttribute_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertBookingCustomAttributeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttribute() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertBookingCustomAttributeResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertBookingCustomAttributeResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertBookingCustomAttributeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpsertBookingCustomAttributeResponse(t *testing.T) { + t.Run("SetCustomAttribute_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertBookingCustomAttributeResponse{} + var fernTestValueCustomAttribute *CustomAttribute + + // Act + obj.SetCustomAttribute(fernTestValueCustomAttribute) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertBookingCustomAttributeResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpsertCatalogObjectResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &UpsertCatalogObjectResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCatalogObject", func(t *testing.T) { + obj := &UpsertCatalogObjectResponse{} + var fernTestValueCatalogObject *CatalogObject + obj.SetCatalogObject(fernTestValueCatalogObject) + assert.Equal(t, fernTestValueCatalogObject, obj.CatalogObject) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIDMappings", func(t *testing.T) { + obj := &UpsertCatalogObjectResponse{} + var fernTestValueIDMappings []*CatalogIDMapping + obj.SetIDMappings(fernTestValueIDMappings) + assert.Equal(t, fernTestValueIDMappings, obj.IDMappings) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpsertCatalogObjectResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertCatalogObjectResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertCatalogObjectResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertCatalogObjectResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetCatalogObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertCatalogObjectResponse{} + var expected *CatalogObject + obj.CatalogObject = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCatalogObject(), "getter should return the property value") + }) + + t.Run("GetCatalogObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertCatalogObjectResponse{} + obj.CatalogObject = nil + + // Act & Assert + assert.Nil(t, obj.GetCatalogObject(), "getter should return nil when property is nil") + }) + + t.Run("GetCatalogObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertCatalogObjectResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCatalogObject() // Should return zero value + }) + + t.Run("GetIDMappings", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertCatalogObjectResponse{} + var expected []*CatalogIDMapping + obj.IDMappings = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIDMappings(), "getter should return the property value") + }) + + t.Run("GetIDMappings_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertCatalogObjectResponse{} + obj.IDMappings = nil + + // Act & Assert + assert.Nil(t, obj.GetIDMappings(), "getter should return nil when property is nil") + }) + + t.Run("GetIDMappings_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertCatalogObjectResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIDMappings() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpsertCatalogObjectResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertCatalogObjectResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCatalogObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertCatalogObjectResponse{} + var fernTestValueCatalogObject *CatalogObject + + // Act + obj.SetCatalogObject(fernTestValueCatalogObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIDMappings_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertCatalogObjectResponse{} + var fernTestValueIDMappings []*CatalogIDMapping + + // Act + obj.SetIDMappings(fernTestValueIDMappings) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpsertCustomerCustomAttributeResponse(t *testing.T) { + t.Run("SetCustomAttribute", func(t *testing.T) { + obj := &UpsertCustomerCustomAttributeResponse{} + var fernTestValueCustomAttribute *CustomAttribute + obj.SetCustomAttribute(fernTestValueCustomAttribute) + assert.Equal(t, fernTestValueCustomAttribute, obj.CustomAttribute) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &UpsertCustomerCustomAttributeResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpsertCustomerCustomAttributeResponse(t *testing.T) { + t.Run("GetCustomAttribute", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertCustomerCustomAttributeResponse{} + var expected *CustomAttribute + obj.CustomAttribute = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttribute(), "getter should return the property value") + }) + + t.Run("GetCustomAttribute_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertCustomerCustomAttributeResponse{} + obj.CustomAttribute = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttribute(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttribute_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertCustomerCustomAttributeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttribute() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertCustomerCustomAttributeResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertCustomerCustomAttributeResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertCustomerCustomAttributeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpsertCustomerCustomAttributeResponse(t *testing.T) { + t.Run("SetCustomAttribute_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertCustomerCustomAttributeResponse{} + var fernTestValueCustomAttribute *CustomAttribute + + // Act + obj.SetCustomAttribute(fernTestValueCustomAttribute) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertCustomerCustomAttributeResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpsertLocationCustomAttributeResponse(t *testing.T) { + t.Run("SetCustomAttribute", func(t *testing.T) { + obj := &UpsertLocationCustomAttributeResponse{} + var fernTestValueCustomAttribute *CustomAttribute + obj.SetCustomAttribute(fernTestValueCustomAttribute) + assert.Equal(t, fernTestValueCustomAttribute, obj.CustomAttribute) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &UpsertLocationCustomAttributeResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpsertLocationCustomAttributeResponse(t *testing.T) { + t.Run("GetCustomAttribute", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertLocationCustomAttributeResponse{} + var expected *CustomAttribute + obj.CustomAttribute = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttribute(), "getter should return the property value") + }) + + t.Run("GetCustomAttribute_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertLocationCustomAttributeResponse{} + obj.CustomAttribute = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttribute(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttribute_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertLocationCustomAttributeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttribute() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertLocationCustomAttributeResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertLocationCustomAttributeResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertLocationCustomAttributeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpsertLocationCustomAttributeResponse(t *testing.T) { + t.Run("SetCustomAttribute_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertLocationCustomAttributeResponse{} + var fernTestValueCustomAttribute *CustomAttribute + + // Act + obj.SetCustomAttribute(fernTestValueCustomAttribute) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertLocationCustomAttributeResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpsertMerchantCustomAttributeResponse(t *testing.T) { + t.Run("SetCustomAttribute", func(t *testing.T) { + obj := &UpsertMerchantCustomAttributeResponse{} + var fernTestValueCustomAttribute *CustomAttribute + obj.SetCustomAttribute(fernTestValueCustomAttribute) + assert.Equal(t, fernTestValueCustomAttribute, obj.CustomAttribute) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &UpsertMerchantCustomAttributeResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpsertMerchantCustomAttributeResponse(t *testing.T) { + t.Run("GetCustomAttribute", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertMerchantCustomAttributeResponse{} + var expected *CustomAttribute + obj.CustomAttribute = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttribute(), "getter should return the property value") + }) + + t.Run("GetCustomAttribute_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertMerchantCustomAttributeResponse{} + obj.CustomAttribute = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttribute(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttribute_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertMerchantCustomAttributeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttribute() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertMerchantCustomAttributeResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertMerchantCustomAttributeResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertMerchantCustomAttributeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpsertMerchantCustomAttributeResponse(t *testing.T) { + t.Run("SetCustomAttribute_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertMerchantCustomAttributeResponse{} + var fernTestValueCustomAttribute *CustomAttribute + + // Act + obj.SetCustomAttribute(fernTestValueCustomAttribute) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertMerchantCustomAttributeResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpsertOrderCustomAttributeResponse(t *testing.T) { + t.Run("SetCustomAttribute", func(t *testing.T) { + obj := &UpsertOrderCustomAttributeResponse{} + var fernTestValueCustomAttribute *CustomAttribute + obj.SetCustomAttribute(fernTestValueCustomAttribute) + assert.Equal(t, fernTestValueCustomAttribute, obj.CustomAttribute) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetErrors", func(t *testing.T) { + obj := &UpsertOrderCustomAttributeResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpsertOrderCustomAttributeResponse(t *testing.T) { + t.Run("GetCustomAttribute", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertOrderCustomAttributeResponse{} + var expected *CustomAttribute + obj.CustomAttribute = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCustomAttribute(), "getter should return the property value") + }) + + t.Run("GetCustomAttribute_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertOrderCustomAttributeResponse{} + obj.CustomAttribute = nil + + // Act & Assert + assert.Nil(t, obj.GetCustomAttribute(), "getter should return nil when property is nil") + }) + + t.Run("GetCustomAttribute_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertOrderCustomAttributeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCustomAttribute() // Should return zero value + }) + + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertOrderCustomAttributeResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertOrderCustomAttributeResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertOrderCustomAttributeResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpsertOrderCustomAttributeResponse(t *testing.T) { + t.Run("SetCustomAttribute_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertOrderCustomAttributeResponse{} + var fernTestValueCustomAttribute *CustomAttribute + + // Act + obj.SetCustomAttribute(fernTestValueCustomAttribute) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertOrderCustomAttributeResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersVendorCreatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &VendorCreatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &VendorCreatedEvent{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &VendorCreatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &VendorCreatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &VendorCreatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &VendorCreatedEvent{} + var fernTestValueData *VendorCreatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersVendorCreatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEvent{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEvent{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEvent{} + var expected *VendorCreatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorCreatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitVendorCreatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEvent{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEvent{} + var fernTestValueData *VendorCreatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersVendorCreatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &VendorCreatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &VendorCreatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &VendorCreatedEventData{} + var fernTestValueObject *VendorCreatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersVendorCreatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEventData{} + var expected *VendorCreatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorCreatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitVendorCreatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEventData{} + var fernTestValueObject *VendorCreatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersVendorCreatedEventObject(t *testing.T) { + t.Run("SetVendor", func(t *testing.T) { + obj := &VendorCreatedEventObject{} + var fernTestValueVendor *Vendor + obj.SetVendor(fernTestValueVendor) + assert.Equal(t, fernTestValueVendor, obj.Vendor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersVendorCreatedEventObject(t *testing.T) { + t.Run("GetVendor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEventObject{} + var expected *Vendor + obj.Vendor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVendor(), "getter should return the property value") + }) + + t.Run("GetVendor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEventObject{} + obj.Vendor = nil + + // Act & Assert + assert.Nil(t, obj.GetVendor(), "getter should return nil when property is nil") + }) + + t.Run("GetVendor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorCreatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVendor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitVendorCreatedEventObject(t *testing.T) { + t.Run("SetVendor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEventObject{} + var fernTestValueVendor *Vendor + + // Act + obj.SetVendor(fernTestValueVendor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersVendorUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID", func(t *testing.T) { + obj := &VendorUpdatedEvent{} + var fernTestValueMerchantID *string + obj.SetMerchantID(fernTestValueMerchantID) + assert.Equal(t, fernTestValueMerchantID, obj.MerchantID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLocationID", func(t *testing.T) { + obj := &VendorUpdatedEvent{} + var fernTestValueLocationID *string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &VendorUpdatedEvent{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventID", func(t *testing.T) { + obj := &VendorUpdatedEvent{} + var fernTestValueEventID *string + obj.SetEventID(fernTestValueEventID) + assert.Equal(t, fernTestValueEventID, obj.EventID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &VendorUpdatedEvent{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetData", func(t *testing.T) { + obj := &VendorUpdatedEvent{} + var fernTestValueData *VendorUpdatedEventData + obj.SetData(fernTestValueData) + assert.Equal(t, fernTestValueData, obj.Data) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersVendorUpdatedEvent(t *testing.T) { + t.Run("GetMerchantID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEvent{} + var expected *string + obj.MerchantID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetMerchantID(), "getter should return the property value") + }) + + t.Run("GetMerchantID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEvent{} + obj.MerchantID = nil + + // Act & Assert + assert.Nil(t, obj.GetMerchantID(), "getter should return nil when property is nil") + }) + + t.Run("GetMerchantID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetMerchantID() // Should return zero value + }) + + t.Run("GetLocationID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEvent{} + var expected *string + obj.LocationID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetLocationID(), "getter should return the property value") + }) + + t.Run("GetLocationID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEvent{} + obj.LocationID = nil + + // Act & Assert + assert.Nil(t, obj.GetLocationID(), "getter should return nil when property is nil") + }) + + t.Run("GetLocationID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetLocationID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEvent{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEvent{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetEventID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEvent{} + var expected *string + obj.EventID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventID(), "getter should return the property value") + }) + + t.Run("GetEventID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEvent{} + obj.EventID = nil + + // Act & Assert + assert.Nil(t, obj.GetEventID(), "getter should return nil when property is nil") + }) + + t.Run("GetEventID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEvent{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEvent{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetData", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEvent{} + var expected *VendorUpdatedEventData + obj.Data = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetData(), "getter should return the property value") + }) + + t.Run("GetData_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEvent{} + obj.Data = nil + + // Act & Assert + assert.Nil(t, obj.GetData(), "getter should return nil when property is nil") + }) + + t.Run("GetData_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorUpdatedEvent + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetData() // Should return zero value + }) + +} + +func TestSettersMarkExplicitVendorUpdatedEvent(t *testing.T) { + t.Run("SetMerchantID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEvent{} + var fernTestValueMerchantID *string + + // Act + obj.SetMerchantID(fernTestValueMerchantID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEvent{} + var fernTestValueLocationID *string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEvent{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEvent{} + var fernTestValueEventID *string + + // Act + obj.SetEventID(fernTestValueEventID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEvent{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetData_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEvent{} + var fernTestValueData *VendorUpdatedEventData + + // Act + obj.SetData(fernTestValueData) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersVendorUpdatedEventData(t *testing.T) { + t.Run("SetType", func(t *testing.T) { + obj := &VendorUpdatedEventData{} + var fernTestValueType *string + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &VendorUpdatedEventData{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetObject", func(t *testing.T) { + obj := &VendorUpdatedEventData{} + var fernTestValueObject *VendorUpdatedEventObject + obj.SetObject(fernTestValueObject) + assert.Equal(t, fernTestValueObject, obj.Object) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersVendorUpdatedEventData(t *testing.T) { + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEventData{} + var expected *string + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEventData{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEventData{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEventData{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetObject", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEventData{} + var expected *VendorUpdatedEventObject + obj.Object = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetObject(), "getter should return the property value") + }) + + t.Run("GetObject_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEventData{} + obj.Object = nil + + // Act & Assert + assert.Nil(t, obj.GetObject(), "getter should return nil when property is nil") + }) + + t.Run("GetObject_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorUpdatedEventData + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetObject() // Should return zero value + }) + +} + +func TestSettersMarkExplicitVendorUpdatedEventData(t *testing.T) { + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEventData{} + var fernTestValueType *string + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEventData{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetObject_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEventData{} + var fernTestValueObject *VendorUpdatedEventObject + + // Act + obj.SetObject(fernTestValueObject) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersVendorUpdatedEventObject(t *testing.T) { + t.Run("SetVendor", func(t *testing.T) { + obj := &VendorUpdatedEventObject{} + var fernTestValueVendor *Vendor + obj.SetVendor(fernTestValueVendor) + assert.Equal(t, fernTestValueVendor, obj.Vendor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersVendorUpdatedEventObject(t *testing.T) { + t.Run("GetVendor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEventObject{} + var expected *Vendor + obj.Vendor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVendor(), "getter should return the property value") + }) + + t.Run("GetVendor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEventObject{} + obj.Vendor = nil + + // Act & Assert + assert.Nil(t, obj.GetVendor(), "getter should return nil when property is nil") + }) + + t.Run("GetVendor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorUpdatedEventObject + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVendor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitVendorUpdatedEventObject(t *testing.T) { + t.Run("SetVendor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEventObject{} + var fernTestValueVendor *Vendor + + // Act + obj.SetVendor(fernTestValueVendor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersVoidTransactionResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &VoidTransactionResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersVoidTransactionResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VoidTransactionResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VoidTransactionResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VoidTransactionResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + +} + +func TestSettersMarkExplicitVoidTransactionResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VoidTransactionResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersWageSetting(t *testing.T) { + t.Run("SetTeamMemberID", func(t *testing.T) { + obj := &WageSetting{} + var fernTestValueTeamMemberID *string + obj.SetTeamMemberID(fernTestValueTeamMemberID) + assert.Equal(t, fernTestValueTeamMemberID, obj.TeamMemberID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetJobAssignments", func(t *testing.T) { + obj := &WageSetting{} + var fernTestValueJobAssignments []*JobAssignment + obj.SetJobAssignments(fernTestValueJobAssignments) + assert.Equal(t, fernTestValueJobAssignments, obj.JobAssignments) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsOvertimeExempt", func(t *testing.T) { + obj := &WageSetting{} + var fernTestValueIsOvertimeExempt *bool + obj.SetIsOvertimeExempt(fernTestValueIsOvertimeExempt) + assert.Equal(t, fernTestValueIsOvertimeExempt, obj.IsOvertimeExempt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &WageSetting{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &WageSetting{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &WageSetting{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersWageSetting(t *testing.T) { + t.Run("GetTeamMemberID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WageSetting{} + var expected *string + obj.TeamMemberID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTeamMemberID(), "getter should return the property value") + }) + + t.Run("GetTeamMemberID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WageSetting{} + obj.TeamMemberID = nil + + // Act & Assert + assert.Nil(t, obj.GetTeamMemberID(), "getter should return nil when property is nil") + }) + + t.Run("GetTeamMemberID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *WageSetting + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTeamMemberID() // Should return zero value + }) + + t.Run("GetJobAssignments", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WageSetting{} + var expected []*JobAssignment + obj.JobAssignments = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetJobAssignments(), "getter should return the property value") + }) + + t.Run("GetJobAssignments_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WageSetting{} + obj.JobAssignments = nil + + // Act & Assert + assert.Nil(t, obj.GetJobAssignments(), "getter should return nil when property is nil") + }) + + t.Run("GetJobAssignments_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *WageSetting + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetJobAssignments() // Should return zero value + }) + + t.Run("GetIsOvertimeExempt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WageSetting{} + var expected *bool + obj.IsOvertimeExempt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsOvertimeExempt(), "getter should return the property value") + }) + + t.Run("GetIsOvertimeExempt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WageSetting{} + obj.IsOvertimeExempt = nil + + // Act & Assert + assert.Nil(t, obj.GetIsOvertimeExempt(), "getter should return nil when property is nil") + }) + + t.Run("GetIsOvertimeExempt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *WageSetting + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsOvertimeExempt() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WageSetting{} + var expected *int + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WageSetting{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *WageSetting + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WageSetting{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WageSetting{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *WageSetting + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WageSetting{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WageSetting{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *WageSetting + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitWageSetting(t *testing.T) { + t.Run("SetTeamMemberID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WageSetting{} + var fernTestValueTeamMemberID *string + + // Act + obj.SetTeamMemberID(fernTestValueTeamMemberID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetJobAssignments_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WageSetting{} + var fernTestValueJobAssignments []*JobAssignment + + // Act + obj.SetJobAssignments(fernTestValueJobAssignments) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsOvertimeExempt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WageSetting{} + var fernTestValueIsOvertimeExempt *bool + + // Act + obj.SetIsOvertimeExempt(fernTestValueIsOvertimeExempt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WageSetting{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WageSetting{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WageSetting{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersWebhookSubscription(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &WebhookSubscription{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &WebhookSubscription{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEnabled", func(t *testing.T) { + obj := &WebhookSubscription{} + var fernTestValueEnabled *bool + obj.SetEnabled(fernTestValueEnabled) + assert.Equal(t, fernTestValueEnabled, obj.Enabled) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventTypes", func(t *testing.T) { + obj := &WebhookSubscription{} + var fernTestValueEventTypes []string + obj.SetEventTypes(fernTestValueEventTypes) + assert.Equal(t, fernTestValueEventTypes, obj.EventTypes) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNotificationURL", func(t *testing.T) { + obj := &WebhookSubscription{} + var fernTestValueNotificationURL *string + obj.SetNotificationURL(fernTestValueNotificationURL) + assert.Equal(t, fernTestValueNotificationURL, obj.NotificationURL) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAPIVersion", func(t *testing.T) { + obj := &WebhookSubscription{} + var fernTestValueAPIVersion *string + obj.SetAPIVersion(fernTestValueAPIVersion) + assert.Equal(t, fernTestValueAPIVersion, obj.APIVersion) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSignatureKey", func(t *testing.T) { + obj := &WebhookSubscription{} + var fernTestValueSignatureKey *string + obj.SetSignatureKey(fernTestValueSignatureKey) + assert.Equal(t, fernTestValueSignatureKey, obj.SignatureKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &WebhookSubscription{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &WebhookSubscription{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersWebhookSubscription(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WebhookSubscription{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WebhookSubscription{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *WebhookSubscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WebhookSubscription{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WebhookSubscription{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *WebhookSubscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetEnabled", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WebhookSubscription{} + var expected *bool + obj.Enabled = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEnabled(), "getter should return the property value") + }) + + t.Run("GetEnabled_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WebhookSubscription{} + obj.Enabled = nil + + // Act & Assert + assert.Nil(t, obj.GetEnabled(), "getter should return nil when property is nil") + }) + + t.Run("GetEnabled_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *WebhookSubscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEnabled() // Should return zero value + }) + + t.Run("GetEventTypes", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WebhookSubscription{} + var expected []string + obj.EventTypes = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEventTypes(), "getter should return the property value") + }) + + t.Run("GetEventTypes_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WebhookSubscription{} + obj.EventTypes = nil + + // Act & Assert + assert.Nil(t, obj.GetEventTypes(), "getter should return nil when property is nil") + }) + + t.Run("GetEventTypes_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *WebhookSubscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEventTypes() // Should return zero value + }) + + t.Run("GetNotificationURL", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WebhookSubscription{} + var expected *string + obj.NotificationURL = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNotificationURL(), "getter should return the property value") + }) + + t.Run("GetNotificationURL_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WebhookSubscription{} + obj.NotificationURL = nil + + // Act & Assert + assert.Nil(t, obj.GetNotificationURL(), "getter should return nil when property is nil") + }) + + t.Run("GetNotificationURL_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *WebhookSubscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNotificationURL() // Should return zero value + }) + + t.Run("GetAPIVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WebhookSubscription{} + var expected *string + obj.APIVersion = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAPIVersion(), "getter should return the property value") + }) + + t.Run("GetAPIVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WebhookSubscription{} + obj.APIVersion = nil + + // Act & Assert + assert.Nil(t, obj.GetAPIVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetAPIVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *WebhookSubscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAPIVersion() // Should return zero value + }) + + t.Run("GetSignatureKey", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WebhookSubscription{} + var expected *string + obj.SignatureKey = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSignatureKey(), "getter should return the property value") + }) + + t.Run("GetSignatureKey_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WebhookSubscription{} + obj.SignatureKey = nil + + // Act & Assert + assert.Nil(t, obj.GetSignatureKey(), "getter should return nil when property is nil") + }) + + t.Run("GetSignatureKey_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *WebhookSubscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSignatureKey() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WebhookSubscription{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WebhookSubscription{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *WebhookSubscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WebhookSubscription{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WebhookSubscription{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *WebhookSubscription + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitWebhookSubscription(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WebhookSubscription{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WebhookSubscription{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEnabled_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WebhookSubscription{} + var fernTestValueEnabled *bool + + // Act + obj.SetEnabled(fernTestValueEnabled) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventTypes_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WebhookSubscription{} + var fernTestValueEventTypes []string + + // Act + obj.SetEventTypes(fernTestValueEventTypes) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNotificationURL_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WebhookSubscription{} + var fernTestValueNotificationURL *string + + // Act + obj.SetNotificationURL(fernTestValueNotificationURL) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAPIVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WebhookSubscription{} + var fernTestValueAPIVersion *string + + // Act + obj.SetAPIVersion(fernTestValueAPIVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSignatureKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WebhookSubscription{} + var fernTestValueSignatureKey *string + + // Act + obj.SetSignatureKey(fernTestValueSignatureKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WebhookSubscription{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WebhookSubscription{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersWorkweekConfig(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &WorkweekConfig{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStartOfWeek", func(t *testing.T) { + obj := &WorkweekConfig{} + var fernTestValueStartOfWeek Weekday + obj.SetStartOfWeek(fernTestValueStartOfWeek) + assert.Equal(t, fernTestValueStartOfWeek, obj.StartOfWeek) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStartOfDayLocalTime", func(t *testing.T) { + obj := &WorkweekConfig{} + var fernTestValueStartOfDayLocalTime string + obj.SetStartOfDayLocalTime(fernTestValueStartOfDayLocalTime) + assert.Equal(t, fernTestValueStartOfDayLocalTime, obj.StartOfDayLocalTime) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &WorkweekConfig{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &WorkweekConfig{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &WorkweekConfig{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersWorkweekConfig(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WorkweekConfig{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WorkweekConfig{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *WorkweekConfig + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetStartOfWeek", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WorkweekConfig{} + var expected Weekday + obj.StartOfWeek = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStartOfWeek(), "getter should return the property value") + }) + + t.Run("GetStartOfWeek_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *WorkweekConfig + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStartOfWeek() // Should return zero value + }) + + t.Run("GetStartOfDayLocalTime", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WorkweekConfig{} + var expected string + obj.StartOfDayLocalTime = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStartOfDayLocalTime(), "getter should return the property value") + }) + + t.Run("GetStartOfDayLocalTime_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *WorkweekConfig + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStartOfDayLocalTime() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WorkweekConfig{} + var expected *int + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WorkweekConfig{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *WorkweekConfig + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WorkweekConfig{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WorkweekConfig{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *WorkweekConfig + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WorkweekConfig{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WorkweekConfig{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *WorkweekConfig + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitWorkweekConfig(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WorkweekConfig{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStartOfWeek_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WorkweekConfig{} + var fernTestValueStartOfWeek Weekday + + // Act + obj.SetStartOfWeek(fernTestValueStartOfWeek) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStartOfDayLocalTime_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WorkweekConfig{} + var fernTestValueStartOfDayLocalTime string + + // Act + obj.SetStartOfDayLocalTime(fernTestValueStartOfDayLocalTime) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WorkweekConfig{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WorkweekConfig{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WorkweekConfig{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingAcceptedPaymentMethods(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AcceptedPaymentMethods{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled AcceptedPaymentMethods + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj AcceptedPaymentMethods + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj AcceptedPaymentMethods + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingAccumulateLoyaltyPointsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AccumulateLoyaltyPointsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled AccumulateLoyaltyPointsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj AccumulateLoyaltyPointsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj AccumulateLoyaltyPointsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingAddGroupToCustomerResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AddGroupToCustomerResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled AddGroupToCustomerResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj AddGroupToCustomerResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj AddGroupToCustomerResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingAdditionalRecipient(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AdditionalRecipient{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled AdditionalRecipient + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj AdditionalRecipient + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj AdditionalRecipient + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingAddress(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Address{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Address + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Address + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Address + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingAdjustLoyaltyPointsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &AdjustLoyaltyPointsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled AdjustLoyaltyPointsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj AdjustLoyaltyPointsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj AdjustLoyaltyPointsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBankAccountCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BankAccountCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BankAccountCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BankAccountCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBankAccountCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BankAccountCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BankAccountCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BankAccountCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBankAccountCreatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountCreatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BankAccountCreatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BankAccountCreatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BankAccountCreatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBankAccountDisabledEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BankAccountDisabledEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BankAccountDisabledEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BankAccountDisabledEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBankAccountDisabledEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BankAccountDisabledEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BankAccountDisabledEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BankAccountDisabledEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBankAccountDisabledEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountDisabledEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BankAccountDisabledEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BankAccountDisabledEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BankAccountDisabledEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBankAccountVerifiedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BankAccountVerifiedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BankAccountVerifiedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BankAccountVerifiedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBankAccountVerifiedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BankAccountVerifiedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BankAccountVerifiedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BankAccountVerifiedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBankAccountVerifiedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BankAccountVerifiedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BankAccountVerifiedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BankAccountVerifiedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BankAccountVerifiedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBatchUpsertCustomerCustomAttributesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCustomerCustomAttributesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BatchUpsertCustomerCustomAttributesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BatchUpsertCustomerCustomAttributesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BatchUpsertCustomerCustomAttributesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBookingCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BookingCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BookingCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BookingCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBookingCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BookingCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BookingCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BookingCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBookingCreatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCreatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BookingCreatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BookingCreatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BookingCreatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBookingCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BookingCustomAttributeDefinitionOwnedCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BookingCustomAttributeDefinitionOwnedCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BookingCustomAttributeDefinitionOwnedCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBookingCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BookingCustomAttributeDefinitionOwnedDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BookingCustomAttributeDefinitionOwnedDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BookingCustomAttributeDefinitionOwnedDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBookingCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionOwnedUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BookingCustomAttributeDefinitionOwnedUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BookingCustomAttributeDefinitionOwnedUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BookingCustomAttributeDefinitionOwnedUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBookingCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BookingCustomAttributeDefinitionVisibleCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BookingCustomAttributeDefinitionVisibleCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BookingCustomAttributeDefinitionVisibleCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBookingCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BookingCustomAttributeDefinitionVisibleDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BookingCustomAttributeDefinitionVisibleDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BookingCustomAttributeDefinitionVisibleDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBookingCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDefinitionVisibleUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BookingCustomAttributeDefinitionVisibleUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BookingCustomAttributeDefinitionVisibleUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BookingCustomAttributeDefinitionVisibleUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBookingCustomAttributeDeleteRequest(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDeleteRequest{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BookingCustomAttributeDeleteRequest + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BookingCustomAttributeDeleteRequest + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BookingCustomAttributeDeleteRequest + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBookingCustomAttributeDeleteResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeDeleteResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BookingCustomAttributeDeleteResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BookingCustomAttributeDeleteResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BookingCustomAttributeDeleteResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBookingCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BookingCustomAttributeOwnedDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BookingCustomAttributeOwnedDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BookingCustomAttributeOwnedDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBookingCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeOwnedUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BookingCustomAttributeOwnedUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BookingCustomAttributeOwnedUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BookingCustomAttributeOwnedUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBookingCustomAttributeUpsertRequest(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeUpsertRequest{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BookingCustomAttributeUpsertRequest + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BookingCustomAttributeUpsertRequest + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BookingCustomAttributeUpsertRequest + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBookingCustomAttributeUpsertResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeUpsertResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BookingCustomAttributeUpsertResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BookingCustomAttributeUpsertResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BookingCustomAttributeUpsertResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBookingCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BookingCustomAttributeVisibleDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BookingCustomAttributeVisibleDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BookingCustomAttributeVisibleDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBookingCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingCustomAttributeVisibleUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BookingCustomAttributeVisibleUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BookingCustomAttributeVisibleUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BookingCustomAttributeVisibleUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBookingUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BookingUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BookingUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BookingUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBookingUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BookingUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BookingUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BookingUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBookingUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BookingUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BookingUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BookingUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BookingUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBreak(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Break{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Break + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Break + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Break + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBreakType(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BreakType{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BreakType + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BreakType + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BreakType + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBulkDeleteBookingCustomAttributesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteBookingCustomAttributesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkDeleteBookingCustomAttributesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkDeleteBookingCustomAttributesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkDeleteBookingCustomAttributesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBulkDeleteLocationCustomAttributesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteLocationCustomAttributesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkDeleteLocationCustomAttributesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkDeleteLocationCustomAttributesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkDeleteLocationCustomAttributesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBulkDeleteMerchantCustomAttributesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteMerchantCustomAttributesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkDeleteMerchantCustomAttributesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkDeleteMerchantCustomAttributesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkDeleteMerchantCustomAttributesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBulkDeleteOrderCustomAttributesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkDeleteOrderCustomAttributesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkDeleteOrderCustomAttributesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkDeleteOrderCustomAttributesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkDeleteOrderCustomAttributesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBulkUpsertBookingCustomAttributesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertBookingCustomAttributesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkUpsertBookingCustomAttributesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkUpsertBookingCustomAttributesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkUpsertBookingCustomAttributesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBulkUpsertLocationCustomAttributesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertLocationCustomAttributesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkUpsertLocationCustomAttributesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkUpsertLocationCustomAttributesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkUpsertLocationCustomAttributesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBulkUpsertMerchantCustomAttributesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertMerchantCustomAttributesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkUpsertMerchantCustomAttributesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkUpsertMerchantCustomAttributesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkUpsertMerchantCustomAttributesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBulkUpsertOrderCustomAttributesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BulkUpsertOrderCustomAttributesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BulkUpsertOrderCustomAttributesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BulkUpsertOrderCustomAttributesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BulkUpsertOrderCustomAttributesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCalculateLoyaltyPointsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CalculateLoyaltyPointsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CalculateLoyaltyPointsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CalculateLoyaltyPointsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CalculateLoyaltyPointsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCancelLoyaltyPromotionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelLoyaltyPromotionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CancelLoyaltyPromotionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CancelLoyaltyPromotionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CancelLoyaltyPromotionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCancelTerminalActionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTerminalActionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CancelTerminalActionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CancelTerminalActionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CancelTerminalActionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCancelTerminalCheckoutResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTerminalCheckoutResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CancelTerminalCheckoutResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CancelTerminalCheckoutResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CancelTerminalCheckoutResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCancelTerminalRefundResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CancelTerminalRefundResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CancelTerminalRefundResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CancelTerminalRefundResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CancelTerminalRefundResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCaptureTransactionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CaptureTransactionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CaptureTransactionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CaptureTransactionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CaptureTransactionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCard(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Card{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Card + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Card + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Card + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCardAutomaticallyUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CardAutomaticallyUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CardAutomaticallyUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CardAutomaticallyUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCardAutomaticallyUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CardAutomaticallyUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CardAutomaticallyUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CardAutomaticallyUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCardAutomaticallyUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardAutomaticallyUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CardAutomaticallyUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CardAutomaticallyUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CardAutomaticallyUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCardCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CardCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CardCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CardCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCardCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CardCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CardCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CardCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCardCreatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardCreatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CardCreatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CardCreatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CardCreatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCardDisabledEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CardDisabledEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CardDisabledEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CardDisabledEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCardDisabledEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CardDisabledEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CardDisabledEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CardDisabledEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCardDisabledEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardDisabledEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CardDisabledEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CardDisabledEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CardDisabledEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCardForgottenEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CardForgottenEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CardForgottenEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CardForgottenEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCardForgottenEventCard(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventCard{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CardForgottenEventCard + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CardForgottenEventCard + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CardForgottenEventCard + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCardForgottenEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CardForgottenEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CardForgottenEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CardForgottenEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCardForgottenEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardForgottenEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CardForgottenEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CardForgottenEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CardForgottenEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCardUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CardUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CardUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CardUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCardUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CardUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CardUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CardUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCardUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CardUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CardUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CardUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CardUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCashDrawerDevice(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerDevice{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CashDrawerDevice + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CashDrawerDevice + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CashDrawerDevice + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCashDrawerShift(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShift{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CashDrawerShift + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CashDrawerShift + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CashDrawerShift + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCashDrawerShiftEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CashDrawerShiftEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CashDrawerShiftEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CashDrawerShiftEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCashDrawerShiftSummary(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CashDrawerShiftSummary{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CashDrawerShiftSummary + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CashDrawerShiftSummary + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CashDrawerShiftSummary + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogAvailabilityPeriod(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogAvailabilityPeriod{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogAvailabilityPeriod + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogAvailabilityPeriod + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogAvailabilityPeriod + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogCategory(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCategory{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogCategory + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogCategory + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogCategory + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogCustomAttributeDefinition(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinition{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogCustomAttributeDefinition + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogCustomAttributeDefinition + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogCustomAttributeDefinition + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogCustomAttributeDefinitionNumberConfig(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinitionNumberConfig{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogCustomAttributeDefinitionNumberConfig + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogCustomAttributeDefinitionNumberConfig + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogCustomAttributeDefinitionNumberConfig + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogCustomAttributeDefinitionSelectionConfig(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinitionSelectionConfig{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogCustomAttributeDefinitionSelectionConfig + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogCustomAttributeDefinitionSelectionConfig + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogCustomAttributeDefinitionSelectionConfig + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogCustomAttributeDefinitionStringConfig(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeDefinitionStringConfig{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogCustomAttributeDefinitionStringConfig + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogCustomAttributeDefinitionStringConfig + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogCustomAttributeDefinitionStringConfig + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogCustomAttributeValue(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogCustomAttributeValue{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogCustomAttributeValue + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogCustomAttributeValue + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogCustomAttributeValue + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogDiscount(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogDiscount{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogDiscount + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogDiscount + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogDiscount + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogEcomSeoData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogEcomSeoData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogEcomSeoData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogEcomSeoData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogEcomSeoData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogIDMapping(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogIDMapping{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogIDMapping + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogIDMapping + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogIDMapping + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogImage(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogImage{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogImage + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogImage + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogImage + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogItem(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItem{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogItem + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogItem + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogItem + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogItemFoodAndBeverageDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogItemFoodAndBeverageDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogItemFoodAndBeverageDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogItemFoodAndBeverageDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogItemFoodAndBeverageDetailsDietaryPreference(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetailsDietaryPreference{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogItemFoodAndBeverageDetailsDietaryPreference + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogItemFoodAndBeverageDetailsDietaryPreference + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogItemFoodAndBeverageDetailsDietaryPreference + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogItemFoodAndBeverageDetailsIngredient(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemFoodAndBeverageDetailsIngredient{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogItemFoodAndBeverageDetailsIngredient + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogItemFoodAndBeverageDetailsIngredient + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogItemFoodAndBeverageDetailsIngredient + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogItemModifierListInfo(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemModifierListInfo{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogItemModifierListInfo + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogItemModifierListInfo + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogItemModifierListInfo + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogItemOption(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOption{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogItemOption + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogItemOption + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogItemOption + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogItemOptionForItem(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOptionForItem{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogItemOptionForItem + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogItemOptionForItem + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogItemOptionForItem + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogItemOptionValue(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOptionValue{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogItemOptionValue + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogItemOptionValue + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogItemOptionValue + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogItemOptionValueForItemVariation(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemOptionValueForItemVariation{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogItemOptionValueForItemVariation + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogItemOptionValueForItemVariation + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogItemOptionValueForItemVariation + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogItemVariation(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogItemVariation{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogItemVariation + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogItemVariation + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogItemVariation + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogMeasurementUnit(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogMeasurementUnit{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogMeasurementUnit + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogMeasurementUnit + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogMeasurementUnit + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogModifier(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifier{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogModifier + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogModifier + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogModifier + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogModifierList(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierList{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogModifierList + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogModifierList + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogModifierList + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogModifierOverride(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogModifierOverride{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogModifierOverride + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogModifierOverride + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogModifierOverride + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogObjectAvailabilityPeriod(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectAvailabilityPeriod{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogObjectAvailabilityPeriod + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectAvailabilityPeriod + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectAvailabilityPeriod + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogObjectBase(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectBase{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogObjectBase + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectBase + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectBase + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogObjectCategory(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCategory{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogObjectCategory + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectCategory + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectCategory + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogObjectCustomAttributeDefinition(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectCustomAttributeDefinition{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogObjectCustomAttributeDefinition + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectCustomAttributeDefinition + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectCustomAttributeDefinition + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogObjectDiscount(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectDiscount{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogObjectDiscount + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectDiscount + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectDiscount + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogObjectImage(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectImage{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogObjectImage + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectImage + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectImage + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogObjectItem(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItem{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogObjectItem + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectItem + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectItem + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogObjectItemOption(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOption{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogObjectItemOption + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectItemOption + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectItemOption + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogObjectItemOptionValue(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemOptionValue{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogObjectItemOptionValue + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectItemOptionValue + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectItemOptionValue + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogObjectItemVariation(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectItemVariation{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogObjectItemVariation + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectItemVariation + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectItemVariation + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogObjectMeasurementUnit(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectMeasurementUnit{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogObjectMeasurementUnit + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectMeasurementUnit + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectMeasurementUnit + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogObjectModifier(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifier{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogObjectModifier + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectModifier + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectModifier + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogObjectModifierList(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectModifierList{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogObjectModifierList + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectModifierList + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectModifierList + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogObjectPricingRule(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectPricingRule{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogObjectPricingRule + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectPricingRule + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectPricingRule + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogObjectProductSet(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectProductSet{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogObjectProductSet + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectProductSet + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectProductSet + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogObjectQuickAmountsSettings(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectQuickAmountsSettings{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogObjectQuickAmountsSettings + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectQuickAmountsSettings + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectQuickAmountsSettings + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogObjectReference(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectReference{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogObjectReference + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectReference + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectReference + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogObjectSubscriptionPlan(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlan{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogObjectSubscriptionPlan + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectSubscriptionPlan + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectSubscriptionPlan + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogObjectSubscriptionPlanVariation(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectSubscriptionPlanVariation{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogObjectSubscriptionPlanVariation + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectSubscriptionPlanVariation + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectSubscriptionPlanVariation + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogObjectTax(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTax{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogObjectTax + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectTax + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectTax + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogObjectTimePeriod(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogObjectTimePeriod{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogObjectTimePeriod + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectTimePeriod + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogObjectTimePeriod + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogPricingRule(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogPricingRule{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogPricingRule + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogPricingRule + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogPricingRule + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogProductSet(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogProductSet{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogProductSet + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogProductSet + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogProductSet + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogQuickAmount(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuickAmount{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogQuickAmount + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogQuickAmount + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogQuickAmount + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogQuickAmountsSettings(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogQuickAmountsSettings{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogQuickAmountsSettings + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogQuickAmountsSettings + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogQuickAmountsSettings + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogStockConversion(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogStockConversion{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogStockConversion + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogStockConversion + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogStockConversion + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogSubscriptionPlan(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlan{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogSubscriptionPlan + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogSubscriptionPlan + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogSubscriptionPlan + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogSubscriptionPlanVariation(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogSubscriptionPlanVariation{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogSubscriptionPlanVariation + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogSubscriptionPlanVariation + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogSubscriptionPlanVariation + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogTax(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogTax{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogTax + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogTax + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogTax + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogTimePeriod(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogTimePeriod{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogTimePeriod + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogTimePeriod + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogTimePeriod + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogV1ID(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogV1ID{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogV1ID + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogV1ID + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogV1ID + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogVersionUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogVersionUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogVersionUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogVersionUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogVersionUpdatedEventCatalogVersion(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEventCatalogVersion{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogVersionUpdatedEventCatalogVersion + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogVersionUpdatedEventCatalogVersion + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogVersionUpdatedEventCatalogVersion + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogVersionUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogVersionUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogVersionUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogVersionUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCatalogVersionUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CatalogVersionUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CatalogVersionUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CatalogVersionUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CatalogVersionUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCategoryPathToRootNode(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CategoryPathToRootNode{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CategoryPathToRootNode + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CategoryPathToRootNode + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CategoryPathToRootNode + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCheckoutOptions(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CheckoutOptions{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CheckoutOptions + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CheckoutOptions + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CheckoutOptions + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCollectedData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CollectedData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CollectedData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CollectedData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CollectedData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingConfirmationDecision(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ConfirmationDecision{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ConfirmationDecision + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ConfirmationDecision + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ConfirmationDecision + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingConfirmationOptions(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ConfirmationOptions{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ConfirmationOptions + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ConfirmationOptions + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ConfirmationOptions + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateBookingCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBookingCustomAttributeDefinitionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateBookingCustomAttributeDefinitionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateBookingCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateBookingCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateBreakTypeResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateBreakTypeResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateBreakTypeResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateBreakTypeResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateBreakTypeResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateCatalogImageRequest(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCatalogImageRequest{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateCatalogImageRequest + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateCatalogImageRequest + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateCatalogImageRequest + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateCatalogImageResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCatalogImageResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateCatalogImageResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateCatalogImageResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateCatalogImageResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateCustomerCardResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerCardResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateCustomerCardResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateCustomerCardResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateCustomerCardResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateCustomerCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerCustomAttributeDefinitionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateCustomerCustomAttributeDefinitionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateCustomerCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateCustomerCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateCustomerGroupResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateCustomerGroupResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateCustomerGroupResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateCustomerGroupResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateCustomerGroupResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateDeviceCodeResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateDeviceCodeResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateDeviceCodeResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateDeviceCodeResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateDeviceCodeResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateGiftCardActivityResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateGiftCardActivityResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateGiftCardActivityResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateGiftCardActivityResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateGiftCardActivityResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateLocationCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLocationCustomAttributeDefinitionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateLocationCustomAttributeDefinitionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateLocationCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateLocationCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateLoyaltyAccountResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLoyaltyAccountResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateLoyaltyAccountResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateLoyaltyAccountResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateLoyaltyAccountResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateLoyaltyPromotionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLoyaltyPromotionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateLoyaltyPromotionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateLoyaltyPromotionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateLoyaltyPromotionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateLoyaltyRewardResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateLoyaltyRewardResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateLoyaltyRewardResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateLoyaltyRewardResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateLoyaltyRewardResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateMerchantCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateMerchantCustomAttributeDefinitionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateMerchantCustomAttributeDefinitionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateMerchantCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateMerchantCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateOrderCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateOrderCustomAttributeDefinitionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateOrderCustomAttributeDefinitionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateOrderCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateOrderCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateOrderRequest(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateOrderRequest{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateOrderRequest + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateOrderRequest + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateOrderRequest + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreatePaymentLinkResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreatePaymentLinkResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreatePaymentLinkResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreatePaymentLinkResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreatePaymentLinkResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateShiftResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateShiftResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateShiftResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateShiftResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateShiftResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateTerminalActionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTerminalActionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateTerminalActionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateTerminalActionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateTerminalActionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateTerminalCheckoutResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTerminalCheckoutResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateTerminalCheckoutResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateTerminalCheckoutResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateTerminalCheckoutResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateTerminalRefundResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateTerminalRefundResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateTerminalRefundResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateTerminalRefundResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateTerminalRefundResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateWebhookSubscriptionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateWebhookSubscriptionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateWebhookSubscriptionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateWebhookSubscriptionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateWebhookSubscriptionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomAttribute(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttribute{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomAttribute + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomAttribute + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomAttribute + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomAttributeDefinition(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinition{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomAttributeDefinition + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomAttributeDefinition + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomAttributeDefinition + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomAttributeDefinitionEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinitionEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomAttributeDefinitionEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomAttributeDefinitionEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomAttributeDefinitionEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomAttributeDefinitionEventDataObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeDefinitionEventDataObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomAttributeDefinitionEventDataObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomAttributeDefinitionEventDataObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomAttributeDefinitionEventDataObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomAttributeEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomAttributeEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomAttributeEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomAttributeEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomAttributeEventDataObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomAttributeEventDataObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomAttributeEventDataObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomAttributeEventDataObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomAttributeEventDataObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomField(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomField{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomField + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomField + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomField + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCreatedEventEventContext(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEventEventContext{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCreatedEventEventContext + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCreatedEventEventContext + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCreatedEventEventContext + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCreatedEventEventContextMerge(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEventEventContextMerge{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCreatedEventEventContextMerge + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCreatedEventEventContextMerge + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCreatedEventEventContextMerge + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCreatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCreatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCreatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCreatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCreatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCustomAttributeDefinitionCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCustomAttributeDefinitionCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeDefinitionCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeDefinitionCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCustomAttributeDefinitionCreatedPublicEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionCreatedPublicEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCustomAttributeDefinitionCreatedPublicEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeDefinitionCreatedPublicEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeDefinitionCreatedPublicEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCustomAttributeDefinitionDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCustomAttributeDefinitionDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeDefinitionDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeDefinitionDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCustomAttributeDefinitionDeletedPublicEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionDeletedPublicEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCustomAttributeDefinitionDeletedPublicEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeDefinitionDeletedPublicEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeDefinitionDeletedPublicEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCustomAttributeDefinitionOwnedCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeDefinitionOwnedCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeDefinitionOwnedCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCustomAttributeDefinitionOwnedDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeDefinitionOwnedDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeDefinitionOwnedDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionOwnedUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCustomAttributeDefinitionOwnedUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeDefinitionOwnedUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeDefinitionOwnedUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCustomAttributeDefinitionUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCustomAttributeDefinitionUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeDefinitionUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeDefinitionUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCustomAttributeDefinitionUpdatedPublicEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionUpdatedPublicEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCustomAttributeDefinitionUpdatedPublicEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeDefinitionUpdatedPublicEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeDefinitionUpdatedPublicEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCustomAttributeDefinitionVisibleCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeDefinitionVisibleCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeDefinitionVisibleCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCustomAttributeDefinitionVisibleDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeDefinitionVisibleDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeDefinitionVisibleDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDefinitionVisibleUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCustomAttributeDefinitionVisibleUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeDefinitionVisibleUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeDefinitionVisibleUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCustomAttributeDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCustomAttributeDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCustomAttributeDeletedPublicEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeDeletedPublicEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCustomAttributeDeletedPublicEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeDeletedPublicEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeDeletedPublicEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCustomAttributeOwnedDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeOwnedDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeOwnedDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeOwnedUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCustomAttributeOwnedUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeOwnedUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeOwnedUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCustomAttributeUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCustomAttributeUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCustomAttributeUpdatedPublicEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeUpdatedPublicEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCustomAttributeUpdatedPublicEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeUpdatedPublicEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeUpdatedPublicEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCustomAttributeVisibleDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeVisibleDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeVisibleDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerCustomAttributeVisibleUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerCustomAttributeVisibleUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeVisibleUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerCustomAttributeVisibleUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerDeletedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerDeletedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerDeletedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerDeletedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerDeletedEventEventContext(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEventEventContext{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerDeletedEventEventContext + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerDeletedEventEventContext + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerDeletedEventEventContext + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerDeletedEventEventContextMerge(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEventEventContextMerge{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerDeletedEventEventContextMerge + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerDeletedEventEventContextMerge + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerDeletedEventEventContextMerge + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerDeletedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerDeletedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerDeletedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerDeletedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerDeletedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerGroup(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerGroup{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerGroup + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerGroup + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerGroup + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerSegment(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerSegment{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerSegment + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerSegment + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerSegment + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCustomerUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CustomerUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CustomerUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CustomerUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CustomerUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDataCollectionOptions(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DataCollectionOptions{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DataCollectionOptions + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DataCollectionOptions + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DataCollectionOptions + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDateRange(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DateRange{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DateRange + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DateRange + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DateRange + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeleteBookingCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteBookingCustomAttributeDefinitionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeleteBookingCustomAttributeDefinitionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeleteBookingCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeleteBookingCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeleteBookingCustomAttributeResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteBookingCustomAttributeResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeleteBookingCustomAttributeResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeleteBookingCustomAttributeResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeleteBookingCustomAttributeResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeleteBreakTypeResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteBreakTypeResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeleteBreakTypeResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeleteBreakTypeResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeleteBreakTypeResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeleteCatalogObjectResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCatalogObjectResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeleteCatalogObjectResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeleteCatalogObjectResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeleteCatalogObjectResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeleteCustomerCardResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomerCardResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeleteCustomerCardResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeleteCustomerCardResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeleteCustomerCardResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeleteCustomerCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomerCustomAttributeDefinitionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeleteCustomerCustomAttributeDefinitionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeleteCustomerCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeleteCustomerCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeleteCustomerCustomAttributeResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomerCustomAttributeResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeleteCustomerCustomAttributeResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeleteCustomerCustomAttributeResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeleteCustomerCustomAttributeResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeleteCustomerGroupResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteCustomerGroupResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeleteCustomerGroupResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeleteCustomerGroupResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeleteCustomerGroupResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeleteDisputeEvidenceResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteDisputeEvidenceResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeleteDisputeEvidenceResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeleteDisputeEvidenceResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeleteDisputeEvidenceResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeleteLocationCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteLocationCustomAttributeDefinitionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeleteLocationCustomAttributeDefinitionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeleteLocationCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeleteLocationCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeleteLocationCustomAttributeResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteLocationCustomAttributeResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeleteLocationCustomAttributeResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeleteLocationCustomAttributeResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeleteLocationCustomAttributeResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeleteLoyaltyRewardResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteLoyaltyRewardResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeleteLoyaltyRewardResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeleteLoyaltyRewardResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeleteLoyaltyRewardResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeleteMerchantCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteMerchantCustomAttributeDefinitionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeleteMerchantCustomAttributeDefinitionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeleteMerchantCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeleteMerchantCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeleteMerchantCustomAttributeResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteMerchantCustomAttributeResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeleteMerchantCustomAttributeResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeleteMerchantCustomAttributeResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeleteMerchantCustomAttributeResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeleteOrderCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteOrderCustomAttributeDefinitionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeleteOrderCustomAttributeDefinitionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeleteOrderCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeleteOrderCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeleteOrderCustomAttributeResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteOrderCustomAttributeResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeleteOrderCustomAttributeResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeleteOrderCustomAttributeResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeleteOrderCustomAttributeResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeletePaymentLinkResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeletePaymentLinkResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeletePaymentLinkResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeletePaymentLinkResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeletePaymentLinkResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeleteShiftResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteShiftResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeleteShiftResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeleteShiftResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeleteShiftResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeleteWebhookSubscriptionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteWebhookSubscriptionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeleteWebhookSubscriptionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeleteWebhookSubscriptionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeleteWebhookSubscriptionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeviceCheckoutOptions(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCheckoutOptions{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeviceCheckoutOptions + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeviceCheckoutOptions + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeviceCheckoutOptions + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeviceCode(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCode{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeviceCode + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeviceCode + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeviceCode + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeviceCodePairedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeviceCodePairedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeviceCodePairedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeviceCodePairedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeviceCodePairedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeviceCodePairedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeviceCodePairedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeviceCodePairedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeviceCodePairedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCodePairedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeviceCodePairedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeviceCodePairedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeviceCodePairedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeviceCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeviceCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeviceCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeviceCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeviceCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeviceCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeviceCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeviceCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeviceCreatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceCreatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeviceCreatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeviceCreatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeviceCreatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDeviceMetadata(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeviceMetadata{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DeviceMetadata + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DeviceMetadata + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DeviceMetadata + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDisputeCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DisputeCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DisputeCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DisputeCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDisputeCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DisputeCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DisputeCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DisputeCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDisputeCreatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeCreatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DisputeCreatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DisputeCreatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DisputeCreatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDisputeEvidence(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidence{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DisputeEvidence + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DisputeEvidence + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DisputeEvidence + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDisputeEvidenceAddedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DisputeEvidenceAddedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DisputeEvidenceAddedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DisputeEvidenceAddedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDisputeEvidenceAddedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DisputeEvidenceAddedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DisputeEvidenceAddedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DisputeEvidenceAddedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDisputeEvidenceAddedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceAddedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DisputeEvidenceAddedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DisputeEvidenceAddedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DisputeEvidenceAddedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDisputeEvidenceCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DisputeEvidenceCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DisputeEvidenceCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DisputeEvidenceCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDisputeEvidenceCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DisputeEvidenceCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DisputeEvidenceCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DisputeEvidenceCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDisputeEvidenceCreatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceCreatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DisputeEvidenceCreatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DisputeEvidenceCreatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DisputeEvidenceCreatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDisputeEvidenceDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DisputeEvidenceDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DisputeEvidenceDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DisputeEvidenceDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDisputeEvidenceDeletedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DisputeEvidenceDeletedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DisputeEvidenceDeletedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DisputeEvidenceDeletedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDisputeEvidenceDeletedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceDeletedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DisputeEvidenceDeletedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DisputeEvidenceDeletedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DisputeEvidenceDeletedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDisputeEvidenceFile(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceFile{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DisputeEvidenceFile + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DisputeEvidenceFile + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DisputeEvidenceFile + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDisputeEvidenceRemovedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DisputeEvidenceRemovedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DisputeEvidenceRemovedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DisputeEvidenceRemovedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDisputeEvidenceRemovedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DisputeEvidenceRemovedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DisputeEvidenceRemovedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DisputeEvidenceRemovedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDisputeEvidenceRemovedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeEvidenceRemovedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DisputeEvidenceRemovedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DisputeEvidenceRemovedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DisputeEvidenceRemovedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDisputeStateChangedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DisputeStateChangedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DisputeStateChangedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DisputeStateChangedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDisputeStateChangedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DisputeStateChangedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DisputeStateChangedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DisputeStateChangedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDisputeStateChangedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateChangedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DisputeStateChangedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DisputeStateChangedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DisputeStateChangedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDisputeStateUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DisputeStateUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DisputeStateUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DisputeStateUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDisputeStateUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DisputeStateUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DisputeStateUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DisputeStateUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingDisputeStateUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DisputeStateUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled DisputeStateUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj DisputeStateUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj DisputeStateUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingEmployeeWage(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EmployeeWage{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled EmployeeWage + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj EmployeeWage + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj EmployeeWage + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingError(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Error{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Error + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Error + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Error + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingEventTypeMetadata(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &EventTypeMetadata{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled EventTypeMetadata + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj EventTypeMetadata + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj EventTypeMetadata + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingFilterValue(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FilterValue{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled FilterValue + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj FilterValue + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj FilterValue + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingFulfillment(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Fulfillment{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Fulfillment + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Fulfillment + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Fulfillment + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingFulfillmentDeliveryDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentDeliveryDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled FulfillmentDeliveryDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj FulfillmentDeliveryDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj FulfillmentDeliveryDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingFulfillmentFulfillmentEntry(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentFulfillmentEntry{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled FulfillmentFulfillmentEntry + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj FulfillmentFulfillmentEntry + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj FulfillmentFulfillmentEntry + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingFulfillmentPickupDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled FulfillmentPickupDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj FulfillmentPickupDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj FulfillmentPickupDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingFulfillmentPickupDetailsCurbsidePickupDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentPickupDetailsCurbsidePickupDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled FulfillmentPickupDetailsCurbsidePickupDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj FulfillmentPickupDetailsCurbsidePickupDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj FulfillmentPickupDetailsCurbsidePickupDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingFulfillmentRecipient(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentRecipient{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled FulfillmentRecipient + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj FulfillmentRecipient + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj FulfillmentRecipient + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingFulfillmentShipmentDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &FulfillmentShipmentDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled FulfillmentShipmentDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj FulfillmentShipmentDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj FulfillmentShipmentDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetBreakTypeResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetBreakTypeResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetBreakTypeResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetBreakTypeResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetBreakTypeResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetCashDrawerShiftResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCashDrawerShiftResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetCashDrawerShiftResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetCashDrawerShiftResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetCashDrawerShiftResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetCatalogObjectResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCatalogObjectResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetCatalogObjectResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetCatalogObjectResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetCatalogObjectResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetCustomerCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerCustomAttributeDefinitionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetCustomerCustomAttributeDefinitionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetCustomerCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetCustomerCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetCustomerCustomAttributeResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerCustomAttributeResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetCustomerCustomAttributeResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetCustomerCustomAttributeResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetCustomerCustomAttributeResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetCustomerGroupResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerGroupResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetCustomerGroupResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetCustomerGroupResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetCustomerGroupResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetCustomerSegmentResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetCustomerSegmentResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetCustomerSegmentResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetCustomerSegmentResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetCustomerSegmentResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetDeviceCodeResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDeviceCodeResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetDeviceCodeResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetDeviceCodeResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetDeviceCodeResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetDisputeEvidenceResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetDisputeEvidenceResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetDisputeEvidenceResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetDisputeEvidenceResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetDisputeEvidenceResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetEmployeeWageResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetEmployeeWageResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetEmployeeWageResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetEmployeeWageResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetEmployeeWageResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetLoyaltyAccountResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLoyaltyAccountResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetLoyaltyAccountResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetLoyaltyAccountResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetLoyaltyAccountResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetLoyaltyProgramResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLoyaltyProgramResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetLoyaltyProgramResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetLoyaltyProgramResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetLoyaltyProgramResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetLoyaltyPromotionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLoyaltyPromotionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetLoyaltyPromotionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetLoyaltyPromotionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetLoyaltyPromotionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetLoyaltyRewardResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetLoyaltyRewardResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetLoyaltyRewardResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetLoyaltyRewardResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetLoyaltyRewardResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetPaymentLinkResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetPaymentLinkResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetPaymentLinkResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetPaymentLinkResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetPaymentLinkResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetShiftResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetShiftResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetShiftResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetShiftResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetShiftResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetTeamMemberBookingProfileResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTeamMemberBookingProfileResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetTeamMemberBookingProfileResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetTeamMemberBookingProfileResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetTeamMemberBookingProfileResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetTeamMemberWageResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTeamMemberWageResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetTeamMemberWageResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetTeamMemberWageResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetTeamMemberWageResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetTerminalActionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTerminalActionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetTerminalActionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetTerminalActionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetTerminalActionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetTerminalCheckoutResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTerminalCheckoutResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetTerminalCheckoutResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetTerminalCheckoutResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetTerminalCheckoutResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetTerminalRefundResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTerminalRefundResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetTerminalRefundResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetTerminalRefundResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetTerminalRefundResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetTransactionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetTransactionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetTransactionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetTransactionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetTransactionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetWageSettingResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetWageSettingResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetWageSettingResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetWageSettingResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetWageSettingResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetWebhookSubscriptionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetWebhookSubscriptionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetWebhookSubscriptionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetWebhookSubscriptionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetWebhookSubscriptionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardActivity(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivity{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardActivity + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivity + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivity + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardActivityActivate(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityActivate{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardActivityActivate + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityActivate + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityActivate + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardActivityAdjustDecrement(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityAdjustDecrement{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardActivityAdjustDecrement + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityAdjustDecrement + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityAdjustDecrement + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardActivityAdjustIncrement(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityAdjustIncrement{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardActivityAdjustIncrement + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityAdjustIncrement + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityAdjustIncrement + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardActivityBlock(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityBlock{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardActivityBlock + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityBlock + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityBlock + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardActivityClearBalance(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityClearBalance{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardActivityClearBalance + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityClearBalance + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityClearBalance + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardActivityCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardActivityCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardActivityCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardActivityCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardActivityCreatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityCreatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardActivityCreatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityCreatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityCreatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardActivityDeactivate(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityDeactivate{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardActivityDeactivate + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityDeactivate + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityDeactivate + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardActivityImport(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityImport{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardActivityImport + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityImport + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityImport + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardActivityImportReversal(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityImportReversal{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardActivityImportReversal + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityImportReversal + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityImportReversal + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardActivityLoad(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityLoad{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardActivityLoad + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityLoad + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityLoad + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardActivityRedeem(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityRedeem{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardActivityRedeem + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityRedeem + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityRedeem + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardActivityRefund(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityRefund{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardActivityRefund + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityRefund + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityRefund + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardActivityTransferBalanceFrom(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityTransferBalanceFrom{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardActivityTransferBalanceFrom + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityTransferBalanceFrom + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityTransferBalanceFrom + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardActivityTransferBalanceTo(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityTransferBalanceTo{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardActivityTransferBalanceTo + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityTransferBalanceTo + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityTransferBalanceTo + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardActivityUnblock(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUnblock{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardActivityUnblock + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityUnblock + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityUnblock + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardActivityUnlinkedActivityRefund(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUnlinkedActivityRefund{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardActivityUnlinkedActivityRefund + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityUnlinkedActivityRefund + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityUnlinkedActivityRefund + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardActivityUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardActivityUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardActivityUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardActivityUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardActivityUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardActivityUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardActivityUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardActivityUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardCreatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCreatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardCreatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardCreatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardCreatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardCustomerLinkedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardCustomerLinkedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardCustomerLinkedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardCustomerLinkedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardCustomerLinkedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardCustomerLinkedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardCustomerLinkedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardCustomerLinkedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardCustomerLinkedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerLinkedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardCustomerLinkedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardCustomerLinkedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardCustomerLinkedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardCustomerUnlinkedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardCustomerUnlinkedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardCustomerUnlinkedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardCustomerUnlinkedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardCustomerUnlinkedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardCustomerUnlinkedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardCustomerUnlinkedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardCustomerUnlinkedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardCustomerUnlinkedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardCustomerUnlinkedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardCustomerUnlinkedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardCustomerUnlinkedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardCustomerUnlinkedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGiftCardUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GiftCardUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GiftCardUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GiftCardUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GiftCardUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInventoryCountUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InventoryCountUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InventoryCountUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InventoryCountUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInventoryCountUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InventoryCountUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InventoryCountUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InventoryCountUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInventoryCountUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InventoryCountUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InventoryCountUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InventoryCountUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InventoryCountUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoiceCanceledEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoiceCanceledEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoiceCanceledEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoiceCanceledEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoiceCanceledEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoiceCanceledEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoiceCanceledEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoiceCanceledEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoiceCanceledEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCanceledEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoiceCanceledEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoiceCanceledEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoiceCanceledEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoiceCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoiceCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoiceCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoiceCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoiceCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoiceCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoiceCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoiceCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoiceCreatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceCreatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoiceCreatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoiceCreatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoiceCreatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoiceDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoiceDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoiceDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoiceDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoiceDeletedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceDeletedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoiceDeletedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoiceDeletedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoiceDeletedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoicePaymentMadeEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoicePaymentMadeEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoicePaymentMadeEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoicePaymentMadeEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoicePaymentMadeEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoicePaymentMadeEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoicePaymentMadeEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoicePaymentMadeEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoicePaymentMadeEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePaymentMadeEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoicePaymentMadeEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoicePaymentMadeEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoicePaymentMadeEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoicePublishedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoicePublishedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoicePublishedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoicePublishedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoicePublishedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoicePublishedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoicePublishedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoicePublishedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoicePublishedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoicePublishedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoicePublishedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoicePublishedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoicePublishedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoiceRefundedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoiceRefundedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoiceRefundedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoiceRefundedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoiceRefundedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoiceRefundedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoiceRefundedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoiceRefundedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoiceRefundedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceRefundedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoiceRefundedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoiceRefundedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoiceRefundedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoiceScheduledChargeFailedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoiceScheduledChargeFailedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoiceScheduledChargeFailedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoiceScheduledChargeFailedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoiceScheduledChargeFailedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoiceScheduledChargeFailedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoiceScheduledChargeFailedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoiceScheduledChargeFailedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoiceScheduledChargeFailedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceScheduledChargeFailedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoiceScheduledChargeFailedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoiceScheduledChargeFailedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoiceScheduledChargeFailedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoiceUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoiceUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoiceUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoiceUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoiceUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoiceUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoiceUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoiceUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingInvoiceUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &InvoiceUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled InvoiceUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj InvoiceUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj InvoiceUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingItemVariationLocationOverrides(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ItemVariationLocationOverrides{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ItemVariationLocationOverrides + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ItemVariationLocationOverrides + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ItemVariationLocationOverrides + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingJobAssignment(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobAssignment{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled JobAssignment + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj JobAssignment + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj JobAssignment + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingJobCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled JobCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj JobCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj JobCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingJobCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled JobCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj JobCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj JobCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingJobCreatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobCreatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled JobCreatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj JobCreatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj JobCreatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingJobUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled JobUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj JobUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj JobUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingJobUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled JobUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj JobUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj JobUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingJobUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &JobUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled JobUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj JobUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj JobUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLaborScheduledShiftCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LaborScheduledShiftCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LaborScheduledShiftCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LaborScheduledShiftCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLaborScheduledShiftCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LaborScheduledShiftCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LaborScheduledShiftCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LaborScheduledShiftCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLaborScheduledShiftCreatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftCreatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LaborScheduledShiftCreatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LaborScheduledShiftCreatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LaborScheduledShiftCreatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLaborScheduledShiftDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LaborScheduledShiftDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LaborScheduledShiftDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LaborScheduledShiftDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLaborScheduledShiftDeletedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftDeletedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LaborScheduledShiftDeletedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LaborScheduledShiftDeletedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LaborScheduledShiftDeletedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLaborScheduledShiftPublishedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LaborScheduledShiftPublishedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LaborScheduledShiftPublishedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LaborScheduledShiftPublishedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLaborScheduledShiftPublishedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LaborScheduledShiftPublishedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LaborScheduledShiftPublishedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LaborScheduledShiftPublishedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLaborScheduledShiftPublishedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftPublishedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LaborScheduledShiftPublishedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LaborScheduledShiftPublishedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LaborScheduledShiftPublishedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLaborScheduledShiftUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LaborScheduledShiftUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LaborScheduledShiftUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LaborScheduledShiftUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLaborScheduledShiftUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LaborScheduledShiftUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LaborScheduledShiftUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LaborScheduledShiftUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLaborScheduledShiftUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborScheduledShiftUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LaborScheduledShiftUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LaborScheduledShiftUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LaborScheduledShiftUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLaborShiftCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LaborShiftCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LaborShiftCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LaborShiftCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLaborShiftCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LaborShiftCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LaborShiftCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LaborShiftCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLaborShiftCreatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftCreatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LaborShiftCreatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LaborShiftCreatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LaborShiftCreatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLaborShiftDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LaborShiftDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LaborShiftDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LaborShiftDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLaborShiftDeletedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftDeletedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LaborShiftDeletedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LaborShiftDeletedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LaborShiftDeletedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLaborShiftUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LaborShiftUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LaborShiftUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LaborShiftUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLaborShiftUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LaborShiftUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LaborShiftUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LaborShiftUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLaborShiftUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborShiftUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LaborShiftUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LaborShiftUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LaborShiftUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLaborTimecardCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LaborTimecardCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LaborTimecardCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LaborTimecardCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLaborTimecardCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LaborTimecardCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LaborTimecardCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LaborTimecardCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLaborTimecardCreatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardCreatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LaborTimecardCreatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LaborTimecardCreatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LaborTimecardCreatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLaborTimecardDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LaborTimecardDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LaborTimecardDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LaborTimecardDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLaborTimecardDeletedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardDeletedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LaborTimecardDeletedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LaborTimecardDeletedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LaborTimecardDeletedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLaborTimecardUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LaborTimecardUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LaborTimecardUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LaborTimecardUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLaborTimecardUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LaborTimecardUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LaborTimecardUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LaborTimecardUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLaborTimecardUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LaborTimecardUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LaborTimecardUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LaborTimecardUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LaborTimecardUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListBookingCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingCustomAttributeDefinitionsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListBookingCustomAttributeDefinitionsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListBookingCustomAttributeDefinitionsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListBookingCustomAttributeDefinitionsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListBookingCustomAttributesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBookingCustomAttributesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListBookingCustomAttributesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListBookingCustomAttributesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListBookingCustomAttributesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListBreakTypesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListBreakTypesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListBreakTypesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListBreakTypesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListBreakTypesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListCashDrawerShiftEventsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCashDrawerShiftEventsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListCashDrawerShiftEventsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListCashDrawerShiftEventsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListCashDrawerShiftEventsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListCashDrawerShiftsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCashDrawerShiftsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListCashDrawerShiftsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListCashDrawerShiftsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListCashDrawerShiftsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListCustomerCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerCustomAttributeDefinitionsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListCustomerCustomAttributeDefinitionsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListCustomerCustomAttributeDefinitionsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListCustomerCustomAttributeDefinitionsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListCustomerCustomAttributesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerCustomAttributesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListCustomerCustomAttributesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListCustomerCustomAttributesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListCustomerCustomAttributesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListCustomerGroupsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerGroupsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListCustomerGroupsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListCustomerGroupsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListCustomerGroupsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListCustomerSegmentsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListCustomerSegmentsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListCustomerSegmentsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListCustomerSegmentsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListCustomerSegmentsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListDeviceCodesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDeviceCodesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListDeviceCodesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListDeviceCodesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListDeviceCodesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListDisputeEvidenceResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListDisputeEvidenceResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListDisputeEvidenceResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListDisputeEvidenceResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListDisputeEvidenceResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListEmployeeWagesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEmployeeWagesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListEmployeeWagesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListEmployeeWagesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListEmployeeWagesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListGiftCardActivitiesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListGiftCardActivitiesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListGiftCardActivitiesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListGiftCardActivitiesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListGiftCardActivitiesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListLocationBookingProfilesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationBookingProfilesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListLocationBookingProfilesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListLocationBookingProfilesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListLocationBookingProfilesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListLocationCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationCustomAttributeDefinitionsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListLocationCustomAttributeDefinitionsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListLocationCustomAttributeDefinitionsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListLocationCustomAttributeDefinitionsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListLocationCustomAttributesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLocationCustomAttributesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListLocationCustomAttributesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListLocationCustomAttributesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListLocationCustomAttributesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListLoyaltyProgramsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLoyaltyProgramsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListLoyaltyProgramsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListLoyaltyProgramsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListLoyaltyProgramsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListLoyaltyPromotionsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListLoyaltyPromotionsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListLoyaltyPromotionsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListLoyaltyPromotionsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListLoyaltyPromotionsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListMerchantCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantCustomAttributeDefinitionsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListMerchantCustomAttributeDefinitionsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListMerchantCustomAttributeDefinitionsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListMerchantCustomAttributeDefinitionsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListMerchantCustomAttributesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListMerchantCustomAttributesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListMerchantCustomAttributesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListMerchantCustomAttributesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListMerchantCustomAttributesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListOrderCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListOrderCustomAttributeDefinitionsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListOrderCustomAttributeDefinitionsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListOrderCustomAttributeDefinitionsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListOrderCustomAttributeDefinitionsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListOrderCustomAttributesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListOrderCustomAttributesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListOrderCustomAttributesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListOrderCustomAttributesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListOrderCustomAttributesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListPaymentLinksResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListPaymentLinksResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListPaymentLinksResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListPaymentLinksResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListPaymentLinksResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListTeamMemberBookingProfilesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTeamMemberBookingProfilesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListTeamMemberBookingProfilesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListTeamMemberBookingProfilesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListTeamMemberBookingProfilesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListTeamMemberWagesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTeamMemberWagesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListTeamMemberWagesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListTeamMemberWagesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListTeamMemberWagesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListTransactionsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListTransactionsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListTransactionsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListTransactionsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListTransactionsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListWebhookEventTypesResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWebhookEventTypesResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListWebhookEventTypesResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListWebhookEventTypesResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListWebhookEventTypesResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListWebhookSubscriptionsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWebhookSubscriptionsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListWebhookSubscriptionsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListWebhookSubscriptionsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListWebhookSubscriptionsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingListWorkweekConfigsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListWorkweekConfigsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ListWorkweekConfigsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ListWorkweekConfigsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ListWorkweekConfigsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLocationBookingProfile(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationBookingProfile{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LocationBookingProfile + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LocationBookingProfile + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LocationBookingProfile + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLocationCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LocationCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LocationCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LocationCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLocationCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LocationCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LocationCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LocationCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLocationCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LocationCustomAttributeDefinitionOwnedCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LocationCustomAttributeDefinitionOwnedCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LocationCustomAttributeDefinitionOwnedCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLocationCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LocationCustomAttributeDefinitionOwnedDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LocationCustomAttributeDefinitionOwnedDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LocationCustomAttributeDefinitionOwnedDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLocationCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionOwnedUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LocationCustomAttributeDefinitionOwnedUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LocationCustomAttributeDefinitionOwnedUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LocationCustomAttributeDefinitionOwnedUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLocationCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LocationCustomAttributeDefinitionVisibleCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LocationCustomAttributeDefinitionVisibleCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LocationCustomAttributeDefinitionVisibleCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLocationCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LocationCustomAttributeDefinitionVisibleDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LocationCustomAttributeDefinitionVisibleDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LocationCustomAttributeDefinitionVisibleDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLocationCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeDefinitionVisibleUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LocationCustomAttributeDefinitionVisibleUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LocationCustomAttributeDefinitionVisibleUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LocationCustomAttributeDefinitionVisibleUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLocationCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LocationCustomAttributeOwnedDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LocationCustomAttributeOwnedDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LocationCustomAttributeOwnedDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLocationCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeOwnedUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LocationCustomAttributeOwnedUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LocationCustomAttributeOwnedUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LocationCustomAttributeOwnedUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLocationCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LocationCustomAttributeVisibleDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LocationCustomAttributeVisibleDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LocationCustomAttributeVisibleDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLocationCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationCustomAttributeVisibleUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LocationCustomAttributeVisibleUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LocationCustomAttributeVisibleUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LocationCustomAttributeVisibleUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLocationSettingsUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LocationSettingsUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LocationSettingsUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LocationSettingsUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLocationSettingsUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LocationSettingsUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LocationSettingsUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LocationSettingsUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLocationSettingsUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationSettingsUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LocationSettingsUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LocationSettingsUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LocationSettingsUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLocationUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LocationUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LocationUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LocationUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLocationUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LocationUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LocationUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LocationUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LocationUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyAccount(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccount{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyAccount + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyAccount + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyAccount + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyAccountCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyAccountCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyAccountCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyAccountCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyAccountCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyAccountCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyAccountCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyAccountCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyAccountCreatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountCreatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyAccountCreatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyAccountCreatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyAccountCreatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyAccountDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyAccountDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyAccountDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyAccountDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyAccountDeletedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyAccountDeletedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyAccountDeletedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyAccountDeletedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyAccountDeletedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountDeletedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyAccountDeletedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyAccountDeletedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyAccountDeletedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyAccountExpiringPointDeadline(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountExpiringPointDeadline{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyAccountExpiringPointDeadline + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyAccountExpiringPointDeadline + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyAccountExpiringPointDeadline + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyAccountMapping(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountMapping{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyAccountMapping + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyAccountMapping + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyAccountMapping + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyAccountUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyAccountUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyAccountUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyAccountUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyAccountUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyAccountUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyAccountUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyAccountUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyAccountUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyAccountUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyAccountUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyAccountUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyAccountUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyEventAccumulatePoints(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAccumulatePoints{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyEventAccumulatePoints + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventAccumulatePoints + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventAccumulatePoints + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyEventAccumulatePromotionPoints(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAccumulatePromotionPoints{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyEventAccumulatePromotionPoints + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventAccumulatePromotionPoints + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventAccumulatePromotionPoints + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyEventAdjustPoints(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventAdjustPoints{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyEventAdjustPoints + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventAdjustPoints + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventAdjustPoints + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyEventCreateReward(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreateReward{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyEventCreateReward + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventCreateReward + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventCreateReward + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyEventCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyEventCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyEventCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyEventCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyEventCreatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventCreatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyEventCreatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventCreatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventCreatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyEventDeleteReward(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventDeleteReward{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyEventDeleteReward + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventDeleteReward + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventDeleteReward + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyEventExpirePoints(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventExpirePoints{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyEventExpirePoints + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventExpirePoints + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventExpirePoints + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyEventOther(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventOther{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyEventOther + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventOther + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventOther + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyEventRedeemReward(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyEventRedeemReward{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyEventRedeemReward + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventRedeemReward + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyEventRedeemReward + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyProgram(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgram{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyProgram + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgram + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgram + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyProgramAccrualRule(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRule{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyProgramAccrualRule + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgramAccrualRule + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgramAccrualRule + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyProgramAccrualRuleCategoryData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRuleCategoryData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyProgramAccrualRuleCategoryData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgramAccrualRuleCategoryData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgramAccrualRuleCategoryData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyProgramAccrualRuleItemVariationData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRuleItemVariationData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyProgramAccrualRuleItemVariationData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgramAccrualRuleItemVariationData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgramAccrualRuleItemVariationData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyProgramAccrualRuleSpendData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRuleSpendData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyProgramAccrualRuleSpendData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgramAccrualRuleSpendData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgramAccrualRuleSpendData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyProgramAccrualRuleVisitData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramAccrualRuleVisitData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyProgramAccrualRuleVisitData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgramAccrualRuleVisitData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgramAccrualRuleVisitData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyProgramCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyProgramCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgramCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgramCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyProgramCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyProgramCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgramCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgramCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyProgramCreatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramCreatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyProgramCreatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgramCreatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgramCreatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyProgramExpirationPolicy(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramExpirationPolicy{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyProgramExpirationPolicy + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgramExpirationPolicy + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgramExpirationPolicy + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyProgramRewardTier(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramRewardTier{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyProgramRewardTier + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgramRewardTier + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgramRewardTier + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyProgramTerminology(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramTerminology{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyProgramTerminology + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgramTerminology + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgramTerminology + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyProgramUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyProgramUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgramUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgramUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyProgramUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyProgramUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgramUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgramUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyProgramUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyProgramUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyProgramUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgramUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyProgramUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyPromotion(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotion{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyPromotion + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyPromotion + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyPromotion + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyPromotionAvailableTimeData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionAvailableTimeData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyPromotionAvailableTimeData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyPromotionAvailableTimeData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyPromotionAvailableTimeData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyPromotionCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyPromotionCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyPromotionCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyPromotionCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyPromotionCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyPromotionCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyPromotionCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyPromotionCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyPromotionCreatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionCreatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyPromotionCreatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyPromotionCreatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyPromotionCreatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyPromotionIncentive(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionIncentive{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyPromotionIncentive + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyPromotionIncentive + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyPromotionIncentive + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyPromotionIncentivePointsAdditionData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionIncentivePointsAdditionData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyPromotionIncentivePointsAdditionData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyPromotionIncentivePointsAdditionData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyPromotionIncentivePointsAdditionData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyPromotionIncentivePointsMultiplierData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionIncentivePointsMultiplierData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyPromotionIncentivePointsMultiplierData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyPromotionIncentivePointsMultiplierData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyPromotionIncentivePointsMultiplierData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyPromotionTriggerLimit(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionTriggerLimit{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyPromotionTriggerLimit + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyPromotionTriggerLimit + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyPromotionTriggerLimit + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyPromotionUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyPromotionUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyPromotionUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyPromotionUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyPromotionUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyPromotionUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyPromotionUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyPromotionUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyPromotionUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyPromotionUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyPromotionUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyPromotionUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyPromotionUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingLoyaltyReward(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &LoyaltyReward{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled LoyaltyReward + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj LoyaltyReward + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj LoyaltyReward + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingMeasurementUnit(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MeasurementUnit{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled MeasurementUnit + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj MeasurementUnit + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj MeasurementUnit + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingMeasurementUnitCustom(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MeasurementUnitCustom{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled MeasurementUnitCustom + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj MeasurementUnitCustom + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj MeasurementUnitCustom + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingMerchantCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled MerchantCustomAttributeDefinitionOwnedCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj MerchantCustomAttributeDefinitionOwnedCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj MerchantCustomAttributeDefinitionOwnedCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingMerchantCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled MerchantCustomAttributeDefinitionOwnedDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj MerchantCustomAttributeDefinitionOwnedDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj MerchantCustomAttributeDefinitionOwnedDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingMerchantCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionOwnedUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled MerchantCustomAttributeDefinitionOwnedUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj MerchantCustomAttributeDefinitionOwnedUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj MerchantCustomAttributeDefinitionOwnedUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingMerchantCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled MerchantCustomAttributeDefinitionVisibleCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj MerchantCustomAttributeDefinitionVisibleCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj MerchantCustomAttributeDefinitionVisibleCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingMerchantCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled MerchantCustomAttributeDefinitionVisibleDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj MerchantCustomAttributeDefinitionVisibleDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj MerchantCustomAttributeDefinitionVisibleDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingMerchantCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeDefinitionVisibleUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled MerchantCustomAttributeDefinitionVisibleUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj MerchantCustomAttributeDefinitionVisibleUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj MerchantCustomAttributeDefinitionVisibleUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingMerchantCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled MerchantCustomAttributeOwnedDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj MerchantCustomAttributeOwnedDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj MerchantCustomAttributeOwnedDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingMerchantCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeOwnedUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled MerchantCustomAttributeOwnedUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj MerchantCustomAttributeOwnedUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj MerchantCustomAttributeOwnedUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingMerchantCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled MerchantCustomAttributeVisibleDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj MerchantCustomAttributeVisibleDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj MerchantCustomAttributeVisibleDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingMerchantCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantCustomAttributeVisibleUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled MerchantCustomAttributeVisibleUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj MerchantCustomAttributeVisibleUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj MerchantCustomAttributeVisibleUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingMerchantSettingsUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled MerchantSettingsUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj MerchantSettingsUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj MerchantSettingsUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingMerchantSettingsUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled MerchantSettingsUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj MerchantSettingsUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj MerchantSettingsUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingMerchantSettingsUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &MerchantSettingsUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled MerchantSettingsUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj MerchantSettingsUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj MerchantSettingsUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingModifierLocationOverrides(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ModifierLocationOverrides{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ModifierLocationOverrides + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ModifierLocationOverrides + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ModifierLocationOverrides + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingMoney(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Money{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Money + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Money + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Money + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOauthAuthorizationRevokedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OauthAuthorizationRevokedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OauthAuthorizationRevokedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OauthAuthorizationRevokedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOauthAuthorizationRevokedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OauthAuthorizationRevokedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OauthAuthorizationRevokedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OauthAuthorizationRevokedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOauthAuthorizationRevokedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OauthAuthorizationRevokedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OauthAuthorizationRevokedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OauthAuthorizationRevokedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOauthAuthorizationRevokedEventRevocationObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OauthAuthorizationRevokedEventRevocationObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OauthAuthorizationRevokedEventRevocationObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OauthAuthorizationRevokedEventRevocationObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OauthAuthorizationRevokedEventRevocationObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrder(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Order{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Order + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Order + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Order + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderCreated(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreated{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderCreated + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderCreated + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderCreated + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderCreatedObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCreatedObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderCreatedObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderCreatedObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderCreatedObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderCustomAttributeDefinitionOwnedCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderCustomAttributeDefinitionOwnedCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderCustomAttributeDefinitionOwnedCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderCustomAttributeDefinitionOwnedDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderCustomAttributeDefinitionOwnedDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderCustomAttributeDefinitionOwnedDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionOwnedUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderCustomAttributeDefinitionOwnedUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderCustomAttributeDefinitionOwnedUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderCustomAttributeDefinitionOwnedUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderCustomAttributeDefinitionVisibleCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderCustomAttributeDefinitionVisibleCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderCustomAttributeDefinitionVisibleCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderCustomAttributeDefinitionVisibleDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderCustomAttributeDefinitionVisibleDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderCustomAttributeDefinitionVisibleDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeDefinitionVisibleUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderCustomAttributeDefinitionVisibleUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderCustomAttributeDefinitionVisibleUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderCustomAttributeDefinitionVisibleUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderCustomAttributeOwnedDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderCustomAttributeOwnedDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderCustomAttributeOwnedDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeOwnedUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderCustomAttributeOwnedUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderCustomAttributeOwnedUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderCustomAttributeOwnedUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderCustomAttributeVisibleDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderCustomAttributeVisibleDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderCustomAttributeVisibleDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderCustomAttributeVisibleUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderCustomAttributeVisibleUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderCustomAttributeVisibleUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderCustomAttributeVisibleUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderFulfillmentUpdated(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdated{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderFulfillmentUpdated + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderFulfillmentUpdated + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderFulfillmentUpdated + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderFulfillmentUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderFulfillmentUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderFulfillmentUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderFulfillmentUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderFulfillmentUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderFulfillmentUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderFulfillmentUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderFulfillmentUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderFulfillmentUpdatedObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderFulfillmentUpdatedObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderFulfillmentUpdatedObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderFulfillmentUpdatedObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderFulfillmentUpdatedUpdate(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderFulfillmentUpdatedUpdate{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderFulfillmentUpdatedUpdate + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderFulfillmentUpdatedUpdate + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderFulfillmentUpdatedUpdate + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderLineItem(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItem{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderLineItem + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderLineItem + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderLineItem + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderLineItemAppliedDiscount(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedDiscount{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderLineItemAppliedDiscount + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderLineItemAppliedDiscount + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderLineItemAppliedDiscount + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderLineItemAppliedServiceCharge(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedServiceCharge{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderLineItemAppliedServiceCharge + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderLineItemAppliedServiceCharge + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderLineItemAppliedServiceCharge + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderLineItemAppliedTax(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemAppliedTax{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderLineItemAppliedTax + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderLineItemAppliedTax + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderLineItemAppliedTax + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderLineItemDiscount(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemDiscount{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderLineItemDiscount + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderLineItemDiscount + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderLineItemDiscount + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderLineItemModifier(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemModifier{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderLineItemModifier + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderLineItemModifier + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderLineItemModifier + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderLineItemPricingBlocklists(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklists{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderLineItemPricingBlocklists + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderLineItemPricingBlocklists + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderLineItemPricingBlocklists + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderLineItemPricingBlocklistsBlockedDiscount(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedDiscount{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderLineItemPricingBlocklistsBlockedDiscount + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderLineItemPricingBlocklistsBlockedDiscount + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderLineItemPricingBlocklistsBlockedDiscount + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderLineItemPricingBlocklistsBlockedServiceCharge(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedServiceCharge{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderLineItemPricingBlocklistsBlockedServiceCharge + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderLineItemPricingBlocklistsBlockedServiceCharge + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderLineItemPricingBlocklistsBlockedServiceCharge + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderLineItemPricingBlocklistsBlockedTax(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemPricingBlocklistsBlockedTax{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderLineItemPricingBlocklistsBlockedTax + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderLineItemPricingBlocklistsBlockedTax + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderLineItemPricingBlocklistsBlockedTax + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderLineItemTax(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderLineItemTax{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderLineItemTax + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderLineItemTax + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderLineItemTax + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderMoneyAmounts(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderMoneyAmounts{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderMoneyAmounts + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderMoneyAmounts + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderMoneyAmounts + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderPricingOptions(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderPricingOptions{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderPricingOptions + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderPricingOptions + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderPricingOptions + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderQuantityUnit(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderQuantityUnit{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderQuantityUnit + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderQuantityUnit + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderQuantityUnit + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderReturn(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturn{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderReturn + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderReturn + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderReturn + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderReturnDiscount(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnDiscount{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderReturnDiscount + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderReturnDiscount + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderReturnDiscount + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderReturnLineItem(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItem{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderReturnLineItem + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderReturnLineItem + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderReturnLineItem + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderReturnLineItemModifier(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnLineItemModifier{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderReturnLineItemModifier + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderReturnLineItemModifier + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderReturnLineItemModifier + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderReturnServiceCharge(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnServiceCharge{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderReturnServiceCharge + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderReturnServiceCharge + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderReturnServiceCharge + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderReturnTax(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTax{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderReturnTax + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderReturnTax + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderReturnTax + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderReturnTip(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReturnTip{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderReturnTip + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderReturnTip + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderReturnTip + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderReward(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderReward{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderReward + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderReward + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderReward + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderRoundingAdjustment(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderRoundingAdjustment{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderRoundingAdjustment + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderRoundingAdjustment + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderRoundingAdjustment + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderServiceCharge(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderServiceCharge{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderServiceCharge + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderServiceCharge + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderServiceCharge + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderSource(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderSource{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderSource + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderSource + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderSource + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderUpdated(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdated{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderUpdated + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderUpdated + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderUpdated + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingOrderUpdatedObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &OrderUpdatedObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled OrderUpdatedObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj OrderUpdatedObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj OrderUpdatedObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentCreatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentCreatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentCreatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentCreatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentCreatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentLink(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLink{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentLink + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentLink + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentLink + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentLinkRelatedResources(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentLinkRelatedResources{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentLinkRelatedResources + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentLinkRelatedResources + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentLinkRelatedResources + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentOptions(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentOptions{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentOptions + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentOptions + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentOptions + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPaymentUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PaymentUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PaymentUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PaymentUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PaymentUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPayoutFailedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PayoutFailedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PayoutFailedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PayoutFailedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPayoutFailedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PayoutFailedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PayoutFailedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PayoutFailedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPayoutFailedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutFailedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PayoutFailedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PayoutFailedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PayoutFailedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPayoutPaidEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PayoutPaidEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PayoutPaidEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PayoutPaidEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPayoutPaidEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PayoutPaidEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PayoutPaidEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PayoutPaidEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPayoutPaidEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutPaidEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PayoutPaidEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PayoutPaidEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PayoutPaidEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPayoutSentEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PayoutSentEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PayoutSentEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PayoutSentEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPayoutSentEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PayoutSentEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PayoutSentEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PayoutSentEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPayoutSentEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PayoutSentEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PayoutSentEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PayoutSentEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PayoutSentEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingPrePopulatedData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &PrePopulatedData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled PrePopulatedData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj PrePopulatedData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj PrePopulatedData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingProcessingFee(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ProcessingFee{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ProcessingFee + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ProcessingFee + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ProcessingFee + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingQrCodeOptions(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &QrCodeOptions{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled QrCodeOptions + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj QrCodeOptions + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj QrCodeOptions + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingQuickPay(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &QuickPay{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled QuickPay + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj QuickPay + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj QuickPay + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingReceiptOptions(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ReceiptOptions{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ReceiptOptions + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ReceiptOptions + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ReceiptOptions + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRedeemLoyaltyRewardResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RedeemLoyaltyRewardResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RedeemLoyaltyRewardResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RedeemLoyaltyRewardResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RedeemLoyaltyRewardResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRefund(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Refund{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Refund + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Refund + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Refund + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRefundCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RefundCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RefundCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RefundCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRefundCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RefundCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RefundCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RefundCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRefundCreatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundCreatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RefundCreatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RefundCreatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RefundCreatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRefundUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RefundUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RefundUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RefundUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRefundUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RefundUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RefundUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RefundUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRefundUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RefundUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RefundUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RefundUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RefundUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRemoveGroupFromCustomerResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RemoveGroupFromCustomerResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RemoveGroupFromCustomerResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RemoveGroupFromCustomerResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RemoveGroupFromCustomerResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRetrieveBookingCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveBookingCustomAttributeDefinitionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RetrieveBookingCustomAttributeDefinitionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RetrieveBookingCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RetrieveBookingCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRetrieveBookingCustomAttributeResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveBookingCustomAttributeResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RetrieveBookingCustomAttributeResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RetrieveBookingCustomAttributeResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RetrieveBookingCustomAttributeResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRetrieveLocationCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationCustomAttributeDefinitionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RetrieveLocationCustomAttributeDefinitionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RetrieveLocationCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RetrieveLocationCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRetrieveLocationCustomAttributeResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveLocationCustomAttributeResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RetrieveLocationCustomAttributeResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RetrieveLocationCustomAttributeResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RetrieveLocationCustomAttributeResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRetrieveMerchantCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveMerchantCustomAttributeDefinitionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RetrieveMerchantCustomAttributeDefinitionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RetrieveMerchantCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RetrieveMerchantCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRetrieveMerchantCustomAttributeResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveMerchantCustomAttributeResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RetrieveMerchantCustomAttributeResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RetrieveMerchantCustomAttributeResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RetrieveMerchantCustomAttributeResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRetrieveOrderCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveOrderCustomAttributeDefinitionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RetrieveOrderCustomAttributeDefinitionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RetrieveOrderCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RetrieveOrderCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingRetrieveOrderCustomAttributeResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &RetrieveOrderCustomAttributeResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled RetrieveOrderCustomAttributeResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj RetrieveOrderCustomAttributeResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj RetrieveOrderCustomAttributeResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSaveCardOptions(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SaveCardOptions{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SaveCardOptions + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SaveCardOptions + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SaveCardOptions + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchLoyaltyAccountsRequestLoyaltyAccountQuery(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyAccountsRequestLoyaltyAccountQuery{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchLoyaltyAccountsRequestLoyaltyAccountQuery + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchLoyaltyAccountsRequestLoyaltyAccountQuery + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchLoyaltyAccountsRequestLoyaltyAccountQuery + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchLoyaltyAccountsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyAccountsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchLoyaltyAccountsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchLoyaltyAccountsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchLoyaltyAccountsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchLoyaltyRewardsRequestLoyaltyRewardQuery(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyRewardsRequestLoyaltyRewardQuery{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchLoyaltyRewardsRequestLoyaltyRewardQuery + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchLoyaltyRewardsRequestLoyaltyRewardQuery + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchLoyaltyRewardsRequestLoyaltyRewardQuery + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchLoyaltyRewardsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchLoyaltyRewardsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchLoyaltyRewardsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchLoyaltyRewardsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchLoyaltyRewardsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchShiftsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchShiftsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchShiftsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchShiftsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchShiftsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchTerminalActionsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalActionsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchTerminalActionsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchTerminalActionsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchTerminalActionsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchTerminalCheckoutsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalCheckoutsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchTerminalCheckoutsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchTerminalCheckoutsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchTerminalCheckoutsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchTerminalRefundsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchTerminalRefundsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchTerminalRefundsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchTerminalRefundsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchTerminalRefundsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSelectOption(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SelectOption{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SelectOption + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SelectOption + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SelectOption + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSelectOptions(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SelectOptions{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SelectOptions + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SelectOptions + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SelectOptions + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingShift(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Shift{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Shift + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Shift + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Shift + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingShiftFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ShiftFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ShiftFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ShiftFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingShiftQuery(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftQuery{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ShiftQuery + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ShiftQuery + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ShiftQuery + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingShiftSort(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftSort{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ShiftSort + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ShiftSort + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ShiftSort + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingShiftWage(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftWage{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ShiftWage + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ShiftWage + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ShiftWage + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingShiftWorkday(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShiftWorkday{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ShiftWorkday + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ShiftWorkday + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ShiftWorkday + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingShippingFee(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ShippingFee{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled ShippingFee + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj ShippingFee + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj ShippingFee + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSignatureImage(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SignatureImage{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SignatureImage + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SignatureImage + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SignatureImage + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSignatureOptions(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SignatureOptions{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SignatureOptions + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SignatureOptions + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SignatureOptions + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSourceApplication(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SourceApplication{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SourceApplication + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SourceApplication + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SourceApplication + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSubscriptionCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SubscriptionCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SubscriptionCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SubscriptionCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSubscriptionCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SubscriptionCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SubscriptionCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SubscriptionCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSubscriptionCreatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionCreatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SubscriptionCreatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SubscriptionCreatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SubscriptionCreatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSubscriptionPhase(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionPhase{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SubscriptionPhase + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SubscriptionPhase + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SubscriptionPhase + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSubscriptionPricing(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionPricing{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SubscriptionPricing + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SubscriptionPricing + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SubscriptionPricing + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSubscriptionTestResult(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionTestResult{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SubscriptionTestResult + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SubscriptionTestResult + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SubscriptionTestResult + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSubscriptionUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SubscriptionUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SubscriptionUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SubscriptionUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSubscriptionUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SubscriptionUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SubscriptionUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SubscriptionUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSubscriptionUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SubscriptionUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SubscriptionUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SubscriptionUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SubscriptionUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTeamMemberBookingProfile(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberBookingProfile{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TeamMemberBookingProfile + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TeamMemberBookingProfile + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TeamMemberBookingProfile + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTeamMemberCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TeamMemberCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TeamMemberCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TeamMemberCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTeamMemberCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TeamMemberCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TeamMemberCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TeamMemberCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTeamMemberCreatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberCreatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TeamMemberCreatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TeamMemberCreatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TeamMemberCreatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTeamMemberUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TeamMemberUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TeamMemberUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TeamMemberUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTeamMemberUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TeamMemberUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TeamMemberUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TeamMemberUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTeamMemberUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TeamMemberUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TeamMemberUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TeamMemberUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTeamMemberWage(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWage{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TeamMemberWage + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TeamMemberWage + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TeamMemberWage + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTeamMemberWageSettingUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TeamMemberWageSettingUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TeamMemberWageSettingUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TeamMemberWageSettingUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTeamMemberWageSettingUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TeamMemberWageSettingUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TeamMemberWageSettingUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TeamMemberWageSettingUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTeamMemberWageSettingUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TeamMemberWageSettingUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TeamMemberWageSettingUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TeamMemberWageSettingUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TeamMemberWageSettingUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTender(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Tender{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Tender + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Tender + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Tender + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTenderBankAccountDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderBankAccountDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TenderBankAccountDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TenderBankAccountDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TenderBankAccountDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTenderBuyNowPayLaterDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderBuyNowPayLaterDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TenderBuyNowPayLaterDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TenderBuyNowPayLaterDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TenderBuyNowPayLaterDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTenderCardDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderCardDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TenderCardDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TenderCardDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TenderCardDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTenderCashDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderCashDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TenderCashDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TenderCashDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TenderCashDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTenderSquareAccountDetails(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TenderSquareAccountDetails{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TenderSquareAccountDetails + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TenderSquareAccountDetails + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TenderSquareAccountDetails + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalAction(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalAction{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalAction + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalAction + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalAction + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalActionCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalActionCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalActionCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalActionCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalActionCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalActionCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalActionCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalActionCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalActionCreatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionCreatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalActionCreatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalActionCreatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalActionCreatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalActionQuery(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionQuery{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalActionQuery + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalActionQuery + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalActionQuery + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalActionQueryFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionQueryFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalActionQueryFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalActionQueryFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalActionQueryFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalActionQuerySort(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionQuerySort{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalActionQuerySort + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalActionQuerySort + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalActionQuerySort + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalActionUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalActionUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalActionUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalActionUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalActionUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalActionUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalActionUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalActionUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalActionUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalActionUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalActionUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalActionUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalActionUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalCheckout(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckout{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalCheckout + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalCheckout + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalCheckout + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalCheckoutCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalCheckoutCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalCheckoutCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalCheckoutCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalCheckoutCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalCheckoutCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalCheckoutCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalCheckoutCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalCheckoutCreatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutCreatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalCheckoutCreatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalCheckoutCreatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalCheckoutCreatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalCheckoutQuery(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutQuery{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalCheckoutQuery + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalCheckoutQuery + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalCheckoutQuery + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalCheckoutQueryFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutQueryFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalCheckoutQueryFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalCheckoutQueryFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalCheckoutQueryFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalCheckoutQuerySort(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutQuerySort{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalCheckoutQuerySort + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalCheckoutQuerySort + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalCheckoutQuerySort + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalCheckoutUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalCheckoutUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalCheckoutUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalCheckoutUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalCheckoutUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalCheckoutUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalCheckoutUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalCheckoutUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalCheckoutUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalCheckoutUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalCheckoutUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalCheckoutUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalCheckoutUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalRefund(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefund{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalRefund + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalRefund + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalRefund + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalRefundCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalRefundCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalRefundCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalRefundCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalRefundCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalRefundCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalRefundCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalRefundCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalRefundCreatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundCreatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalRefundCreatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalRefundCreatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalRefundCreatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalRefundQuery(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundQuery{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalRefundQuery + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalRefundQuery + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalRefundQuery + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalRefundQueryFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundQueryFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalRefundQueryFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalRefundQueryFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalRefundQueryFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalRefundQuerySort(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundQuerySort{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalRefundQuerySort + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalRefundQuerySort + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalRefundQuerySort + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalRefundUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalRefundUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalRefundUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalRefundUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalRefundUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalRefundUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalRefundUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalRefundUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTerminalRefundUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TerminalRefundUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TerminalRefundUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TerminalRefundUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TerminalRefundUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTestWebhookSubscriptionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TestWebhookSubscriptionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TestWebhookSubscriptionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TestWebhookSubscriptionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TestWebhookSubscriptionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTimeRange(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TimeRange{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TimeRange + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TimeRange + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TimeRange + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTipSettings(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TipSettings{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TipSettings + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TipSettings + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TipSettings + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTransaction(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Transaction{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Transaction + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Transaction + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Transaction + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTransferOrderCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TransferOrderCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TransferOrderCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TransferOrderCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTransferOrderCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TransferOrderCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TransferOrderCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TransferOrderCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTransferOrderCreatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderCreatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TransferOrderCreatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TransferOrderCreatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TransferOrderCreatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTransferOrderDeletedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderDeletedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TransferOrderDeletedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TransferOrderDeletedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TransferOrderDeletedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTransferOrderDeletedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderDeletedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TransferOrderDeletedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TransferOrderDeletedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TransferOrderDeletedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTransferOrderUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TransferOrderUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TransferOrderUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TransferOrderUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTransferOrderUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TransferOrderUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TransferOrderUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TransferOrderUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingTransferOrderUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TransferOrderUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled TransferOrderUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj TransferOrderUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj TransferOrderUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateBookingCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateBookingCustomAttributeDefinitionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateBookingCustomAttributeDefinitionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateBookingCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateBookingCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateBreakTypeResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateBreakTypeResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateBreakTypeResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateBreakTypeResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateBreakTypeResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateCatalogImageRequest(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCatalogImageRequest{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateCatalogImageRequest + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateCatalogImageRequest + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateCatalogImageRequest + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateCatalogImageResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCatalogImageResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateCatalogImageResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateCatalogImageResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateCatalogImageResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateCustomerCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerCustomAttributeDefinitionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateCustomerCustomAttributeDefinitionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateCustomerCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateCustomerCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateCustomerGroupResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateCustomerGroupResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateCustomerGroupResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateCustomerGroupResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateCustomerGroupResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateLocationCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateLocationCustomAttributeDefinitionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateLocationCustomAttributeDefinitionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateLocationCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateLocationCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateMerchantCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateMerchantCustomAttributeDefinitionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateMerchantCustomAttributeDefinitionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateMerchantCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateMerchantCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateOrderCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateOrderCustomAttributeDefinitionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateOrderCustomAttributeDefinitionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateOrderCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateOrderCustomAttributeDefinitionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdatePaymentLinkResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdatePaymentLinkResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdatePaymentLinkResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdatePaymentLinkResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdatePaymentLinkResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateShiftResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateShiftResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateShiftResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateShiftResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateShiftResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateWageSettingResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWageSettingResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateWageSettingResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateWageSettingResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateWageSettingResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateWebhookSubscriptionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWebhookSubscriptionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateWebhookSubscriptionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateWebhookSubscriptionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateWebhookSubscriptionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateWebhookSubscriptionSignatureKeyResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWebhookSubscriptionSignatureKeyResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateWebhookSubscriptionSignatureKeyResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateWebhookSubscriptionSignatureKeyResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateWebhookSubscriptionSignatureKeyResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateWorkweekConfigResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWorkweekConfigResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateWorkweekConfigResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateWorkweekConfigResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateWorkweekConfigResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpsertBookingCustomAttributeResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertBookingCustomAttributeResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpsertBookingCustomAttributeResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpsertBookingCustomAttributeResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpsertBookingCustomAttributeResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpsertCatalogObjectResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertCatalogObjectResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpsertCatalogObjectResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpsertCatalogObjectResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpsertCatalogObjectResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpsertCustomerCustomAttributeResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertCustomerCustomAttributeResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpsertCustomerCustomAttributeResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpsertCustomerCustomAttributeResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpsertCustomerCustomAttributeResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpsertLocationCustomAttributeResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertLocationCustomAttributeResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpsertLocationCustomAttributeResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpsertLocationCustomAttributeResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpsertLocationCustomAttributeResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpsertMerchantCustomAttributeResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertMerchantCustomAttributeResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpsertMerchantCustomAttributeResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpsertMerchantCustomAttributeResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpsertMerchantCustomAttributeResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpsertOrderCustomAttributeResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpsertOrderCustomAttributeResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpsertOrderCustomAttributeResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpsertOrderCustomAttributeResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpsertOrderCustomAttributeResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingVendorCreatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled VendorCreatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj VendorCreatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj VendorCreatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingVendorCreatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled VendorCreatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj VendorCreatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj VendorCreatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingVendorCreatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorCreatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled VendorCreatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj VendorCreatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj VendorCreatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingVendorUpdatedEvent(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEvent{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled VendorUpdatedEvent + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj VendorUpdatedEvent + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj VendorUpdatedEvent + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingVendorUpdatedEventData(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEventData{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled VendorUpdatedEventData + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj VendorUpdatedEventData + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj VendorUpdatedEventData + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingVendorUpdatedEventObject(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorUpdatedEventObject{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled VendorUpdatedEventObject + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj VendorUpdatedEventObject + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj VendorUpdatedEventObject + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingVoidTransactionResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VoidTransactionResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled VoidTransactionResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj VoidTransactionResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj VoidTransactionResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingWageSetting(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WageSetting{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled WageSetting + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj WageSetting + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj WageSetting + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingWebhookSubscription(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WebhookSubscription{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled WebhookSubscription + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj WebhookSubscription + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj WebhookSubscription + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingWorkweekConfig(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &WorkweekConfig{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled WorkweekConfig + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj WorkweekConfig + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj WorkweekConfig + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringAcceptedPaymentMethods(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &AcceptedPaymentMethods{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AcceptedPaymentMethods + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringAccumulateLoyaltyPointsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &AccumulateLoyaltyPointsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AccumulateLoyaltyPointsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringAddGroupToCustomerResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &AddGroupToCustomerResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AddGroupToCustomerResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringAdditionalRecipient(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &AdditionalRecipient{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AdditionalRecipient + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringAddress(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Address{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Address + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringAdjustLoyaltyPointsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &AdjustLoyaltyPointsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AdjustLoyaltyPointsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBankAccountCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BankAccountCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBankAccountCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BankAccountCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBankAccountCreatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BankAccountCreatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountCreatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBankAccountDisabledEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BankAccountDisabledEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountDisabledEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBankAccountDisabledEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BankAccountDisabledEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountDisabledEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBankAccountDisabledEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BankAccountDisabledEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountDisabledEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBankAccountVerifiedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BankAccountVerifiedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountVerifiedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBankAccountVerifiedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BankAccountVerifiedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountVerifiedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBankAccountVerifiedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BankAccountVerifiedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountVerifiedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBatchUpsertCustomerCustomAttributesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BatchUpsertCustomerCustomAttributesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchUpsertCustomerCustomAttributesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBookingCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BookingCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBookingCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BookingCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBookingCreatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BookingCreatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCreatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBookingCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BookingCustomAttributeDefinitionOwnedCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionOwnedCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBookingCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BookingCustomAttributeDefinitionOwnedDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionOwnedDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBookingCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BookingCustomAttributeDefinitionOwnedUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionOwnedUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBookingCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BookingCustomAttributeDefinitionVisibleCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionVisibleCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBookingCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BookingCustomAttributeDefinitionVisibleDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionVisibleDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBookingCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BookingCustomAttributeDefinitionVisibleUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionVisibleUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBookingCustomAttributeDeleteRequest(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BookingCustomAttributeDeleteRequest{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDeleteRequest + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBookingCustomAttributeDeleteResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BookingCustomAttributeDeleteResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDeleteResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBookingCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BookingCustomAttributeOwnedDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeOwnedDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBookingCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BookingCustomAttributeOwnedUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeOwnedUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBookingCustomAttributeUpsertRequest(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BookingCustomAttributeUpsertRequest{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeUpsertRequest + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBookingCustomAttributeUpsertResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BookingCustomAttributeUpsertResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeUpsertResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBookingCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BookingCustomAttributeVisibleDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeVisibleDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBookingCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BookingCustomAttributeVisibleUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeVisibleUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBookingUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BookingUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBookingUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BookingUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBookingUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BookingUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBreak(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Break{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Break + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBreakType(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BreakType{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BreakType + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBulkDeleteBookingCustomAttributesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkDeleteBookingCustomAttributesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteBookingCustomAttributesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBulkDeleteLocationCustomAttributesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkDeleteLocationCustomAttributesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteLocationCustomAttributesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBulkDeleteMerchantCustomAttributesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkDeleteMerchantCustomAttributesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteMerchantCustomAttributesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBulkDeleteOrderCustomAttributesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkDeleteOrderCustomAttributesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteOrderCustomAttributesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBulkUpsertBookingCustomAttributesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkUpsertBookingCustomAttributesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertBookingCustomAttributesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBulkUpsertLocationCustomAttributesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkUpsertLocationCustomAttributesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertLocationCustomAttributesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBulkUpsertMerchantCustomAttributesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkUpsertMerchantCustomAttributesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertMerchantCustomAttributesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBulkUpsertOrderCustomAttributesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BulkUpsertOrderCustomAttributesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertOrderCustomAttributesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCalculateLoyaltyPointsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CalculateLoyaltyPointsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CalculateLoyaltyPointsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCancelLoyaltyPromotionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CancelLoyaltyPromotionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelLoyaltyPromotionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCancelTerminalActionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CancelTerminalActionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelTerminalActionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCancelTerminalCheckoutResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CancelTerminalCheckoutResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelTerminalCheckoutResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCancelTerminalRefundResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CancelTerminalRefundResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelTerminalRefundResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCaptureTransactionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CaptureTransactionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CaptureTransactionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCard(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Card{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Card + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCardAutomaticallyUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CardAutomaticallyUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardAutomaticallyUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCardAutomaticallyUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CardAutomaticallyUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardAutomaticallyUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCardAutomaticallyUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CardAutomaticallyUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardAutomaticallyUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCardCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CardCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCardCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CardCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCardCreatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CardCreatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardCreatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCardDisabledEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CardDisabledEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardDisabledEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCardDisabledEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CardDisabledEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardDisabledEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCardDisabledEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CardDisabledEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardDisabledEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCardForgottenEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CardForgottenEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardForgottenEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCardForgottenEventCard(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CardForgottenEventCard{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardForgottenEventCard + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCardForgottenEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CardForgottenEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardForgottenEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCardForgottenEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CardForgottenEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardForgottenEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCardUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CardUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCardUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CardUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCardUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CardUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCashDrawerDevice(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CashDrawerDevice{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerDevice + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCashDrawerShift(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CashDrawerShift{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShift + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCashDrawerShiftEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CashDrawerShiftEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShiftEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCashDrawerShiftSummary(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CashDrawerShiftSummary{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShiftSummary + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogAvailabilityPeriod(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogAvailabilityPeriod{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogAvailabilityPeriod + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogCategory(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogCategory{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCategory + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogCustomAttributeDefinition(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogCustomAttributeDefinition{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeDefinition + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogCustomAttributeDefinitionNumberConfig(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogCustomAttributeDefinitionNumberConfig{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeDefinitionNumberConfig + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogCustomAttributeDefinitionSelectionConfig(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogCustomAttributeDefinitionSelectionConfig{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeDefinitionSelectionConfig + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogCustomAttributeDefinitionStringConfig(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogCustomAttributeDefinitionStringConfig{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeDefinitionStringConfig + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogCustomAttributeValue(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogCustomAttributeValue{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeValue + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogDiscount(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogDiscount{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogDiscount + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogEcomSeoData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogEcomSeoData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogEcomSeoData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogIDMapping(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogIDMapping{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogIDMapping + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogImage(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogImage{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogImage + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogItem(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogItem{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogItemFoodAndBeverageDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogItemFoodAndBeverageDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemFoodAndBeverageDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogItemFoodAndBeverageDetailsDietaryPreference(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogItemFoodAndBeverageDetailsDietaryPreference{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemFoodAndBeverageDetailsDietaryPreference + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogItemFoodAndBeverageDetailsIngredient(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogItemFoodAndBeverageDetailsIngredient{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemFoodAndBeverageDetailsIngredient + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogItemModifierListInfo(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogItemModifierListInfo{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemModifierListInfo + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogItemOption(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogItemOption{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemOption + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogItemOptionForItem(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogItemOptionForItem{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemOptionForItem + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogItemOptionValue(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogItemOptionValue{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemOptionValue + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogItemOptionValueForItemVariation(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogItemOptionValueForItemVariation{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemOptionValueForItemVariation + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogItemVariation(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogItemVariation{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemVariation + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogMeasurementUnit(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogMeasurementUnit{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogMeasurementUnit + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogModifier(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogModifier{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifier + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogModifierList(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogModifierList{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifierList + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogModifierOverride(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogModifierOverride{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifierOverride + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogObjectAvailabilityPeriod(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectAvailabilityPeriod{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectAvailabilityPeriod + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogObjectBase(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectBase{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectBase + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogObjectCategory(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectCategory{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectCategory + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogObjectCustomAttributeDefinition(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectCustomAttributeDefinition{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectCustomAttributeDefinition + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogObjectDiscount(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectDiscount{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectDiscount + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogObjectImage(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectImage{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectImage + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogObjectItem(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectItem{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItem + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogObjectItemOption(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectItemOption{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemOption + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogObjectItemOptionValue(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectItemOptionValue{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemOptionValue + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogObjectItemVariation(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectItemVariation{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemVariation + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogObjectMeasurementUnit(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectMeasurementUnit{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectMeasurementUnit + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogObjectModifier(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectModifier{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectModifier + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogObjectModifierList(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectModifierList{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectModifierList + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogObjectPricingRule(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectPricingRule{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectPricingRule + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogObjectProductSet(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectProductSet{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectProductSet + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogObjectQuickAmountsSettings(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectQuickAmountsSettings{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectQuickAmountsSettings + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogObjectReference(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectReference{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectReference + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogObjectSubscriptionPlan(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectSubscriptionPlan{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectSubscriptionPlan + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogObjectSubscriptionPlanVariation(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectSubscriptionPlanVariation{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectSubscriptionPlanVariation + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogObjectTax(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectTax{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectTax + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogObjectTimePeriod(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectTimePeriod{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectTimePeriod + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogPricingRule(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogPricingRule{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogPricingRule + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogProductSet(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogProductSet{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogProductSet + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogQuickAmount(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogQuickAmount{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuickAmount + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogQuickAmountsSettings(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogQuickAmountsSettings{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuickAmountsSettings + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogStockConversion(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogStockConversion{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogStockConversion + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogSubscriptionPlan(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogSubscriptionPlan{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogSubscriptionPlan + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogSubscriptionPlanVariation(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogSubscriptionPlanVariation{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogSubscriptionPlanVariation + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogTax(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogTax{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogTax + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogTimePeriod(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogTimePeriod{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogTimePeriod + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogV1ID(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogV1ID{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogV1ID + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogVersionUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogVersionUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogVersionUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogVersionUpdatedEventCatalogVersion(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogVersionUpdatedEventCatalogVersion{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogVersionUpdatedEventCatalogVersion + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogVersionUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogVersionUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogVersionUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCatalogVersionUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CatalogVersionUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogVersionUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCategoryPathToRootNode(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CategoryPathToRootNode{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CategoryPathToRootNode + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCheckoutOptions(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CheckoutOptions{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutOptions + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCollectedData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CollectedData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CollectedData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringConfirmationDecision(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ConfirmationDecision{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ConfirmationDecision + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringConfirmationOptions(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ConfirmationOptions{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ConfirmationOptions + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateBookingCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateBookingCustomAttributeDefinitionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateBookingCustomAttributeDefinitionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateBreakTypeResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateBreakTypeResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateBreakTypeResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateCatalogImageRequest(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateCatalogImageRequest{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCatalogImageRequest + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateCatalogImageResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateCatalogImageResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCatalogImageResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateCustomerCardResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateCustomerCardResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCustomerCardResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateCustomerCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateCustomerCustomAttributeDefinitionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCustomerCustomAttributeDefinitionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateCustomerGroupResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateCustomerGroupResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCustomerGroupResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateDeviceCodeResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateDeviceCodeResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateDeviceCodeResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateGiftCardActivityResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateGiftCardActivityResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateGiftCardActivityResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateLocationCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateLocationCustomAttributeDefinitionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateLocationCustomAttributeDefinitionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateLoyaltyAccountResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateLoyaltyAccountResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateLoyaltyAccountResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateLoyaltyPromotionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateLoyaltyPromotionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateLoyaltyPromotionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateLoyaltyRewardResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateLoyaltyRewardResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateLoyaltyRewardResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateMerchantCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateMerchantCustomAttributeDefinitionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateMerchantCustomAttributeDefinitionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateOrderCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateOrderCustomAttributeDefinitionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateOrderCustomAttributeDefinitionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateOrderRequest(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateOrderRequest{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateOrderRequest + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreatePaymentLinkResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreatePaymentLinkResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreatePaymentLinkResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateShiftResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateShiftResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateShiftResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateTerminalActionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateTerminalActionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTerminalActionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateTerminalCheckoutResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateTerminalCheckoutResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTerminalCheckoutResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateTerminalRefundResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateTerminalRefundResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTerminalRefundResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateWebhookSubscriptionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateWebhookSubscriptionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateWebhookSubscriptionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomAttribute(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomAttribute{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttribute + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomAttributeDefinition(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomAttributeDefinition{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeDefinition + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomAttributeDefinitionEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomAttributeDefinitionEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeDefinitionEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomAttributeDefinitionEventDataObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomAttributeDefinitionEventDataObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeDefinitionEventDataObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomAttributeEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomAttributeEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomAttributeEventDataObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomAttributeEventDataObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeEventDataObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomField(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomField{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomField + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCreatedEventEventContext(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCreatedEventEventContext{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCreatedEventEventContext + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCreatedEventEventContextMerge(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCreatedEventEventContextMerge{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCreatedEventEventContextMerge + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCreatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCreatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCreatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCustomAttributeDefinitionCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeDefinitionCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCustomAttributeDefinitionCreatedPublicEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeDefinitionCreatedPublicEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionCreatedPublicEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCustomAttributeDefinitionDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeDefinitionDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCustomAttributeDefinitionDeletedPublicEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeDefinitionDeletedPublicEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionDeletedPublicEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeDefinitionOwnedCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionOwnedCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeDefinitionOwnedDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionOwnedDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeDefinitionOwnedUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionOwnedUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCustomAttributeDefinitionUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeDefinitionUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCustomAttributeDefinitionUpdatedPublicEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeDefinitionUpdatedPublicEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionUpdatedPublicEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeDefinitionVisibleCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionVisibleCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeDefinitionVisibleDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionVisibleDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeDefinitionVisibleUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionVisibleUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCustomAttributeDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCustomAttributeDeletedPublicEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeDeletedPublicEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDeletedPublicEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeOwnedDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeOwnedDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeOwnedUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeOwnedUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCustomAttributeUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCustomAttributeUpdatedPublicEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeUpdatedPublicEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeUpdatedPublicEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeVisibleDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeVisibleDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeVisibleUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeVisibleUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerDeletedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerDeletedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerDeletedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerDeletedEventEventContext(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerDeletedEventEventContext{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerDeletedEventEventContext + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerDeletedEventEventContextMerge(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerDeletedEventEventContextMerge{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerDeletedEventEventContextMerge + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerDeletedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerDeletedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerDeletedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerGroup(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerGroup{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerGroup + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerSegment(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerSegment{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerSegment + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCustomerUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CustomerUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDataCollectionOptions(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DataCollectionOptions{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DataCollectionOptions + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDateRange(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DateRange{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DateRange + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeleteBookingCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeleteBookingCustomAttributeDefinitionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteBookingCustomAttributeDefinitionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeleteBookingCustomAttributeResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeleteBookingCustomAttributeResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteBookingCustomAttributeResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeleteBreakTypeResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeleteBreakTypeResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteBreakTypeResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeleteCatalogObjectResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeleteCatalogObjectResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteCatalogObjectResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeleteCustomerCardResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeleteCustomerCardResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteCustomerCardResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeleteCustomerCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeleteCustomerCustomAttributeDefinitionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteCustomerCustomAttributeDefinitionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeleteCustomerCustomAttributeResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeleteCustomerCustomAttributeResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteCustomerCustomAttributeResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeleteCustomerGroupResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeleteCustomerGroupResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteCustomerGroupResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeleteDisputeEvidenceResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeleteDisputeEvidenceResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteDisputeEvidenceResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeleteLocationCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeleteLocationCustomAttributeDefinitionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteLocationCustomAttributeDefinitionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeleteLocationCustomAttributeResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeleteLocationCustomAttributeResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteLocationCustomAttributeResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeleteLoyaltyRewardResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeleteLoyaltyRewardResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteLoyaltyRewardResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeleteMerchantCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeleteMerchantCustomAttributeDefinitionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteMerchantCustomAttributeDefinitionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeleteMerchantCustomAttributeResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeleteMerchantCustomAttributeResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteMerchantCustomAttributeResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeleteOrderCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeleteOrderCustomAttributeDefinitionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteOrderCustomAttributeDefinitionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeleteOrderCustomAttributeResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeleteOrderCustomAttributeResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteOrderCustomAttributeResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeletePaymentLinkResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeletePaymentLinkResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeletePaymentLinkResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeleteShiftResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeleteShiftResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteShiftResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeleteWebhookSubscriptionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeleteWebhookSubscriptionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteWebhookSubscriptionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeviceCheckoutOptions(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeviceCheckoutOptions{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCheckoutOptions + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeviceCode(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeviceCode{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCode + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeviceCodePairedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeviceCodePairedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCodePairedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeviceCodePairedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeviceCodePairedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCodePairedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeviceCodePairedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeviceCodePairedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCodePairedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeviceCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeviceCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeviceCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeviceCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeviceCreatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeviceCreatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCreatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDeviceMetadata(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DeviceMetadata{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceMetadata + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDisputeCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DisputeCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDisputeCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DisputeCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDisputeCreatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DisputeCreatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeCreatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDisputeEvidence(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DisputeEvidence{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidence + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDisputeEvidenceAddedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DisputeEvidenceAddedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceAddedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDisputeEvidenceAddedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DisputeEvidenceAddedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceAddedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDisputeEvidenceAddedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DisputeEvidenceAddedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceAddedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDisputeEvidenceCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DisputeEvidenceCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDisputeEvidenceCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DisputeEvidenceCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDisputeEvidenceCreatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DisputeEvidenceCreatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceCreatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDisputeEvidenceDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DisputeEvidenceDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDisputeEvidenceDeletedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DisputeEvidenceDeletedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceDeletedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDisputeEvidenceDeletedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DisputeEvidenceDeletedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceDeletedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDisputeEvidenceFile(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DisputeEvidenceFile{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceFile + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDisputeEvidenceRemovedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DisputeEvidenceRemovedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceRemovedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDisputeEvidenceRemovedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DisputeEvidenceRemovedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceRemovedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDisputeEvidenceRemovedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DisputeEvidenceRemovedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceRemovedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDisputeStateChangedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DisputeStateChangedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateChangedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDisputeStateChangedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DisputeStateChangedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateChangedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDisputeStateChangedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DisputeStateChangedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateChangedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDisputeStateUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DisputeStateUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDisputeStateUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DisputeStateUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringDisputeStateUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &DisputeStateUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringEmployeeWage(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &EmployeeWage{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *EmployeeWage + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringError(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Error{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Error + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringEventTypeMetadata(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &EventTypeMetadata{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *EventTypeMetadata + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringFilterValue(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &FilterValue{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FilterValue + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringFulfillment(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Fulfillment{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Fulfillment + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringFulfillmentDeliveryDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &FulfillmentDeliveryDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentDeliveryDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringFulfillmentFulfillmentEntry(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &FulfillmentFulfillmentEntry{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentFulfillmentEntry + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringFulfillmentPickupDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &FulfillmentPickupDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentPickupDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringFulfillmentPickupDetailsCurbsidePickupDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &FulfillmentPickupDetailsCurbsidePickupDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentPickupDetailsCurbsidePickupDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringFulfillmentRecipient(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &FulfillmentRecipient{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentRecipient + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringFulfillmentShipmentDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &FulfillmentShipmentDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentShipmentDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetBreakTypeResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetBreakTypeResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetBreakTypeResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetCashDrawerShiftResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetCashDrawerShiftResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCashDrawerShiftResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetCatalogObjectResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetCatalogObjectResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCatalogObjectResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetCustomerCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetCustomerCustomAttributeDefinitionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCustomerCustomAttributeDefinitionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetCustomerCustomAttributeResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetCustomerCustomAttributeResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCustomerCustomAttributeResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetCustomerGroupResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetCustomerGroupResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCustomerGroupResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetCustomerSegmentResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetCustomerSegmentResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCustomerSegmentResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetDeviceCodeResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetDeviceCodeResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetDeviceCodeResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetDisputeEvidenceResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetDisputeEvidenceResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetDisputeEvidenceResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetEmployeeWageResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetEmployeeWageResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetEmployeeWageResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetLoyaltyAccountResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetLoyaltyAccountResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetLoyaltyAccountResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetLoyaltyProgramResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetLoyaltyProgramResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetLoyaltyProgramResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetLoyaltyPromotionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetLoyaltyPromotionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetLoyaltyPromotionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetLoyaltyRewardResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetLoyaltyRewardResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetLoyaltyRewardResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetPaymentLinkResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetPaymentLinkResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetPaymentLinkResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetShiftResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetShiftResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetShiftResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetTeamMemberBookingProfileResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetTeamMemberBookingProfileResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetTeamMemberBookingProfileResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetTeamMemberWageResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetTeamMemberWageResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetTeamMemberWageResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetTerminalActionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetTerminalActionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetTerminalActionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetTerminalCheckoutResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetTerminalCheckoutResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetTerminalCheckoutResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetTerminalRefundResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetTerminalRefundResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetTerminalRefundResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetTransactionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetTransactionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetTransactionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetWageSettingResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetWageSettingResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetWageSettingResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetWebhookSubscriptionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetWebhookSubscriptionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetWebhookSubscriptionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardActivity(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivity{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivity + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardActivityActivate(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityActivate{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityActivate + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardActivityAdjustDecrement(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityAdjustDecrement{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityAdjustDecrement + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardActivityAdjustIncrement(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityAdjustIncrement{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityAdjustIncrement + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardActivityBlock(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityBlock{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityBlock + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardActivityClearBalance(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityClearBalance{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityClearBalance + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardActivityCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardActivityCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardActivityCreatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityCreatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityCreatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardActivityDeactivate(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityDeactivate{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityDeactivate + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardActivityImport(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityImport{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityImport + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardActivityImportReversal(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityImportReversal{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityImportReversal + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardActivityLoad(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityLoad{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityLoad + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardActivityRedeem(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityRedeem{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityRedeem + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardActivityRefund(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityRefund{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityRefund + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardActivityTransferBalanceFrom(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityTransferBalanceFrom{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityTransferBalanceFrom + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardActivityTransferBalanceTo(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityTransferBalanceTo{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityTransferBalanceTo + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardActivityUnblock(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityUnblock{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityUnblock + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardActivityUnlinkedActivityRefund(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityUnlinkedActivityRefund{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityUnlinkedActivityRefund + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardActivityUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardActivityUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardActivityUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardCreatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardCreatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCreatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardCustomerLinkedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardCustomerLinkedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerLinkedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardCustomerLinkedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardCustomerLinkedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerLinkedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardCustomerLinkedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardCustomerLinkedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerLinkedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardCustomerUnlinkedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardCustomerUnlinkedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerUnlinkedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardCustomerUnlinkedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardCustomerUnlinkedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerUnlinkedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardCustomerUnlinkedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardCustomerUnlinkedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerUnlinkedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGiftCardUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GiftCardUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInventoryCountUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InventoryCountUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryCountUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInventoryCountUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InventoryCountUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryCountUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInventoryCountUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InventoryCountUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryCountUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoiceCanceledEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoiceCanceledEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCanceledEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoiceCanceledEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoiceCanceledEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCanceledEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoiceCanceledEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoiceCanceledEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCanceledEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoiceCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoiceCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoiceCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoiceCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoiceCreatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoiceCreatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCreatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoiceDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoiceDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoiceDeletedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoiceDeletedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceDeletedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoicePaymentMadeEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoicePaymentMadeEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentMadeEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoicePaymentMadeEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoicePaymentMadeEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentMadeEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoicePaymentMadeEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoicePaymentMadeEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentMadeEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoicePublishedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoicePublishedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePublishedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoicePublishedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoicePublishedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePublishedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoicePublishedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoicePublishedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePublishedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoiceRefundedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoiceRefundedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceRefundedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoiceRefundedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoiceRefundedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceRefundedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoiceRefundedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoiceRefundedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceRefundedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoiceScheduledChargeFailedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoiceScheduledChargeFailedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceScheduledChargeFailedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoiceScheduledChargeFailedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoiceScheduledChargeFailedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceScheduledChargeFailedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoiceScheduledChargeFailedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoiceScheduledChargeFailedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceScheduledChargeFailedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoiceUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoiceUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoiceUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoiceUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringInvoiceUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &InvoiceUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringItemVariationLocationOverrides(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ItemVariationLocationOverrides{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ItemVariationLocationOverrides + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringJobAssignment(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &JobAssignment{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobAssignment + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringJobCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &JobCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringJobCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &JobCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringJobCreatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &JobCreatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobCreatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringJobUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &JobUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringJobUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &JobUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringJobUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &JobUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLaborScheduledShiftCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LaborScheduledShiftCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLaborScheduledShiftCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LaborScheduledShiftCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLaborScheduledShiftCreatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LaborScheduledShiftCreatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftCreatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLaborScheduledShiftDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LaborScheduledShiftDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLaborScheduledShiftDeletedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LaborScheduledShiftDeletedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftDeletedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLaborScheduledShiftPublishedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LaborScheduledShiftPublishedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftPublishedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLaborScheduledShiftPublishedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LaborScheduledShiftPublishedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftPublishedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLaborScheduledShiftPublishedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LaborScheduledShiftPublishedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftPublishedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLaborScheduledShiftUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LaborScheduledShiftUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLaborScheduledShiftUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LaborScheduledShiftUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLaborScheduledShiftUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LaborScheduledShiftUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLaborShiftCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LaborShiftCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLaborShiftCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LaborShiftCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLaborShiftCreatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LaborShiftCreatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftCreatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLaborShiftDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LaborShiftDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLaborShiftDeletedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LaborShiftDeletedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftDeletedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLaborShiftUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LaborShiftUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLaborShiftUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LaborShiftUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLaborShiftUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LaborShiftUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLaborTimecardCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LaborTimecardCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLaborTimecardCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LaborTimecardCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLaborTimecardCreatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LaborTimecardCreatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardCreatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLaborTimecardDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LaborTimecardDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLaborTimecardDeletedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LaborTimecardDeletedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardDeletedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLaborTimecardUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LaborTimecardUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLaborTimecardUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LaborTimecardUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLaborTimecardUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LaborTimecardUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListBookingCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListBookingCustomAttributeDefinitionsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListBookingCustomAttributeDefinitionsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListBookingCustomAttributesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListBookingCustomAttributesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListBookingCustomAttributesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListBreakTypesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListBreakTypesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListBreakTypesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListCashDrawerShiftEventsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListCashDrawerShiftEventsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCashDrawerShiftEventsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListCashDrawerShiftsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListCashDrawerShiftsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCashDrawerShiftsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListCustomerCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListCustomerCustomAttributeDefinitionsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCustomerCustomAttributeDefinitionsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListCustomerCustomAttributesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListCustomerCustomAttributesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCustomerCustomAttributesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListCustomerGroupsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListCustomerGroupsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCustomerGroupsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListCustomerSegmentsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListCustomerSegmentsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCustomerSegmentsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListDeviceCodesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListDeviceCodesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListDeviceCodesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListDisputeEvidenceResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListDisputeEvidenceResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListDisputeEvidenceResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListEmployeeWagesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListEmployeeWagesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListEmployeeWagesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListGiftCardActivitiesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListGiftCardActivitiesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListGiftCardActivitiesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListLocationBookingProfilesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListLocationBookingProfilesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListLocationBookingProfilesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListLocationCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListLocationCustomAttributeDefinitionsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListLocationCustomAttributeDefinitionsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListLocationCustomAttributesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListLocationCustomAttributesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListLocationCustomAttributesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListLoyaltyProgramsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListLoyaltyProgramsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListLoyaltyProgramsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListLoyaltyPromotionsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListLoyaltyPromotionsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListLoyaltyPromotionsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListMerchantCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListMerchantCustomAttributeDefinitionsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListMerchantCustomAttributeDefinitionsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListMerchantCustomAttributesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListMerchantCustomAttributesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListMerchantCustomAttributesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListOrderCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListOrderCustomAttributeDefinitionsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListOrderCustomAttributeDefinitionsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListOrderCustomAttributesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListOrderCustomAttributesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListOrderCustomAttributesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListPaymentLinksResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListPaymentLinksResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListPaymentLinksResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListTeamMemberBookingProfilesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListTeamMemberBookingProfilesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListTeamMemberBookingProfilesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListTeamMemberWagesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListTeamMemberWagesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListTeamMemberWagesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListTransactionsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListTransactionsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListTransactionsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListWebhookEventTypesResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListWebhookEventTypesResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListWebhookEventTypesResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListWebhookSubscriptionsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListWebhookSubscriptionsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListWebhookSubscriptionsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringListWorkweekConfigsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ListWorkweekConfigsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListWorkweekConfigsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLocationBookingProfile(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LocationBookingProfile{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationBookingProfile + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLocationCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LocationCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLocationCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LocationCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLocationCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LocationCustomAttributeDefinitionOwnedCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionOwnedCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLocationCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LocationCustomAttributeDefinitionOwnedDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionOwnedDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLocationCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LocationCustomAttributeDefinitionOwnedUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionOwnedUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLocationCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LocationCustomAttributeDefinitionVisibleCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionVisibleCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLocationCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LocationCustomAttributeDefinitionVisibleDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionVisibleDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLocationCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LocationCustomAttributeDefinitionVisibleUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionVisibleUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLocationCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LocationCustomAttributeOwnedDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeOwnedDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLocationCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LocationCustomAttributeOwnedUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeOwnedUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLocationCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LocationCustomAttributeVisibleDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeVisibleDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLocationCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LocationCustomAttributeVisibleUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeVisibleUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLocationSettingsUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LocationSettingsUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationSettingsUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLocationSettingsUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LocationSettingsUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationSettingsUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLocationSettingsUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LocationSettingsUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationSettingsUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLocationUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LocationUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLocationUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LocationUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyAccount(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyAccount{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccount + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyAccountCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyAccountCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyAccountCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyAccountCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyAccountCreatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyAccountCreatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountCreatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyAccountDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyAccountDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyAccountDeletedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyAccountDeletedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountDeletedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyAccountDeletedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyAccountDeletedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountDeletedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyAccountExpiringPointDeadline(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyAccountExpiringPointDeadline{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountExpiringPointDeadline + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyAccountMapping(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyAccountMapping{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountMapping + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyAccountUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyAccountUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyAccountUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyAccountUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyAccountUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyAccountUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyEventAccumulatePoints(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventAccumulatePoints{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventAccumulatePoints + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyEventAccumulatePromotionPoints(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventAccumulatePromotionPoints{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventAccumulatePromotionPoints + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyEventAdjustPoints(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventAdjustPoints{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventAdjustPoints + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyEventCreateReward(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventCreateReward{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventCreateReward + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyEventCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyEventCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyEventCreatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventCreatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventCreatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyEventDeleteReward(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventDeleteReward{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventDeleteReward + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyEventExpirePoints(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventExpirePoints{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventExpirePoints + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyEventOther(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventOther{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventOther + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyEventRedeemReward(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventRedeemReward{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventRedeemReward + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyProgram(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgram{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgram + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyProgramAccrualRule(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgramAccrualRule{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramAccrualRule + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyProgramAccrualRuleCategoryData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgramAccrualRuleCategoryData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramAccrualRuleCategoryData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyProgramAccrualRuleItemVariationData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgramAccrualRuleItemVariationData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramAccrualRuleItemVariationData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyProgramAccrualRuleSpendData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgramAccrualRuleSpendData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramAccrualRuleSpendData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyProgramAccrualRuleVisitData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgramAccrualRuleVisitData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramAccrualRuleVisitData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyProgramCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgramCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyProgramCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgramCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyProgramCreatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgramCreatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramCreatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyProgramExpirationPolicy(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgramExpirationPolicy{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramExpirationPolicy + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyProgramRewardTier(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgramRewardTier{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramRewardTier + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyProgramTerminology(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgramTerminology{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramTerminology + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyProgramUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgramUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyProgramUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgramUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyProgramUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgramUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyPromotion(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyPromotion{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotion + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyPromotionAvailableTimeData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyPromotionAvailableTimeData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionAvailableTimeData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyPromotionCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyPromotionCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyPromotionCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyPromotionCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyPromotionCreatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyPromotionCreatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionCreatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyPromotionIncentive(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyPromotionIncentive{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionIncentive + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyPromotionIncentivePointsAdditionData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyPromotionIncentivePointsAdditionData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionIncentivePointsAdditionData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyPromotionIncentivePointsMultiplierData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyPromotionIncentivePointsMultiplierData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionIncentivePointsMultiplierData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyPromotionTriggerLimit(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyPromotionTriggerLimit{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionTriggerLimit + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyPromotionUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyPromotionUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyPromotionUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyPromotionUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyPromotionUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyPromotionUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringLoyaltyReward(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyReward{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyReward + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringMeasurementUnit(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &MeasurementUnit{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MeasurementUnit + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringMeasurementUnitCustom(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &MeasurementUnitCustom{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MeasurementUnitCustom + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringMerchantCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &MerchantCustomAttributeDefinitionOwnedCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionOwnedCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringMerchantCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &MerchantCustomAttributeDefinitionOwnedDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionOwnedDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringMerchantCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &MerchantCustomAttributeDefinitionOwnedUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionOwnedUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringMerchantCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &MerchantCustomAttributeDefinitionVisibleCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionVisibleCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringMerchantCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &MerchantCustomAttributeDefinitionVisibleDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionVisibleDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringMerchantCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &MerchantCustomAttributeDefinitionVisibleUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionVisibleUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringMerchantCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &MerchantCustomAttributeOwnedDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeOwnedDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringMerchantCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &MerchantCustomAttributeOwnedUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeOwnedUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringMerchantCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &MerchantCustomAttributeVisibleDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeVisibleDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringMerchantCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &MerchantCustomAttributeVisibleUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeVisibleUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringMerchantSettingsUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &MerchantSettingsUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantSettingsUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringMerchantSettingsUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &MerchantSettingsUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantSettingsUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringMerchantSettingsUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &MerchantSettingsUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantSettingsUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringModifierLocationOverrides(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ModifierLocationOverrides{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ModifierLocationOverrides + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringMoney(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Money{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Money + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOauthAuthorizationRevokedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OauthAuthorizationRevokedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OauthAuthorizationRevokedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOauthAuthorizationRevokedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OauthAuthorizationRevokedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OauthAuthorizationRevokedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOauthAuthorizationRevokedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OauthAuthorizationRevokedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OauthAuthorizationRevokedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOauthAuthorizationRevokedEventRevocationObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OauthAuthorizationRevokedEventRevocationObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OauthAuthorizationRevokedEventRevocationObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrder(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Order{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderCreated(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderCreated{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCreated + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderCreatedObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderCreatedObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCreatedObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderCustomAttributeDefinitionOwnedCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionOwnedCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderCustomAttributeDefinitionOwnedDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionOwnedDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderCustomAttributeDefinitionOwnedUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionOwnedUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderCustomAttributeDefinitionVisibleCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionVisibleCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderCustomAttributeDefinitionVisibleDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionVisibleDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderCustomAttributeDefinitionVisibleUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionVisibleUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderCustomAttributeOwnedDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeOwnedDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderCustomAttributeOwnedUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeOwnedUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderCustomAttributeVisibleDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeVisibleDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderCustomAttributeVisibleUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeVisibleUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderFulfillmentUpdated(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderFulfillmentUpdated{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdated + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderFulfillmentUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderFulfillmentUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderFulfillmentUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderFulfillmentUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderFulfillmentUpdatedObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderFulfillmentUpdatedObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdatedObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderFulfillmentUpdatedUpdate(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderFulfillmentUpdatedUpdate{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdatedUpdate + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderLineItem(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderLineItem{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItem + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderLineItemAppliedDiscount(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderLineItemAppliedDiscount{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemAppliedDiscount + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderLineItemAppliedServiceCharge(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderLineItemAppliedServiceCharge{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemAppliedServiceCharge + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderLineItemAppliedTax(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderLineItemAppliedTax{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemAppliedTax + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderLineItemDiscount(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderLineItemDiscount{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemDiscount + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderLineItemModifier(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderLineItemModifier{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemModifier + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderLineItemPricingBlocklists(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderLineItemPricingBlocklists{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemPricingBlocklists + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderLineItemPricingBlocklistsBlockedDiscount(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderLineItemPricingBlocklistsBlockedDiscount{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemPricingBlocklistsBlockedDiscount + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderLineItemPricingBlocklistsBlockedServiceCharge(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderLineItemPricingBlocklistsBlockedServiceCharge{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemPricingBlocklistsBlockedServiceCharge + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderLineItemPricingBlocklistsBlockedTax(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderLineItemPricingBlocklistsBlockedTax{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemPricingBlocklistsBlockedTax + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderLineItemTax(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderLineItemTax{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemTax + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderMoneyAmounts(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderMoneyAmounts{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderMoneyAmounts + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderPricingOptions(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderPricingOptions{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderPricingOptions + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderQuantityUnit(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderQuantityUnit{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderQuantityUnit + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderReturn(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderReturn{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturn + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderReturnDiscount(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderReturnDiscount{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnDiscount + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderReturnLineItem(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderReturnLineItem{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItem + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderReturnLineItemModifier(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderReturnLineItemModifier{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItemModifier + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderReturnServiceCharge(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderReturnServiceCharge{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnServiceCharge + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderReturnTax(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderReturnTax{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnTax + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderReturnTip(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderReturnTip{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnTip + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderReward(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderReward{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReward + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderRoundingAdjustment(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderRoundingAdjustment{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderRoundingAdjustment + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderServiceCharge(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderServiceCharge{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderServiceCharge + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderSource(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderSource{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderSource + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderUpdated(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderUpdated{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderUpdated + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringOrderUpdatedObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &OrderUpdatedObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderUpdatedObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentCreatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentCreatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentCreatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentLink(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentLink{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentLink + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentLinkRelatedResources(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentLinkRelatedResources{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentLinkRelatedResources + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentOptions(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentOptions{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentOptions + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPaymentUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PaymentUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPayoutFailedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PayoutFailedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutFailedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPayoutFailedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PayoutFailedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutFailedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPayoutFailedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PayoutFailedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutFailedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPayoutPaidEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PayoutPaidEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutPaidEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPayoutPaidEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PayoutPaidEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutPaidEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPayoutPaidEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PayoutPaidEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutPaidEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPayoutSentEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PayoutSentEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutSentEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPayoutSentEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PayoutSentEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutSentEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPayoutSentEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PayoutSentEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutSentEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringPrePopulatedData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &PrePopulatedData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PrePopulatedData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringProcessingFee(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ProcessingFee{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ProcessingFee + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringQrCodeOptions(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &QrCodeOptions{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *QrCodeOptions + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringQuickPay(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &QuickPay{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *QuickPay + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringReceiptOptions(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ReceiptOptions{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ReceiptOptions + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRedeemLoyaltyRewardResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RedeemLoyaltyRewardResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RedeemLoyaltyRewardResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRefund(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Refund{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Refund + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRefundCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RefundCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRefundCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RefundCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRefundCreatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RefundCreatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundCreatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRefundUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RefundUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRefundUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RefundUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRefundUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RefundUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRemoveGroupFromCustomerResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RemoveGroupFromCustomerResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RemoveGroupFromCustomerResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRetrieveBookingCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RetrieveBookingCustomAttributeDefinitionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveBookingCustomAttributeDefinitionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRetrieveBookingCustomAttributeResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RetrieveBookingCustomAttributeResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveBookingCustomAttributeResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRetrieveLocationCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RetrieveLocationCustomAttributeDefinitionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveLocationCustomAttributeDefinitionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRetrieveLocationCustomAttributeResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RetrieveLocationCustomAttributeResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveLocationCustomAttributeResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRetrieveMerchantCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RetrieveMerchantCustomAttributeDefinitionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveMerchantCustomAttributeDefinitionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRetrieveMerchantCustomAttributeResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RetrieveMerchantCustomAttributeResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveMerchantCustomAttributeResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRetrieveOrderCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RetrieveOrderCustomAttributeDefinitionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveOrderCustomAttributeDefinitionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringRetrieveOrderCustomAttributeResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &RetrieveOrderCustomAttributeResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveOrderCustomAttributeResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSaveCardOptions(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SaveCardOptions{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SaveCardOptions + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchLoyaltyAccountsRequestLoyaltyAccountQuery(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchLoyaltyAccountsRequestLoyaltyAccountQuery{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchLoyaltyAccountsRequestLoyaltyAccountQuery + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchLoyaltyAccountsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchLoyaltyAccountsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchLoyaltyAccountsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchLoyaltyRewardsRequestLoyaltyRewardQuery(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchLoyaltyRewardsRequestLoyaltyRewardQuery{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchLoyaltyRewardsRequestLoyaltyRewardQuery + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchLoyaltyRewardsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchLoyaltyRewardsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchLoyaltyRewardsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchShiftsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchShiftsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchShiftsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchTerminalActionsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchTerminalActionsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTerminalActionsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchTerminalCheckoutsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchTerminalCheckoutsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTerminalCheckoutsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchTerminalRefundsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchTerminalRefundsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTerminalRefundsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSelectOption(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SelectOption{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SelectOption + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSelectOptions(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SelectOptions{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SelectOptions + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringShift(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Shift{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Shift + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringShiftFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ShiftFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShiftFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringShiftQuery(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ShiftQuery{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShiftQuery + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringShiftSort(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ShiftSort{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShiftSort + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringShiftWage(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ShiftWage{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShiftWage + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringShiftWorkday(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ShiftWorkday{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShiftWorkday + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringShippingFee(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &ShippingFee{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShippingFee + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSignatureImage(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SignatureImage{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SignatureImage + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSignatureOptions(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SignatureOptions{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SignatureOptions + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSourceApplication(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SourceApplication{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SourceApplication + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSubscriptionCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SubscriptionCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSubscriptionCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SubscriptionCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSubscriptionCreatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SubscriptionCreatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionCreatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSubscriptionPhase(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SubscriptionPhase{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionPhase + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSubscriptionPricing(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SubscriptionPricing{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionPricing + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSubscriptionTestResult(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SubscriptionTestResult{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionTestResult + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSubscriptionUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SubscriptionUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSubscriptionUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SubscriptionUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSubscriptionUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SubscriptionUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTeamMemberBookingProfile(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TeamMemberBookingProfile{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberBookingProfile + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTeamMemberCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TeamMemberCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTeamMemberCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TeamMemberCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTeamMemberCreatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TeamMemberCreatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberCreatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTeamMemberUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TeamMemberUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTeamMemberUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TeamMemberUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTeamMemberUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TeamMemberUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTeamMemberWage(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TeamMemberWage{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberWage + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTeamMemberWageSettingUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TeamMemberWageSettingUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberWageSettingUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTeamMemberWageSettingUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TeamMemberWageSettingUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberWageSettingUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTeamMemberWageSettingUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TeamMemberWageSettingUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberWageSettingUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTender(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Tender{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Tender + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTenderBankAccountDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TenderBankAccountDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TenderBankAccountDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTenderBuyNowPayLaterDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TenderBuyNowPayLaterDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TenderBuyNowPayLaterDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTenderCardDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TenderCardDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TenderCardDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTenderCashDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TenderCashDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TenderCashDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTenderSquareAccountDetails(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TenderSquareAccountDetails{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TenderSquareAccountDetails + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalAction(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalAction{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalAction + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalActionCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalActionCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalActionCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalActionCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalActionCreatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalActionCreatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionCreatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalActionQuery(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalActionQuery{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionQuery + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalActionQueryFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalActionQueryFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionQueryFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalActionQuerySort(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalActionQuerySort{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionQuerySort + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalActionUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalActionUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalActionUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalActionUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalActionUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalActionUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalCheckout(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalCheckout{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckout + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalCheckoutCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalCheckoutCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalCheckoutCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalCheckoutCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalCheckoutCreatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalCheckoutCreatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutCreatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalCheckoutQuery(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalCheckoutQuery{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutQuery + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalCheckoutQueryFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalCheckoutQueryFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutQueryFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalCheckoutQuerySort(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalCheckoutQuerySort{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutQuerySort + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalCheckoutUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalCheckoutUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalCheckoutUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalCheckoutUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalCheckoutUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalCheckoutUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalRefund(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalRefund{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefund + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalRefundCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalRefundCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalRefundCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalRefundCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalRefundCreatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalRefundCreatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundCreatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalRefundQuery(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalRefundQuery{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundQuery + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalRefundQueryFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalRefundQueryFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundQueryFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalRefundQuerySort(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalRefundQuerySort{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundQuerySort + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalRefundUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalRefundUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalRefundUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalRefundUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTerminalRefundUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TerminalRefundUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTestWebhookSubscriptionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TestWebhookSubscriptionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TestWebhookSubscriptionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTimeRange(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TimeRange{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimeRange + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTipSettings(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TipSettings{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TipSettings + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTransaction(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Transaction{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Transaction + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTransferOrderCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TransferOrderCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTransferOrderCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TransferOrderCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTransferOrderCreatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TransferOrderCreatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderCreatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTransferOrderDeletedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TransferOrderDeletedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderDeletedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTransferOrderDeletedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TransferOrderDeletedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderDeletedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTransferOrderUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TransferOrderUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTransferOrderUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TransferOrderUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringTransferOrderUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &TransferOrderUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateBookingCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateBookingCustomAttributeDefinitionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateBookingCustomAttributeDefinitionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateBreakTypeResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateBreakTypeResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateBreakTypeResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateCatalogImageRequest(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateCatalogImageRequest{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateCatalogImageRequest + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateCatalogImageResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateCatalogImageResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateCatalogImageResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateCustomerCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateCustomerCustomAttributeDefinitionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateCustomerCustomAttributeDefinitionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateCustomerGroupResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateCustomerGroupResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateCustomerGroupResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateLocationCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateLocationCustomAttributeDefinitionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateLocationCustomAttributeDefinitionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateMerchantCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateMerchantCustomAttributeDefinitionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateMerchantCustomAttributeDefinitionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateOrderCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateOrderCustomAttributeDefinitionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateOrderCustomAttributeDefinitionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdatePaymentLinkResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdatePaymentLinkResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdatePaymentLinkResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateShiftResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateShiftResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateShiftResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateWageSettingResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateWageSettingResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateWageSettingResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateWebhookSubscriptionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateWebhookSubscriptionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateWebhookSubscriptionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateWebhookSubscriptionSignatureKeyResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateWebhookSubscriptionSignatureKeyResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateWebhookSubscriptionSignatureKeyResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateWorkweekConfigResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateWorkweekConfigResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateWorkweekConfigResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpsertBookingCustomAttributeResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpsertBookingCustomAttributeResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertBookingCustomAttributeResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpsertCatalogObjectResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpsertCatalogObjectResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertCatalogObjectResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpsertCustomerCustomAttributeResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpsertCustomerCustomAttributeResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertCustomerCustomAttributeResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpsertLocationCustomAttributeResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpsertLocationCustomAttributeResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertLocationCustomAttributeResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpsertMerchantCustomAttributeResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpsertMerchantCustomAttributeResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertMerchantCustomAttributeResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpsertOrderCustomAttributeResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpsertOrderCustomAttributeResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertOrderCustomAttributeResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringVendorCreatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &VendorCreatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorCreatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringVendorCreatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &VendorCreatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorCreatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringVendorCreatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &VendorCreatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorCreatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringVendorUpdatedEvent(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &VendorUpdatedEvent{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorUpdatedEvent + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringVendorUpdatedEventData(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &VendorUpdatedEventData{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorUpdatedEventData + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringVendorUpdatedEventObject(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &VendorUpdatedEventObject{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorUpdatedEventObject + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringVoidTransactionResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &VoidTransactionResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VoidTransactionResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringWageSetting(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &WageSetting{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *WageSetting + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringWebhookSubscription(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &WebhookSubscription{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *WebhookSubscription + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringWorkweekConfig(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &WorkweekConfig{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *WorkweekConfig + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestEnumActionCancelReason(t *testing.T) { + t.Run("NewFromString_BUYER_CANCELED", func(t *testing.T) { + t.Parallel() + val, err := NewActionCancelReasonFromString("BUYER_CANCELED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActionCancelReason("BUYER_CANCELED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SELLER_CANCELED", func(t *testing.T) { + t.Parallel() + val, err := NewActionCancelReasonFromString("SELLER_CANCELED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActionCancelReason("SELLER_CANCELED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TIMED_OUT", func(t *testing.T) { + t.Parallel() + val, err := NewActionCancelReasonFromString("TIMED_OUT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ActionCancelReason("TIMED_OUT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewActionCancelReasonFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewActionCancelReasonFromString("BUYER_CANCELED") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCardBrand(t *testing.T) { + t.Run("NewFromString_OTHER_BRAND", func(t *testing.T) { + t.Parallel() + val, err := NewCardBrandFromString("OTHER_BRAND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CardBrand("OTHER_BRAND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VISA", func(t *testing.T) { + t.Parallel() + val, err := NewCardBrandFromString("VISA") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CardBrand("VISA"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MASTERCARD", func(t *testing.T) { + t.Parallel() + val, err := NewCardBrandFromString("MASTERCARD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CardBrand("MASTERCARD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AMERICAN_EXPRESS", func(t *testing.T) { + t.Parallel() + val, err := NewCardBrandFromString("AMERICAN_EXPRESS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CardBrand("AMERICAN_EXPRESS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DISCOVER", func(t *testing.T) { + t.Parallel() + val, err := NewCardBrandFromString("DISCOVER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CardBrand("DISCOVER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DISCOVER_DINERS", func(t *testing.T) { + t.Parallel() + val, err := NewCardBrandFromString("DISCOVER_DINERS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CardBrand("DISCOVER_DINERS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_JCB", func(t *testing.T) { + t.Parallel() + val, err := NewCardBrandFromString("JCB") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CardBrand("JCB"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CHINA_UNIONPAY", func(t *testing.T) { + t.Parallel() + val, err := NewCardBrandFromString("CHINA_UNIONPAY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CardBrand("CHINA_UNIONPAY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SQUARE_GIFT_CARD", func(t *testing.T) { + t.Parallel() + val, err := NewCardBrandFromString("SQUARE_GIFT_CARD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CardBrand("SQUARE_GIFT_CARD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SQUARE_CAPITAL_CARD", func(t *testing.T) { + t.Parallel() + val, err := NewCardBrandFromString("SQUARE_CAPITAL_CARD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CardBrand("SQUARE_CAPITAL_CARD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INTERAC", func(t *testing.T) { + t.Parallel() + val, err := NewCardBrandFromString("INTERAC") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CardBrand("INTERAC"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EFTPOS", func(t *testing.T) { + t.Parallel() + val, err := NewCardBrandFromString("EFTPOS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CardBrand("EFTPOS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FELICA", func(t *testing.T) { + t.Parallel() + val, err := NewCardBrandFromString("FELICA") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CardBrand("FELICA"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EBT", func(t *testing.T) { + t.Parallel() + val, err := NewCardBrandFromString("EBT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CardBrand("EBT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCardBrandFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCardBrandFromString("OTHER_BRAND") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCardCoBrand(t *testing.T) { + t.Run("NewFromString_UNKNOWN", func(t *testing.T) { + t.Parallel() + val, err := NewCardCoBrandFromString("UNKNOWN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CardCoBrand("UNKNOWN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AFTERPAY", func(t *testing.T) { + t.Parallel() + val, err := NewCardCoBrandFromString("AFTERPAY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CardCoBrand("AFTERPAY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CLEARPAY", func(t *testing.T) { + t.Parallel() + val, err := NewCardCoBrandFromString("CLEARPAY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CardCoBrand("CLEARPAY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCardCoBrandFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCardCoBrandFromString("UNKNOWN") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCardPrepaidType(t *testing.T) { + t.Run("NewFromString_UNKNOWN_PREPAID_TYPE", func(t *testing.T) { + t.Parallel() + val, err := NewCardPrepaidTypeFromString("UNKNOWN_PREPAID_TYPE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CardPrepaidType("UNKNOWN_PREPAID_TYPE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NOT_PREPAID", func(t *testing.T) { + t.Parallel() + val, err := NewCardPrepaidTypeFromString("NOT_PREPAID") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CardPrepaidType("NOT_PREPAID"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PREPAID", func(t *testing.T) { + t.Parallel() + val, err := NewCardPrepaidTypeFromString("PREPAID") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CardPrepaidType("PREPAID"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCardPrepaidTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCardPrepaidTypeFromString("UNKNOWN_PREPAID_TYPE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCardType(t *testing.T) { + t.Run("NewFromString_UNKNOWN_CARD_TYPE", func(t *testing.T) { + t.Parallel() + val, err := NewCardTypeFromString("UNKNOWN_CARD_TYPE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CardType("UNKNOWN_CARD_TYPE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CREDIT", func(t *testing.T) { + t.Parallel() + val, err := NewCardTypeFromString("CREDIT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CardType("CREDIT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DEBIT", func(t *testing.T) { + t.Parallel() + val, err := NewCardTypeFromString("DEBIT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CardType("DEBIT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCardTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCardTypeFromString("UNKNOWN_CARD_TYPE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCashDrawerEventType(t *testing.T) { + t.Run("NewFromString_NO_SALE", func(t *testing.T) { + t.Parallel() + val, err := NewCashDrawerEventTypeFromString("NO_SALE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CashDrawerEventType("NO_SALE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CASH_TENDER_PAYMENT", func(t *testing.T) { + t.Parallel() + val, err := NewCashDrawerEventTypeFromString("CASH_TENDER_PAYMENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CashDrawerEventType("CASH_TENDER_PAYMENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_OTHER_TENDER_PAYMENT", func(t *testing.T) { + t.Parallel() + val, err := NewCashDrawerEventTypeFromString("OTHER_TENDER_PAYMENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CashDrawerEventType("OTHER_TENDER_PAYMENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CASH_TENDER_CANCELLED_PAYMENT", func(t *testing.T) { + t.Parallel() + val, err := NewCashDrawerEventTypeFromString("CASH_TENDER_CANCELLED_PAYMENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CashDrawerEventType("CASH_TENDER_CANCELLED_PAYMENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_OTHER_TENDER_CANCELLED_PAYMENT", func(t *testing.T) { + t.Parallel() + val, err := NewCashDrawerEventTypeFromString("OTHER_TENDER_CANCELLED_PAYMENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CashDrawerEventType("OTHER_TENDER_CANCELLED_PAYMENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CASH_TENDER_REFUND", func(t *testing.T) { + t.Parallel() + val, err := NewCashDrawerEventTypeFromString("CASH_TENDER_REFUND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CashDrawerEventType("CASH_TENDER_REFUND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_OTHER_TENDER_REFUND", func(t *testing.T) { + t.Parallel() + val, err := NewCashDrawerEventTypeFromString("OTHER_TENDER_REFUND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CashDrawerEventType("OTHER_TENDER_REFUND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PAID_IN", func(t *testing.T) { + t.Parallel() + val, err := NewCashDrawerEventTypeFromString("PAID_IN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CashDrawerEventType("PAID_IN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PAID_OUT", func(t *testing.T) { + t.Parallel() + val, err := NewCashDrawerEventTypeFromString("PAID_OUT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CashDrawerEventType("PAID_OUT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCashDrawerEventTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCashDrawerEventTypeFromString("NO_SALE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCashDrawerShiftState(t *testing.T) { + t.Run("NewFromString_OPEN", func(t *testing.T) { + t.Parallel() + val, err := NewCashDrawerShiftStateFromString("OPEN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CashDrawerShiftState("OPEN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ENDED", func(t *testing.T) { + t.Parallel() + val, err := NewCashDrawerShiftStateFromString("ENDED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CashDrawerShiftState("ENDED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CLOSED", func(t *testing.T) { + t.Parallel() + val, err := NewCashDrawerShiftStateFromString("CLOSED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CashDrawerShiftState("CLOSED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCashDrawerShiftStateFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCashDrawerShiftStateFromString("OPEN") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCatalogCategoryType(t *testing.T) { + t.Run("NewFromString_REGULAR_CATEGORY", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogCategoryTypeFromString("REGULAR_CATEGORY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogCategoryType("REGULAR_CATEGORY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MENU_CATEGORY", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogCategoryTypeFromString("MENU_CATEGORY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogCategoryType("MENU_CATEGORY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_KITCHEN_CATEGORY", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogCategoryTypeFromString("KITCHEN_CATEGORY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogCategoryType("KITCHEN_CATEGORY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCatalogCategoryTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCatalogCategoryTypeFromString("REGULAR_CATEGORY") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCatalogCustomAttributeDefinitionAppVisibility(t *testing.T) { + t.Run("NewFromString_APP_VISIBILITY_HIDDEN", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogCustomAttributeDefinitionAppVisibilityFromString("APP_VISIBILITY_HIDDEN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogCustomAttributeDefinitionAppVisibility("APP_VISIBILITY_HIDDEN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_APP_VISIBILITY_READ_ONLY", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogCustomAttributeDefinitionAppVisibilityFromString("APP_VISIBILITY_READ_ONLY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogCustomAttributeDefinitionAppVisibility("APP_VISIBILITY_READ_ONLY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_APP_VISIBILITY_READ_WRITE_VALUES", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogCustomAttributeDefinitionAppVisibilityFromString("APP_VISIBILITY_READ_WRITE_VALUES") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogCustomAttributeDefinitionAppVisibility("APP_VISIBILITY_READ_WRITE_VALUES"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCatalogCustomAttributeDefinitionAppVisibilityFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCatalogCustomAttributeDefinitionAppVisibilityFromString("APP_VISIBILITY_HIDDEN") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCatalogCustomAttributeDefinitionSellerVisibility(t *testing.T) { + t.Run("NewFromString_SELLER_VISIBILITY_HIDDEN", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogCustomAttributeDefinitionSellerVisibilityFromString("SELLER_VISIBILITY_HIDDEN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogCustomAttributeDefinitionSellerVisibility("SELLER_VISIBILITY_HIDDEN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SELLER_VISIBILITY_READ_WRITE_VALUES", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogCustomAttributeDefinitionSellerVisibilityFromString("SELLER_VISIBILITY_READ_WRITE_VALUES") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogCustomAttributeDefinitionSellerVisibility("SELLER_VISIBILITY_READ_WRITE_VALUES"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCatalogCustomAttributeDefinitionSellerVisibilityFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCatalogCustomAttributeDefinitionSellerVisibilityFromString("SELLER_VISIBILITY_HIDDEN") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCatalogCustomAttributeDefinitionType(t *testing.T) { + t.Run("NewFromString_STRING", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogCustomAttributeDefinitionTypeFromString("STRING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogCustomAttributeDefinitionType("STRING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BOOLEAN", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogCustomAttributeDefinitionTypeFromString("BOOLEAN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogCustomAttributeDefinitionType("BOOLEAN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NUMBER", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogCustomAttributeDefinitionTypeFromString("NUMBER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogCustomAttributeDefinitionType("NUMBER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SELECTION", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogCustomAttributeDefinitionTypeFromString("SELECTION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogCustomAttributeDefinitionType("SELECTION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCatalogCustomAttributeDefinitionTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCatalogCustomAttributeDefinitionTypeFromString("STRING") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCatalogDiscountModifyTaxBasis(t *testing.T) { + t.Run("NewFromString_MODIFY_TAX_BASIS", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogDiscountModifyTaxBasisFromString("MODIFY_TAX_BASIS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogDiscountModifyTaxBasis("MODIFY_TAX_BASIS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DO_NOT_MODIFY_TAX_BASIS", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogDiscountModifyTaxBasisFromString("DO_NOT_MODIFY_TAX_BASIS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogDiscountModifyTaxBasis("DO_NOT_MODIFY_TAX_BASIS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCatalogDiscountModifyTaxBasisFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCatalogDiscountModifyTaxBasisFromString("MODIFY_TAX_BASIS") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCatalogDiscountType(t *testing.T) { + t.Run("NewFromString_FIXED_PERCENTAGE", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogDiscountTypeFromString("FIXED_PERCENTAGE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogDiscountType("FIXED_PERCENTAGE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FIXED_AMOUNT", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogDiscountTypeFromString("FIXED_AMOUNT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogDiscountType("FIXED_AMOUNT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VARIABLE_PERCENTAGE", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogDiscountTypeFromString("VARIABLE_PERCENTAGE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogDiscountType("VARIABLE_PERCENTAGE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VARIABLE_AMOUNT", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogDiscountTypeFromString("VARIABLE_AMOUNT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogDiscountType("VARIABLE_AMOUNT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCatalogDiscountTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCatalogDiscountTypeFromString("FIXED_PERCENTAGE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreference(t *testing.T) { + t.Run("NewFromString_DAIRY_FREE", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreferenceFromString("DAIRY_FREE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreference("DAIRY_FREE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GLUTEN_FREE", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreferenceFromString("GLUTEN_FREE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreference("GLUTEN_FREE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_HALAL", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreferenceFromString("HALAL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreference("HALAL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_KOSHER", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreferenceFromString("KOSHER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreference("KOSHER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NUT_FREE", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreferenceFromString("NUT_FREE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreference("NUT_FREE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VEGAN", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreferenceFromString("VEGAN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreference("VEGAN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VEGETARIAN", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreferenceFromString("VEGETARIAN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreference("VEGETARIAN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreferenceFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCatalogItemFoodAndBeverageDetailsDietaryPreferenceStandardDietaryPreferenceFromString("DAIRY_FREE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCatalogItemFoodAndBeverageDetailsDietaryPreferenceType(t *testing.T) { + t.Run("NewFromString_STANDARD", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemFoodAndBeverageDetailsDietaryPreferenceTypeFromString("STANDARD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemFoodAndBeverageDetailsDietaryPreferenceType("STANDARD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CUSTOM", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemFoodAndBeverageDetailsDietaryPreferenceTypeFromString("CUSTOM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemFoodAndBeverageDetailsDietaryPreferenceType("CUSTOM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCatalogItemFoodAndBeverageDetailsDietaryPreferenceTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCatalogItemFoodAndBeverageDetailsDietaryPreferenceTypeFromString("STANDARD") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCatalogItemFoodAndBeverageDetailsIngredientStandardIngredient(t *testing.T) { + t.Run("NewFromString_CELERY", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemFoodAndBeverageDetailsIngredientStandardIngredientFromString("CELERY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient("CELERY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CRUSTACEANS", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemFoodAndBeverageDetailsIngredientStandardIngredientFromString("CRUSTACEANS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient("CRUSTACEANS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EGGS", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemFoodAndBeverageDetailsIngredientStandardIngredientFromString("EGGS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient("EGGS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FISH", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemFoodAndBeverageDetailsIngredientStandardIngredientFromString("FISH") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient("FISH"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GLUTEN", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemFoodAndBeverageDetailsIngredientStandardIngredientFromString("GLUTEN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient("GLUTEN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LUPIN", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemFoodAndBeverageDetailsIngredientStandardIngredientFromString("LUPIN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient("LUPIN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MILK", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemFoodAndBeverageDetailsIngredientStandardIngredientFromString("MILK") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient("MILK"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MOLLUSCS", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemFoodAndBeverageDetailsIngredientStandardIngredientFromString("MOLLUSCS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient("MOLLUSCS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MUSTARD", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemFoodAndBeverageDetailsIngredientStandardIngredientFromString("MUSTARD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient("MUSTARD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PEANUTS", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemFoodAndBeverageDetailsIngredientStandardIngredientFromString("PEANUTS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient("PEANUTS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SESAME", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemFoodAndBeverageDetailsIngredientStandardIngredientFromString("SESAME") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient("SESAME"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SOY", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemFoodAndBeverageDetailsIngredientStandardIngredientFromString("SOY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient("SOY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SULPHITES", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemFoodAndBeverageDetailsIngredientStandardIngredientFromString("SULPHITES") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient("SULPHITES"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TREE_NUTS", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemFoodAndBeverageDetailsIngredientStandardIngredientFromString("TREE_NUTS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemFoodAndBeverageDetailsIngredientStandardIngredient("TREE_NUTS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCatalogItemFoodAndBeverageDetailsIngredientStandardIngredientFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCatalogItemFoodAndBeverageDetailsIngredientStandardIngredientFromString("CELERY") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCatalogItemProductType(t *testing.T) { + t.Run("NewFromString_REGULAR", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemProductTypeFromString("REGULAR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemProductType("REGULAR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GIFT_CARD", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemProductTypeFromString("GIFT_CARD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemProductType("GIFT_CARD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_APPOINTMENTS_SERVICE", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemProductTypeFromString("APPOINTMENTS_SERVICE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemProductType("APPOINTMENTS_SERVICE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FOOD_AND_BEV", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemProductTypeFromString("FOOD_AND_BEV") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemProductType("FOOD_AND_BEV"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EVENT", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemProductTypeFromString("EVENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemProductType("EVENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DIGITAL", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemProductTypeFromString("DIGITAL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemProductType("DIGITAL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DONATION", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemProductTypeFromString("DONATION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemProductType("DONATION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LEGACY_SQUARE_ONLINE_SERVICE", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemProductTypeFromString("LEGACY_SQUARE_ONLINE_SERVICE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemProductType("LEGACY_SQUARE_ONLINE_SERVICE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LEGACY_SQUARE_ONLINE_MEMBERSHIP", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogItemProductTypeFromString("LEGACY_SQUARE_ONLINE_MEMBERSHIP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogItemProductType("LEGACY_SQUARE_ONLINE_MEMBERSHIP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCatalogItemProductTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCatalogItemProductTypeFromString("REGULAR") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCatalogModifierListModifierType(t *testing.T) { + t.Run("NewFromString_LIST", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogModifierListModifierTypeFromString("LIST") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogModifierListModifierType("LIST"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TEXT", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogModifierListModifierTypeFromString("TEXT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogModifierListModifierType("TEXT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCatalogModifierListModifierTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCatalogModifierListModifierTypeFromString("LIST") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCatalogModifierListSelectionType(t *testing.T) { + t.Run("NewFromString_SINGLE", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogModifierListSelectionTypeFromString("SINGLE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogModifierListSelectionType("SINGLE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MULTIPLE", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogModifierListSelectionTypeFromString("MULTIPLE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogModifierListSelectionType("MULTIPLE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCatalogModifierListSelectionTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCatalogModifierListSelectionTypeFromString("SINGLE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCatalogModifierToggleOverrideType(t *testing.T) { + t.Run("NewFromString_NO", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogModifierToggleOverrideTypeFromString("NO") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogModifierToggleOverrideType("NO"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_YES", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogModifierToggleOverrideTypeFromString("YES") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogModifierToggleOverrideType("YES"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NOT_SET", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogModifierToggleOverrideTypeFromString("NOT_SET") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogModifierToggleOverrideType("NOT_SET"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCatalogModifierToggleOverrideTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCatalogModifierToggleOverrideTypeFromString("NO") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCatalogObjectType(t *testing.T) { + t.Run("NewFromString_ITEM", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogObjectTypeFromString("ITEM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogObjectType("ITEM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IMAGE", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogObjectTypeFromString("IMAGE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogObjectType("IMAGE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CATEGORY", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogObjectTypeFromString("CATEGORY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogObjectType("CATEGORY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ITEM_VARIATION", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogObjectTypeFromString("ITEM_VARIATION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogObjectType("ITEM_VARIATION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TAX", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogObjectTypeFromString("TAX") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogObjectType("TAX"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DISCOUNT", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogObjectTypeFromString("DISCOUNT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogObjectType("DISCOUNT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MODIFIER_LIST", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogObjectTypeFromString("MODIFIER_LIST") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogObjectType("MODIFIER_LIST"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MODIFIER", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogObjectTypeFromString("MODIFIER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogObjectType("MODIFIER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PRICING_RULE", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogObjectTypeFromString("PRICING_RULE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogObjectType("PRICING_RULE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PRODUCT_SET", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogObjectTypeFromString("PRODUCT_SET") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogObjectType("PRODUCT_SET"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TIME_PERIOD", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogObjectTypeFromString("TIME_PERIOD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogObjectType("TIME_PERIOD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MEASUREMENT_UNIT", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogObjectTypeFromString("MEASUREMENT_UNIT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogObjectType("MEASUREMENT_UNIT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SUBSCRIPTION_PLAN_VARIATION", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogObjectTypeFromString("SUBSCRIPTION_PLAN_VARIATION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogObjectType("SUBSCRIPTION_PLAN_VARIATION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ITEM_OPTION", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogObjectTypeFromString("ITEM_OPTION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogObjectType("ITEM_OPTION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ITEM_OPTION_VAL", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogObjectTypeFromString("ITEM_OPTION_VAL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogObjectType("ITEM_OPTION_VAL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CUSTOM_ATTRIBUTE_DEFINITION", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogObjectTypeFromString("CUSTOM_ATTRIBUTE_DEFINITION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogObjectType("CUSTOM_ATTRIBUTE_DEFINITION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_QUICK_AMOUNTS_SETTINGS", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogObjectTypeFromString("QUICK_AMOUNTS_SETTINGS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogObjectType("QUICK_AMOUNTS_SETTINGS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SUBSCRIPTION_PLAN", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogObjectTypeFromString("SUBSCRIPTION_PLAN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogObjectType("SUBSCRIPTION_PLAN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AVAILABILITY_PERIOD", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogObjectTypeFromString("AVAILABILITY_PERIOD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogObjectType("AVAILABILITY_PERIOD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCatalogObjectTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCatalogObjectTypeFromString("ITEM") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCatalogPricingType(t *testing.T) { + t.Run("NewFromString_FIXED_PRICING", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogPricingTypeFromString("FIXED_PRICING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogPricingType("FIXED_PRICING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VARIABLE_PRICING", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogPricingTypeFromString("VARIABLE_PRICING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogPricingType("VARIABLE_PRICING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCatalogPricingTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCatalogPricingTypeFromString("FIXED_PRICING") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCatalogQuickAmountType(t *testing.T) { + t.Run("NewFromString_QUICK_AMOUNT_TYPE_MANUAL", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogQuickAmountTypeFromString("QUICK_AMOUNT_TYPE_MANUAL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogQuickAmountType("QUICK_AMOUNT_TYPE_MANUAL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_QUICK_AMOUNT_TYPE_AUTO", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogQuickAmountTypeFromString("QUICK_AMOUNT_TYPE_AUTO") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogQuickAmountType("QUICK_AMOUNT_TYPE_AUTO"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCatalogQuickAmountTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCatalogQuickAmountTypeFromString("QUICK_AMOUNT_TYPE_MANUAL") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCatalogQuickAmountsSettingsOption(t *testing.T) { + t.Run("NewFromString_DISABLED", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogQuickAmountsSettingsOptionFromString("DISABLED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogQuickAmountsSettingsOption("DISABLED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MANUAL", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogQuickAmountsSettingsOptionFromString("MANUAL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogQuickAmountsSettingsOption("MANUAL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AUTO", func(t *testing.T) { + t.Parallel() + val, err := NewCatalogQuickAmountsSettingsOptionFromString("AUTO") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CatalogQuickAmountsSettingsOption("AUTO"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCatalogQuickAmountsSettingsOptionFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCatalogQuickAmountsSettingsOptionFromString("DISABLED") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCheckoutOptionsPaymentType(t *testing.T) { + t.Run("NewFromString_CARD_PRESENT", func(t *testing.T) { + t.Parallel() + val, err := NewCheckoutOptionsPaymentTypeFromString("CARD_PRESENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CheckoutOptionsPaymentType("CARD_PRESENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MANUAL_CARD_ENTRY", func(t *testing.T) { + t.Parallel() + val, err := NewCheckoutOptionsPaymentTypeFromString("MANUAL_CARD_ENTRY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CheckoutOptionsPaymentType("MANUAL_CARD_ENTRY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FELICA_ID", func(t *testing.T) { + t.Parallel() + val, err := NewCheckoutOptionsPaymentTypeFromString("FELICA_ID") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CheckoutOptionsPaymentType("FELICA_ID"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FELICA_QUICPAY", func(t *testing.T) { + t.Parallel() + val, err := NewCheckoutOptionsPaymentTypeFromString("FELICA_QUICPAY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CheckoutOptionsPaymentType("FELICA_QUICPAY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FELICA_TRANSPORTATION_GROUP", func(t *testing.T) { + t.Parallel() + val, err := NewCheckoutOptionsPaymentTypeFromString("FELICA_TRANSPORTATION_GROUP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CheckoutOptionsPaymentType("FELICA_TRANSPORTATION_GROUP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FELICA_ALL", func(t *testing.T) { + t.Parallel() + val, err := NewCheckoutOptionsPaymentTypeFromString("FELICA_ALL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CheckoutOptionsPaymentType("FELICA_ALL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PAYPAY", func(t *testing.T) { + t.Parallel() + val, err := NewCheckoutOptionsPaymentTypeFromString("PAYPAY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CheckoutOptionsPaymentType("PAYPAY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_QR_CODE", func(t *testing.T) { + t.Parallel() + val, err := NewCheckoutOptionsPaymentTypeFromString("QR_CODE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CheckoutOptionsPaymentType("QR_CODE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCheckoutOptionsPaymentTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCheckoutOptionsPaymentTypeFromString("CARD_PRESENT") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCountry(t *testing.T) { + t.Run("NewFromString_ZZ", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("ZZ") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("ZZ"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AD", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("AD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("AD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AE", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("AE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("AE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AF", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("AF") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("AF"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AG", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("AG") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("AG"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AI", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("AI") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("AI"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AL", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("AL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("AL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AM", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("AM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("AM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AO", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("AO") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("AO"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AQ", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("AQ") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("AQ"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AR", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("AR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("AR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AS", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("AS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("AS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AT", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AU", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("AU") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("AU"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AW", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("AW") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("AW"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AX", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("AX") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("AX"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AZ", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("AZ") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("AZ"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BA", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("BA") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("BA"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BB", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("BB") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("BB"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BD", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("BD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("BD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BE", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("BE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("BE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BF", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("BF") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("BF"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BG", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("BG") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("BG"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BH", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("BH") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("BH"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BI", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("BI") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("BI"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BJ", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("BJ") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("BJ"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BL", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("BL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("BL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BM", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("BM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("BM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BN", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("BN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("BN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BO", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("BO") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("BO"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BQ", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("BQ") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("BQ"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BR", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("BR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("BR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BS", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("BS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("BS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BT", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("BT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("BT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BV", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("BV") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("BV"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BW", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("BW") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("BW"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BY", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("BY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("BY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BZ", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("BZ") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("BZ"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CA", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("CA") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("CA"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CC", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("CC") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("CC"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CD", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("CD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("CD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CF", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("CF") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("CF"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CG", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("CG") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("CG"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CH", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("CH") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("CH"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CI", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("CI") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("CI"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CK", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("CK") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("CK"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CL", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("CL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("CL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CM", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("CM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("CM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CN", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("CN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("CN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CO", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("CO") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("CO"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CR", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("CR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("CR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CU", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("CU") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("CU"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CV", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("CV") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("CV"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CW", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("CW") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("CW"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CX", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("CX") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("CX"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CY", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("CY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("CY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CZ", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("CZ") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("CZ"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DE", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("DE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("DE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DJ", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("DJ") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("DJ"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DK", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("DK") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("DK"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DM", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("DM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("DM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DO", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("DO") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("DO"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DZ", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("DZ") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("DZ"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EC", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("EC") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("EC"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EE", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("EE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("EE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EG", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("EG") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("EG"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EH", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("EH") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("EH"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ER", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("ER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("ER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ES", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("ES") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("ES"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ET", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("ET") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("ET"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FI", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("FI") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("FI"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FJ", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("FJ") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("FJ"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FK", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("FK") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("FK"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FM", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("FM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("FM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FO", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("FO") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("FO"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FR", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("FR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("FR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GA", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("GA") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("GA"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GB", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("GB") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("GB"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GD", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("GD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("GD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GE", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("GE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("GE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GF", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("GF") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("GF"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GG", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("GG") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("GG"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GH", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("GH") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("GH"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GI", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("GI") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("GI"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GL", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("GL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("GL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GM", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("GM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("GM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GN", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("GN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("GN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GP", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("GP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("GP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GQ", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("GQ") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("GQ"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GR", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("GR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("GR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GS", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("GS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("GS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GT", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("GT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("GT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GU", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("GU") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("GU"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GW", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("GW") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("GW"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GY", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("GY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("GY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_HK", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("HK") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("HK"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_HM", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("HM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("HM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_HN", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("HN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("HN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_HR", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("HR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("HR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_HT", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("HT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("HT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_HU", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("HU") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("HU"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ID", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("ID") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("ID"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IE", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("IE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("IE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IL", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("IL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("IL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IM", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("IM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("IM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IN", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("IN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("IN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IO", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("IO") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("IO"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IQ", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("IQ") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("IQ"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IR", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("IR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("IR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IS", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("IS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("IS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IT", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("IT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("IT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_JE", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("JE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("JE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_JM", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("JM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("JM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_JO", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("JO") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("JO"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_JP", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("JP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("JP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_KE", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("KE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("KE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_KG", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("KG") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("KG"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_KH", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("KH") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("KH"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_KI", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("KI") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("KI"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_KM", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("KM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("KM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_KN", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("KN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("KN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_KP", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("KP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("KP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_KR", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("KR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("KR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_KW", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("KW") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("KW"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_KY", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("KY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("KY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_KZ", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("KZ") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("KZ"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LA", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("LA") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("LA"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LB", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("LB") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("LB"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LC", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("LC") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("LC"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LI", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("LI") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("LI"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LK", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("LK") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("LK"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LR", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("LR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("LR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LS", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("LS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("LS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LT", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("LT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("LT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LU", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("LU") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("LU"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LV", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("LV") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("LV"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LY", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("LY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("LY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MA", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("MA") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("MA"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MC", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("MC") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("MC"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MD", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("MD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("MD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ME", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("ME") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("ME"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MF", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("MF") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("MF"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MG", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("MG") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("MG"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MH", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("MH") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("MH"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MK", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("MK") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("MK"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ML", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("ML") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("ML"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MM", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("MM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("MM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MN", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("MN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("MN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MO", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("MO") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("MO"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MP", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("MP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("MP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MQ", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("MQ") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("MQ"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MR", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("MR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("MR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MS", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("MS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("MS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MT", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("MT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("MT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MU", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("MU") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("MU"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MV", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("MV") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("MV"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MW", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("MW") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("MW"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MX", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("MX") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("MX"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MY", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("MY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("MY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MZ", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("MZ") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("MZ"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NA", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("NA") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("NA"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NC", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("NC") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("NC"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NE", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("NE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("NE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NF", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("NF") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("NF"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NG", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("NG") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("NG"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NI", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("NI") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("NI"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NL", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("NL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("NL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NO", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("NO") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("NO"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NP", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("NP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("NP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NR", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("NR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("NR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NU", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("NU") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("NU"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NZ", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("NZ") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("NZ"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_OM", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("OM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("OM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PA", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("PA") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("PA"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PE", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("PE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("PE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PF", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("PF") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("PF"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PG", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("PG") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("PG"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PH", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("PH") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("PH"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PK", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("PK") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("PK"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PL", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("PL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("PL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PM", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("PM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("PM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PN", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("PN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("PN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PR", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("PR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("PR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PS", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("PS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("PS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PT", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("PT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("PT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PW", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("PW") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("PW"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PY", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("PY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("PY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_QA", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("QA") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("QA"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RE", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("RE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("RE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RO", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("RO") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("RO"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RS", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("RS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("RS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RU", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("RU") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("RU"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RW", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("RW") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("RW"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SA", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("SA") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("SA"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SB", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("SB") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("SB"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SC", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("SC") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("SC"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SD", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("SD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("SD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SE", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("SE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("SE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SG", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("SG") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("SG"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SH", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("SH") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("SH"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SI", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("SI") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("SI"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SJ", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("SJ") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("SJ"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SK", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("SK") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("SK"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SL", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("SL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("SL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SM", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("SM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("SM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SN", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("SN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("SN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SO", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("SO") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("SO"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SR", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("SR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("SR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SS", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("SS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("SS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ST", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("ST") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("ST"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SV", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("SV") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("SV"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SX", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("SX") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("SX"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SY", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("SY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("SY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SZ", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("SZ") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("SZ"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TC", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("TC") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("TC"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TD", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("TD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("TD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TF", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("TF") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("TF"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TG", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("TG") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("TG"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TH", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("TH") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("TH"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TJ", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("TJ") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("TJ"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TK", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("TK") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("TK"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TL", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("TL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("TL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TM", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("TM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("TM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TN", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("TN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("TN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TO", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("TO") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("TO"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TR", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("TR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("TR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TT", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("TT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("TT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TV", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("TV") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("TV"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TW", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("TW") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("TW"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TZ", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("TZ") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("TZ"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UA", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("UA") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("UA"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UG", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("UG") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("UG"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UM", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("UM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("UM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_US", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("US") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("US"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UY", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("UY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("UY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UZ", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("UZ") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("UZ"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VA", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("VA") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("VA"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VC", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("VC") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("VC"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VE", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("VE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("VE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VG", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("VG") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("VG"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VI", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("VI") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("VI"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VN", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("VN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("VN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VU", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("VU") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("VU"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_WF", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("WF") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("WF"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_WS", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("WS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("WS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_YE", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("YE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("YE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_YT", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("YT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("YT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ZA", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("ZA") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("ZA"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ZM", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("ZM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("ZM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ZW", func(t *testing.T) { + t.Parallel() + val, err := NewCountryFromString("ZW") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Country("ZW"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCountryFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCountryFromString("ZZ") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCurrency(t *testing.T) { + t.Run("NewFromString_UNKNOWN_CURRENCY", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("UNKNOWN_CURRENCY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("UNKNOWN_CURRENCY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AED", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("AED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("AED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AFN", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("AFN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("AFN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ALL", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("ALL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("ALL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AMD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("AMD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("AMD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ANG", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("ANG") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("ANG"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AOA", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("AOA") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("AOA"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ARS", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("ARS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("ARS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AUD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("AUD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("AUD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AWG", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("AWG") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("AWG"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AZN", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("AZN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("AZN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BAM", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("BAM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("BAM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BBD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("BBD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("BBD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BDT", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("BDT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("BDT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BGN", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("BGN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("BGN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BHD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("BHD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("BHD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BIF", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("BIF") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("BIF"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BMD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("BMD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("BMD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BND", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("BND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("BND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BOB", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("BOB") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("BOB"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BOV", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("BOV") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("BOV"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BRL", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("BRL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("BRL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BSD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("BSD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("BSD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BTN", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("BTN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("BTN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BWP", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("BWP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("BWP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BYR", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("BYR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("BYR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BZD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("BZD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("BZD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CAD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("CAD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("CAD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CDF", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("CDF") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("CDF"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CHE", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("CHE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("CHE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CHF", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("CHF") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("CHF"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CHW", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("CHW") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("CHW"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CLF", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("CLF") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("CLF"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CLP", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("CLP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("CLP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CNY", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("CNY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("CNY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_COP", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("COP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("COP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_COU", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("COU") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("COU"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CRC", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("CRC") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("CRC"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CUC", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("CUC") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("CUC"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CUP", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("CUP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("CUP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CVE", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("CVE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("CVE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CZK", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("CZK") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("CZK"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DJF", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("DJF") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("DJF"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DKK", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("DKK") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("DKK"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DOP", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("DOP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("DOP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DZD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("DZD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("DZD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EGP", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("EGP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("EGP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ERN", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("ERN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("ERN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ETB", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("ETB") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("ETB"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EUR", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("EUR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("EUR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FJD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("FJD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("FJD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FKP", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("FKP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("FKP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GBP", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("GBP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("GBP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GEL", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("GEL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("GEL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GHS", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("GHS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("GHS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GIP", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("GIP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("GIP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GMD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("GMD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("GMD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GNF", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("GNF") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("GNF"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GTQ", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("GTQ") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("GTQ"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GYD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("GYD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("GYD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_HKD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("HKD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("HKD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_HNL", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("HNL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("HNL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_HRK", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("HRK") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("HRK"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_HTG", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("HTG") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("HTG"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_HUF", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("HUF") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("HUF"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IDR", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("IDR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("IDR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ILS", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("ILS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("ILS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INR", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("INR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("INR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IQD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("IQD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("IQD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IRR", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("IRR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("IRR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ISK", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("ISK") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("ISK"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_JMD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("JMD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("JMD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_JOD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("JOD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("JOD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_JPY", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("JPY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("JPY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_KES", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("KES") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("KES"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_KGS", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("KGS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("KGS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_KHR", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("KHR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("KHR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_KMF", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("KMF") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("KMF"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_KPW", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("KPW") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("KPW"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_KRW", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("KRW") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("KRW"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_KWD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("KWD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("KWD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_KYD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("KYD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("KYD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_KZT", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("KZT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("KZT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LAK", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("LAK") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("LAK"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LBP", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("LBP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("LBP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LKR", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("LKR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("LKR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LRD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("LRD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("LRD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LSL", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("LSL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("LSL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LTL", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("LTL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("LTL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LVL", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("LVL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("LVL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LYD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("LYD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("LYD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MAD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("MAD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("MAD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MDL", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("MDL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("MDL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MGA", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("MGA") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("MGA"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MKD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("MKD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("MKD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MMK", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("MMK") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("MMK"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MNT", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("MNT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("MNT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MOP", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("MOP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("MOP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MRO", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("MRO") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("MRO"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MUR", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("MUR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("MUR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MVR", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("MVR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("MVR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MWK", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("MWK") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("MWK"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MXN", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("MXN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("MXN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MXV", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("MXV") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("MXV"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MYR", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("MYR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("MYR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MZN", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("MZN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("MZN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NAD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("NAD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("NAD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NGN", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("NGN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("NGN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NIO", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("NIO") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("NIO"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NOK", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("NOK") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("NOK"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NPR", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("NPR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("NPR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NZD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("NZD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("NZD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_OMR", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("OMR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("OMR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PAB", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("PAB") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("PAB"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PEN", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("PEN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("PEN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PGK", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("PGK") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("PGK"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PHP", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("PHP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("PHP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PKR", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("PKR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("PKR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PLN", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("PLN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("PLN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PYG", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("PYG") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("PYG"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_QAR", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("QAR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("QAR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RON", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("RON") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("RON"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RSD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("RSD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("RSD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RUB", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("RUB") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("RUB"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RWF", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("RWF") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("RWF"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SAR", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("SAR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("SAR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SBD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("SBD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("SBD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SCR", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("SCR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("SCR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SDG", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("SDG") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("SDG"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SEK", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("SEK") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("SEK"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SGD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("SGD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("SGD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SHP", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("SHP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("SHP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SLL", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("SLL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("SLL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SLE", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("SLE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("SLE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SOS", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("SOS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("SOS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SRD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("SRD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("SRD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SSP", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("SSP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("SSP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_STD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("STD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("STD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SVC", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("SVC") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("SVC"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SYP", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("SYP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("SYP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SZL", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("SZL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("SZL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_THB", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("THB") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("THB"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TJS", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("TJS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("TJS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TMT", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("TMT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("TMT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TND", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("TND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("TND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TOP", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("TOP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("TOP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TRY", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("TRY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("TRY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TTD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("TTD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("TTD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TWD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("TWD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("TWD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TZS", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("TZS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("TZS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UAH", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("UAH") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("UAH"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UGX", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("UGX") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("UGX"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_USD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("USD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("USD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_USN", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("USN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("USN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_USS", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("USS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("USS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UYI", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("UYI") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("UYI"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UYU", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("UYU") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("UYU"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UZS", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("UZS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("UZS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VEF", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("VEF") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("VEF"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VND", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("VND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("VND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VUV", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("VUV") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("VUV"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_WST", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("WST") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("WST"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_XAF", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("XAF") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("XAF"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_XAG", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("XAG") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("XAG"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_XAU", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("XAU") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("XAU"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_XBA", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("XBA") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("XBA"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_XBB", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("XBB") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("XBB"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_XBC", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("XBC") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("XBC"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_XBD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("XBD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("XBD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_XCD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("XCD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("XCD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_XDR", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("XDR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("XDR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_XOF", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("XOF") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("XOF"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_XPD", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("XPD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("XPD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_XPF", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("XPF") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("XPF"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_XPT", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("XPT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("XPT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_XTS", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("XTS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("XTS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_XXX", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("XXX") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("XXX"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_YER", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("YER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("YER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ZAR", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("ZAR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("ZAR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ZMK", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("ZMK") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("ZMK"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ZMW", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("ZMW") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("ZMW"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BTC", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("BTC") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("BTC"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_XUS", func(t *testing.T) { + t.Parallel() + val, err := NewCurrencyFromString("XUS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Currency("XUS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCurrencyFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCurrencyFromString("UNKNOWN_CURRENCY") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumCustomAttributeDefinitionVisibility(t *testing.T) { + t.Run("NewFromString_VISIBILITY_HIDDEN", func(t *testing.T) { + t.Parallel() + val, err := NewCustomAttributeDefinitionVisibilityFromString("VISIBILITY_HIDDEN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CustomAttributeDefinitionVisibility("VISIBILITY_HIDDEN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VISIBILITY_READ_ONLY", func(t *testing.T) { + t.Parallel() + val, err := NewCustomAttributeDefinitionVisibilityFromString("VISIBILITY_READ_ONLY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CustomAttributeDefinitionVisibility("VISIBILITY_READ_ONLY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VISIBILITY_READ_WRITE_VALUES", func(t *testing.T) { + t.Parallel() + val, err := NewCustomAttributeDefinitionVisibilityFromString("VISIBILITY_READ_WRITE_VALUES") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, CustomAttributeDefinitionVisibility("VISIBILITY_READ_WRITE_VALUES"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewCustomAttributeDefinitionVisibilityFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewCustomAttributeDefinitionVisibilityFromString("VISIBILITY_HIDDEN") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumDataCollectionOptionsInputType(t *testing.T) { + t.Run("NewFromString_EMAIL", func(t *testing.T) { + t.Parallel() + val, err := NewDataCollectionOptionsInputTypeFromString("EMAIL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DataCollectionOptionsInputType("EMAIL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PHONE_NUMBER", func(t *testing.T) { + t.Parallel() + val, err := NewDataCollectionOptionsInputTypeFromString("PHONE_NUMBER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DataCollectionOptionsInputType("PHONE_NUMBER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewDataCollectionOptionsInputTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewDataCollectionOptionsInputTypeFromString("EMAIL") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumDayOfWeek(t *testing.T) { + t.Run("NewFromString_SUN", func(t *testing.T) { + t.Parallel() + val, err := NewDayOfWeekFromString("SUN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DayOfWeek("SUN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MON", func(t *testing.T) { + t.Parallel() + val, err := NewDayOfWeekFromString("MON") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DayOfWeek("MON"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TUE", func(t *testing.T) { + t.Parallel() + val, err := NewDayOfWeekFromString("TUE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DayOfWeek("TUE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_WED", func(t *testing.T) { + t.Parallel() + val, err := NewDayOfWeekFromString("WED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DayOfWeek("WED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_THU", func(t *testing.T) { + t.Parallel() + val, err := NewDayOfWeekFromString("THU") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DayOfWeek("THU"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FRI", func(t *testing.T) { + t.Parallel() + val, err := NewDayOfWeekFromString("FRI") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DayOfWeek("FRI"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SAT", func(t *testing.T) { + t.Parallel() + val, err := NewDayOfWeekFromString("SAT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DayOfWeek("SAT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewDayOfWeekFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewDayOfWeekFromString("SUN") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumDeviceCodeStatus(t *testing.T) { + t.Run("NewFromString_UNKNOWN", func(t *testing.T) { + t.Parallel() + val, err := NewDeviceCodeStatusFromString("UNKNOWN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DeviceCodeStatus("UNKNOWN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UNPAIRED", func(t *testing.T) { + t.Parallel() + val, err := NewDeviceCodeStatusFromString("UNPAIRED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DeviceCodeStatus("UNPAIRED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PAIRED", func(t *testing.T) { + t.Parallel() + val, err := NewDeviceCodeStatusFromString("PAIRED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DeviceCodeStatus("PAIRED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EXPIRED", func(t *testing.T) { + t.Parallel() + val, err := NewDeviceCodeStatusFromString("EXPIRED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DeviceCodeStatus("EXPIRED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewDeviceCodeStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewDeviceCodeStatusFromString("UNKNOWN") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumDisputeEvidenceType(t *testing.T) { + t.Run("NewFromString_GENERIC_EVIDENCE", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeEvidenceTypeFromString("GENERIC_EVIDENCE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeEvidenceType("GENERIC_EVIDENCE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ONLINE_OR_APP_ACCESS_LOG", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeEvidenceTypeFromString("ONLINE_OR_APP_ACCESS_LOG") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeEvidenceType("ONLINE_OR_APP_ACCESS_LOG"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AUTHORIZATION_DOCUMENTATION", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeEvidenceTypeFromString("AUTHORIZATION_DOCUMENTATION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeEvidenceType("AUTHORIZATION_DOCUMENTATION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CANCELLATION_OR_REFUND_DOCUMENTATION", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeEvidenceTypeFromString("CANCELLATION_OR_REFUND_DOCUMENTATION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeEvidenceType("CANCELLATION_OR_REFUND_DOCUMENTATION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CARDHOLDER_COMMUNICATION", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeEvidenceTypeFromString("CARDHOLDER_COMMUNICATION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeEvidenceType("CARDHOLDER_COMMUNICATION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CARDHOLDER_INFORMATION", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeEvidenceTypeFromString("CARDHOLDER_INFORMATION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeEvidenceType("CARDHOLDER_INFORMATION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PURCHASE_ACKNOWLEDGEMENT", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeEvidenceTypeFromString("PURCHASE_ACKNOWLEDGEMENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeEvidenceType("PURCHASE_ACKNOWLEDGEMENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DUPLICATE_CHARGE_DOCUMENTATION", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeEvidenceTypeFromString("DUPLICATE_CHARGE_DOCUMENTATION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeEvidenceType("DUPLICATE_CHARGE_DOCUMENTATION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PRODUCT_OR_SERVICE_DESCRIPTION", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeEvidenceTypeFromString("PRODUCT_OR_SERVICE_DESCRIPTION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeEvidenceType("PRODUCT_OR_SERVICE_DESCRIPTION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RECEIPT", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeEvidenceTypeFromString("RECEIPT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeEvidenceType("RECEIPT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SERVICE_RECEIVED_DOCUMENTATION", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeEvidenceTypeFromString("SERVICE_RECEIVED_DOCUMENTATION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeEvidenceType("SERVICE_RECEIVED_DOCUMENTATION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PROOF_OF_DELIVERY_DOCUMENTATION", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeEvidenceTypeFromString("PROOF_OF_DELIVERY_DOCUMENTATION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeEvidenceType("PROOF_OF_DELIVERY_DOCUMENTATION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RELATED_TRANSACTION_DOCUMENTATION", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeEvidenceTypeFromString("RELATED_TRANSACTION_DOCUMENTATION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeEvidenceType("RELATED_TRANSACTION_DOCUMENTATION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_REBUTTAL_EXPLANATION", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeEvidenceTypeFromString("REBUTTAL_EXPLANATION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeEvidenceType("REBUTTAL_EXPLANATION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TRACKING_NUMBER", func(t *testing.T) { + t.Parallel() + val, err := NewDisputeEvidenceTypeFromString("TRACKING_NUMBER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, DisputeEvidenceType("TRACKING_NUMBER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewDisputeEvidenceTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewDisputeEvidenceTypeFromString("GENERIC_EVIDENCE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumEcomVisibility(t *testing.T) { + t.Run("NewFromString_UNINDEXED", func(t *testing.T) { + t.Parallel() + val, err := NewEcomVisibilityFromString("UNINDEXED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, EcomVisibility("UNINDEXED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UNAVAILABLE", func(t *testing.T) { + t.Parallel() + val, err := NewEcomVisibilityFromString("UNAVAILABLE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, EcomVisibility("UNAVAILABLE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_HIDDEN", func(t *testing.T) { + t.Parallel() + val, err := NewEcomVisibilityFromString("HIDDEN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, EcomVisibility("HIDDEN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VISIBLE", func(t *testing.T) { + t.Parallel() + val, err := NewEcomVisibilityFromString("VISIBLE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, EcomVisibility("VISIBLE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewEcomVisibilityFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewEcomVisibilityFromString("UNINDEXED") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumErrorCategory(t *testing.T) { + t.Run("NewFromString_API_ERROR", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCategoryFromString("API_ERROR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCategory("API_ERROR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AUTHENTICATION_ERROR", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCategoryFromString("AUTHENTICATION_ERROR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCategory("AUTHENTICATION_ERROR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVALID_REQUEST_ERROR", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCategoryFromString("INVALID_REQUEST_ERROR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCategory("INVALID_REQUEST_ERROR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RATE_LIMIT_ERROR", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCategoryFromString("RATE_LIMIT_ERROR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCategory("RATE_LIMIT_ERROR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PAYMENT_METHOD_ERROR", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCategoryFromString("PAYMENT_METHOD_ERROR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCategory("PAYMENT_METHOD_ERROR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_REFUND_ERROR", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCategoryFromString("REFUND_ERROR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCategory("REFUND_ERROR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MERCHANT_SUBSCRIPTION_ERROR", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCategoryFromString("MERCHANT_SUBSCRIPTION_ERROR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCategory("MERCHANT_SUBSCRIPTION_ERROR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EXTERNAL_VENDOR_ERROR", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCategoryFromString("EXTERNAL_VENDOR_ERROR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCategory("EXTERNAL_VENDOR_ERROR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewErrorCategoryFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewErrorCategoryFromString("API_ERROR") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumErrorCode(t *testing.T) { + t.Run("NewFromString_INTERNAL_SERVER_ERROR", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INTERNAL_SERVER_ERROR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INTERNAL_SERVER_ERROR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UNAUTHORIZED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("UNAUTHORIZED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("UNAUTHORIZED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ACCESS_TOKEN_EXPIRED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("ACCESS_TOKEN_EXPIRED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("ACCESS_TOKEN_EXPIRED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ACCESS_TOKEN_REVOKED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("ACCESS_TOKEN_REVOKED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("ACCESS_TOKEN_REVOKED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CLIENT_DISABLED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("CLIENT_DISABLED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("CLIENT_DISABLED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FORBIDDEN", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("FORBIDDEN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("FORBIDDEN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INSUFFICIENT_SCOPES", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INSUFFICIENT_SCOPES") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INSUFFICIENT_SCOPES"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_APPLICATION_DISABLED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("APPLICATION_DISABLED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("APPLICATION_DISABLED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_V1_APPLICATION", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("V1_APPLICATION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("V1_APPLICATION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_V1_ACCESS_TOKEN", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("V1_ACCESS_TOKEN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("V1_ACCESS_TOKEN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CARD_PROCESSING_NOT_ENABLED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("CARD_PROCESSING_NOT_ENABLED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("CARD_PROCESSING_NOT_ENABLED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MERCHANT_SUBSCRIPTION_NOT_FOUND", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("MERCHANT_SUBSCRIPTION_NOT_FOUND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("MERCHANT_SUBSCRIPTION_NOT_FOUND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BAD_REQUEST", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("BAD_REQUEST") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("BAD_REQUEST"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MISSING_REQUIRED_PARAMETER", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("MISSING_REQUIRED_PARAMETER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("MISSING_REQUIRED_PARAMETER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INCORRECT_TYPE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INCORRECT_TYPE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INCORRECT_TYPE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVALID_TIME", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INVALID_TIME") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INVALID_TIME"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVALID_TIME_RANGE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INVALID_TIME_RANGE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INVALID_TIME_RANGE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVALID_VALUE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INVALID_VALUE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INVALID_VALUE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVALID_CURSOR", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INVALID_CURSOR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INVALID_CURSOR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UNKNOWN_QUERY_PARAMETER", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("UNKNOWN_QUERY_PARAMETER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("UNKNOWN_QUERY_PARAMETER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CONFLICTING_PARAMETERS", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("CONFLICTING_PARAMETERS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("CONFLICTING_PARAMETERS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EXPECTED_JSON_BODY", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("EXPECTED_JSON_BODY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("EXPECTED_JSON_BODY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVALID_SORT_ORDER", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INVALID_SORT_ORDER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INVALID_SORT_ORDER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VALUE_REGEX_MISMATCH", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("VALUE_REGEX_MISMATCH") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("VALUE_REGEX_MISMATCH"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VALUE_TOO_SHORT", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("VALUE_TOO_SHORT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("VALUE_TOO_SHORT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VALUE_TOO_LONG", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("VALUE_TOO_LONG") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("VALUE_TOO_LONG"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VALUE_TOO_LOW", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("VALUE_TOO_LOW") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("VALUE_TOO_LOW"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VALUE_TOO_HIGH", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("VALUE_TOO_HIGH") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("VALUE_TOO_HIGH"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VALUE_EMPTY", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("VALUE_EMPTY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("VALUE_EMPTY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ARRAY_LENGTH_TOO_LONG", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("ARRAY_LENGTH_TOO_LONG") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("ARRAY_LENGTH_TOO_LONG"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ARRAY_LENGTH_TOO_SHORT", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("ARRAY_LENGTH_TOO_SHORT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("ARRAY_LENGTH_TOO_SHORT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ARRAY_EMPTY", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("ARRAY_EMPTY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("ARRAY_EMPTY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EXPECTED_BOOLEAN", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("EXPECTED_BOOLEAN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("EXPECTED_BOOLEAN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EXPECTED_INTEGER", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("EXPECTED_INTEGER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("EXPECTED_INTEGER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EXPECTED_FLOAT", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("EXPECTED_FLOAT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("EXPECTED_FLOAT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EXPECTED_STRING", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("EXPECTED_STRING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("EXPECTED_STRING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EXPECTED_OBJECT", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("EXPECTED_OBJECT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("EXPECTED_OBJECT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EXPECTED_ARRAY", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("EXPECTED_ARRAY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("EXPECTED_ARRAY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EXPECTED_MAP", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("EXPECTED_MAP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("EXPECTED_MAP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EXPECTED_BASE64_ENCODED_BYTE_ARRAY", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("EXPECTED_BASE64_ENCODED_BYTE_ARRAY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("EXPECTED_BASE64_ENCODED_BYTE_ARRAY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVALID_ARRAY_VALUE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INVALID_ARRAY_VALUE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INVALID_ARRAY_VALUE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVALID_ENUM_VALUE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INVALID_ENUM_VALUE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INVALID_ENUM_VALUE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVALID_CONTENT_TYPE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INVALID_CONTENT_TYPE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INVALID_CONTENT_TYPE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVALID_FORM_VALUE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INVALID_FORM_VALUE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INVALID_FORM_VALUE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CUSTOMER_NOT_FOUND", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("CUSTOMER_NOT_FOUND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("CUSTOMER_NOT_FOUND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ONE_INSTRUMENT_EXPECTED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("ONE_INSTRUMENT_EXPECTED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("ONE_INSTRUMENT_EXPECTED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NO_FIELDS_SET", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("NO_FIELDS_SET") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("NO_FIELDS_SET"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TOO_MANY_MAP_ENTRIES", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("TOO_MANY_MAP_ENTRIES") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("TOO_MANY_MAP_ENTRIES"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MAP_KEY_LENGTH_TOO_SHORT", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("MAP_KEY_LENGTH_TOO_SHORT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("MAP_KEY_LENGTH_TOO_SHORT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MAP_KEY_LENGTH_TOO_LONG", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("MAP_KEY_LENGTH_TOO_LONG") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("MAP_KEY_LENGTH_TOO_LONG"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CUSTOMER_MISSING_NAME", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("CUSTOMER_MISSING_NAME") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("CUSTOMER_MISSING_NAME"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CUSTOMER_MISSING_EMAIL", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("CUSTOMER_MISSING_EMAIL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("CUSTOMER_MISSING_EMAIL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVALID_PAUSE_LENGTH", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INVALID_PAUSE_LENGTH") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INVALID_PAUSE_LENGTH"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVALID_DATE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INVALID_DATE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INVALID_DATE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UNSUPPORTED_COUNTRY", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("UNSUPPORTED_COUNTRY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("UNSUPPORTED_COUNTRY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UNSUPPORTED_CURRENCY", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("UNSUPPORTED_CURRENCY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("UNSUPPORTED_CURRENCY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_APPLE_TTP_PIN_TOKEN", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("APPLE_TTP_PIN_TOKEN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("APPLE_TTP_PIN_TOKEN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CARD_EXPIRED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("CARD_EXPIRED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("CARD_EXPIRED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVALID_EXPIRATION", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INVALID_EXPIRATION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INVALID_EXPIRATION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVALID_EXPIRATION_YEAR", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INVALID_EXPIRATION_YEAR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INVALID_EXPIRATION_YEAR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVALID_EXPIRATION_DATE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INVALID_EXPIRATION_DATE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INVALID_EXPIRATION_DATE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UNSUPPORTED_CARD_BRAND", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("UNSUPPORTED_CARD_BRAND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("UNSUPPORTED_CARD_BRAND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UNSUPPORTED_ENTRY_METHOD", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("UNSUPPORTED_ENTRY_METHOD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("UNSUPPORTED_ENTRY_METHOD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVALID_ENCRYPTED_CARD", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INVALID_ENCRYPTED_CARD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INVALID_ENCRYPTED_CARD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVALID_CARD", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INVALID_CARD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INVALID_CARD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PAYMENT_AMOUNT_MISMATCH", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("PAYMENT_AMOUNT_MISMATCH") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("PAYMENT_AMOUNT_MISMATCH"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GENERIC_DECLINE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("GENERIC_DECLINE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("GENERIC_DECLINE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CVV_FAILURE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("CVV_FAILURE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("CVV_FAILURE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ADDRESS_VERIFICATION_FAILURE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("ADDRESS_VERIFICATION_FAILURE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("ADDRESS_VERIFICATION_FAILURE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVALID_ACCOUNT", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INVALID_ACCOUNT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INVALID_ACCOUNT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CURRENCY_MISMATCH", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("CURRENCY_MISMATCH") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("CURRENCY_MISMATCH"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INSUFFICIENT_FUNDS", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INSUFFICIENT_FUNDS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INSUFFICIENT_FUNDS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INSUFFICIENT_PERMISSIONS", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INSUFFICIENT_PERMISSIONS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INSUFFICIENT_PERMISSIONS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CARDHOLDER_INSUFFICIENT_PERMISSIONS", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("CARDHOLDER_INSUFFICIENT_PERMISSIONS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("CARDHOLDER_INSUFFICIENT_PERMISSIONS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVALID_LOCATION", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INVALID_LOCATION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INVALID_LOCATION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TRANSACTION_LIMIT", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("TRANSACTION_LIMIT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("TRANSACTION_LIMIT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VOICE_FAILURE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("VOICE_FAILURE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("VOICE_FAILURE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PAN_FAILURE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("PAN_FAILURE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("PAN_FAILURE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EXPIRATION_FAILURE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("EXPIRATION_FAILURE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("EXPIRATION_FAILURE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CARD_NOT_SUPPORTED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("CARD_NOT_SUPPORTED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("CARD_NOT_SUPPORTED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_READER_DECLINED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("READER_DECLINED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("READER_DECLINED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVALID_PIN", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INVALID_PIN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INVALID_PIN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MISSING_PIN", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("MISSING_PIN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("MISSING_PIN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MISSING_ACCOUNT_TYPE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("MISSING_ACCOUNT_TYPE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("MISSING_ACCOUNT_TYPE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVALID_POSTAL_CODE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INVALID_POSTAL_CODE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INVALID_POSTAL_CODE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVALID_FEES", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INVALID_FEES") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INVALID_FEES"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MANUALLY_ENTERED_PAYMENT_NOT_SUPPORTED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("MANUALLY_ENTERED_PAYMENT_NOT_SUPPORTED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("MANUALLY_ENTERED_PAYMENT_NOT_SUPPORTED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PAYMENT_LIMIT_EXCEEDED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("PAYMENT_LIMIT_EXCEEDED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("PAYMENT_LIMIT_EXCEEDED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GIFT_CARD_AVAILABLE_AMOUNT", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("GIFT_CARD_AVAILABLE_AMOUNT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("GIFT_CARD_AVAILABLE_AMOUNT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ACCOUNT_UNUSABLE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("ACCOUNT_UNUSABLE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("ACCOUNT_UNUSABLE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BUYER_REFUSED_PAYMENT", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("BUYER_REFUSED_PAYMENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("BUYER_REFUSED_PAYMENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DELAYED_TRANSACTION_EXPIRED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("DELAYED_TRANSACTION_EXPIRED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("DELAYED_TRANSACTION_EXPIRED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DELAYED_TRANSACTION_CANCELED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("DELAYED_TRANSACTION_CANCELED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("DELAYED_TRANSACTION_CANCELED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DELAYED_TRANSACTION_CAPTURED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("DELAYED_TRANSACTION_CAPTURED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("DELAYED_TRANSACTION_CAPTURED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DELAYED_TRANSACTION_FAILED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("DELAYED_TRANSACTION_FAILED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("DELAYED_TRANSACTION_FAILED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CARD_TOKEN_EXPIRED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("CARD_TOKEN_EXPIRED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("CARD_TOKEN_EXPIRED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CARD_TOKEN_USED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("CARD_TOKEN_USED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("CARD_TOKEN_USED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AMOUNT_TOO_HIGH", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("AMOUNT_TOO_HIGH") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("AMOUNT_TOO_HIGH"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UNSUPPORTED_INSTRUMENT_TYPE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("UNSUPPORTED_INSTRUMENT_TYPE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("UNSUPPORTED_INSTRUMENT_TYPE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_REFUND_AMOUNT_INVALID", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("REFUND_AMOUNT_INVALID") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("REFUND_AMOUNT_INVALID"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_REFUND_ALREADY_PENDING", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("REFUND_ALREADY_PENDING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("REFUND_ALREADY_PENDING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PAYMENT_NOT_REFUNDABLE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("PAYMENT_NOT_REFUNDABLE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("PAYMENT_NOT_REFUNDABLE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PAYMENT_NOT_REFUNDABLE_DUE_TO_DISPUTE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("PAYMENT_NOT_REFUNDABLE_DUE_TO_DISPUTE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("PAYMENT_NOT_REFUNDABLE_DUE_TO_DISPUTE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_REFUND_ERROR_PAYMENT_NEEDS_COMPLETION", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("REFUND_ERROR_PAYMENT_NEEDS_COMPLETION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("REFUND_ERROR_PAYMENT_NEEDS_COMPLETION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_REFUND_DECLINED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("REFUND_DECLINED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("REFUND_DECLINED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INSUFFICIENT_PERMISSIONS_FOR_REFUND", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INSUFFICIENT_PERMISSIONS_FOR_REFUND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INSUFFICIENT_PERMISSIONS_FOR_REFUND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVALID_CARD_DATA", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INVALID_CARD_DATA") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INVALID_CARD_DATA"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SOURCE_USED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("SOURCE_USED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("SOURCE_USED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SOURCE_EXPIRED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("SOURCE_EXPIRED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("SOURCE_EXPIRED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UNSUPPORTED_LOYALTY_REWARD_TIER", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("UNSUPPORTED_LOYALTY_REWARD_TIER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("UNSUPPORTED_LOYALTY_REWARD_TIER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LOCATION_MISMATCH", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("LOCATION_MISMATCH") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("LOCATION_MISMATCH"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ORDER_UNPAID_NOT_RETURNABLE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("ORDER_UNPAID_NOT_RETURNABLE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("ORDER_UNPAID_NOT_RETURNABLE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PARTIAL_PAYMENT_DELAY_CAPTURE_NOT_SUPPORTED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("PARTIAL_PAYMENT_DELAY_CAPTURE_NOT_SUPPORTED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("PARTIAL_PAYMENT_DELAY_CAPTURE_NOT_SUPPORTED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IDEMPOTENCY_KEY_REUSED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("IDEMPOTENCY_KEY_REUSED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("IDEMPOTENCY_KEY_REUSED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UNEXPECTED_VALUE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("UNEXPECTED_VALUE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("UNEXPECTED_VALUE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SANDBOX_NOT_SUPPORTED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("SANDBOX_NOT_SUPPORTED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("SANDBOX_NOT_SUPPORTED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVALID_EMAIL_ADDRESS", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INVALID_EMAIL_ADDRESS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INVALID_EMAIL_ADDRESS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVALID_PHONE_NUMBER", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INVALID_PHONE_NUMBER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INVALID_PHONE_NUMBER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CHECKOUT_EXPIRED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("CHECKOUT_EXPIRED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("CHECKOUT_EXPIRED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BAD_CERTIFICATE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("BAD_CERTIFICATE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("BAD_CERTIFICATE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVALID_SQUARE_VERSION_FORMAT", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("INVALID_SQUARE_VERSION_FORMAT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("INVALID_SQUARE_VERSION_FORMAT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_API_VERSION_INCOMPATIBLE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("API_VERSION_INCOMPATIBLE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("API_VERSION_INCOMPATIBLE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CARD_PRESENCE_REQUIRED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("CARD_PRESENCE_REQUIRED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("CARD_PRESENCE_REQUIRED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UNSUPPORTED_SOURCE_TYPE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("UNSUPPORTED_SOURCE_TYPE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("UNSUPPORTED_SOURCE_TYPE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CARD_MISMATCH", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("CARD_MISMATCH") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("CARD_MISMATCH"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PLAID_ERROR", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("PLAID_ERROR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("PLAID_ERROR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PLAID_ERROR_ITEM_LOGIN_REQUIRED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("PLAID_ERROR_ITEM_LOGIN_REQUIRED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("PLAID_ERROR_ITEM_LOGIN_REQUIRED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PLAID_ERROR_RATE_LIMIT", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("PLAID_ERROR_RATE_LIMIT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("PLAID_ERROR_RATE_LIMIT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PAYMENT_SOURCE_NOT_ENABLED_FOR_TARGET", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("PAYMENT_SOURCE_NOT_ENABLED_FOR_TARGET") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("PAYMENT_SOURCE_NOT_ENABLED_FOR_TARGET"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CARD_DECLINED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("CARD_DECLINED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("CARD_DECLINED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VERIFY_CVV_FAILURE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("VERIFY_CVV_FAILURE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("VERIFY_CVV_FAILURE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VERIFY_AVS_FAILURE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("VERIFY_AVS_FAILURE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("VERIFY_AVS_FAILURE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CARD_DECLINED_CALL_ISSUER", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("CARD_DECLINED_CALL_ISSUER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("CARD_DECLINED_CALL_ISSUER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CARD_DECLINED_VERIFICATION_REQUIRED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("CARD_DECLINED_VERIFICATION_REQUIRED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("CARD_DECLINED_VERIFICATION_REQUIRED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BAD_EXPIRATION", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("BAD_EXPIRATION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("BAD_EXPIRATION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CHIP_INSERTION_REQUIRED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("CHIP_INSERTION_REQUIRED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("CHIP_INSERTION_REQUIRED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ALLOWABLE_PIN_TRIES_EXCEEDED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("ALLOWABLE_PIN_TRIES_EXCEEDED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("ALLOWABLE_PIN_TRIES_EXCEEDED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RESERVATION_DECLINED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("RESERVATION_DECLINED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("RESERVATION_DECLINED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UNKNOWN_BODY_PARAMETER", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("UNKNOWN_BODY_PARAMETER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("UNKNOWN_BODY_PARAMETER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NOT_FOUND", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("NOT_FOUND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("NOT_FOUND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_APPLE_PAYMENT_PROCESSING_CERTIFICATE_HASH_NOT_FOUND", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("APPLE_PAYMENT_PROCESSING_CERTIFICATE_HASH_NOT_FOUND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("APPLE_PAYMENT_PROCESSING_CERTIFICATE_HASH_NOT_FOUND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_METHOD_NOT_ALLOWED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("METHOD_NOT_ALLOWED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("METHOD_NOT_ALLOWED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NOT_ACCEPTABLE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("NOT_ACCEPTABLE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("NOT_ACCEPTABLE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_REQUEST_TIMEOUT", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("REQUEST_TIMEOUT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("REQUEST_TIMEOUT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CONFLICT", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("CONFLICT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("CONFLICT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GONE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("GONE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("GONE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_REQUEST_ENTITY_TOO_LARGE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("REQUEST_ENTITY_TOO_LARGE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("REQUEST_ENTITY_TOO_LARGE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UNSUPPORTED_MEDIA_TYPE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("UNSUPPORTED_MEDIA_TYPE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("UNSUPPORTED_MEDIA_TYPE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UNPROCESSABLE_ENTITY", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("UNPROCESSABLE_ENTITY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("UNPROCESSABLE_ENTITY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RATE_LIMITED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("RATE_LIMITED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("RATE_LIMITED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NOT_IMPLEMENTED", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("NOT_IMPLEMENTED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("NOT_IMPLEMENTED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BAD_GATEWAY", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("BAD_GATEWAY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("BAD_GATEWAY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SERVICE_UNAVAILABLE", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("SERVICE_UNAVAILABLE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("SERVICE_UNAVAILABLE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TEMPORARY_ERROR", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("TEMPORARY_ERROR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("TEMPORARY_ERROR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GATEWAY_TIMEOUT", func(t *testing.T) { + t.Parallel() + val, err := NewErrorCodeFromString("GATEWAY_TIMEOUT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ErrorCode("GATEWAY_TIMEOUT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewErrorCodeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewErrorCodeFromString("INTERNAL_SERVER_ERROR") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumExcludeStrategy(t *testing.T) { + t.Run("NewFromString_LEAST_EXPENSIVE", func(t *testing.T) { + t.Parallel() + val, err := NewExcludeStrategyFromString("LEAST_EXPENSIVE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ExcludeStrategy("LEAST_EXPENSIVE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MOST_EXPENSIVE", func(t *testing.T) { + t.Parallel() + val, err := NewExcludeStrategyFromString("MOST_EXPENSIVE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ExcludeStrategy("MOST_EXPENSIVE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewExcludeStrategyFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewExcludeStrategyFromString("LEAST_EXPENSIVE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumFulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleType(t *testing.T) { + t.Run("NewFromString_SCHEDULED", func(t *testing.T) { + t.Parallel() + val, err := NewFulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleTypeFromString("SCHEDULED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, FulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleType("SCHEDULED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ASAP", func(t *testing.T) { + t.Parallel() + val, err := NewFulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleTypeFromString("ASAP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, FulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleType("ASAP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewFulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewFulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleTypeFromString("SCHEDULED") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumFulfillmentFulfillmentLineItemApplication(t *testing.T) { + t.Run("NewFromString_ALL", func(t *testing.T) { + t.Parallel() + val, err := NewFulfillmentFulfillmentLineItemApplicationFromString("ALL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, FulfillmentFulfillmentLineItemApplication("ALL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ENTRY_LIST", func(t *testing.T) { + t.Parallel() + val, err := NewFulfillmentFulfillmentLineItemApplicationFromString("ENTRY_LIST") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, FulfillmentFulfillmentLineItemApplication("ENTRY_LIST"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewFulfillmentFulfillmentLineItemApplicationFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewFulfillmentFulfillmentLineItemApplicationFromString("ALL") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumFulfillmentPickupDetailsScheduleType(t *testing.T) { + t.Run("NewFromString_SCHEDULED", func(t *testing.T) { + t.Parallel() + val, err := NewFulfillmentPickupDetailsScheduleTypeFromString("SCHEDULED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, FulfillmentPickupDetailsScheduleType("SCHEDULED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ASAP", func(t *testing.T) { + t.Parallel() + val, err := NewFulfillmentPickupDetailsScheduleTypeFromString("ASAP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, FulfillmentPickupDetailsScheduleType("ASAP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewFulfillmentPickupDetailsScheduleTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewFulfillmentPickupDetailsScheduleTypeFromString("SCHEDULED") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumFulfillmentState(t *testing.T) { + t.Run("NewFromString_PROPOSED", func(t *testing.T) { + t.Parallel() + val, err := NewFulfillmentStateFromString("PROPOSED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, FulfillmentState("PROPOSED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RESERVED", func(t *testing.T) { + t.Parallel() + val, err := NewFulfillmentStateFromString("RESERVED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, FulfillmentState("RESERVED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PREPARED", func(t *testing.T) { + t.Parallel() + val, err := NewFulfillmentStateFromString("PREPARED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, FulfillmentState("PREPARED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_COMPLETED", func(t *testing.T) { + t.Parallel() + val, err := NewFulfillmentStateFromString("COMPLETED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, FulfillmentState("COMPLETED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CANCELED", func(t *testing.T) { + t.Parallel() + val, err := NewFulfillmentStateFromString("CANCELED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, FulfillmentState("CANCELED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FAILED", func(t *testing.T) { + t.Parallel() + val, err := NewFulfillmentStateFromString("FAILED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, FulfillmentState("FAILED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewFulfillmentStateFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewFulfillmentStateFromString("PROPOSED") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumFulfillmentType(t *testing.T) { + t.Run("NewFromString_PICKUP", func(t *testing.T) { + t.Parallel() + val, err := NewFulfillmentTypeFromString("PICKUP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, FulfillmentType("PICKUP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SHIPMENT", func(t *testing.T) { + t.Parallel() + val, err := NewFulfillmentTypeFromString("SHIPMENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, FulfillmentType("SHIPMENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DELIVERY", func(t *testing.T) { + t.Parallel() + val, err := NewFulfillmentTypeFromString("DELIVERY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, FulfillmentType("DELIVERY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewFulfillmentTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewFulfillmentTypeFromString("PICKUP") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumGiftCardActivityAdjustDecrementReason(t *testing.T) { + t.Run("NewFromString_SUSPICIOUS_ACTIVITY", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityAdjustDecrementReasonFromString("SUSPICIOUS_ACTIVITY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityAdjustDecrementReason("SUSPICIOUS_ACTIVITY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BALANCE_ACCIDENTALLY_INCREASED", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityAdjustDecrementReasonFromString("BALANCE_ACCIDENTALLY_INCREASED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityAdjustDecrementReason("BALANCE_ACCIDENTALLY_INCREASED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SUPPORT_ISSUE", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityAdjustDecrementReasonFromString("SUPPORT_ISSUE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityAdjustDecrementReason("SUPPORT_ISSUE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PURCHASE_WAS_REFUNDED", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityAdjustDecrementReasonFromString("PURCHASE_WAS_REFUNDED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityAdjustDecrementReason("PURCHASE_WAS_REFUNDED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewGiftCardActivityAdjustDecrementReasonFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewGiftCardActivityAdjustDecrementReasonFromString("SUSPICIOUS_ACTIVITY") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumGiftCardActivityAdjustIncrementReason(t *testing.T) { + t.Run("NewFromString_COMPLIMENTARY", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityAdjustIncrementReasonFromString("COMPLIMENTARY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityAdjustIncrementReason("COMPLIMENTARY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SUPPORT_ISSUE", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityAdjustIncrementReasonFromString("SUPPORT_ISSUE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityAdjustIncrementReason("SUPPORT_ISSUE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TRANSACTION_VOIDED", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityAdjustIncrementReasonFromString("TRANSACTION_VOIDED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityAdjustIncrementReason("TRANSACTION_VOIDED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewGiftCardActivityAdjustIncrementReasonFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewGiftCardActivityAdjustIncrementReasonFromString("COMPLIMENTARY") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumGiftCardActivityClearBalanceReason(t *testing.T) { + t.Run("NewFromString_SUSPICIOUS_ACTIVITY", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityClearBalanceReasonFromString("SUSPICIOUS_ACTIVITY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityClearBalanceReason("SUSPICIOUS_ACTIVITY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_REUSE_GIFTCARD", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityClearBalanceReasonFromString("REUSE_GIFTCARD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityClearBalanceReason("REUSE_GIFTCARD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UNKNOWN_REASON", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityClearBalanceReasonFromString("UNKNOWN_REASON") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityClearBalanceReason("UNKNOWN_REASON"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewGiftCardActivityClearBalanceReasonFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewGiftCardActivityClearBalanceReasonFromString("SUSPICIOUS_ACTIVITY") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumGiftCardActivityDeactivateReason(t *testing.T) { + t.Run("NewFromString_SUSPICIOUS_ACTIVITY", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityDeactivateReasonFromString("SUSPICIOUS_ACTIVITY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityDeactivateReason("SUSPICIOUS_ACTIVITY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UNKNOWN_REASON", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityDeactivateReasonFromString("UNKNOWN_REASON") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityDeactivateReason("UNKNOWN_REASON"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CHARGEBACK_DEACTIVATE", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityDeactivateReasonFromString("CHARGEBACK_DEACTIVATE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityDeactivateReason("CHARGEBACK_DEACTIVATE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewGiftCardActivityDeactivateReasonFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewGiftCardActivityDeactivateReasonFromString("SUSPICIOUS_ACTIVITY") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumGiftCardActivityRedeemStatus(t *testing.T) { + t.Run("NewFromString_PENDING", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityRedeemStatusFromString("PENDING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityRedeemStatus("PENDING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_COMPLETED", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityRedeemStatusFromString("COMPLETED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityRedeemStatus("COMPLETED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CANCELED", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityRedeemStatusFromString("CANCELED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityRedeemStatus("CANCELED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewGiftCardActivityRedeemStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewGiftCardActivityRedeemStatusFromString("PENDING") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumGiftCardActivityType(t *testing.T) { + t.Run("NewFromString_ACTIVATE", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityTypeFromString("ACTIVATE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityType("ACTIVATE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LOAD", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityTypeFromString("LOAD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityType("LOAD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_REDEEM", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityTypeFromString("REDEEM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityType("REDEEM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CLEAR_BALANCE", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityTypeFromString("CLEAR_BALANCE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityType("CLEAR_BALANCE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DEACTIVATE", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityTypeFromString("DEACTIVATE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityType("DEACTIVATE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ADJUST_INCREMENT", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityTypeFromString("ADJUST_INCREMENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityType("ADJUST_INCREMENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ADJUST_DECREMENT", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityTypeFromString("ADJUST_DECREMENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityType("ADJUST_DECREMENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_REFUND", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityTypeFromString("REFUND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityType("REFUND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UNLINKED_ACTIVITY_REFUND", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityTypeFromString("UNLINKED_ACTIVITY_REFUND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityType("UNLINKED_ACTIVITY_REFUND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IMPORT", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityTypeFromString("IMPORT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityType("IMPORT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BLOCK", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityTypeFromString("BLOCK") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityType("BLOCK"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UNBLOCK", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityTypeFromString("UNBLOCK") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityType("UNBLOCK"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IMPORT_REVERSAL", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityTypeFromString("IMPORT_REVERSAL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityType("IMPORT_REVERSAL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TRANSFER_BALANCE_FROM", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityTypeFromString("TRANSFER_BALANCE_FROM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityType("TRANSFER_BALANCE_FROM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TRANSFER_BALANCE_TO", func(t *testing.T) { + t.Parallel() + val, err := NewGiftCardActivityTypeFromString("TRANSFER_BALANCE_TO") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, GiftCardActivityType("TRANSFER_BALANCE_TO"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewGiftCardActivityTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewGiftCardActivityTypeFromString("ACTIVATE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumInventoryAlertType(t *testing.T) { + t.Run("NewFromString_NONE", func(t *testing.T) { + t.Parallel() + val, err := NewInventoryAlertTypeFromString("NONE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InventoryAlertType("NONE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LOW_QUANTITY", func(t *testing.T) { + t.Parallel() + val, err := NewInventoryAlertTypeFromString("LOW_QUANTITY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, InventoryAlertType("LOW_QUANTITY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewInventoryAlertTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewInventoryAlertTypeFromString("NONE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumJobAssignmentPayType(t *testing.T) { + t.Run("NewFromString_NONE", func(t *testing.T) { + t.Parallel() + val, err := NewJobAssignmentPayTypeFromString("NONE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, JobAssignmentPayType("NONE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_HOURLY", func(t *testing.T) { + t.Parallel() + val, err := NewJobAssignmentPayTypeFromString("HOURLY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, JobAssignmentPayType("HOURLY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SALARY", func(t *testing.T) { + t.Parallel() + val, err := NewJobAssignmentPayTypeFromString("SALARY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, JobAssignmentPayType("SALARY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewJobAssignmentPayTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewJobAssignmentPayTypeFromString("NONE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumLoyaltyEventSource(t *testing.T) { + t.Run("NewFromString_SQUARE", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyEventSourceFromString("SQUARE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyEventSource("SQUARE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LOYALTY_API", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyEventSourceFromString("LOYALTY_API") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyEventSource("LOYALTY_API"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewLoyaltyEventSourceFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewLoyaltyEventSourceFromString("SQUARE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumLoyaltyEventType(t *testing.T) { + t.Run("NewFromString_ACCUMULATE_POINTS", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyEventTypeFromString("ACCUMULATE_POINTS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyEventType("ACCUMULATE_POINTS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CREATE_REWARD", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyEventTypeFromString("CREATE_REWARD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyEventType("CREATE_REWARD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_REDEEM_REWARD", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyEventTypeFromString("REDEEM_REWARD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyEventType("REDEEM_REWARD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DELETE_REWARD", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyEventTypeFromString("DELETE_REWARD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyEventType("DELETE_REWARD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ADJUST_POINTS", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyEventTypeFromString("ADJUST_POINTS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyEventType("ADJUST_POINTS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EXPIRE_POINTS", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyEventTypeFromString("EXPIRE_POINTS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyEventType("EXPIRE_POINTS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_OTHER", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyEventTypeFromString("OTHER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyEventType("OTHER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ACCUMULATE_PROMOTION_POINTS", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyEventTypeFromString("ACCUMULATE_PROMOTION_POINTS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyEventType("ACCUMULATE_PROMOTION_POINTS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewLoyaltyEventTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewLoyaltyEventTypeFromString("ACCUMULATE_POINTS") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumLoyaltyProgramAccrualRuleTaxMode(t *testing.T) { + t.Run("NewFromString_BEFORE_TAX", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyProgramAccrualRuleTaxModeFromString("BEFORE_TAX") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyProgramAccrualRuleTaxMode("BEFORE_TAX"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AFTER_TAX", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyProgramAccrualRuleTaxModeFromString("AFTER_TAX") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyProgramAccrualRuleTaxMode("AFTER_TAX"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewLoyaltyProgramAccrualRuleTaxModeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewLoyaltyProgramAccrualRuleTaxModeFromString("BEFORE_TAX") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumLoyaltyProgramAccrualRuleType(t *testing.T) { + t.Run("NewFromString_VISIT", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyProgramAccrualRuleTypeFromString("VISIT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyProgramAccrualRuleType("VISIT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SPEND", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyProgramAccrualRuleTypeFromString("SPEND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyProgramAccrualRuleType("SPEND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ITEM_VARIATION", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyProgramAccrualRuleTypeFromString("ITEM_VARIATION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyProgramAccrualRuleType("ITEM_VARIATION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CATEGORY", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyProgramAccrualRuleTypeFromString("CATEGORY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyProgramAccrualRuleType("CATEGORY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewLoyaltyProgramAccrualRuleTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewLoyaltyProgramAccrualRuleTypeFromString("VISIT") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumLoyaltyProgramStatus(t *testing.T) { + t.Run("NewFromString_INACTIVE", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyProgramStatusFromString("INACTIVE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyProgramStatus("INACTIVE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ACTIVE", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyProgramStatusFromString("ACTIVE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyProgramStatus("ACTIVE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewLoyaltyProgramStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewLoyaltyProgramStatusFromString("INACTIVE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumLoyaltyPromotionIncentiveType(t *testing.T) { + t.Run("NewFromString_POINTS_MULTIPLIER", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyPromotionIncentiveTypeFromString("POINTS_MULTIPLIER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyPromotionIncentiveType("POINTS_MULTIPLIER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_POINTS_ADDITION", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyPromotionIncentiveTypeFromString("POINTS_ADDITION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyPromotionIncentiveType("POINTS_ADDITION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewLoyaltyPromotionIncentiveTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewLoyaltyPromotionIncentiveTypeFromString("POINTS_MULTIPLIER") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumLoyaltyPromotionStatus(t *testing.T) { + t.Run("NewFromString_ACTIVE", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyPromotionStatusFromString("ACTIVE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyPromotionStatus("ACTIVE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ENDED", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyPromotionStatusFromString("ENDED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyPromotionStatus("ENDED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CANCELED", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyPromotionStatusFromString("CANCELED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyPromotionStatus("CANCELED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SCHEDULED", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyPromotionStatusFromString("SCHEDULED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyPromotionStatus("SCHEDULED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewLoyaltyPromotionStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewLoyaltyPromotionStatusFromString("ACTIVE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumLoyaltyPromotionTriggerLimitInterval(t *testing.T) { + t.Run("NewFromString_ALL_TIME", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyPromotionTriggerLimitIntervalFromString("ALL_TIME") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyPromotionTriggerLimitInterval("ALL_TIME"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DAY", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyPromotionTriggerLimitIntervalFromString("DAY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyPromotionTriggerLimitInterval("DAY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewLoyaltyPromotionTriggerLimitIntervalFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewLoyaltyPromotionTriggerLimitIntervalFromString("ALL_TIME") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumLoyaltyRewardStatus(t *testing.T) { + t.Run("NewFromString_ISSUED", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyRewardStatusFromString("ISSUED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyRewardStatus("ISSUED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_REDEEMED", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyRewardStatusFromString("REDEEMED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyRewardStatus("REDEEMED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DELETED", func(t *testing.T) { + t.Parallel() + val, err := NewLoyaltyRewardStatusFromString("DELETED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, LoyaltyRewardStatus("DELETED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewLoyaltyRewardStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewLoyaltyRewardStatusFromString("ISSUED") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumMeasurementUnitArea(t *testing.T) { + t.Run("NewFromString_IMPERIAL_ACRE", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitAreaFromString("IMPERIAL_ACRE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitArea("IMPERIAL_ACRE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IMPERIAL_SQUARE_INCH", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitAreaFromString("IMPERIAL_SQUARE_INCH") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitArea("IMPERIAL_SQUARE_INCH"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IMPERIAL_SQUARE_FOOT", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitAreaFromString("IMPERIAL_SQUARE_FOOT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitArea("IMPERIAL_SQUARE_FOOT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IMPERIAL_SQUARE_YARD", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitAreaFromString("IMPERIAL_SQUARE_YARD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitArea("IMPERIAL_SQUARE_YARD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IMPERIAL_SQUARE_MILE", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitAreaFromString("IMPERIAL_SQUARE_MILE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitArea("IMPERIAL_SQUARE_MILE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_METRIC_SQUARE_CENTIMETER", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitAreaFromString("METRIC_SQUARE_CENTIMETER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitArea("METRIC_SQUARE_CENTIMETER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_METRIC_SQUARE_METER", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitAreaFromString("METRIC_SQUARE_METER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitArea("METRIC_SQUARE_METER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_METRIC_SQUARE_KILOMETER", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitAreaFromString("METRIC_SQUARE_KILOMETER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitArea("METRIC_SQUARE_KILOMETER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewMeasurementUnitAreaFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewMeasurementUnitAreaFromString("IMPERIAL_ACRE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumMeasurementUnitLength(t *testing.T) { + t.Run("NewFromString_IMPERIAL_INCH", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitLengthFromString("IMPERIAL_INCH") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitLength("IMPERIAL_INCH"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IMPERIAL_FOOT", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitLengthFromString("IMPERIAL_FOOT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitLength("IMPERIAL_FOOT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IMPERIAL_YARD", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitLengthFromString("IMPERIAL_YARD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitLength("IMPERIAL_YARD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IMPERIAL_MILE", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitLengthFromString("IMPERIAL_MILE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitLength("IMPERIAL_MILE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_METRIC_MILLIMETER", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitLengthFromString("METRIC_MILLIMETER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitLength("METRIC_MILLIMETER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_METRIC_CENTIMETER", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitLengthFromString("METRIC_CENTIMETER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitLength("METRIC_CENTIMETER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_METRIC_METER", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitLengthFromString("METRIC_METER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitLength("METRIC_METER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_METRIC_KILOMETER", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitLengthFromString("METRIC_KILOMETER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitLength("METRIC_KILOMETER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewMeasurementUnitLengthFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewMeasurementUnitLengthFromString("IMPERIAL_INCH") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumMeasurementUnitTime(t *testing.T) { + t.Run("NewFromString_GENERIC_MILLISECOND", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitTimeFromString("GENERIC_MILLISECOND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitTime("GENERIC_MILLISECOND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GENERIC_SECOND", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitTimeFromString("GENERIC_SECOND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitTime("GENERIC_SECOND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GENERIC_MINUTE", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitTimeFromString("GENERIC_MINUTE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitTime("GENERIC_MINUTE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GENERIC_HOUR", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitTimeFromString("GENERIC_HOUR") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitTime("GENERIC_HOUR"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GENERIC_DAY", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitTimeFromString("GENERIC_DAY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitTime("GENERIC_DAY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewMeasurementUnitTimeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewMeasurementUnitTimeFromString("GENERIC_MILLISECOND") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumMeasurementUnitUnitType(t *testing.T) { + t.Run("NewFromString_TYPE_CUSTOM", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitUnitTypeFromString("TYPE_CUSTOM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitUnitType("TYPE_CUSTOM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TYPE_AREA", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitUnitTypeFromString("TYPE_AREA") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitUnitType("TYPE_AREA"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TYPE_LENGTH", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitUnitTypeFromString("TYPE_LENGTH") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitUnitType("TYPE_LENGTH"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TYPE_VOLUME", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitUnitTypeFromString("TYPE_VOLUME") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitUnitType("TYPE_VOLUME"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TYPE_WEIGHT", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitUnitTypeFromString("TYPE_WEIGHT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitUnitType("TYPE_WEIGHT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TYPE_GENERIC", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitUnitTypeFromString("TYPE_GENERIC") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitUnitType("TYPE_GENERIC"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewMeasurementUnitUnitTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewMeasurementUnitUnitTypeFromString("TYPE_CUSTOM") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumMeasurementUnitVolume(t *testing.T) { + t.Run("NewFromString_GENERIC_FLUID_OUNCE", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitVolumeFromString("GENERIC_FLUID_OUNCE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitVolume("GENERIC_FLUID_OUNCE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GENERIC_SHOT", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitVolumeFromString("GENERIC_SHOT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitVolume("GENERIC_SHOT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GENERIC_CUP", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitVolumeFromString("GENERIC_CUP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitVolume("GENERIC_CUP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GENERIC_PINT", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitVolumeFromString("GENERIC_PINT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitVolume("GENERIC_PINT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GENERIC_QUART", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitVolumeFromString("GENERIC_QUART") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitVolume("GENERIC_QUART"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GENERIC_GALLON", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitVolumeFromString("GENERIC_GALLON") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitVolume("GENERIC_GALLON"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IMPERIAL_CUBIC_INCH", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitVolumeFromString("IMPERIAL_CUBIC_INCH") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitVolume("IMPERIAL_CUBIC_INCH"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IMPERIAL_CUBIC_FOOT", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitVolumeFromString("IMPERIAL_CUBIC_FOOT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitVolume("IMPERIAL_CUBIC_FOOT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IMPERIAL_CUBIC_YARD", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitVolumeFromString("IMPERIAL_CUBIC_YARD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitVolume("IMPERIAL_CUBIC_YARD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_METRIC_MILLILITER", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitVolumeFromString("METRIC_MILLILITER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitVolume("METRIC_MILLILITER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_METRIC_LITER", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitVolumeFromString("METRIC_LITER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitVolume("METRIC_LITER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewMeasurementUnitVolumeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewMeasurementUnitVolumeFromString("GENERIC_FLUID_OUNCE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumMeasurementUnitWeight(t *testing.T) { + t.Run("NewFromString_IMPERIAL_WEIGHT_OUNCE", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitWeightFromString("IMPERIAL_WEIGHT_OUNCE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitWeight("IMPERIAL_WEIGHT_OUNCE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IMPERIAL_POUND", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitWeightFromString("IMPERIAL_POUND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitWeight("IMPERIAL_POUND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_IMPERIAL_STONE", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitWeightFromString("IMPERIAL_STONE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitWeight("IMPERIAL_STONE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_METRIC_MILLIGRAM", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitWeightFromString("METRIC_MILLIGRAM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitWeight("METRIC_MILLIGRAM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_METRIC_GRAM", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitWeightFromString("METRIC_GRAM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitWeight("METRIC_GRAM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_METRIC_KILOGRAM", func(t *testing.T) { + t.Parallel() + val, err := NewMeasurementUnitWeightFromString("METRIC_KILOGRAM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, MeasurementUnitWeight("METRIC_KILOGRAM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewMeasurementUnitWeightFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewMeasurementUnitWeightFromString("IMPERIAL_WEIGHT_OUNCE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumOauthAuthorizationRevokedEventRevokerType(t *testing.T) { + t.Run("NewFromString_APPLICATION", func(t *testing.T) { + t.Parallel() + val, err := NewOauthAuthorizationRevokedEventRevokerTypeFromString("APPLICATION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OauthAuthorizationRevokedEventRevokerType("APPLICATION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MERCHANT", func(t *testing.T) { + t.Parallel() + val, err := NewOauthAuthorizationRevokedEventRevokerTypeFromString("MERCHANT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OauthAuthorizationRevokedEventRevokerType("MERCHANT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SQUARE", func(t *testing.T) { + t.Parallel() + val, err := NewOauthAuthorizationRevokedEventRevokerTypeFromString("SQUARE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OauthAuthorizationRevokedEventRevokerType("SQUARE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewOauthAuthorizationRevokedEventRevokerTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewOauthAuthorizationRevokedEventRevokerTypeFromString("APPLICATION") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumOrderCardSurchargeTreatmentType(t *testing.T) { + t.Run("NewFromString_LINE_ITEM_TREATMENT", func(t *testing.T) { + t.Parallel() + val, err := NewOrderCardSurchargeTreatmentTypeFromString("LINE_ITEM_TREATMENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderCardSurchargeTreatmentType("LINE_ITEM_TREATMENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_APPORTIONED_TREATMENT", func(t *testing.T) { + t.Parallel() + val, err := NewOrderCardSurchargeTreatmentTypeFromString("APPORTIONED_TREATMENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderCardSurchargeTreatmentType("APPORTIONED_TREATMENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewOrderCardSurchargeTreatmentTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewOrderCardSurchargeTreatmentTypeFromString("LINE_ITEM_TREATMENT") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumOrderFulfillmentDeliveryDetailsScheduleType(t *testing.T) { + t.Run("NewFromString_SCHEDULED", func(t *testing.T) { + t.Parallel() + val, err := NewOrderFulfillmentDeliveryDetailsScheduleTypeFromString("SCHEDULED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderFulfillmentDeliveryDetailsScheduleType("SCHEDULED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ASAP", func(t *testing.T) { + t.Parallel() + val, err := NewOrderFulfillmentDeliveryDetailsScheduleTypeFromString("ASAP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderFulfillmentDeliveryDetailsScheduleType("ASAP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewOrderFulfillmentDeliveryDetailsScheduleTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewOrderFulfillmentDeliveryDetailsScheduleTypeFromString("SCHEDULED") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumOrderFulfillmentFulfillmentLineItemApplication(t *testing.T) { + t.Run("NewFromString_ALL", func(t *testing.T) { + t.Parallel() + val, err := NewOrderFulfillmentFulfillmentLineItemApplicationFromString("ALL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderFulfillmentFulfillmentLineItemApplication("ALL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ENTRY_LIST", func(t *testing.T) { + t.Parallel() + val, err := NewOrderFulfillmentFulfillmentLineItemApplicationFromString("ENTRY_LIST") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderFulfillmentFulfillmentLineItemApplication("ENTRY_LIST"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewOrderFulfillmentFulfillmentLineItemApplicationFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewOrderFulfillmentFulfillmentLineItemApplicationFromString("ALL") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumOrderFulfillmentPickupDetailsScheduleType(t *testing.T) { + t.Run("NewFromString_SCHEDULED", func(t *testing.T) { + t.Parallel() + val, err := NewOrderFulfillmentPickupDetailsScheduleTypeFromString("SCHEDULED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderFulfillmentPickupDetailsScheduleType("SCHEDULED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ASAP", func(t *testing.T) { + t.Parallel() + val, err := NewOrderFulfillmentPickupDetailsScheduleTypeFromString("ASAP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderFulfillmentPickupDetailsScheduleType("ASAP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewOrderFulfillmentPickupDetailsScheduleTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewOrderFulfillmentPickupDetailsScheduleTypeFromString("SCHEDULED") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumOrderFulfillmentState(t *testing.T) { + t.Run("NewFromString_PROPOSED", func(t *testing.T) { + t.Parallel() + val, err := NewOrderFulfillmentStateFromString("PROPOSED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderFulfillmentState("PROPOSED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RESERVED", func(t *testing.T) { + t.Parallel() + val, err := NewOrderFulfillmentStateFromString("RESERVED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderFulfillmentState("RESERVED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PREPARED", func(t *testing.T) { + t.Parallel() + val, err := NewOrderFulfillmentStateFromString("PREPARED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderFulfillmentState("PREPARED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_COMPLETED", func(t *testing.T) { + t.Parallel() + val, err := NewOrderFulfillmentStateFromString("COMPLETED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderFulfillmentState("COMPLETED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CANCELED", func(t *testing.T) { + t.Parallel() + val, err := NewOrderFulfillmentStateFromString("CANCELED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderFulfillmentState("CANCELED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FAILED", func(t *testing.T) { + t.Parallel() + val, err := NewOrderFulfillmentStateFromString("FAILED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderFulfillmentState("FAILED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewOrderFulfillmentStateFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewOrderFulfillmentStateFromString("PROPOSED") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumOrderFulfillmentType(t *testing.T) { + t.Run("NewFromString_PICKUP", func(t *testing.T) { + t.Parallel() + val, err := NewOrderFulfillmentTypeFromString("PICKUP") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderFulfillmentType("PICKUP"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SHIPMENT", func(t *testing.T) { + t.Parallel() + val, err := NewOrderFulfillmentTypeFromString("SHIPMENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderFulfillmentType("SHIPMENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DELIVERY", func(t *testing.T) { + t.Parallel() + val, err := NewOrderFulfillmentTypeFromString("DELIVERY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderFulfillmentType("DELIVERY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewOrderFulfillmentTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewOrderFulfillmentTypeFromString("PICKUP") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumOrderLineItemDiscountScope(t *testing.T) { + t.Run("NewFromString_OTHER_DISCOUNT_SCOPE", func(t *testing.T) { + t.Parallel() + val, err := NewOrderLineItemDiscountScopeFromString("OTHER_DISCOUNT_SCOPE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderLineItemDiscountScope("OTHER_DISCOUNT_SCOPE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LINE_ITEM", func(t *testing.T) { + t.Parallel() + val, err := NewOrderLineItemDiscountScopeFromString("LINE_ITEM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderLineItemDiscountScope("LINE_ITEM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ORDER", func(t *testing.T) { + t.Parallel() + val, err := NewOrderLineItemDiscountScopeFromString("ORDER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderLineItemDiscountScope("ORDER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewOrderLineItemDiscountScopeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewOrderLineItemDiscountScopeFromString("OTHER_DISCOUNT_SCOPE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumOrderLineItemDiscountType(t *testing.T) { + t.Run("NewFromString_UNKNOWN_DISCOUNT", func(t *testing.T) { + t.Parallel() + val, err := NewOrderLineItemDiscountTypeFromString("UNKNOWN_DISCOUNT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderLineItemDiscountType("UNKNOWN_DISCOUNT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FIXED_PERCENTAGE", func(t *testing.T) { + t.Parallel() + val, err := NewOrderLineItemDiscountTypeFromString("FIXED_PERCENTAGE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderLineItemDiscountType("FIXED_PERCENTAGE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FIXED_AMOUNT", func(t *testing.T) { + t.Parallel() + val, err := NewOrderLineItemDiscountTypeFromString("FIXED_AMOUNT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderLineItemDiscountType("FIXED_AMOUNT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VARIABLE_PERCENTAGE", func(t *testing.T) { + t.Parallel() + val, err := NewOrderLineItemDiscountTypeFromString("VARIABLE_PERCENTAGE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderLineItemDiscountType("VARIABLE_PERCENTAGE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VARIABLE_AMOUNT", func(t *testing.T) { + t.Parallel() + val, err := NewOrderLineItemDiscountTypeFromString("VARIABLE_AMOUNT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderLineItemDiscountType("VARIABLE_AMOUNT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewOrderLineItemDiscountTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewOrderLineItemDiscountTypeFromString("UNKNOWN_DISCOUNT") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumOrderLineItemItemType(t *testing.T) { + t.Run("NewFromString_ITEM", func(t *testing.T) { + t.Parallel() + val, err := NewOrderLineItemItemTypeFromString("ITEM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderLineItemItemType("ITEM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CUSTOM_AMOUNT", func(t *testing.T) { + t.Parallel() + val, err := NewOrderLineItemItemTypeFromString("CUSTOM_AMOUNT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderLineItemItemType("CUSTOM_AMOUNT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_GIFT_CARD", func(t *testing.T) { + t.Parallel() + val, err := NewOrderLineItemItemTypeFromString("GIFT_CARD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderLineItemItemType("GIFT_CARD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewOrderLineItemItemTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewOrderLineItemItemTypeFromString("ITEM") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumOrderLineItemTaxScope(t *testing.T) { + t.Run("NewFromString_OTHER_TAX_SCOPE", func(t *testing.T) { + t.Parallel() + val, err := NewOrderLineItemTaxScopeFromString("OTHER_TAX_SCOPE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderLineItemTaxScope("OTHER_TAX_SCOPE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LINE_ITEM", func(t *testing.T) { + t.Parallel() + val, err := NewOrderLineItemTaxScopeFromString("LINE_ITEM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderLineItemTaxScope("LINE_ITEM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ORDER", func(t *testing.T) { + t.Parallel() + val, err := NewOrderLineItemTaxScopeFromString("ORDER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderLineItemTaxScope("ORDER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewOrderLineItemTaxScopeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewOrderLineItemTaxScopeFromString("OTHER_TAX_SCOPE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumOrderLineItemTaxType(t *testing.T) { + t.Run("NewFromString_UNKNOWN_TAX", func(t *testing.T) { + t.Parallel() + val, err := NewOrderLineItemTaxTypeFromString("UNKNOWN_TAX") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderLineItemTaxType("UNKNOWN_TAX"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ADDITIVE", func(t *testing.T) { + t.Parallel() + val, err := NewOrderLineItemTaxTypeFromString("ADDITIVE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderLineItemTaxType("ADDITIVE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INCLUSIVE", func(t *testing.T) { + t.Parallel() + val, err := NewOrderLineItemTaxTypeFromString("INCLUSIVE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderLineItemTaxType("INCLUSIVE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewOrderLineItemTaxTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewOrderLineItemTaxTypeFromString("UNKNOWN_TAX") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumOrderServiceChargeCalculationPhase(t *testing.T) { + t.Run("NewFromString_SUBTOTAL_PHASE", func(t *testing.T) { + t.Parallel() + val, err := NewOrderServiceChargeCalculationPhaseFromString("SUBTOTAL_PHASE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderServiceChargeCalculationPhase("SUBTOTAL_PHASE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TOTAL_PHASE", func(t *testing.T) { + t.Parallel() + val, err := NewOrderServiceChargeCalculationPhaseFromString("TOTAL_PHASE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderServiceChargeCalculationPhase("TOTAL_PHASE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_APPORTIONED_PERCENTAGE_PHASE", func(t *testing.T) { + t.Parallel() + val, err := NewOrderServiceChargeCalculationPhaseFromString("APPORTIONED_PERCENTAGE_PHASE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderServiceChargeCalculationPhase("APPORTIONED_PERCENTAGE_PHASE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_APPORTIONED_AMOUNT_PHASE", func(t *testing.T) { + t.Parallel() + val, err := NewOrderServiceChargeCalculationPhaseFromString("APPORTIONED_AMOUNT_PHASE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderServiceChargeCalculationPhase("APPORTIONED_AMOUNT_PHASE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewOrderServiceChargeCalculationPhaseFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewOrderServiceChargeCalculationPhaseFromString("SUBTOTAL_PHASE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumOrderServiceChargeScope(t *testing.T) { + t.Run("NewFromString_OTHER_SERVICE_CHARGE_SCOPE", func(t *testing.T) { + t.Parallel() + val, err := NewOrderServiceChargeScopeFromString("OTHER_SERVICE_CHARGE_SCOPE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderServiceChargeScope("OTHER_SERVICE_CHARGE_SCOPE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_LINE_ITEM", func(t *testing.T) { + t.Parallel() + val, err := NewOrderServiceChargeScopeFromString("LINE_ITEM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderServiceChargeScope("LINE_ITEM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ORDER", func(t *testing.T) { + t.Parallel() + val, err := NewOrderServiceChargeScopeFromString("ORDER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderServiceChargeScope("ORDER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewOrderServiceChargeScopeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewOrderServiceChargeScopeFromString("OTHER_SERVICE_CHARGE_SCOPE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumOrderServiceChargeTreatmentType(t *testing.T) { + t.Run("NewFromString_LINE_ITEM_TREATMENT", func(t *testing.T) { + t.Parallel() + val, err := NewOrderServiceChargeTreatmentTypeFromString("LINE_ITEM_TREATMENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderServiceChargeTreatmentType("LINE_ITEM_TREATMENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_APPORTIONED_TREATMENT", func(t *testing.T) { + t.Parallel() + val, err := NewOrderServiceChargeTreatmentTypeFromString("APPORTIONED_TREATMENT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderServiceChargeTreatmentType("APPORTIONED_TREATMENT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewOrderServiceChargeTreatmentTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewOrderServiceChargeTreatmentTypeFromString("LINE_ITEM_TREATMENT") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumOrderServiceChargeType(t *testing.T) { + t.Run("NewFromString_AUTO_GRATUITY", func(t *testing.T) { + t.Parallel() + val, err := NewOrderServiceChargeTypeFromString("AUTO_GRATUITY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderServiceChargeType("AUTO_GRATUITY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CUSTOM", func(t *testing.T) { + t.Parallel() + val, err := NewOrderServiceChargeTypeFromString("CUSTOM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderServiceChargeType("CUSTOM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewOrderServiceChargeTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewOrderServiceChargeTypeFromString("AUTO_GRATUITY") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumOrderState(t *testing.T) { + t.Run("NewFromString_OPEN", func(t *testing.T) { + t.Parallel() + val, err := NewOrderStateFromString("OPEN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderState("OPEN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_COMPLETED", func(t *testing.T) { + t.Parallel() + val, err := NewOrderStateFromString("COMPLETED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderState("COMPLETED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CANCELED", func(t *testing.T) { + t.Parallel() + val, err := NewOrderStateFromString("CANCELED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderState("CANCELED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DRAFT", func(t *testing.T) { + t.Parallel() + val, err := NewOrderStateFromString("DRAFT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, OrderState("DRAFT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewOrderStateFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewOrderStateFromString("OPEN") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumPaymentOptionsDelayAction(t *testing.T) { + t.Run("NewFromString_CANCEL", func(t *testing.T) { + t.Parallel() + val, err := NewPaymentOptionsDelayActionFromString("CANCEL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, PaymentOptionsDelayAction("CANCEL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_COMPLETE", func(t *testing.T) { + t.Parallel() + val, err := NewPaymentOptionsDelayActionFromString("COMPLETE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, PaymentOptionsDelayAction("COMPLETE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewPaymentOptionsDelayActionFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewPaymentOptionsDelayActionFromString("CANCEL") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumProduct(t *testing.T) { + t.Run("NewFromString_SQUARE_POS", func(t *testing.T) { + t.Parallel() + val, err := NewProductFromString("SQUARE_POS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Product("SQUARE_POS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EXTERNAL_API", func(t *testing.T) { + t.Parallel() + val, err := NewProductFromString("EXTERNAL_API") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Product("EXTERNAL_API"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BILLING", func(t *testing.T) { + t.Parallel() + val, err := NewProductFromString("BILLING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Product("BILLING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_APPOINTMENTS", func(t *testing.T) { + t.Parallel() + val, err := NewProductFromString("APPOINTMENTS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Product("APPOINTMENTS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVOICES", func(t *testing.T) { + t.Parallel() + val, err := NewProductFromString("INVOICES") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Product("INVOICES"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ONLINE_STORE", func(t *testing.T) { + t.Parallel() + val, err := NewProductFromString("ONLINE_STORE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Product("ONLINE_STORE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PAYROLL", func(t *testing.T) { + t.Parallel() + val, err := NewProductFromString("PAYROLL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Product("PAYROLL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DASHBOARD", func(t *testing.T) { + t.Parallel() + val, err := NewProductFromString("DASHBOARD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Product("DASHBOARD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ITEM_LIBRARY_IMPORT", func(t *testing.T) { + t.Parallel() + val, err := NewProductFromString("ITEM_LIBRARY_IMPORT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Product("ITEM_LIBRARY_IMPORT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_OTHER", func(t *testing.T) { + t.Parallel() + val, err := NewProductFromString("OTHER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Product("OTHER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewProductFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewProductFromString("SQUARE_POS") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumRefundStatus(t *testing.T) { + t.Run("NewFromString_PENDING", func(t *testing.T) { + t.Parallel() + val, err := NewRefundStatusFromString("PENDING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, RefundStatus("PENDING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_APPROVED", func(t *testing.T) { + t.Parallel() + val, err := NewRefundStatusFromString("APPROVED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, RefundStatus("APPROVED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_REJECTED", func(t *testing.T) { + t.Parallel() + val, err := NewRefundStatusFromString("REJECTED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, RefundStatus("REJECTED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FAILED", func(t *testing.T) { + t.Parallel() + val, err := NewRefundStatusFromString("FAILED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, RefundStatus("FAILED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewRefundStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewRefundStatusFromString("PENDING") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumShiftFilterStatus(t *testing.T) { + t.Run("NewFromString_OPEN", func(t *testing.T) { + t.Parallel() + val, err := NewShiftFilterStatusFromString("OPEN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ShiftFilterStatus("OPEN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CLOSED", func(t *testing.T) { + t.Parallel() + val, err := NewShiftFilterStatusFromString("CLOSED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ShiftFilterStatus("CLOSED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewShiftFilterStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewShiftFilterStatusFromString("OPEN") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumShiftSortField(t *testing.T) { + t.Run("NewFromString_START_AT", func(t *testing.T) { + t.Parallel() + val, err := NewShiftSortFieldFromString("START_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ShiftSortField("START_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_END_AT", func(t *testing.T) { + t.Parallel() + val, err := NewShiftSortFieldFromString("END_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ShiftSortField("END_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CREATED_AT", func(t *testing.T) { + t.Parallel() + val, err := NewShiftSortFieldFromString("CREATED_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ShiftSortField("CREATED_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UPDATED_AT", func(t *testing.T) { + t.Parallel() + val, err := NewShiftSortFieldFromString("UPDATED_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ShiftSortField("UPDATED_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewShiftSortFieldFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewShiftSortFieldFromString("START_AT") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumShiftStatus(t *testing.T) { + t.Run("NewFromString_OPEN", func(t *testing.T) { + t.Parallel() + val, err := NewShiftStatusFromString("OPEN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ShiftStatus("OPEN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CLOSED", func(t *testing.T) { + t.Parallel() + val, err := NewShiftStatusFromString("CLOSED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ShiftStatus("CLOSED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewShiftStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewShiftStatusFromString("OPEN") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumShiftWorkdayMatcher(t *testing.T) { + t.Run("NewFromString_START_AT", func(t *testing.T) { + t.Parallel() + val, err := NewShiftWorkdayMatcherFromString("START_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ShiftWorkdayMatcher("START_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_END_AT", func(t *testing.T) { + t.Parallel() + val, err := NewShiftWorkdayMatcherFromString("END_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ShiftWorkdayMatcher("END_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INTERSECTION", func(t *testing.T) { + t.Parallel() + val, err := NewShiftWorkdayMatcherFromString("INTERSECTION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, ShiftWorkdayMatcher("INTERSECTION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewShiftWorkdayMatcherFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewShiftWorkdayMatcherFromString("START_AT") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumSortOrder(t *testing.T) { + t.Run("NewFromString_DESC", func(t *testing.T) { + t.Parallel() + val, err := NewSortOrderFromString("DESC") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SortOrder("DESC"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ASC", func(t *testing.T) { + t.Parallel() + val, err := NewSortOrderFromString("ASC") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SortOrder("ASC"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewSortOrderFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewSortOrderFromString("DESC") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumSubscriptionCadence(t *testing.T) { + t.Run("NewFromString_DAILY", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionCadenceFromString("DAILY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionCadence("DAILY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_WEEKLY", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionCadenceFromString("WEEKLY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionCadence("WEEKLY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EVERY_TWO_WEEKS", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionCadenceFromString("EVERY_TWO_WEEKS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionCadence("EVERY_TWO_WEEKS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_THIRTY_DAYS", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionCadenceFromString("THIRTY_DAYS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionCadence("THIRTY_DAYS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SIXTY_DAYS", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionCadenceFromString("SIXTY_DAYS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionCadence("SIXTY_DAYS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NINETY_DAYS", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionCadenceFromString("NINETY_DAYS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionCadence("NINETY_DAYS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MONTHLY", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionCadenceFromString("MONTHLY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionCadence("MONTHLY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EVERY_TWO_MONTHS", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionCadenceFromString("EVERY_TWO_MONTHS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionCadence("EVERY_TWO_MONTHS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_QUARTERLY", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionCadenceFromString("QUARTERLY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionCadence("QUARTERLY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EVERY_FOUR_MONTHS", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionCadenceFromString("EVERY_FOUR_MONTHS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionCadence("EVERY_FOUR_MONTHS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EVERY_SIX_MONTHS", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionCadenceFromString("EVERY_SIX_MONTHS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionCadence("EVERY_SIX_MONTHS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ANNUAL", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionCadenceFromString("ANNUAL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionCadence("ANNUAL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EVERY_TWO_YEARS", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionCadenceFromString("EVERY_TWO_YEARS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionCadence("EVERY_TWO_YEARS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewSubscriptionCadenceFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewSubscriptionCadenceFromString("DAILY") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumSubscriptionPricingType(t *testing.T) { + t.Run("NewFromString_STATIC", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionPricingTypeFromString("STATIC") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionPricingType("STATIC"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RELATIVE", func(t *testing.T) { + t.Parallel() + val, err := NewSubscriptionPricingTypeFromString("RELATIVE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SubscriptionPricingType("RELATIVE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewSubscriptionPricingTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewSubscriptionPricingTypeFromString("STATIC") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumTaxCalculationPhase(t *testing.T) { + t.Run("NewFromString_TAX_SUBTOTAL_PHASE", func(t *testing.T) { + t.Parallel() + val, err := NewTaxCalculationPhaseFromString("TAX_SUBTOTAL_PHASE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TaxCalculationPhase("TAX_SUBTOTAL_PHASE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TAX_TOTAL_PHASE", func(t *testing.T) { + t.Parallel() + val, err := NewTaxCalculationPhaseFromString("TAX_TOTAL_PHASE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TaxCalculationPhase("TAX_TOTAL_PHASE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewTaxCalculationPhaseFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewTaxCalculationPhaseFromString("TAX_SUBTOTAL_PHASE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumTaxInclusionType(t *testing.T) { + t.Run("NewFromString_ADDITIVE", func(t *testing.T) { + t.Parallel() + val, err := NewTaxInclusionTypeFromString("ADDITIVE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TaxInclusionType("ADDITIVE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INCLUSIVE", func(t *testing.T) { + t.Parallel() + val, err := NewTaxInclusionTypeFromString("INCLUSIVE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TaxInclusionType("INCLUSIVE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewTaxInclusionTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewTaxInclusionTypeFromString("ADDITIVE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumTeamMemberInvitationStatus(t *testing.T) { + t.Run("NewFromString_UNINVITED", func(t *testing.T) { + t.Parallel() + val, err := NewTeamMemberInvitationStatusFromString("UNINVITED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TeamMemberInvitationStatus("UNINVITED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PENDING", func(t *testing.T) { + t.Parallel() + val, err := NewTeamMemberInvitationStatusFromString("PENDING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TeamMemberInvitationStatus("PENDING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ACCEPTED", func(t *testing.T) { + t.Parallel() + val, err := NewTeamMemberInvitationStatusFromString("ACCEPTED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TeamMemberInvitationStatus("ACCEPTED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewTeamMemberInvitationStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewTeamMemberInvitationStatusFromString("UNINVITED") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumTenderBankAccountDetailsStatus(t *testing.T) { + t.Run("NewFromString_PENDING", func(t *testing.T) { + t.Parallel() + val, err := NewTenderBankAccountDetailsStatusFromString("PENDING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderBankAccountDetailsStatus("PENDING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_COMPLETED", func(t *testing.T) { + t.Parallel() + val, err := NewTenderBankAccountDetailsStatusFromString("COMPLETED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderBankAccountDetailsStatus("COMPLETED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FAILED", func(t *testing.T) { + t.Parallel() + val, err := NewTenderBankAccountDetailsStatusFromString("FAILED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderBankAccountDetailsStatus("FAILED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewTenderBankAccountDetailsStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewTenderBankAccountDetailsStatusFromString("PENDING") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumTenderBuyNowPayLaterDetailsBrand(t *testing.T) { + t.Run("NewFromString_OTHER_BRAND", func(t *testing.T) { + t.Parallel() + val, err := NewTenderBuyNowPayLaterDetailsBrandFromString("OTHER_BRAND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderBuyNowPayLaterDetailsBrand("OTHER_BRAND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AFTERPAY", func(t *testing.T) { + t.Parallel() + val, err := NewTenderBuyNowPayLaterDetailsBrandFromString("AFTERPAY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderBuyNowPayLaterDetailsBrand("AFTERPAY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewTenderBuyNowPayLaterDetailsBrandFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewTenderBuyNowPayLaterDetailsBrandFromString("OTHER_BRAND") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumTenderBuyNowPayLaterDetailsStatus(t *testing.T) { + t.Run("NewFromString_AUTHORIZED", func(t *testing.T) { + t.Parallel() + val, err := NewTenderBuyNowPayLaterDetailsStatusFromString("AUTHORIZED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderBuyNowPayLaterDetailsStatus("AUTHORIZED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CAPTURED", func(t *testing.T) { + t.Parallel() + val, err := NewTenderBuyNowPayLaterDetailsStatusFromString("CAPTURED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderBuyNowPayLaterDetailsStatus("CAPTURED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VOIDED", func(t *testing.T) { + t.Parallel() + val, err := NewTenderBuyNowPayLaterDetailsStatusFromString("VOIDED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderBuyNowPayLaterDetailsStatus("VOIDED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FAILED", func(t *testing.T) { + t.Parallel() + val, err := NewTenderBuyNowPayLaterDetailsStatusFromString("FAILED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderBuyNowPayLaterDetailsStatus("FAILED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewTenderBuyNowPayLaterDetailsStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewTenderBuyNowPayLaterDetailsStatusFromString("AUTHORIZED") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumTenderCardDetailsEntryMethod(t *testing.T) { + t.Run("NewFromString_SWIPED", func(t *testing.T) { + t.Parallel() + val, err := NewTenderCardDetailsEntryMethodFromString("SWIPED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderCardDetailsEntryMethod("SWIPED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_KEYED", func(t *testing.T) { + t.Parallel() + val, err := NewTenderCardDetailsEntryMethodFromString("KEYED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderCardDetailsEntryMethod("KEYED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EMV", func(t *testing.T) { + t.Parallel() + val, err := NewTenderCardDetailsEntryMethodFromString("EMV") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderCardDetailsEntryMethod("EMV"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ON_FILE", func(t *testing.T) { + t.Parallel() + val, err := NewTenderCardDetailsEntryMethodFromString("ON_FILE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderCardDetailsEntryMethod("ON_FILE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CONTACTLESS", func(t *testing.T) { + t.Parallel() + val, err := NewTenderCardDetailsEntryMethodFromString("CONTACTLESS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderCardDetailsEntryMethod("CONTACTLESS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewTenderCardDetailsEntryMethodFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewTenderCardDetailsEntryMethodFromString("SWIPED") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumTenderCardDetailsStatus(t *testing.T) { + t.Run("NewFromString_AUTHORIZED", func(t *testing.T) { + t.Parallel() + val, err := NewTenderCardDetailsStatusFromString("AUTHORIZED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderCardDetailsStatus("AUTHORIZED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CAPTURED", func(t *testing.T) { + t.Parallel() + val, err := NewTenderCardDetailsStatusFromString("CAPTURED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderCardDetailsStatus("CAPTURED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VOIDED", func(t *testing.T) { + t.Parallel() + val, err := NewTenderCardDetailsStatusFromString("VOIDED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderCardDetailsStatus("VOIDED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FAILED", func(t *testing.T) { + t.Parallel() + val, err := NewTenderCardDetailsStatusFromString("FAILED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderCardDetailsStatus("FAILED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewTenderCardDetailsStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewTenderCardDetailsStatusFromString("AUTHORIZED") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumTenderSquareAccountDetailsStatus(t *testing.T) { + t.Run("NewFromString_AUTHORIZED", func(t *testing.T) { + t.Parallel() + val, err := NewTenderSquareAccountDetailsStatusFromString("AUTHORIZED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderSquareAccountDetailsStatus("AUTHORIZED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CAPTURED", func(t *testing.T) { + t.Parallel() + val, err := NewTenderSquareAccountDetailsStatusFromString("CAPTURED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderSquareAccountDetailsStatus("CAPTURED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VOIDED", func(t *testing.T) { + t.Parallel() + val, err := NewTenderSquareAccountDetailsStatusFromString("VOIDED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderSquareAccountDetailsStatus("VOIDED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FAILED", func(t *testing.T) { + t.Parallel() + val, err := NewTenderSquareAccountDetailsStatusFromString("FAILED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderSquareAccountDetailsStatus("FAILED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewTenderSquareAccountDetailsStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewTenderSquareAccountDetailsStatusFromString("AUTHORIZED") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumTenderType(t *testing.T) { + t.Run("NewFromString_CARD", func(t *testing.T) { + t.Parallel() + val, err := NewTenderTypeFromString("CARD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderType("CARD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CASH", func(t *testing.T) { + t.Parallel() + val, err := NewTenderTypeFromString("CASH") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderType("CASH"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_THIRD_PARTY_CARD", func(t *testing.T) { + t.Parallel() + val, err := NewTenderTypeFromString("THIRD_PARTY_CARD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderType("THIRD_PARTY_CARD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SQUARE_GIFT_CARD", func(t *testing.T) { + t.Parallel() + val, err := NewTenderTypeFromString("SQUARE_GIFT_CARD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderType("SQUARE_GIFT_CARD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NO_SALE", func(t *testing.T) { + t.Parallel() + val, err := NewTenderTypeFromString("NO_SALE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderType("NO_SALE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BANK_ACCOUNT", func(t *testing.T) { + t.Parallel() + val, err := NewTenderTypeFromString("BANK_ACCOUNT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderType("BANK_ACCOUNT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_WALLET", func(t *testing.T) { + t.Parallel() + val, err := NewTenderTypeFromString("WALLET") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderType("WALLET"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BUY_NOW_PAY_LATER", func(t *testing.T) { + t.Parallel() + val, err := NewTenderTypeFromString("BUY_NOW_PAY_LATER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderType("BUY_NOW_PAY_LATER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SQUARE_ACCOUNT", func(t *testing.T) { + t.Parallel() + val, err := NewTenderTypeFromString("SQUARE_ACCOUNT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderType("SQUARE_ACCOUNT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_OTHER", func(t *testing.T) { + t.Parallel() + val, err := NewTenderTypeFromString("OTHER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TenderType("OTHER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewTenderTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewTenderTypeFromString("CARD") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumTerminalActionActionType(t *testing.T) { + t.Run("NewFromString_QR_CODE", func(t *testing.T) { + t.Parallel() + val, err := NewTerminalActionActionTypeFromString("QR_CODE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TerminalActionActionType("QR_CODE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PING", func(t *testing.T) { + t.Parallel() + val, err := NewTerminalActionActionTypeFromString("PING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TerminalActionActionType("PING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SAVE_CARD", func(t *testing.T) { + t.Parallel() + val, err := NewTerminalActionActionTypeFromString("SAVE_CARD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TerminalActionActionType("SAVE_CARD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SIGNATURE", func(t *testing.T) { + t.Parallel() + val, err := NewTerminalActionActionTypeFromString("SIGNATURE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TerminalActionActionType("SIGNATURE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CONFIRMATION", func(t *testing.T) { + t.Parallel() + val, err := NewTerminalActionActionTypeFromString("CONFIRMATION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TerminalActionActionType("CONFIRMATION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_RECEIPT", func(t *testing.T) { + t.Parallel() + val, err := NewTerminalActionActionTypeFromString("RECEIPT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TerminalActionActionType("RECEIPT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DATA_COLLECTION", func(t *testing.T) { + t.Parallel() + val, err := NewTerminalActionActionTypeFromString("DATA_COLLECTION") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TerminalActionActionType("DATA_COLLECTION"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SELECT", func(t *testing.T) { + t.Parallel() + val, err := NewTerminalActionActionTypeFromString("SELECT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TerminalActionActionType("SELECT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewTerminalActionActionTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewTerminalActionActionTypeFromString("QR_CODE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumTransactionProduct(t *testing.T) { + t.Run("NewFromString_REGISTER", func(t *testing.T) { + t.Parallel() + val, err := NewTransactionProductFromString("REGISTER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TransactionProduct("REGISTER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EXTERNAL_API", func(t *testing.T) { + t.Parallel() + val, err := NewTransactionProductFromString("EXTERNAL_API") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TransactionProduct("EXTERNAL_API"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_BILLING", func(t *testing.T) { + t.Parallel() + val, err := NewTransactionProductFromString("BILLING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TransactionProduct("BILLING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_APPOINTMENTS", func(t *testing.T) { + t.Parallel() + val, err := NewTransactionProductFromString("APPOINTMENTS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TransactionProduct("APPOINTMENTS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INVOICES", func(t *testing.T) { + t.Parallel() + val, err := NewTransactionProductFromString("INVOICES") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TransactionProduct("INVOICES"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_ONLINE_STORE", func(t *testing.T) { + t.Parallel() + val, err := NewTransactionProductFromString("ONLINE_STORE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TransactionProduct("ONLINE_STORE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PAYROLL", func(t *testing.T) { + t.Parallel() + val, err := NewTransactionProductFromString("PAYROLL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TransactionProduct("PAYROLL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_OTHER", func(t *testing.T) { + t.Parallel() + val, err := NewTransactionProductFromString("OTHER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TransactionProduct("OTHER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewTransactionProductFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewTransactionProductFromString("REGISTER") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumTransactionType(t *testing.T) { + t.Run("NewFromString_DEBIT", func(t *testing.T) { + t.Parallel() + val, err := NewTransactionTypeFromString("DEBIT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TransactionType("DEBIT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CREDIT", func(t *testing.T) { + t.Parallel() + val, err := NewTransactionTypeFromString("CREDIT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, TransactionType("CREDIT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewTransactionTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewTransactionTypeFromString("DEBIT") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumVisibilityFilter(t *testing.T) { + t.Run("NewFromString_ALL", func(t *testing.T) { + t.Parallel() + val, err := NewVisibilityFilterFromString("ALL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, VisibilityFilter("ALL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_READ", func(t *testing.T) { + t.Parallel() + val, err := NewVisibilityFilterFromString("READ") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, VisibilityFilter("READ"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_READ_WRITE", func(t *testing.T) { + t.Parallel() + val, err := NewVisibilityFilterFromString("READ_WRITE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, VisibilityFilter("READ_WRITE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewVisibilityFilterFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewVisibilityFilterFromString("ALL") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumWeekday(t *testing.T) { + t.Run("NewFromString_MON", func(t *testing.T) { + t.Parallel() + val, err := NewWeekdayFromString("MON") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Weekday("MON"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_TUE", func(t *testing.T) { + t.Parallel() + val, err := NewWeekdayFromString("TUE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Weekday("TUE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_WED", func(t *testing.T) { + t.Parallel() + val, err := NewWeekdayFromString("WED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Weekday("WED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_THU", func(t *testing.T) { + t.Parallel() + val, err := NewWeekdayFromString("THU") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Weekday("THU"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_FRI", func(t *testing.T) { + t.Parallel() + val, err := NewWeekdayFromString("FRI") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Weekday("FRI"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SAT", func(t *testing.T) { + t.Parallel() + val, err := NewWeekdayFromString("SAT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Weekday("SAT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SUN", func(t *testing.T) { + t.Parallel() + val, err := NewWeekdayFromString("SUN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, Weekday("SUN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewWeekdayFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewWeekdayFromString("MON") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestExtraPropertiesAcceptedPaymentMethods(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &AcceptedPaymentMethods{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AcceptedPaymentMethods + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesAccumulateLoyaltyPointsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &AccumulateLoyaltyPointsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AccumulateLoyaltyPointsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesAddGroupToCustomerResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &AddGroupToCustomerResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AddGroupToCustomerResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesAdditionalRecipient(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &AdditionalRecipient{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AdditionalRecipient + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesAddress(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Address{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Address + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesAdjustLoyaltyPointsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &AdjustLoyaltyPointsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *AdjustLoyaltyPointsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBankAccountCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BankAccountCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBankAccountCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BankAccountCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBankAccountCreatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BankAccountCreatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountCreatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBankAccountDisabledEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BankAccountDisabledEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountDisabledEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBankAccountDisabledEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BankAccountDisabledEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountDisabledEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBankAccountDisabledEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BankAccountDisabledEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountDisabledEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBankAccountVerifiedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BankAccountVerifiedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountVerifiedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBankAccountVerifiedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BankAccountVerifiedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountVerifiedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBankAccountVerifiedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BankAccountVerifiedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BankAccountVerifiedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchUpsertCustomerCustomAttributesRequestCustomerCustomAttributeUpsertRequest + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBatchUpsertCustomerCustomAttributesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BatchUpsertCustomerCustomAttributesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchUpsertCustomerCustomAttributesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchUpsertCustomerCustomAttributesResponseCustomerCustomAttributeUpsertResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBookingCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BookingCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBookingCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BookingCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBookingCreatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BookingCreatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCreatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBookingCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BookingCustomAttributeDefinitionOwnedCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionOwnedCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBookingCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BookingCustomAttributeDefinitionOwnedDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionOwnedDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBookingCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BookingCustomAttributeDefinitionOwnedUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionOwnedUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBookingCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BookingCustomAttributeDefinitionVisibleCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionVisibleCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBookingCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BookingCustomAttributeDefinitionVisibleDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionVisibleDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBookingCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BookingCustomAttributeDefinitionVisibleUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDefinitionVisibleUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBookingCustomAttributeDeleteRequest(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BookingCustomAttributeDeleteRequest{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDeleteRequest + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBookingCustomAttributeDeleteResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BookingCustomAttributeDeleteResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeDeleteResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBookingCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BookingCustomAttributeOwnedDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeOwnedDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBookingCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BookingCustomAttributeOwnedUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeOwnedUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBookingCustomAttributeUpsertRequest(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BookingCustomAttributeUpsertRequest{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeUpsertRequest + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBookingCustomAttributeUpsertResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BookingCustomAttributeUpsertResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeUpsertResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBookingCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BookingCustomAttributeVisibleDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeVisibleDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBookingCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BookingCustomAttributeVisibleUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingCustomAttributeVisibleUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBookingUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BookingUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBookingUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BookingUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBookingUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BookingUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BookingUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBreak(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Break{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Break + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBreakType(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BreakType{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BreakType + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBulkDeleteBookingCustomAttributesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkDeleteBookingCustomAttributesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteBookingCustomAttributesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteLocationCustomAttributesRequestLocationCustomAttributeDeleteRequest + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBulkDeleteLocationCustomAttributesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkDeleteLocationCustomAttributesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteLocationCustomAttributesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteLocationCustomAttributesResponseLocationCustomAttributeDeleteResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteMerchantCustomAttributesRequestMerchantCustomAttributeDeleteRequest + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBulkDeleteMerchantCustomAttributesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkDeleteMerchantCustomAttributesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteMerchantCustomAttributesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteMerchantCustomAttributesResponseMerchantCustomAttributeDeleteResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteOrderCustomAttributesRequestDeleteCustomAttribute + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBulkDeleteOrderCustomAttributesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkDeleteOrderCustomAttributesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkDeleteOrderCustomAttributesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBulkUpsertBookingCustomAttributesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkUpsertBookingCustomAttributesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertBookingCustomAttributesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertLocationCustomAttributesRequestLocationCustomAttributeUpsertRequest + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBulkUpsertLocationCustomAttributesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkUpsertLocationCustomAttributesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertLocationCustomAttributesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertLocationCustomAttributesResponseLocationCustomAttributeUpsertResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertMerchantCustomAttributesRequestMerchantCustomAttributeUpsertRequest + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBulkUpsertMerchantCustomAttributesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkUpsertMerchantCustomAttributesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertMerchantCustomAttributesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertMerchantCustomAttributesResponseMerchantCustomAttributeUpsertResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertOrderCustomAttributesRequestUpsertCustomAttribute + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBulkUpsertOrderCustomAttributesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BulkUpsertOrderCustomAttributesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BulkUpsertOrderCustomAttributesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCalculateLoyaltyPointsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CalculateLoyaltyPointsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CalculateLoyaltyPointsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCancelLoyaltyPromotionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CancelLoyaltyPromotionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelLoyaltyPromotionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCancelTerminalActionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CancelTerminalActionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelTerminalActionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCancelTerminalCheckoutResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CancelTerminalCheckoutResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelTerminalCheckoutResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCancelTerminalRefundResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CancelTerminalRefundResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CancelTerminalRefundResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCaptureTransactionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CaptureTransactionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CaptureTransactionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCard(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Card{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Card + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCardAutomaticallyUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CardAutomaticallyUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardAutomaticallyUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCardAutomaticallyUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CardAutomaticallyUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardAutomaticallyUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCardAutomaticallyUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CardAutomaticallyUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardAutomaticallyUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCardCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CardCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCardCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CardCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCardCreatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CardCreatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardCreatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCardDisabledEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CardDisabledEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardDisabledEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCardDisabledEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CardDisabledEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardDisabledEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCardDisabledEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CardDisabledEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardDisabledEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCardForgottenEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CardForgottenEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardForgottenEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCardForgottenEventCard(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CardForgottenEventCard{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardForgottenEventCard + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCardForgottenEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CardForgottenEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardForgottenEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCardForgottenEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CardForgottenEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardForgottenEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCardUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CardUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCardUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CardUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCardUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CardUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CardUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCashDrawerDevice(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CashDrawerDevice{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerDevice + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCashDrawerShift(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CashDrawerShift{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShift + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCashDrawerShiftEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CashDrawerShiftEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShiftEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCashDrawerShiftSummary(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CashDrawerShiftSummary{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CashDrawerShiftSummary + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogAvailabilityPeriod(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogAvailabilityPeriod{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogAvailabilityPeriod + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogCategory(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogCategory{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCategory + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogCustomAttributeDefinition(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogCustomAttributeDefinition{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeDefinition + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogCustomAttributeDefinitionNumberConfig(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogCustomAttributeDefinitionNumberConfig{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeDefinitionNumberConfig + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogCustomAttributeDefinitionSelectionConfig(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogCustomAttributeDefinitionSelectionConfig{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeDefinitionSelectionConfig + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeDefinitionSelectionConfigCustomAttributeSelection + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogCustomAttributeDefinitionStringConfig(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogCustomAttributeDefinitionStringConfig{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeDefinitionStringConfig + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogCustomAttributeValue(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogCustomAttributeValue{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogCustomAttributeValue + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogDiscount(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogDiscount{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogDiscount + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogEcomSeoData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogEcomSeoData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogEcomSeoData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogIDMapping(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogIDMapping{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogIDMapping + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogImage(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogImage{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogImage + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogItem(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogItem{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItem + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogItemFoodAndBeverageDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogItemFoodAndBeverageDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemFoodAndBeverageDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogItemFoodAndBeverageDetailsDietaryPreference(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogItemFoodAndBeverageDetailsDietaryPreference{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemFoodAndBeverageDetailsDietaryPreference + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogItemFoodAndBeverageDetailsIngredient(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogItemFoodAndBeverageDetailsIngredient{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemFoodAndBeverageDetailsIngredient + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogItemModifierListInfo(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogItemModifierListInfo{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemModifierListInfo + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogItemOption(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogItemOption{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemOption + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogItemOptionForItem(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogItemOptionForItem{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemOptionForItem + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogItemOptionValue(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogItemOptionValue{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemOptionValue + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogItemOptionValueForItemVariation(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogItemOptionValueForItemVariation{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemOptionValueForItemVariation + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogItemVariation(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogItemVariation{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogItemVariation + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogMeasurementUnit(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogMeasurementUnit{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogMeasurementUnit + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogModifier(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogModifier{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifier + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogModifierList(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogModifierList{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifierList + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogModifierOverride(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogModifierOverride{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogModifierOverride + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogObjectAvailabilityPeriod(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectAvailabilityPeriod{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectAvailabilityPeriod + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogObjectBase(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectBase{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectBase + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogObjectCategory(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectCategory{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectCategory + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogObjectCustomAttributeDefinition(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectCustomAttributeDefinition{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectCustomAttributeDefinition + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogObjectDiscount(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectDiscount{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectDiscount + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogObjectImage(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectImage{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectImage + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogObjectItem(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectItem{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItem + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogObjectItemOption(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectItemOption{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemOption + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogObjectItemOptionValue(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectItemOptionValue{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemOptionValue + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogObjectItemVariation(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectItemVariation{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectItemVariation + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogObjectMeasurementUnit(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectMeasurementUnit{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectMeasurementUnit + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogObjectModifier(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectModifier{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectModifier + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogObjectModifierList(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectModifierList{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectModifierList + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogObjectPricingRule(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectPricingRule{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectPricingRule + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogObjectProductSet(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectProductSet{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectProductSet + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogObjectQuickAmountsSettings(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectQuickAmountsSettings{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectQuickAmountsSettings + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogObjectReference(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectReference{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectReference + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogObjectSubscriptionPlan(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectSubscriptionPlan{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectSubscriptionPlan + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogObjectSubscriptionPlanVariation(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectSubscriptionPlanVariation{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectSubscriptionPlanVariation + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogObjectTax(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectTax{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectTax + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogObjectTimePeriod(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogObjectTimePeriod{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogObjectTimePeriod + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogPricingRule(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogPricingRule{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogPricingRule + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogProductSet(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogProductSet{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogProductSet + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogQuickAmount(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogQuickAmount{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuickAmount + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogQuickAmountsSettings(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogQuickAmountsSettings{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogQuickAmountsSettings + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogStockConversion(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogStockConversion{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogStockConversion + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogSubscriptionPlan(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogSubscriptionPlan{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogSubscriptionPlan + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogSubscriptionPlanVariation(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogSubscriptionPlanVariation{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogSubscriptionPlanVariation + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogTax(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogTax{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogTax + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogTimePeriod(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogTimePeriod{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogTimePeriod + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogV1ID(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogV1ID{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogV1ID + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogVersionUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogVersionUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogVersionUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogVersionUpdatedEventCatalogVersion(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogVersionUpdatedEventCatalogVersion{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogVersionUpdatedEventCatalogVersion + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogVersionUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogVersionUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogVersionUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCatalogVersionUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CatalogVersionUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CatalogVersionUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCategoryPathToRootNode(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CategoryPathToRootNode{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CategoryPathToRootNode + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCheckoutOptions(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CheckoutOptions{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CheckoutOptions + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCollectedData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CollectedData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CollectedData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesConfirmationDecision(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ConfirmationDecision{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ConfirmationDecision + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesConfirmationOptions(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ConfirmationOptions{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ConfirmationOptions + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateBookingCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateBookingCustomAttributeDefinitionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateBookingCustomAttributeDefinitionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateBreakTypeResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateBreakTypeResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateBreakTypeResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateCatalogImageRequest(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateCatalogImageRequest{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCatalogImageRequest + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateCatalogImageResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateCatalogImageResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCatalogImageResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateCustomerCardResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateCustomerCardResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCustomerCardResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateCustomerCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateCustomerCustomAttributeDefinitionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCustomerCustomAttributeDefinitionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateCustomerGroupResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateCustomerGroupResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateCustomerGroupResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateDeviceCodeResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateDeviceCodeResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateDeviceCodeResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateGiftCardActivityResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateGiftCardActivityResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateGiftCardActivityResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateLocationCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateLocationCustomAttributeDefinitionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateLocationCustomAttributeDefinitionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateLoyaltyAccountResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateLoyaltyAccountResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateLoyaltyAccountResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateLoyaltyPromotionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateLoyaltyPromotionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateLoyaltyPromotionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateLoyaltyRewardResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateLoyaltyRewardResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateLoyaltyRewardResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateMerchantCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateMerchantCustomAttributeDefinitionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateMerchantCustomAttributeDefinitionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateOrderCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateOrderCustomAttributeDefinitionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateOrderCustomAttributeDefinitionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateOrderRequest(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateOrderRequest{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateOrderRequest + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreatePaymentLinkResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreatePaymentLinkResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreatePaymentLinkResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateShiftResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateShiftResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateShiftResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateTerminalActionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateTerminalActionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTerminalActionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateTerminalCheckoutResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateTerminalCheckoutResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTerminalCheckoutResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateTerminalRefundResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateTerminalRefundResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateTerminalRefundResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateWebhookSubscriptionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateWebhookSubscriptionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateWebhookSubscriptionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomAttribute(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomAttribute{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttribute + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomAttributeDefinition(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomAttributeDefinition{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeDefinition + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomAttributeDefinitionEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomAttributeDefinitionEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeDefinitionEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomAttributeDefinitionEventDataObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomAttributeDefinitionEventDataObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeDefinitionEventDataObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomAttributeEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomAttributeEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomAttributeEventDataObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomAttributeEventDataObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomAttributeEventDataObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomField(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomField{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomField + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCreatedEventEventContext(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCreatedEventEventContext{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCreatedEventEventContext + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCreatedEventEventContextMerge(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCreatedEventEventContextMerge{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCreatedEventEventContextMerge + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCreatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCreatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCreatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCustomAttributeDefinitionCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeDefinitionCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCustomAttributeDefinitionCreatedPublicEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeDefinitionCreatedPublicEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionCreatedPublicEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCustomAttributeDefinitionDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeDefinitionDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCustomAttributeDefinitionDeletedPublicEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeDefinitionDeletedPublicEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionDeletedPublicEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeDefinitionOwnedCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionOwnedCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeDefinitionOwnedDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionOwnedDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeDefinitionOwnedUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionOwnedUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCustomAttributeDefinitionUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeDefinitionUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCustomAttributeDefinitionUpdatedPublicEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeDefinitionUpdatedPublicEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionUpdatedPublicEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeDefinitionVisibleCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionVisibleCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeDefinitionVisibleDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionVisibleDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeDefinitionVisibleUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDefinitionVisibleUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCustomAttributeDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCustomAttributeDeletedPublicEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeDeletedPublicEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeDeletedPublicEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeOwnedDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeOwnedDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeOwnedUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeOwnedUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCustomAttributeUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCustomAttributeUpdatedPublicEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeUpdatedPublicEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeUpdatedPublicEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeVisibleDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeVisibleDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerCustomAttributeVisibleUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerCustomAttributeVisibleUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerDeletedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerDeletedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerDeletedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerDeletedEventEventContext(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerDeletedEventEventContext{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerDeletedEventEventContext + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerDeletedEventEventContextMerge(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerDeletedEventEventContextMerge{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerDeletedEventEventContextMerge + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerDeletedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerDeletedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerDeletedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerGroup(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerGroup{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerGroup + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerSegment(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerSegment{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerSegment + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCustomerUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CustomerUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CustomerUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDataCollectionOptions(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DataCollectionOptions{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DataCollectionOptions + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDateRange(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DateRange{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DateRange + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeleteBookingCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeleteBookingCustomAttributeDefinitionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteBookingCustomAttributeDefinitionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeleteBookingCustomAttributeResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeleteBookingCustomAttributeResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteBookingCustomAttributeResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeleteBreakTypeResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeleteBreakTypeResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteBreakTypeResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeleteCatalogObjectResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeleteCatalogObjectResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteCatalogObjectResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeleteCustomerCardResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeleteCustomerCardResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteCustomerCardResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeleteCustomerCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeleteCustomerCustomAttributeDefinitionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteCustomerCustomAttributeDefinitionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeleteCustomerCustomAttributeResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeleteCustomerCustomAttributeResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteCustomerCustomAttributeResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeleteCustomerGroupResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeleteCustomerGroupResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteCustomerGroupResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeleteDisputeEvidenceResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeleteDisputeEvidenceResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteDisputeEvidenceResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeleteLocationCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeleteLocationCustomAttributeDefinitionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteLocationCustomAttributeDefinitionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeleteLocationCustomAttributeResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeleteLocationCustomAttributeResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteLocationCustomAttributeResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeleteLoyaltyRewardResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeleteLoyaltyRewardResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteLoyaltyRewardResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeleteMerchantCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeleteMerchantCustomAttributeDefinitionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteMerchantCustomAttributeDefinitionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeleteMerchantCustomAttributeResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeleteMerchantCustomAttributeResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteMerchantCustomAttributeResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeleteOrderCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeleteOrderCustomAttributeDefinitionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteOrderCustomAttributeDefinitionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeleteOrderCustomAttributeResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeleteOrderCustomAttributeResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteOrderCustomAttributeResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeletePaymentLinkResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeletePaymentLinkResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeletePaymentLinkResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeleteShiftResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeleteShiftResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteShiftResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeleteWebhookSubscriptionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeleteWebhookSubscriptionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeleteWebhookSubscriptionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeviceCheckoutOptions(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeviceCheckoutOptions{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCheckoutOptions + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeviceCode(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeviceCode{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCode + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeviceCodePairedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeviceCodePairedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCodePairedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeviceCodePairedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeviceCodePairedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCodePairedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeviceCodePairedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeviceCodePairedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCodePairedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeviceCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeviceCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeviceCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeviceCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeviceCreatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeviceCreatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceCreatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDeviceMetadata(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DeviceMetadata{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DeviceMetadata + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDisputeCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DisputeCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDisputeCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DisputeCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDisputeCreatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DisputeCreatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeCreatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDisputeEvidence(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DisputeEvidence{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidence + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDisputeEvidenceAddedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DisputeEvidenceAddedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceAddedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDisputeEvidenceAddedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DisputeEvidenceAddedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceAddedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDisputeEvidenceAddedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DisputeEvidenceAddedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceAddedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDisputeEvidenceCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DisputeEvidenceCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDisputeEvidenceCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DisputeEvidenceCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDisputeEvidenceCreatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DisputeEvidenceCreatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceCreatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDisputeEvidenceDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DisputeEvidenceDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDisputeEvidenceDeletedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DisputeEvidenceDeletedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceDeletedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDisputeEvidenceDeletedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DisputeEvidenceDeletedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceDeletedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDisputeEvidenceFile(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DisputeEvidenceFile{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceFile + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDisputeEvidenceRemovedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DisputeEvidenceRemovedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceRemovedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDisputeEvidenceRemovedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DisputeEvidenceRemovedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceRemovedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDisputeEvidenceRemovedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DisputeEvidenceRemovedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeEvidenceRemovedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDisputeStateChangedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DisputeStateChangedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateChangedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDisputeStateChangedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DisputeStateChangedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateChangedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDisputeStateChangedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DisputeStateChangedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateChangedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDisputeStateUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DisputeStateUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDisputeStateUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DisputeStateUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesDisputeStateUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &DisputeStateUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *DisputeStateUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesEmployeeWage(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &EmployeeWage{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *EmployeeWage + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesError(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Error{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Error + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesEventTypeMetadata(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &EventTypeMetadata{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *EventTypeMetadata + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesFilterValue(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &FilterValue{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FilterValue + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesFulfillment(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Fulfillment{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Fulfillment + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesFulfillmentDeliveryDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &FulfillmentDeliveryDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentDeliveryDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesFulfillmentFulfillmentEntry(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &FulfillmentFulfillmentEntry{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentFulfillmentEntry + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesFulfillmentPickupDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &FulfillmentPickupDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentPickupDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesFulfillmentPickupDetailsCurbsidePickupDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &FulfillmentPickupDetailsCurbsidePickupDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentPickupDetailsCurbsidePickupDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesFulfillmentRecipient(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &FulfillmentRecipient{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentRecipient + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesFulfillmentShipmentDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &FulfillmentShipmentDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *FulfillmentShipmentDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetBreakTypeResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetBreakTypeResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetBreakTypeResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetCashDrawerShiftResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetCashDrawerShiftResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCashDrawerShiftResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetCatalogObjectResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetCatalogObjectResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCatalogObjectResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetCustomerCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetCustomerCustomAttributeDefinitionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCustomerCustomAttributeDefinitionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetCustomerCustomAttributeResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetCustomerCustomAttributeResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCustomerCustomAttributeResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetCustomerGroupResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetCustomerGroupResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCustomerGroupResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetCustomerSegmentResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetCustomerSegmentResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetCustomerSegmentResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetDeviceCodeResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetDeviceCodeResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetDeviceCodeResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetDisputeEvidenceResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetDisputeEvidenceResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetDisputeEvidenceResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetEmployeeWageResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetEmployeeWageResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetEmployeeWageResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetLoyaltyAccountResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetLoyaltyAccountResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetLoyaltyAccountResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetLoyaltyProgramResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetLoyaltyProgramResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetLoyaltyProgramResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetLoyaltyPromotionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetLoyaltyPromotionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetLoyaltyPromotionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetLoyaltyRewardResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetLoyaltyRewardResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetLoyaltyRewardResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetPaymentLinkResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetPaymentLinkResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetPaymentLinkResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetShiftResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetShiftResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetShiftResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetTeamMemberBookingProfileResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetTeamMemberBookingProfileResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetTeamMemberBookingProfileResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetTeamMemberWageResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetTeamMemberWageResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetTeamMemberWageResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetTerminalActionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetTerminalActionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetTerminalActionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetTerminalCheckoutResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetTerminalCheckoutResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetTerminalCheckoutResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetTerminalRefundResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetTerminalRefundResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetTerminalRefundResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetTransactionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetTransactionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetTransactionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetWageSettingResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetWageSettingResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetWageSettingResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetWebhookSubscriptionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetWebhookSubscriptionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetWebhookSubscriptionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardActivity(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivity{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivity + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardActivityActivate(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityActivate{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityActivate + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardActivityAdjustDecrement(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityAdjustDecrement{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityAdjustDecrement + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardActivityAdjustIncrement(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityAdjustIncrement{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityAdjustIncrement + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardActivityBlock(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityBlock{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityBlock + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardActivityClearBalance(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityClearBalance{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityClearBalance + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardActivityCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardActivityCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardActivityCreatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityCreatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityCreatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardActivityDeactivate(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityDeactivate{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityDeactivate + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardActivityImport(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityImport{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityImport + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardActivityImportReversal(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityImportReversal{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityImportReversal + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardActivityLoad(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityLoad{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityLoad + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardActivityRedeem(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityRedeem{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityRedeem + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardActivityRefund(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityRefund{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityRefund + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardActivityTransferBalanceFrom(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityTransferBalanceFrom{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityTransferBalanceFrom + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardActivityTransferBalanceTo(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityTransferBalanceTo{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityTransferBalanceTo + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardActivityUnblock(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityUnblock{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityUnblock + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardActivityUnlinkedActivityRefund(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityUnlinkedActivityRefund{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityUnlinkedActivityRefund + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardActivityUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardActivityUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardActivityUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardActivityUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardActivityUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardCreatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardCreatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCreatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardCustomerLinkedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardCustomerLinkedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerLinkedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardCustomerLinkedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardCustomerLinkedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerLinkedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardCustomerLinkedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardCustomerLinkedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerLinkedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardCustomerUnlinkedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardCustomerUnlinkedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerUnlinkedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardCustomerUnlinkedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardCustomerUnlinkedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerUnlinkedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardCustomerUnlinkedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardCustomerUnlinkedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardCustomerUnlinkedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGiftCardUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GiftCardUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GiftCardUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInventoryCountUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InventoryCountUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryCountUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInventoryCountUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InventoryCountUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryCountUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInventoryCountUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InventoryCountUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InventoryCountUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoiceCanceledEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoiceCanceledEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCanceledEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoiceCanceledEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoiceCanceledEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCanceledEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoiceCanceledEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoiceCanceledEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCanceledEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoiceCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoiceCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoiceCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoiceCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoiceCreatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoiceCreatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceCreatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoiceDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoiceDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoiceDeletedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoiceDeletedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceDeletedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoicePaymentMadeEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoicePaymentMadeEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentMadeEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoicePaymentMadeEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoicePaymentMadeEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentMadeEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoicePaymentMadeEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoicePaymentMadeEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePaymentMadeEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoicePublishedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoicePublishedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePublishedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoicePublishedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoicePublishedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePublishedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoicePublishedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoicePublishedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoicePublishedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoiceRefundedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoiceRefundedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceRefundedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoiceRefundedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoiceRefundedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceRefundedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoiceRefundedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoiceRefundedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceRefundedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoiceScheduledChargeFailedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoiceScheduledChargeFailedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceScheduledChargeFailedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoiceScheduledChargeFailedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoiceScheduledChargeFailedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceScheduledChargeFailedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoiceScheduledChargeFailedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoiceScheduledChargeFailedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceScheduledChargeFailedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoiceUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoiceUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoiceUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoiceUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesInvoiceUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &InvoiceUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *InvoiceUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesItemVariationLocationOverrides(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ItemVariationLocationOverrides{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ItemVariationLocationOverrides + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesJobAssignment(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &JobAssignment{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobAssignment + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesJobCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &JobCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesJobCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &JobCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesJobCreatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &JobCreatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobCreatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesJobUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &JobUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesJobUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &JobUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesJobUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &JobUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *JobUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLaborScheduledShiftCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LaborScheduledShiftCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLaborScheduledShiftCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LaborScheduledShiftCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLaborScheduledShiftCreatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LaborScheduledShiftCreatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftCreatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLaborScheduledShiftDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LaborScheduledShiftDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLaborScheduledShiftDeletedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LaborScheduledShiftDeletedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftDeletedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLaborScheduledShiftPublishedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LaborScheduledShiftPublishedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftPublishedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLaborScheduledShiftPublishedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LaborScheduledShiftPublishedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftPublishedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLaborScheduledShiftPublishedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LaborScheduledShiftPublishedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftPublishedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLaborScheduledShiftUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LaborScheduledShiftUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLaborScheduledShiftUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LaborScheduledShiftUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLaborScheduledShiftUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LaborScheduledShiftUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborScheduledShiftUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLaborShiftCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LaborShiftCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLaborShiftCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LaborShiftCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLaborShiftCreatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LaborShiftCreatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftCreatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLaborShiftDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LaborShiftDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLaborShiftDeletedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LaborShiftDeletedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftDeletedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLaborShiftUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LaborShiftUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLaborShiftUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LaborShiftUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLaborShiftUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LaborShiftUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborShiftUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLaborTimecardCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LaborTimecardCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLaborTimecardCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LaborTimecardCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLaborTimecardCreatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LaborTimecardCreatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardCreatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLaborTimecardDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LaborTimecardDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLaborTimecardDeletedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LaborTimecardDeletedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardDeletedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLaborTimecardUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LaborTimecardUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLaborTimecardUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LaborTimecardUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLaborTimecardUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LaborTimecardUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LaborTimecardUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListBookingCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListBookingCustomAttributeDefinitionsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListBookingCustomAttributeDefinitionsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListBookingCustomAttributesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListBookingCustomAttributesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListBookingCustomAttributesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListBreakTypesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListBreakTypesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListBreakTypesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListCashDrawerShiftEventsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListCashDrawerShiftEventsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCashDrawerShiftEventsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListCashDrawerShiftsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListCashDrawerShiftsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCashDrawerShiftsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListCustomerCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListCustomerCustomAttributeDefinitionsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCustomerCustomAttributeDefinitionsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListCustomerCustomAttributesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListCustomerCustomAttributesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCustomerCustomAttributesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListCustomerGroupsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListCustomerGroupsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCustomerGroupsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListCustomerSegmentsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListCustomerSegmentsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListCustomerSegmentsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListDeviceCodesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListDeviceCodesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListDeviceCodesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListDisputeEvidenceResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListDisputeEvidenceResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListDisputeEvidenceResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListEmployeeWagesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListEmployeeWagesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListEmployeeWagesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListGiftCardActivitiesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListGiftCardActivitiesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListGiftCardActivitiesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListLocationBookingProfilesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListLocationBookingProfilesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListLocationBookingProfilesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListLocationCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListLocationCustomAttributeDefinitionsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListLocationCustomAttributeDefinitionsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListLocationCustomAttributesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListLocationCustomAttributesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListLocationCustomAttributesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListLoyaltyProgramsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListLoyaltyProgramsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListLoyaltyProgramsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListLoyaltyPromotionsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListLoyaltyPromotionsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListLoyaltyPromotionsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListMerchantCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListMerchantCustomAttributeDefinitionsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListMerchantCustomAttributeDefinitionsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListMerchantCustomAttributesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListMerchantCustomAttributesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListMerchantCustomAttributesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListOrderCustomAttributeDefinitionsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListOrderCustomAttributeDefinitionsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListOrderCustomAttributeDefinitionsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListOrderCustomAttributesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListOrderCustomAttributesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListOrderCustomAttributesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListPaymentLinksResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListPaymentLinksResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListPaymentLinksResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListTeamMemberBookingProfilesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListTeamMemberBookingProfilesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListTeamMemberBookingProfilesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListTeamMemberWagesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListTeamMemberWagesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListTeamMemberWagesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListTransactionsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListTransactionsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListTransactionsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListWebhookEventTypesResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListWebhookEventTypesResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListWebhookEventTypesResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListWebhookSubscriptionsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListWebhookSubscriptionsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListWebhookSubscriptionsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesListWorkweekConfigsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ListWorkweekConfigsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ListWorkweekConfigsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLocationBookingProfile(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LocationBookingProfile{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationBookingProfile + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLocationCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LocationCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLocationCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LocationCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLocationCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LocationCustomAttributeDefinitionOwnedCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionOwnedCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLocationCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LocationCustomAttributeDefinitionOwnedDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionOwnedDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLocationCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LocationCustomAttributeDefinitionOwnedUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionOwnedUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLocationCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LocationCustomAttributeDefinitionVisibleCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionVisibleCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLocationCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LocationCustomAttributeDefinitionVisibleDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionVisibleDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLocationCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LocationCustomAttributeDefinitionVisibleUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeDefinitionVisibleUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLocationCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LocationCustomAttributeOwnedDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeOwnedDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLocationCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LocationCustomAttributeOwnedUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeOwnedUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLocationCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LocationCustomAttributeVisibleDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeVisibleDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLocationCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LocationCustomAttributeVisibleUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationCustomAttributeVisibleUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLocationSettingsUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LocationSettingsUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationSettingsUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLocationSettingsUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LocationSettingsUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationSettingsUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLocationSettingsUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LocationSettingsUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationSettingsUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLocationUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LocationUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLocationUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LocationUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LocationUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyAccount(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyAccount{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccount + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyAccountCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyAccountCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyAccountCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyAccountCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyAccountCreatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyAccountCreatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountCreatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyAccountDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyAccountDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyAccountDeletedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyAccountDeletedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountDeletedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyAccountDeletedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyAccountDeletedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountDeletedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyAccountExpiringPointDeadline(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyAccountExpiringPointDeadline{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountExpiringPointDeadline + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyAccountMapping(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyAccountMapping{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountMapping + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyAccountUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyAccountUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyAccountUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyAccountUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyAccountUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyAccountUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyAccountUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyEventAccumulatePoints(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventAccumulatePoints{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventAccumulatePoints + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyEventAccumulatePromotionPoints(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventAccumulatePromotionPoints{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventAccumulatePromotionPoints + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyEventAdjustPoints(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventAdjustPoints{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventAdjustPoints + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyEventCreateReward(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventCreateReward{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventCreateReward + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyEventCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyEventCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyEventCreatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventCreatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventCreatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyEventDeleteReward(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventDeleteReward{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventDeleteReward + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyEventExpirePoints(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventExpirePoints{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventExpirePoints + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyEventOther(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventOther{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventOther + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyEventRedeemReward(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyEventRedeemReward{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyEventRedeemReward + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyProgram(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgram{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgram + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyProgramAccrualRule(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgramAccrualRule{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramAccrualRule + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyProgramAccrualRuleCategoryData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgramAccrualRuleCategoryData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramAccrualRuleCategoryData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyProgramAccrualRuleItemVariationData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgramAccrualRuleItemVariationData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramAccrualRuleItemVariationData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyProgramAccrualRuleSpendData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgramAccrualRuleSpendData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramAccrualRuleSpendData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyProgramAccrualRuleVisitData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgramAccrualRuleVisitData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramAccrualRuleVisitData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyProgramCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgramCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyProgramCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgramCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyProgramCreatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgramCreatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramCreatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyProgramExpirationPolicy(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgramExpirationPolicy{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramExpirationPolicy + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyProgramRewardTier(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgramRewardTier{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramRewardTier + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyProgramTerminology(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgramTerminology{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramTerminology + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyProgramUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgramUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyProgramUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgramUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyProgramUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyProgramUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyProgramUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyPromotion(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyPromotion{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotion + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyPromotionAvailableTimeData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyPromotionAvailableTimeData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionAvailableTimeData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyPromotionCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyPromotionCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyPromotionCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyPromotionCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyPromotionCreatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyPromotionCreatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionCreatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyPromotionIncentive(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyPromotionIncentive{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionIncentive + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyPromotionIncentivePointsAdditionData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyPromotionIncentivePointsAdditionData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionIncentivePointsAdditionData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyPromotionIncentivePointsMultiplierData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyPromotionIncentivePointsMultiplierData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionIncentivePointsMultiplierData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyPromotionTriggerLimit(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyPromotionTriggerLimit{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionTriggerLimit + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyPromotionUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyPromotionUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyPromotionUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyPromotionUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyPromotionUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyPromotionUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyPromotionUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesLoyaltyReward(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &LoyaltyReward{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *LoyaltyReward + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesMeasurementUnit(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &MeasurementUnit{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MeasurementUnit + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesMeasurementUnitCustom(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &MeasurementUnitCustom{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MeasurementUnitCustom + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesMerchantCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &MerchantCustomAttributeDefinitionOwnedCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionOwnedCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesMerchantCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &MerchantCustomAttributeDefinitionOwnedDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionOwnedDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesMerchantCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &MerchantCustomAttributeDefinitionOwnedUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionOwnedUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesMerchantCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &MerchantCustomAttributeDefinitionVisibleCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionVisibleCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesMerchantCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &MerchantCustomAttributeDefinitionVisibleDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionVisibleDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesMerchantCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &MerchantCustomAttributeDefinitionVisibleUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeDefinitionVisibleUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesMerchantCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &MerchantCustomAttributeOwnedDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeOwnedDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesMerchantCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &MerchantCustomAttributeOwnedUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeOwnedUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesMerchantCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &MerchantCustomAttributeVisibleDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeVisibleDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesMerchantCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &MerchantCustomAttributeVisibleUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantCustomAttributeVisibleUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesMerchantSettingsUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &MerchantSettingsUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantSettingsUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesMerchantSettingsUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &MerchantSettingsUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantSettingsUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesMerchantSettingsUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &MerchantSettingsUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *MerchantSettingsUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesModifierLocationOverrides(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ModifierLocationOverrides{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ModifierLocationOverrides + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesMoney(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Money{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Money + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOauthAuthorizationRevokedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OauthAuthorizationRevokedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OauthAuthorizationRevokedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOauthAuthorizationRevokedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OauthAuthorizationRevokedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OauthAuthorizationRevokedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOauthAuthorizationRevokedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OauthAuthorizationRevokedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OauthAuthorizationRevokedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOauthAuthorizationRevokedEventRevocationObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OauthAuthorizationRevokedEventRevocationObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OauthAuthorizationRevokedEventRevocationObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrder(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Order{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Order + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderCreated(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderCreated{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCreated + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderCreatedObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderCreatedObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCreatedObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderCustomAttributeDefinitionOwnedCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderCustomAttributeDefinitionOwnedCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionOwnedCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderCustomAttributeDefinitionOwnedDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderCustomAttributeDefinitionOwnedDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionOwnedDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderCustomAttributeDefinitionOwnedUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderCustomAttributeDefinitionOwnedUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionOwnedUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderCustomAttributeDefinitionVisibleCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderCustomAttributeDefinitionVisibleCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionVisibleCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderCustomAttributeDefinitionVisibleDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderCustomAttributeDefinitionVisibleDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionVisibleDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderCustomAttributeDefinitionVisibleUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderCustomAttributeDefinitionVisibleUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeDefinitionVisibleUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderCustomAttributeOwnedDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderCustomAttributeOwnedDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeOwnedDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderCustomAttributeOwnedUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderCustomAttributeOwnedUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeOwnedUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderCustomAttributeVisibleDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderCustomAttributeVisibleDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeVisibleDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderCustomAttributeVisibleUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderCustomAttributeVisibleUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderCustomAttributeVisibleUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderFulfillmentUpdated(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderFulfillmentUpdated{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdated + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderFulfillmentUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderFulfillmentUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderFulfillmentUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderFulfillmentUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderFulfillmentUpdatedObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderFulfillmentUpdatedObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdatedObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderFulfillmentUpdatedUpdate(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderFulfillmentUpdatedUpdate{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderFulfillmentUpdatedUpdate + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderLineItem(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderLineItem{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItem + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderLineItemAppliedDiscount(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderLineItemAppliedDiscount{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemAppliedDiscount + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderLineItemAppliedServiceCharge(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderLineItemAppliedServiceCharge{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemAppliedServiceCharge + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderLineItemAppliedTax(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderLineItemAppliedTax{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemAppliedTax + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderLineItemDiscount(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderLineItemDiscount{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemDiscount + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderLineItemModifier(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderLineItemModifier{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemModifier + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderLineItemPricingBlocklists(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderLineItemPricingBlocklists{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemPricingBlocklists + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderLineItemPricingBlocklistsBlockedDiscount(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderLineItemPricingBlocklistsBlockedDiscount{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemPricingBlocklistsBlockedDiscount + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderLineItemPricingBlocklistsBlockedServiceCharge(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderLineItemPricingBlocklistsBlockedServiceCharge{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemPricingBlocklistsBlockedServiceCharge + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderLineItemPricingBlocklistsBlockedTax(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderLineItemPricingBlocklistsBlockedTax{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemPricingBlocklistsBlockedTax + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderLineItemTax(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderLineItemTax{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderLineItemTax + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderMoneyAmounts(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderMoneyAmounts{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderMoneyAmounts + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderPricingOptions(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderPricingOptions{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderPricingOptions + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderQuantityUnit(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderQuantityUnit{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderQuantityUnit + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderReturn(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderReturn{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturn + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderReturnDiscount(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderReturnDiscount{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnDiscount + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderReturnLineItem(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderReturnLineItem{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItem + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderReturnLineItemModifier(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderReturnLineItemModifier{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnLineItemModifier + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderReturnServiceCharge(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderReturnServiceCharge{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnServiceCharge + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderReturnTax(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderReturnTax{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnTax + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderReturnTip(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderReturnTip{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReturnTip + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderReward(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderReward{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderReward + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderRoundingAdjustment(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderRoundingAdjustment{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderRoundingAdjustment + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderServiceCharge(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderServiceCharge{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderServiceCharge + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderSource(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderSource{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderSource + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderUpdated(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderUpdated{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderUpdated + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesOrderUpdatedObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &OrderUpdatedObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *OrderUpdatedObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentCreatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentCreatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentCreatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentLink(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentLink{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentLink + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentLinkRelatedResources(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentLinkRelatedResources{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentLinkRelatedResources + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentOptions(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentOptions{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentOptions + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPaymentUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PaymentUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PaymentUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPayoutFailedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PayoutFailedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutFailedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPayoutFailedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PayoutFailedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutFailedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPayoutFailedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PayoutFailedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutFailedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPayoutPaidEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PayoutPaidEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutPaidEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPayoutPaidEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PayoutPaidEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutPaidEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPayoutPaidEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PayoutPaidEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutPaidEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPayoutSentEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PayoutSentEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutSentEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPayoutSentEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PayoutSentEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutSentEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPayoutSentEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PayoutSentEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PayoutSentEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesPrePopulatedData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &PrePopulatedData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *PrePopulatedData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesProcessingFee(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ProcessingFee{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ProcessingFee + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesQrCodeOptions(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &QrCodeOptions{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *QrCodeOptions + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesQuickPay(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &QuickPay{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *QuickPay + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesReceiptOptions(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ReceiptOptions{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ReceiptOptions + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRedeemLoyaltyRewardResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RedeemLoyaltyRewardResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RedeemLoyaltyRewardResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRefund(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Refund{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Refund + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRefundCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RefundCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRefundCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RefundCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRefundCreatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RefundCreatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundCreatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRefundUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RefundUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRefundUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RefundUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRefundUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RefundUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RefundUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRemoveGroupFromCustomerResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RemoveGroupFromCustomerResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RemoveGroupFromCustomerResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRetrieveBookingCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RetrieveBookingCustomAttributeDefinitionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveBookingCustomAttributeDefinitionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRetrieveBookingCustomAttributeResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RetrieveBookingCustomAttributeResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveBookingCustomAttributeResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRetrieveLocationCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RetrieveLocationCustomAttributeDefinitionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveLocationCustomAttributeDefinitionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRetrieveLocationCustomAttributeResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RetrieveLocationCustomAttributeResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveLocationCustomAttributeResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRetrieveMerchantCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RetrieveMerchantCustomAttributeDefinitionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveMerchantCustomAttributeDefinitionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRetrieveMerchantCustomAttributeResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RetrieveMerchantCustomAttributeResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveMerchantCustomAttributeResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRetrieveOrderCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RetrieveOrderCustomAttributeDefinitionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveOrderCustomAttributeDefinitionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesRetrieveOrderCustomAttributeResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &RetrieveOrderCustomAttributeResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *RetrieveOrderCustomAttributeResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSaveCardOptions(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SaveCardOptions{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SaveCardOptions + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchLoyaltyAccountsRequestLoyaltyAccountQuery(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchLoyaltyAccountsRequestLoyaltyAccountQuery{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchLoyaltyAccountsRequestLoyaltyAccountQuery + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchLoyaltyAccountsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchLoyaltyAccountsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchLoyaltyAccountsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchLoyaltyRewardsRequestLoyaltyRewardQuery(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchLoyaltyRewardsRequestLoyaltyRewardQuery{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchLoyaltyRewardsRequestLoyaltyRewardQuery + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchLoyaltyRewardsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchLoyaltyRewardsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchLoyaltyRewardsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchShiftsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchShiftsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchShiftsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchTerminalActionsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchTerminalActionsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTerminalActionsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchTerminalCheckoutsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchTerminalCheckoutsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTerminalCheckoutsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchTerminalRefundsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchTerminalRefundsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchTerminalRefundsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSelectOption(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SelectOption{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SelectOption + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSelectOptions(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SelectOptions{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SelectOptions + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesShift(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Shift{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Shift + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesShiftFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ShiftFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShiftFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesShiftQuery(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ShiftQuery{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShiftQuery + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesShiftSort(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ShiftSort{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShiftSort + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesShiftWage(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ShiftWage{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShiftWage + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesShiftWorkday(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ShiftWorkday{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShiftWorkday + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesShippingFee(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &ShippingFee{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *ShippingFee + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSignatureImage(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SignatureImage{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SignatureImage + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSignatureOptions(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SignatureOptions{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SignatureOptions + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSourceApplication(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SourceApplication{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SourceApplication + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSubscriptionCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SubscriptionCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSubscriptionCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SubscriptionCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSubscriptionCreatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SubscriptionCreatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionCreatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSubscriptionPhase(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SubscriptionPhase{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionPhase + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSubscriptionPricing(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SubscriptionPricing{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionPricing + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSubscriptionTestResult(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SubscriptionTestResult{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionTestResult + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSubscriptionUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SubscriptionUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSubscriptionUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SubscriptionUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSubscriptionUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SubscriptionUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SubscriptionUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTeamMemberBookingProfile(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TeamMemberBookingProfile{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberBookingProfile + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTeamMemberCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TeamMemberCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTeamMemberCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TeamMemberCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTeamMemberCreatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TeamMemberCreatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberCreatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTeamMemberUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TeamMemberUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTeamMemberUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TeamMemberUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTeamMemberUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TeamMemberUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTeamMemberWage(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TeamMemberWage{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberWage + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTeamMemberWageSettingUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TeamMemberWageSettingUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberWageSettingUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTeamMemberWageSettingUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TeamMemberWageSettingUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberWageSettingUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTeamMemberWageSettingUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TeamMemberWageSettingUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TeamMemberWageSettingUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTender(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Tender{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Tender + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTenderBankAccountDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TenderBankAccountDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TenderBankAccountDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTenderBuyNowPayLaterDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TenderBuyNowPayLaterDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TenderBuyNowPayLaterDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTenderCardDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TenderCardDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TenderCardDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTenderCashDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TenderCashDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TenderCashDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTenderSquareAccountDetails(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TenderSquareAccountDetails{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TenderSquareAccountDetails + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalAction(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalAction{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalAction + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalActionCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalActionCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalActionCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalActionCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalActionCreatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalActionCreatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionCreatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalActionQuery(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalActionQuery{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionQuery + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalActionQueryFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalActionQueryFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionQueryFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalActionQuerySort(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalActionQuerySort{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionQuerySort + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalActionUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalActionUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalActionUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalActionUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalActionUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalActionUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalActionUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalCheckout(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalCheckout{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckout + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalCheckoutCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalCheckoutCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalCheckoutCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalCheckoutCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalCheckoutCreatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalCheckoutCreatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutCreatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalCheckoutQuery(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalCheckoutQuery{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutQuery + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalCheckoutQueryFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalCheckoutQueryFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutQueryFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalCheckoutQuerySort(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalCheckoutQuerySort{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutQuerySort + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalCheckoutUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalCheckoutUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalCheckoutUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalCheckoutUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalCheckoutUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalCheckoutUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalCheckoutUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalRefund(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalRefund{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefund + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalRefundCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalRefundCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalRefundCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalRefundCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalRefundCreatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalRefundCreatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundCreatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalRefundQuery(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalRefundQuery{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundQuery + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalRefundQueryFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalRefundQueryFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundQueryFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalRefundQuerySort(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalRefundQuerySort{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundQuerySort + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalRefundUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalRefundUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalRefundUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalRefundUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTerminalRefundUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TerminalRefundUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TerminalRefundUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTestWebhookSubscriptionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TestWebhookSubscriptionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TestWebhookSubscriptionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTimeRange(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TimeRange{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TimeRange + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTipSettings(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TipSettings{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TipSettings + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTransaction(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Transaction{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Transaction + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTransferOrderCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TransferOrderCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTransferOrderCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TransferOrderCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTransferOrderCreatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TransferOrderCreatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderCreatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTransferOrderDeletedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TransferOrderDeletedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderDeletedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTransferOrderDeletedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TransferOrderDeletedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderDeletedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTransferOrderUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TransferOrderUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTransferOrderUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TransferOrderUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesTransferOrderUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &TransferOrderUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *TransferOrderUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateBookingCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateBookingCustomAttributeDefinitionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateBookingCustomAttributeDefinitionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateBreakTypeResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateBreakTypeResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateBreakTypeResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateCatalogImageRequest(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateCatalogImageRequest{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateCatalogImageRequest + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateCatalogImageResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateCatalogImageResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateCatalogImageResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateCustomerCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateCustomerCustomAttributeDefinitionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateCustomerCustomAttributeDefinitionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateCustomerGroupResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateCustomerGroupResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateCustomerGroupResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateLocationCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateLocationCustomAttributeDefinitionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateLocationCustomAttributeDefinitionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateMerchantCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateMerchantCustomAttributeDefinitionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateMerchantCustomAttributeDefinitionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateOrderCustomAttributeDefinitionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateOrderCustomAttributeDefinitionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateOrderCustomAttributeDefinitionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdatePaymentLinkResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdatePaymentLinkResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdatePaymentLinkResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateShiftResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateShiftResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateShiftResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateWageSettingResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateWageSettingResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateWageSettingResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateWebhookSubscriptionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateWebhookSubscriptionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateWebhookSubscriptionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateWebhookSubscriptionSignatureKeyResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateWebhookSubscriptionSignatureKeyResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateWebhookSubscriptionSignatureKeyResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateWorkweekConfigResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateWorkweekConfigResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateWorkweekConfigResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpsertBookingCustomAttributeResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpsertBookingCustomAttributeResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertBookingCustomAttributeResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpsertCatalogObjectResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpsertCatalogObjectResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertCatalogObjectResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpsertCustomerCustomAttributeResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpsertCustomerCustomAttributeResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertCustomerCustomAttributeResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpsertLocationCustomAttributeResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpsertLocationCustomAttributeResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertLocationCustomAttributeResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpsertMerchantCustomAttributeResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpsertMerchantCustomAttributeResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertMerchantCustomAttributeResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpsertOrderCustomAttributeResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpsertOrderCustomAttributeResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpsertOrderCustomAttributeResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesVendorCreatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &VendorCreatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorCreatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesVendorCreatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &VendorCreatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorCreatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesVendorCreatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &VendorCreatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorCreatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesVendorUpdatedEvent(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &VendorUpdatedEvent{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorUpdatedEvent + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesVendorUpdatedEventData(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &VendorUpdatedEventData{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorUpdatedEventData + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesVendorUpdatedEventObject(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &VendorUpdatedEventObject{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorUpdatedEventObject + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesVoidTransactionResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &VoidTransactionResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VoidTransactionResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesWageSetting(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &WageSetting{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *WageSetting + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesWebhookSubscription(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &WebhookSubscription{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *WebhookSubscription + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesWorkweekConfig(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &WorkweekConfig{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *WorkweekConfig + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/v1transactions.go b/v1transactions.go index 6a51d04..6eb6792 100644 --- a/v1transactions.go +++ b/v1transactions.go @@ -189,6 +189,27 @@ func (v *V1UpdateOrderRequest) SetCanceledNote(canceledNote *string) { v.require(v1UpdateOrderRequestFieldCanceledNote) } +func (v *V1UpdateOrderRequest) UnmarshalJSON(data []byte) error { + type unmarshaler V1UpdateOrderRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *v = V1UpdateOrderRequest(body) + return nil +} + +func (v *V1UpdateOrderRequest) MarshalJSON() ([]byte, error) { + type embed V1UpdateOrderRequest + var marshaler = struct { + embed + }{ + embed: embed(*v), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, v.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( v1MoneyFieldAmount = big.NewInt(1 << 0) v1MoneyFieldCurrencyCode = big.NewInt(1 << 1) @@ -223,6 +244,9 @@ func (v *V1Money) GetCurrencyCode() *Currency { } func (v *V1Money) GetExtraProperties() map[string]interface{} { + if v == nil { + return nil + } return v.extraProperties } @@ -275,6 +299,9 @@ func (v *V1Money) MarshalJSON() ([]byte, error) { } func (v *V1Money) String() string { + if v == nil { + return "" + } if len(v.rawJSON) > 0 { if value, err := internal.StringifyJSON(v.rawJSON); err == nil { return value @@ -551,6 +578,9 @@ func (v *V1Order) GetBtcPriceSatoshi() *float64 { } func (v *V1Order) GetExtraProperties() map[string]interface{} { + if v == nil { + return nil + } return v.extraProperties } @@ -764,6 +794,9 @@ func (v *V1Order) MarshalJSON() ([]byte, error) { } func (v *V1Order) String() string { + if v == nil { + return "" + } if len(v.rawJSON) > 0 { if value, err := internal.StringifyJSON(v.rawJSON); err == nil { return value @@ -810,6 +843,9 @@ func (v *V1OrderHistoryEntry) GetCreatedAt() *string { } func (v *V1OrderHistoryEntry) GetExtraProperties() map[string]interface{} { + if v == nil { + return nil + } return v.extraProperties } @@ -862,6 +898,9 @@ func (v *V1OrderHistoryEntry) MarshalJSON() ([]byte, error) { } func (v *V1OrderHistoryEntry) String() string { + if v == nil { + return "" + } if len(v.rawJSON) > 0 { if value, err := internal.StringifyJSON(v.rawJSON); err == nil { return value @@ -1142,6 +1181,9 @@ func (v *V1Tender) GetIsExchange() *bool { } func (v *V1Tender) GetExtraProperties() map[string]interface{} { + if v == nil { + return nil + } return v.extraProperties } @@ -1292,6 +1334,9 @@ func (v *V1Tender) MarshalJSON() ([]byte, error) { } func (v *V1Tender) String() string { + if v == nil { + return "" + } if len(v.rawJSON) > 0 { if value, err := internal.StringifyJSON(v.rawJSON); err == nil { return value diff --git a/v1transactions/v1transactions_test/v1transactions_test.go b/v1transactions/v1transactions_test/v1transactions_test.go new file mode 100644 index 0000000..88bd840 --- /dev/null +++ b/v1transactions/v1transactions_test/v1transactions_test.go @@ -0,0 +1,148 @@ +// Code generated by Fern. DO NOT EDIT. + +package v1transactions_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestV1TransactionsV1ListOrdersWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.V1ListOrdersRequest{ + LocationID: "location_id", + Order: square.SortOrderDesc.Ptr(), + Limit: square.Int( + 1, + ), + BatchToken: square.String( + "batch_token", + ), + } + _, invocationErr := client.V1Transactions.V1ListOrders( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestV1TransactionsV1ListOrdersWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestV1TransactionsV1ListOrdersWithWireMock", "GET", "/v1/location_id/orders", map[string]string{"order": "DESC", "limit": "1", "batch_token": "batch_token"}, 1) +} + +func TestV1TransactionsV1RetrieveOrderWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.V1RetrieveOrderRequest{ + LocationID: "location_id", + OrderID: "order_id", + } + _, invocationErr := client.V1Transactions.V1RetrieveOrder( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestV1TransactionsV1RetrieveOrderWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestV1TransactionsV1RetrieveOrderWithWireMock", "GET", "/v1/location_id/orders/order_id", nil, 1) +} + +func TestV1TransactionsV1UpdateOrderWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.V1UpdateOrderRequest{ + LocationID: "location_id", + OrderID: "order_id", + Action: square.V1UpdateOrderRequestActionComplete, + } + _, invocationErr := client.V1Transactions.V1UpdateOrder( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestV1TransactionsV1UpdateOrderWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestV1TransactionsV1UpdateOrderWithWireMock", "PUT", "/v1/location_id/orders/order_id", nil, 1) +} diff --git a/v1transactions_test.go b/v1transactions_test.go new file mode 100644 index 0000000..c553b52 --- /dev/null +++ b/v1transactions_test.go @@ -0,0 +1,4469 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersV1ListOrdersRequest(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &V1ListOrdersRequest{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrder", func(t *testing.T) { + obj := &V1ListOrdersRequest{} + var fernTestValueOrder *SortOrder + obj.SetOrder(fernTestValueOrder) + assert.Equal(t, fernTestValueOrder, obj.Order) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &V1ListOrdersRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBatchToken", func(t *testing.T) { + obj := &V1ListOrdersRequest{} + var fernTestValueBatchToken *string + obj.SetBatchToken(fernTestValueBatchToken) + assert.Equal(t, fernTestValueBatchToken, obj.BatchToken) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitV1ListOrdersRequest(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1ListOrdersRequest{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1ListOrdersRequest{} + var fernTestValueOrder *SortOrder + + // Act + obj.SetOrder(fernTestValueOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1ListOrdersRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBatchToken_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1ListOrdersRequest{} + var fernTestValueBatchToken *string + + // Act + obj.SetBatchToken(fernTestValueBatchToken) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersV1RetrieveOrderRequest(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &V1RetrieveOrderRequest{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrderID", func(t *testing.T) { + obj := &V1RetrieveOrderRequest{} + var fernTestValueOrderID string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitV1RetrieveOrderRequest(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1RetrieveOrderRequest{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1RetrieveOrderRequest{} + var fernTestValueOrderID string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersV1UpdateOrderRequest(t *testing.T) { + t.Run("SetLocationID", func(t *testing.T) { + obj := &V1UpdateOrderRequest{} + var fernTestValueLocationID string + obj.SetLocationID(fernTestValueLocationID) + assert.Equal(t, fernTestValueLocationID, obj.LocationID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrderID", func(t *testing.T) { + obj := &V1UpdateOrderRequest{} + var fernTestValueOrderID string + obj.SetOrderID(fernTestValueOrderID) + assert.Equal(t, fernTestValueOrderID, obj.OrderID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAction", func(t *testing.T) { + obj := &V1UpdateOrderRequest{} + var fernTestValueAction V1UpdateOrderRequestAction + obj.SetAction(fernTestValueAction) + assert.Equal(t, fernTestValueAction, obj.Action) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetShippedTrackingNumber", func(t *testing.T) { + obj := &V1UpdateOrderRequest{} + var fernTestValueShippedTrackingNumber *string + obj.SetShippedTrackingNumber(fernTestValueShippedTrackingNumber) + assert.Equal(t, fernTestValueShippedTrackingNumber, obj.ShippedTrackingNumber) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCompletedNote", func(t *testing.T) { + obj := &V1UpdateOrderRequest{} + var fernTestValueCompletedNote *string + obj.SetCompletedNote(fernTestValueCompletedNote) + assert.Equal(t, fernTestValueCompletedNote, obj.CompletedNote) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRefundedNote", func(t *testing.T) { + obj := &V1UpdateOrderRequest{} + var fernTestValueRefundedNote *string + obj.SetRefundedNote(fernTestValueRefundedNote) + assert.Equal(t, fernTestValueRefundedNote, obj.RefundedNote) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCanceledNote", func(t *testing.T) { + obj := &V1UpdateOrderRequest{} + var fernTestValueCanceledNote *string + obj.SetCanceledNote(fernTestValueCanceledNote) + assert.Equal(t, fernTestValueCanceledNote, obj.CanceledNote) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitV1UpdateOrderRequest(t *testing.T) { + t.Run("SetLocationID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1UpdateOrderRequest{} + var fernTestValueLocationID string + + // Act + obj.SetLocationID(fernTestValueLocationID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrderID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1UpdateOrderRequest{} + var fernTestValueOrderID string + + // Act + obj.SetOrderID(fernTestValueOrderID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAction_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1UpdateOrderRequest{} + var fernTestValueAction V1UpdateOrderRequestAction + + // Act + obj.SetAction(fernTestValueAction) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetShippedTrackingNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1UpdateOrderRequest{} + var fernTestValueShippedTrackingNumber *string + + // Act + obj.SetShippedTrackingNumber(fernTestValueShippedTrackingNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCompletedNote_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1UpdateOrderRequest{} + var fernTestValueCompletedNote *string + + // Act + obj.SetCompletedNote(fernTestValueCompletedNote) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRefundedNote_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1UpdateOrderRequest{} + var fernTestValueRefundedNote *string + + // Act + obj.SetRefundedNote(fernTestValueRefundedNote) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCanceledNote_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1UpdateOrderRequest{} + var fernTestValueCanceledNote *string + + // Act + obj.SetCanceledNote(fernTestValueCanceledNote) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersV1Money(t *testing.T) { + t.Run("SetAmount", func(t *testing.T) { + obj := &V1Money{} + var fernTestValueAmount *int + obj.SetAmount(fernTestValueAmount) + assert.Equal(t, fernTestValueAmount, obj.Amount) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCurrencyCode", func(t *testing.T) { + obj := &V1Money{} + var fernTestValueCurrencyCode *Currency + obj.SetCurrencyCode(fernTestValueCurrencyCode) + assert.Equal(t, fernTestValueCurrencyCode, obj.CurrencyCode) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersV1Money(t *testing.T) { + t.Run("GetAmount", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Money{} + var expected *int + obj.Amount = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAmount(), "getter should return the property value") + }) + + t.Run("GetAmount_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Money{} + obj.Amount = nil + + // Act & Assert + assert.Nil(t, obj.GetAmount(), "getter should return nil when property is nil") + }) + + t.Run("GetAmount_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Money + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAmount() // Should return zero value + }) + + t.Run("GetCurrencyCode", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Money{} + var expected *Currency + obj.CurrencyCode = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCurrencyCode(), "getter should return the property value") + }) + + t.Run("GetCurrencyCode_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Money{} + obj.CurrencyCode = nil + + // Act & Assert + assert.Nil(t, obj.GetCurrencyCode(), "getter should return nil when property is nil") + }) + + t.Run("GetCurrencyCode_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Money + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCurrencyCode() // Should return zero value + }) + +} + +func TestSettersMarkExplicitV1Money(t *testing.T) { + t.Run("SetAmount_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Money{} + var fernTestValueAmount *int + + // Act + obj.SetAmount(fernTestValueAmount) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCurrencyCode_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Money{} + var fernTestValueCurrencyCode *Currency + + // Act + obj.SetCurrencyCode(fernTestValueCurrencyCode) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersV1Order(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &V1Order{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetID", func(t *testing.T) { + obj := &V1Order{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBuyerEmail", func(t *testing.T) { + obj := &V1Order{} + var fernTestValueBuyerEmail *string + obj.SetBuyerEmail(fernTestValueBuyerEmail) + assert.Equal(t, fernTestValueBuyerEmail, obj.BuyerEmail) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRecipientName", func(t *testing.T) { + obj := &V1Order{} + var fernTestValueRecipientName *string + obj.SetRecipientName(fernTestValueRecipientName) + assert.Equal(t, fernTestValueRecipientName, obj.RecipientName) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRecipientPhoneNumber", func(t *testing.T) { + obj := &V1Order{} + var fernTestValueRecipientPhoneNumber *string + obj.SetRecipientPhoneNumber(fernTestValueRecipientPhoneNumber) + assert.Equal(t, fernTestValueRecipientPhoneNumber, obj.RecipientPhoneNumber) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetState", func(t *testing.T) { + obj := &V1Order{} + var fernTestValueState *V1OrderState + obj.SetState(fernTestValueState) + assert.Equal(t, fernTestValueState, obj.State) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetShippingAddress", func(t *testing.T) { + obj := &V1Order{} + var fernTestValueShippingAddress *Address + obj.SetShippingAddress(fernTestValueShippingAddress) + assert.Equal(t, fernTestValueShippingAddress, obj.ShippingAddress) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSubtotalMoney", func(t *testing.T) { + obj := &V1Order{} + var fernTestValueSubtotalMoney *V1Money + obj.SetSubtotalMoney(fernTestValueSubtotalMoney) + assert.Equal(t, fernTestValueSubtotalMoney, obj.SubtotalMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTotalShippingMoney", func(t *testing.T) { + obj := &V1Order{} + var fernTestValueTotalShippingMoney *V1Money + obj.SetTotalShippingMoney(fernTestValueTotalShippingMoney) + assert.Equal(t, fernTestValueTotalShippingMoney, obj.TotalShippingMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTotalTaxMoney", func(t *testing.T) { + obj := &V1Order{} + var fernTestValueTotalTaxMoney *V1Money + obj.SetTotalTaxMoney(fernTestValueTotalTaxMoney) + assert.Equal(t, fernTestValueTotalTaxMoney, obj.TotalTaxMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTotalPriceMoney", func(t *testing.T) { + obj := &V1Order{} + var fernTestValueTotalPriceMoney *V1Money + obj.SetTotalPriceMoney(fernTestValueTotalPriceMoney) + assert.Equal(t, fernTestValueTotalPriceMoney, obj.TotalPriceMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTotalDiscountMoney", func(t *testing.T) { + obj := &V1Order{} + var fernTestValueTotalDiscountMoney *V1Money + obj.SetTotalDiscountMoney(fernTestValueTotalDiscountMoney) + assert.Equal(t, fernTestValueTotalDiscountMoney, obj.TotalDiscountMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &V1Order{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &V1Order{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetExpiresAt", func(t *testing.T) { + obj := &V1Order{} + var fernTestValueExpiresAt *string + obj.SetExpiresAt(fernTestValueExpiresAt) + assert.Equal(t, fernTestValueExpiresAt, obj.ExpiresAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPaymentID", func(t *testing.T) { + obj := &V1Order{} + var fernTestValuePaymentID *string + obj.SetPaymentID(fernTestValuePaymentID) + assert.Equal(t, fernTestValuePaymentID, obj.PaymentID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBuyerNote", func(t *testing.T) { + obj := &V1Order{} + var fernTestValueBuyerNote *string + obj.SetBuyerNote(fernTestValueBuyerNote) + assert.Equal(t, fernTestValueBuyerNote, obj.BuyerNote) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCompletedNote", func(t *testing.T) { + obj := &V1Order{} + var fernTestValueCompletedNote *string + obj.SetCompletedNote(fernTestValueCompletedNote) + assert.Equal(t, fernTestValueCompletedNote, obj.CompletedNote) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRefundedNote", func(t *testing.T) { + obj := &V1Order{} + var fernTestValueRefundedNote *string + obj.SetRefundedNote(fernTestValueRefundedNote) + assert.Equal(t, fernTestValueRefundedNote, obj.RefundedNote) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCanceledNote", func(t *testing.T) { + obj := &V1Order{} + var fernTestValueCanceledNote *string + obj.SetCanceledNote(fernTestValueCanceledNote) + assert.Equal(t, fernTestValueCanceledNote, obj.CanceledNote) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTender", func(t *testing.T) { + obj := &V1Order{} + var fernTestValueTender *V1Tender + obj.SetTender(fernTestValueTender) + assert.Equal(t, fernTestValueTender, obj.Tender) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrderHistory", func(t *testing.T) { + obj := &V1Order{} + var fernTestValueOrderHistory []*V1OrderHistoryEntry + obj.SetOrderHistory(fernTestValueOrderHistory) + assert.Equal(t, fernTestValueOrderHistory, obj.OrderHistory) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPromoCode", func(t *testing.T) { + obj := &V1Order{} + var fernTestValuePromoCode *string + obj.SetPromoCode(fernTestValuePromoCode) + assert.Equal(t, fernTestValuePromoCode, obj.PromoCode) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBtcReceiveAddress", func(t *testing.T) { + obj := &V1Order{} + var fernTestValueBtcReceiveAddress *string + obj.SetBtcReceiveAddress(fernTestValueBtcReceiveAddress) + assert.Equal(t, fernTestValueBtcReceiveAddress, obj.BtcReceiveAddress) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetBtcPriceSatoshi", func(t *testing.T) { + obj := &V1Order{} + var fernTestValueBtcPriceSatoshi *float64 + obj.SetBtcPriceSatoshi(fernTestValueBtcPriceSatoshi) + assert.Equal(t, fernTestValueBtcPriceSatoshi, obj.BtcPriceSatoshi) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersV1Order(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetBuyerEmail", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var expected *string + obj.BuyerEmail = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBuyerEmail(), "getter should return the property value") + }) + + t.Run("GetBuyerEmail_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + obj.BuyerEmail = nil + + // Act & Assert + assert.Nil(t, obj.GetBuyerEmail(), "getter should return nil when property is nil") + }) + + t.Run("GetBuyerEmail_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBuyerEmail() // Should return zero value + }) + + t.Run("GetRecipientName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var expected *string + obj.RecipientName = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRecipientName(), "getter should return the property value") + }) + + t.Run("GetRecipientName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + obj.RecipientName = nil + + // Act & Assert + assert.Nil(t, obj.GetRecipientName(), "getter should return nil when property is nil") + }) + + t.Run("GetRecipientName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRecipientName() // Should return zero value + }) + + t.Run("GetRecipientPhoneNumber", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var expected *string + obj.RecipientPhoneNumber = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRecipientPhoneNumber(), "getter should return the property value") + }) + + t.Run("GetRecipientPhoneNumber_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + obj.RecipientPhoneNumber = nil + + // Act & Assert + assert.Nil(t, obj.GetRecipientPhoneNumber(), "getter should return nil when property is nil") + }) + + t.Run("GetRecipientPhoneNumber_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRecipientPhoneNumber() // Should return zero value + }) + + t.Run("GetState", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var expected *V1OrderState + obj.State = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetState(), "getter should return the property value") + }) + + t.Run("GetState_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + obj.State = nil + + // Act & Assert + assert.Nil(t, obj.GetState(), "getter should return nil when property is nil") + }) + + t.Run("GetState_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetState() // Should return zero value + }) + + t.Run("GetShippingAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var expected *Address + obj.ShippingAddress = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetShippingAddress(), "getter should return the property value") + }) + + t.Run("GetShippingAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + obj.ShippingAddress = nil + + // Act & Assert + assert.Nil(t, obj.GetShippingAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetShippingAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetShippingAddress() // Should return zero value + }) + + t.Run("GetSubtotalMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var expected *V1Money + obj.SubtotalMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSubtotalMoney(), "getter should return the property value") + }) + + t.Run("GetSubtotalMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + obj.SubtotalMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetSubtotalMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetSubtotalMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSubtotalMoney() // Should return zero value + }) + + t.Run("GetTotalShippingMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var expected *V1Money + obj.TotalShippingMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTotalShippingMoney(), "getter should return the property value") + }) + + t.Run("GetTotalShippingMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + obj.TotalShippingMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTotalShippingMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTotalShippingMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTotalShippingMoney() // Should return zero value + }) + + t.Run("GetTotalTaxMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var expected *V1Money + obj.TotalTaxMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTotalTaxMoney(), "getter should return the property value") + }) + + t.Run("GetTotalTaxMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + obj.TotalTaxMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTotalTaxMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTotalTaxMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTotalTaxMoney() // Should return zero value + }) + + t.Run("GetTotalPriceMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var expected *V1Money + obj.TotalPriceMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTotalPriceMoney(), "getter should return the property value") + }) + + t.Run("GetTotalPriceMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + obj.TotalPriceMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTotalPriceMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTotalPriceMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTotalPriceMoney() // Should return zero value + }) + + t.Run("GetTotalDiscountMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var expected *V1Money + obj.TotalDiscountMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTotalDiscountMoney(), "getter should return the property value") + }) + + t.Run("GetTotalDiscountMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + obj.TotalDiscountMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTotalDiscountMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTotalDiscountMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTotalDiscountMoney() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetExpiresAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var expected *string + obj.ExpiresAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetExpiresAt(), "getter should return the property value") + }) + + t.Run("GetExpiresAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + obj.ExpiresAt = nil + + // Act & Assert + assert.Nil(t, obj.GetExpiresAt(), "getter should return nil when property is nil") + }) + + t.Run("GetExpiresAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetExpiresAt() // Should return zero value + }) + + t.Run("GetPaymentID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var expected *string + obj.PaymentID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentID(), "getter should return the property value") + }) + + t.Run("GetPaymentID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + obj.PaymentID = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentID(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentID() // Should return zero value + }) + + t.Run("GetBuyerNote", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var expected *string + obj.BuyerNote = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBuyerNote(), "getter should return the property value") + }) + + t.Run("GetBuyerNote_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + obj.BuyerNote = nil + + // Act & Assert + assert.Nil(t, obj.GetBuyerNote(), "getter should return nil when property is nil") + }) + + t.Run("GetBuyerNote_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBuyerNote() // Should return zero value + }) + + t.Run("GetCompletedNote", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var expected *string + obj.CompletedNote = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCompletedNote(), "getter should return the property value") + }) + + t.Run("GetCompletedNote_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + obj.CompletedNote = nil + + // Act & Assert + assert.Nil(t, obj.GetCompletedNote(), "getter should return nil when property is nil") + }) + + t.Run("GetCompletedNote_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCompletedNote() // Should return zero value + }) + + t.Run("GetRefundedNote", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var expected *string + obj.RefundedNote = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRefundedNote(), "getter should return the property value") + }) + + t.Run("GetRefundedNote_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + obj.RefundedNote = nil + + // Act & Assert + assert.Nil(t, obj.GetRefundedNote(), "getter should return nil when property is nil") + }) + + t.Run("GetRefundedNote_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRefundedNote() // Should return zero value + }) + + t.Run("GetCanceledNote", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var expected *string + obj.CanceledNote = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCanceledNote(), "getter should return the property value") + }) + + t.Run("GetCanceledNote_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + obj.CanceledNote = nil + + // Act & Assert + assert.Nil(t, obj.GetCanceledNote(), "getter should return nil when property is nil") + }) + + t.Run("GetCanceledNote_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCanceledNote() // Should return zero value + }) + + t.Run("GetTender", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var expected *V1Tender + obj.Tender = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTender(), "getter should return the property value") + }) + + t.Run("GetTender_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + obj.Tender = nil + + // Act & Assert + assert.Nil(t, obj.GetTender(), "getter should return nil when property is nil") + }) + + t.Run("GetTender_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTender() // Should return zero value + }) + + t.Run("GetOrderHistory", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var expected []*V1OrderHistoryEntry + obj.OrderHistory = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrderHistory(), "getter should return the property value") + }) + + t.Run("GetOrderHistory_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + obj.OrderHistory = nil + + // Act & Assert + assert.Nil(t, obj.GetOrderHistory(), "getter should return nil when property is nil") + }) + + t.Run("GetOrderHistory_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrderHistory() // Should return zero value + }) + + t.Run("GetPromoCode", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var expected *string + obj.PromoCode = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPromoCode(), "getter should return the property value") + }) + + t.Run("GetPromoCode_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + obj.PromoCode = nil + + // Act & Assert + assert.Nil(t, obj.GetPromoCode(), "getter should return nil when property is nil") + }) + + t.Run("GetPromoCode_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPromoCode() // Should return zero value + }) + + t.Run("GetBtcReceiveAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var expected *string + obj.BtcReceiveAddress = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBtcReceiveAddress(), "getter should return the property value") + }) + + t.Run("GetBtcReceiveAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + obj.BtcReceiveAddress = nil + + // Act & Assert + assert.Nil(t, obj.GetBtcReceiveAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetBtcReceiveAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBtcReceiveAddress() // Should return zero value + }) + + t.Run("GetBtcPriceSatoshi", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var expected *float64 + obj.BtcPriceSatoshi = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetBtcPriceSatoshi(), "getter should return the property value") + }) + + t.Run("GetBtcPriceSatoshi_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + obj.BtcPriceSatoshi = nil + + // Act & Assert + assert.Nil(t, obj.GetBtcPriceSatoshi(), "getter should return nil when property is nil") + }) + + t.Run("GetBtcPriceSatoshi_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Order + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetBtcPriceSatoshi() // Should return zero value + }) + +} + +func TestSettersMarkExplicitV1Order(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBuyerEmail_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var fernTestValueBuyerEmail *string + + // Act + obj.SetBuyerEmail(fernTestValueBuyerEmail) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRecipientName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var fernTestValueRecipientName *string + + // Act + obj.SetRecipientName(fernTestValueRecipientName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRecipientPhoneNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var fernTestValueRecipientPhoneNumber *string + + // Act + obj.SetRecipientPhoneNumber(fernTestValueRecipientPhoneNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetState_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var fernTestValueState *V1OrderState + + // Act + obj.SetState(fernTestValueState) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetShippingAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var fernTestValueShippingAddress *Address + + // Act + obj.SetShippingAddress(fernTestValueShippingAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSubtotalMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var fernTestValueSubtotalMoney *V1Money + + // Act + obj.SetSubtotalMoney(fernTestValueSubtotalMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTotalShippingMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var fernTestValueTotalShippingMoney *V1Money + + // Act + obj.SetTotalShippingMoney(fernTestValueTotalShippingMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTotalTaxMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var fernTestValueTotalTaxMoney *V1Money + + // Act + obj.SetTotalTaxMoney(fernTestValueTotalTaxMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTotalPriceMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var fernTestValueTotalPriceMoney *V1Money + + // Act + obj.SetTotalPriceMoney(fernTestValueTotalPriceMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTotalDiscountMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var fernTestValueTotalDiscountMoney *V1Money + + // Act + obj.SetTotalDiscountMoney(fernTestValueTotalDiscountMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetExpiresAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var fernTestValueExpiresAt *string + + // Act + obj.SetExpiresAt(fernTestValueExpiresAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPaymentID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var fernTestValuePaymentID *string + + // Act + obj.SetPaymentID(fernTestValuePaymentID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBuyerNote_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var fernTestValueBuyerNote *string + + // Act + obj.SetBuyerNote(fernTestValueBuyerNote) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCompletedNote_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var fernTestValueCompletedNote *string + + // Act + obj.SetCompletedNote(fernTestValueCompletedNote) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRefundedNote_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var fernTestValueRefundedNote *string + + // Act + obj.SetRefundedNote(fernTestValueRefundedNote) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCanceledNote_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var fernTestValueCanceledNote *string + + // Act + obj.SetCanceledNote(fernTestValueCanceledNote) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTender_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var fernTestValueTender *V1Tender + + // Act + obj.SetTender(fernTestValueTender) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrderHistory_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var fernTestValueOrderHistory []*V1OrderHistoryEntry + + // Act + obj.SetOrderHistory(fernTestValueOrderHistory) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPromoCode_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var fernTestValuePromoCode *string + + // Act + obj.SetPromoCode(fernTestValuePromoCode) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBtcReceiveAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var fernTestValueBtcReceiveAddress *string + + // Act + obj.SetBtcReceiveAddress(fernTestValueBtcReceiveAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetBtcPriceSatoshi_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + var fernTestValueBtcPriceSatoshi *float64 + + // Act + obj.SetBtcPriceSatoshi(fernTestValueBtcPriceSatoshi) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersV1OrderHistoryEntry(t *testing.T) { + t.Run("SetAction", func(t *testing.T) { + obj := &V1OrderHistoryEntry{} + var fernTestValueAction *V1OrderHistoryEntryAction + obj.SetAction(fernTestValueAction) + assert.Equal(t, fernTestValueAction, obj.Action) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &V1OrderHistoryEntry{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersV1OrderHistoryEntry(t *testing.T) { + t.Run("GetAction", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1OrderHistoryEntry{} + var expected *V1OrderHistoryEntryAction + obj.Action = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAction(), "getter should return the property value") + }) + + t.Run("GetAction_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1OrderHistoryEntry{} + obj.Action = nil + + // Act & Assert + assert.Nil(t, obj.GetAction(), "getter should return nil when property is nil") + }) + + t.Run("GetAction_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1OrderHistoryEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAction() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1OrderHistoryEntry{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1OrderHistoryEntry{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1OrderHistoryEntry + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + +} + +func TestSettersMarkExplicitV1OrderHistoryEntry(t *testing.T) { + t.Run("SetAction_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1OrderHistoryEntry{} + var fernTestValueAction *V1OrderHistoryEntryAction + + // Act + obj.SetAction(fernTestValueAction) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1OrderHistoryEntry{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersV1Tender(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &V1Tender{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetType", func(t *testing.T) { + obj := &V1Tender{} + var fernTestValueType *V1TenderType + obj.SetType(fernTestValueType) + assert.Equal(t, fernTestValueType, obj.Type) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &V1Tender{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEmployeeID", func(t *testing.T) { + obj := &V1Tender{} + var fernTestValueEmployeeID *string + obj.SetEmployeeID(fernTestValueEmployeeID) + assert.Equal(t, fernTestValueEmployeeID, obj.EmployeeID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetReceiptURL", func(t *testing.T) { + obj := &V1Tender{} + var fernTestValueReceiptURL *string + obj.SetReceiptURL(fernTestValueReceiptURL) + assert.Equal(t, fernTestValueReceiptURL, obj.ReceiptURL) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCardBrand", func(t *testing.T) { + obj := &V1Tender{} + var fernTestValueCardBrand *V1TenderCardBrand + obj.SetCardBrand(fernTestValueCardBrand) + assert.Equal(t, fernTestValueCardBrand, obj.CardBrand) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPanSuffix", func(t *testing.T) { + obj := &V1Tender{} + var fernTestValuePanSuffix *string + obj.SetPanSuffix(fernTestValuePanSuffix) + assert.Equal(t, fernTestValuePanSuffix, obj.PanSuffix) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEntryMethod", func(t *testing.T) { + obj := &V1Tender{} + var fernTestValueEntryMethod *V1TenderEntryMethod + obj.SetEntryMethod(fernTestValueEntryMethod) + assert.Equal(t, fernTestValueEntryMethod, obj.EntryMethod) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPaymentNote", func(t *testing.T) { + obj := &V1Tender{} + var fernTestValuePaymentNote *string + obj.SetPaymentNote(fernTestValuePaymentNote) + assert.Equal(t, fernTestValuePaymentNote, obj.PaymentNote) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTotalMoney", func(t *testing.T) { + obj := &V1Tender{} + var fernTestValueTotalMoney *V1Money + obj.SetTotalMoney(fernTestValueTotalMoney) + assert.Equal(t, fernTestValueTotalMoney, obj.TotalMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTenderedMoney", func(t *testing.T) { + obj := &V1Tender{} + var fernTestValueTenderedMoney *V1Money + obj.SetTenderedMoney(fernTestValueTenderedMoney) + assert.Equal(t, fernTestValueTenderedMoney, obj.TenderedMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetTenderedAt", func(t *testing.T) { + obj := &V1Tender{} + var fernTestValueTenderedAt *string + obj.SetTenderedAt(fernTestValueTenderedAt) + assert.Equal(t, fernTestValueTenderedAt, obj.TenderedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSettledAt", func(t *testing.T) { + obj := &V1Tender{} + var fernTestValueSettledAt *string + obj.SetSettledAt(fernTestValueSettledAt) + assert.Equal(t, fernTestValueSettledAt, obj.SettledAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetChangeBackMoney", func(t *testing.T) { + obj := &V1Tender{} + var fernTestValueChangeBackMoney *V1Money + obj.SetChangeBackMoney(fernTestValueChangeBackMoney) + assert.Equal(t, fernTestValueChangeBackMoney, obj.ChangeBackMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRefundedMoney", func(t *testing.T) { + obj := &V1Tender{} + var fernTestValueRefundedMoney *V1Money + obj.SetRefundedMoney(fernTestValueRefundedMoney) + assert.Equal(t, fernTestValueRefundedMoney, obj.RefundedMoney) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIsExchange", func(t *testing.T) { + obj := &V1Tender{} + var fernTestValueIsExchange *bool + obj.SetIsExchange(fernTestValueIsExchange) + assert.Equal(t, fernTestValueIsExchange, obj.IsExchange) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersV1Tender(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetType", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var expected *V1TenderType + obj.Type = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetType(), "getter should return the property value") + }) + + t.Run("GetType_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + obj.Type = nil + + // Act & Assert + assert.Nil(t, obj.GetType(), "getter should return nil when property is nil") + }) + + t.Run("GetType_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetType() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetEmployeeID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var expected *string + obj.EmployeeID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEmployeeID(), "getter should return the property value") + }) + + t.Run("GetEmployeeID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + obj.EmployeeID = nil + + // Act & Assert + assert.Nil(t, obj.GetEmployeeID(), "getter should return nil when property is nil") + }) + + t.Run("GetEmployeeID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEmployeeID() // Should return zero value + }) + + t.Run("GetReceiptURL", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var expected *string + obj.ReceiptURL = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetReceiptURL(), "getter should return the property value") + }) + + t.Run("GetReceiptURL_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + obj.ReceiptURL = nil + + // Act & Assert + assert.Nil(t, obj.GetReceiptURL(), "getter should return nil when property is nil") + }) + + t.Run("GetReceiptURL_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetReceiptURL() // Should return zero value + }) + + t.Run("GetCardBrand", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var expected *V1TenderCardBrand + obj.CardBrand = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCardBrand(), "getter should return the property value") + }) + + t.Run("GetCardBrand_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + obj.CardBrand = nil + + // Act & Assert + assert.Nil(t, obj.GetCardBrand(), "getter should return nil when property is nil") + }) + + t.Run("GetCardBrand_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCardBrand() // Should return zero value + }) + + t.Run("GetPanSuffix", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var expected *string + obj.PanSuffix = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPanSuffix(), "getter should return the property value") + }) + + t.Run("GetPanSuffix_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + obj.PanSuffix = nil + + // Act & Assert + assert.Nil(t, obj.GetPanSuffix(), "getter should return nil when property is nil") + }) + + t.Run("GetPanSuffix_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPanSuffix() // Should return zero value + }) + + t.Run("GetEntryMethod", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var expected *V1TenderEntryMethod + obj.EntryMethod = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEntryMethod(), "getter should return the property value") + }) + + t.Run("GetEntryMethod_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + obj.EntryMethod = nil + + // Act & Assert + assert.Nil(t, obj.GetEntryMethod(), "getter should return nil when property is nil") + }) + + t.Run("GetEntryMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEntryMethod() // Should return zero value + }) + + t.Run("GetPaymentNote", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var expected *string + obj.PaymentNote = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPaymentNote(), "getter should return the property value") + }) + + t.Run("GetPaymentNote_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + obj.PaymentNote = nil + + // Act & Assert + assert.Nil(t, obj.GetPaymentNote(), "getter should return nil when property is nil") + }) + + t.Run("GetPaymentNote_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPaymentNote() // Should return zero value + }) + + t.Run("GetTotalMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var expected *V1Money + obj.TotalMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTotalMoney(), "getter should return the property value") + }) + + t.Run("GetTotalMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + obj.TotalMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTotalMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTotalMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTotalMoney() // Should return zero value + }) + + t.Run("GetTenderedMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var expected *V1Money + obj.TenderedMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTenderedMoney(), "getter should return the property value") + }) + + t.Run("GetTenderedMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + obj.TenderedMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetTenderedMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetTenderedMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTenderedMoney() // Should return zero value + }) + + t.Run("GetTenderedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var expected *string + obj.TenderedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetTenderedAt(), "getter should return the property value") + }) + + t.Run("GetTenderedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + obj.TenderedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetTenderedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetTenderedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetTenderedAt() // Should return zero value + }) + + t.Run("GetSettledAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var expected *string + obj.SettledAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetSettledAt(), "getter should return the property value") + }) + + t.Run("GetSettledAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + obj.SettledAt = nil + + // Act & Assert + assert.Nil(t, obj.GetSettledAt(), "getter should return nil when property is nil") + }) + + t.Run("GetSettledAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetSettledAt() // Should return zero value + }) + + t.Run("GetChangeBackMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var expected *V1Money + obj.ChangeBackMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetChangeBackMoney(), "getter should return the property value") + }) + + t.Run("GetChangeBackMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + obj.ChangeBackMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetChangeBackMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetChangeBackMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetChangeBackMoney() // Should return zero value + }) + + t.Run("GetRefundedMoney", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var expected *V1Money + obj.RefundedMoney = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRefundedMoney(), "getter should return the property value") + }) + + t.Run("GetRefundedMoney_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + obj.RefundedMoney = nil + + // Act & Assert + assert.Nil(t, obj.GetRefundedMoney(), "getter should return nil when property is nil") + }) + + t.Run("GetRefundedMoney_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRefundedMoney() // Should return zero value + }) + + t.Run("GetIsExchange", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var expected *bool + obj.IsExchange = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIsExchange(), "getter should return the property value") + }) + + t.Run("GetIsExchange_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + obj.IsExchange = nil + + // Act & Assert + assert.Nil(t, obj.GetIsExchange(), "getter should return nil when property is nil") + }) + + t.Run("GetIsExchange_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Tender + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIsExchange() // Should return zero value + }) + +} + +func TestSettersMarkExplicitV1Tender(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var fernTestValueType *V1TenderType + + // Act + obj.SetType(fernTestValueType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEmployeeID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var fernTestValueEmployeeID *string + + // Act + obj.SetEmployeeID(fernTestValueEmployeeID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetReceiptURL_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var fernTestValueReceiptURL *string + + // Act + obj.SetReceiptURL(fernTestValueReceiptURL) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCardBrand_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var fernTestValueCardBrand *V1TenderCardBrand + + // Act + obj.SetCardBrand(fernTestValueCardBrand) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPanSuffix_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var fernTestValuePanSuffix *string + + // Act + obj.SetPanSuffix(fernTestValuePanSuffix) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEntryMethod_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var fernTestValueEntryMethod *V1TenderEntryMethod + + // Act + obj.SetEntryMethod(fernTestValueEntryMethod) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPaymentNote_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var fernTestValuePaymentNote *string + + // Act + obj.SetPaymentNote(fernTestValuePaymentNote) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTotalMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var fernTestValueTotalMoney *V1Money + + // Act + obj.SetTotalMoney(fernTestValueTotalMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTenderedMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var fernTestValueTenderedMoney *V1Money + + // Act + obj.SetTenderedMoney(fernTestValueTenderedMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetTenderedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var fernTestValueTenderedAt *string + + // Act + obj.SetTenderedAt(fernTestValueTenderedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSettledAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var fernTestValueSettledAt *string + + // Act + obj.SetSettledAt(fernTestValueSettledAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetChangeBackMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var fernTestValueChangeBackMoney *V1Money + + // Act + obj.SetChangeBackMoney(fernTestValueChangeBackMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRefundedMoney_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var fernTestValueRefundedMoney *V1Money + + // Act + obj.SetRefundedMoney(fernTestValueRefundedMoney) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIsExchange_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + var fernTestValueIsExchange *bool + + // Act + obj.SetIsExchange(fernTestValueIsExchange) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingV1Money(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Money{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled V1Money + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj V1Money + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj V1Money + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingV1Order(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Order{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled V1Order + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj V1Order + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj V1Order + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingV1OrderHistoryEntry(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1OrderHistoryEntry{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled V1OrderHistoryEntry + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj V1OrderHistoryEntry + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj V1OrderHistoryEntry + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingV1Tender(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &V1Tender{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled V1Tender + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj V1Tender + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj V1Tender + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringV1Money(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &V1Money{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Money + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringV1Order(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &V1Order{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Order + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringV1OrderHistoryEntry(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &V1OrderHistoryEntry{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1OrderHistoryEntry + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringV1Tender(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &V1Tender{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Tender + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestEnumV1OrderHistoryEntryAction(t *testing.T) { + t.Run("NewFromString_ORDER_PLACED", func(t *testing.T) { + t.Parallel() + val, err := NewV1OrderHistoryEntryActionFromString("ORDER_PLACED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1OrderHistoryEntryAction("ORDER_PLACED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DECLINED", func(t *testing.T) { + t.Parallel() + val, err := NewV1OrderHistoryEntryActionFromString("DECLINED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1OrderHistoryEntryAction("DECLINED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_PAYMENT_RECEIVED", func(t *testing.T) { + t.Parallel() + val, err := NewV1OrderHistoryEntryActionFromString("PAYMENT_RECEIVED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1OrderHistoryEntryAction("PAYMENT_RECEIVED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CANCELED", func(t *testing.T) { + t.Parallel() + val, err := NewV1OrderHistoryEntryActionFromString("CANCELED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1OrderHistoryEntryAction("CANCELED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_COMPLETED", func(t *testing.T) { + t.Parallel() + val, err := NewV1OrderHistoryEntryActionFromString("COMPLETED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1OrderHistoryEntryAction("COMPLETED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_REFUNDED", func(t *testing.T) { + t.Parallel() + val, err := NewV1OrderHistoryEntryActionFromString("REFUNDED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1OrderHistoryEntryAction("REFUNDED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_EXPIRED", func(t *testing.T) { + t.Parallel() + val, err := NewV1OrderHistoryEntryActionFromString("EXPIRED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1OrderHistoryEntryAction("EXPIRED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewV1OrderHistoryEntryActionFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewV1OrderHistoryEntryActionFromString("ORDER_PLACED") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumV1OrderState(t *testing.T) { + t.Run("NewFromString_PENDING", func(t *testing.T) { + t.Parallel() + val, err := NewV1OrderStateFromString("PENDING") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1OrderState("PENDING"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_OPEN", func(t *testing.T) { + t.Parallel() + val, err := NewV1OrderStateFromString("OPEN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1OrderState("OPEN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_COMPLETED", func(t *testing.T) { + t.Parallel() + val, err := NewV1OrderStateFromString("COMPLETED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1OrderState("COMPLETED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CANCELED", func(t *testing.T) { + t.Parallel() + val, err := NewV1OrderStateFromString("CANCELED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1OrderState("CANCELED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_REFUNDED", func(t *testing.T) { + t.Parallel() + val, err := NewV1OrderStateFromString("REFUNDED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1OrderState("REFUNDED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_REJECTED", func(t *testing.T) { + t.Parallel() + val, err := NewV1OrderStateFromString("REJECTED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1OrderState("REJECTED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewV1OrderStateFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewV1OrderStateFromString("PENDING") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumV1TenderCardBrand(t *testing.T) { + t.Run("NewFromString_OTHER_BRAND", func(t *testing.T) { + t.Parallel() + val, err := NewV1TenderCardBrandFromString("OTHER_BRAND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1TenderCardBrand("OTHER_BRAND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_VISA", func(t *testing.T) { + t.Parallel() + val, err := NewV1TenderCardBrandFromString("VISA") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1TenderCardBrand("VISA"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_MASTER_CARD", func(t *testing.T) { + t.Parallel() + val, err := NewV1TenderCardBrandFromString("MASTER_CARD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1TenderCardBrand("MASTER_CARD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_AMERICAN_EXPRESS", func(t *testing.T) { + t.Parallel() + val, err := NewV1TenderCardBrandFromString("AMERICAN_EXPRESS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1TenderCardBrand("AMERICAN_EXPRESS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DISCOVER", func(t *testing.T) { + t.Parallel() + val, err := NewV1TenderCardBrandFromString("DISCOVER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1TenderCardBrand("DISCOVER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_DISCOVER_DINERS", func(t *testing.T) { + t.Parallel() + val, err := NewV1TenderCardBrandFromString("DISCOVER_DINERS") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1TenderCardBrand("DISCOVER_DINERS"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_JCB", func(t *testing.T) { + t.Parallel() + val, err := NewV1TenderCardBrandFromString("JCB") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1TenderCardBrand("JCB"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CHINA_UNIONPAY", func(t *testing.T) { + t.Parallel() + val, err := NewV1TenderCardBrandFromString("CHINA_UNIONPAY") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1TenderCardBrand("CHINA_UNIONPAY"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SQUARE_GIFT_CARD", func(t *testing.T) { + t.Parallel() + val, err := NewV1TenderCardBrandFromString("SQUARE_GIFT_CARD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1TenderCardBrand("SQUARE_GIFT_CARD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewV1TenderCardBrandFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewV1TenderCardBrandFromString("OTHER_BRAND") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumV1TenderEntryMethod(t *testing.T) { + t.Run("NewFromString_MANUAL", func(t *testing.T) { + t.Parallel() + val, err := NewV1TenderEntryMethodFromString("MANUAL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1TenderEntryMethod("MANUAL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SCANNED", func(t *testing.T) { + t.Parallel() + val, err := NewV1TenderEntryMethodFromString("SCANNED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1TenderEntryMethod("SCANNED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SQUARE_CASH", func(t *testing.T) { + t.Parallel() + val, err := NewV1TenderEntryMethodFromString("SQUARE_CASH") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1TenderEntryMethod("SQUARE_CASH"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SQUARE_WALLET", func(t *testing.T) { + t.Parallel() + val, err := NewV1TenderEntryMethodFromString("SQUARE_WALLET") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1TenderEntryMethod("SQUARE_WALLET"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SWIPED", func(t *testing.T) { + t.Parallel() + val, err := NewV1TenderEntryMethodFromString("SWIPED") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1TenderEntryMethod("SWIPED"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_WEB_FORM", func(t *testing.T) { + t.Parallel() + val, err := NewV1TenderEntryMethodFromString("WEB_FORM") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1TenderEntryMethod("WEB_FORM"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_OTHER", func(t *testing.T) { + t.Parallel() + val, err := NewV1TenderEntryMethodFromString("OTHER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1TenderEntryMethod("OTHER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewV1TenderEntryMethodFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewV1TenderEntryMethodFromString("MANUAL") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumV1TenderType(t *testing.T) { + t.Run("NewFromString_CREDIT_CARD", func(t *testing.T) { + t.Parallel() + val, err := NewV1TenderTypeFromString("CREDIT_CARD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1TenderType("CREDIT_CARD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CASH", func(t *testing.T) { + t.Parallel() + val, err := NewV1TenderTypeFromString("CASH") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1TenderType("CASH"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_THIRD_PARTY_CARD", func(t *testing.T) { + t.Parallel() + val, err := NewV1TenderTypeFromString("THIRD_PARTY_CARD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1TenderType("THIRD_PARTY_CARD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_NO_SALE", func(t *testing.T) { + t.Parallel() + val, err := NewV1TenderTypeFromString("NO_SALE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1TenderType("NO_SALE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SQUARE_WALLET", func(t *testing.T) { + t.Parallel() + val, err := NewV1TenderTypeFromString("SQUARE_WALLET") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1TenderType("SQUARE_WALLET"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_SQUARE_GIFT_CARD", func(t *testing.T) { + t.Parallel() + val, err := NewV1TenderTypeFromString("SQUARE_GIFT_CARD") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1TenderType("SQUARE_GIFT_CARD"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_UNKNOWN", func(t *testing.T) { + t.Parallel() + val, err := NewV1TenderTypeFromString("UNKNOWN") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1TenderType("UNKNOWN"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_OTHER", func(t *testing.T) { + t.Parallel() + val, err := NewV1TenderTypeFromString("OTHER") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1TenderType("OTHER"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewV1TenderTypeFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewV1TenderTypeFromString("CREDIT_CARD") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumV1UpdateOrderRequestAction(t *testing.T) { + t.Run("NewFromString_COMPLETE", func(t *testing.T) { + t.Parallel() + val, err := NewV1UpdateOrderRequestActionFromString("COMPLETE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1UpdateOrderRequestAction("COMPLETE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CANCEL", func(t *testing.T) { + t.Parallel() + val, err := NewV1UpdateOrderRequestActionFromString("CANCEL") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1UpdateOrderRequestAction("CANCEL"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_REFUND", func(t *testing.T) { + t.Parallel() + val, err := NewV1UpdateOrderRequestActionFromString("REFUND") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, V1UpdateOrderRequestAction("REFUND"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewV1UpdateOrderRequestActionFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewV1UpdateOrderRequestActionFromString("COMPLETE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestExtraPropertiesV1Money(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &V1Money{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Money + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesV1Order(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &V1Order{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Order + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesV1OrderHistoryEntry(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &V1OrderHistoryEntry{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1OrderHistoryEntry + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesV1Tender(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &V1Tender{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *V1Tender + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/vendors.go b/vendors.go index 580b536..cf85a14 100644 --- a/vendors.go +++ b/vendors.go @@ -15,7 +15,7 @@ var ( type BatchCreateVendorsRequest struct { // Specifies a set of new [Vendor](entity:Vendor) objects as represented by a collection of idempotency-key/`Vendor`-object pairs. - Vendors map[string]*Vendor `json:"vendors,omitempty" url:"-"` + Vendors map[string]*Vendor `json:"vendors" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -35,6 +35,27 @@ func (b *BatchCreateVendorsRequest) SetVendors(vendors map[string]*Vendor) { b.require(batchCreateVendorsRequestFieldVendors) } +func (b *BatchCreateVendorsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler BatchCreateVendorsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *b = BatchCreateVendorsRequest(body) + return nil +} + +func (b *BatchCreateVendorsRequest) MarshalJSON() ([]byte, error) { + type embed BatchCreateVendorsRequest + var marshaler = struct { + embed + }{ + embed: embed(*b), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, b.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( batchGetVendorsRequestFieldVendorIDs = big.NewInt(1 << 0) ) @@ -61,6 +82,27 @@ func (b *BatchGetVendorsRequest) SetVendorIDs(vendorIDs []string) { b.require(batchGetVendorsRequestFieldVendorIDs) } +func (b *BatchGetVendorsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler BatchGetVendorsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *b = BatchGetVendorsRequest(body) + return nil +} + +func (b *BatchGetVendorsRequest) MarshalJSON() ([]byte, error) { + type embed BatchGetVendorsRequest + var marshaler = struct { + embed + }{ + embed: embed(*b), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, b.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( batchUpdateVendorsRequestFieldVendors = big.NewInt(1 << 0) ) @@ -68,7 +110,7 @@ var ( type BatchUpdateVendorsRequest struct { // A set of [UpdateVendorRequest](entity:UpdateVendorRequest) objects encapsulating to-be-updated [Vendor](entity:Vendor) // objects. The set is represented by a collection of `Vendor`-ID/`UpdateVendorRequest`-object pairs. - Vendors map[string]*UpdateVendorRequest `json:"vendors,omitempty" url:"-"` + Vendors map[string]*UpdateVendorRequest `json:"vendors" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -88,6 +130,27 @@ func (b *BatchUpdateVendorsRequest) SetVendors(vendors map[string]*UpdateVendorR b.require(batchUpdateVendorsRequestFieldVendors) } +func (b *BatchUpdateVendorsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler BatchUpdateVendorsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *b = BatchUpdateVendorsRequest(body) + return nil +} + +func (b *BatchUpdateVendorsRequest) MarshalJSON() ([]byte, error) { + type embed BatchUpdateVendorsRequest + var marshaler = struct { + embed + }{ + embed: embed(*b), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, b.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( createVendorRequestFieldIdempotencyKey = big.NewInt(1 << 0) createVendorRequestFieldVendor = big.NewInt(1 << 1) @@ -128,6 +191,27 @@ func (c *CreateVendorRequest) SetVendor(vendor_ *Vendor) { c.require(createVendorRequestFieldVendor) } +func (c *CreateVendorRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateVendorRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateVendorRequest(body) + return nil +} + +func (c *CreateVendorRequest) MarshalJSON() ([]byte, error) { + type embed CreateVendorRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( getVendorsRequestFieldVendorID = big.NewInt(1 << 0) ) @@ -203,6 +287,27 @@ func (s *SearchVendorsRequest) SetCursor(cursor *string) { s.require(searchVendorsRequestFieldCursor) } +func (s *SearchVendorsRequest) UnmarshalJSON(data []byte) error { + type unmarshaler SearchVendorsRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *s = SearchVendorsRequest(body) + return nil +} + +func (s *SearchVendorsRequest) MarshalJSON() ([]byte, error) { + type embed SearchVendorsRequest + var marshaler = struct { + embed + }{ + embed: embed(*s), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, s.explicitFields) + return json.Marshal(explicitMarshaler) +} + // Represents an output from a call to [BulkCreateVendors](api-endpoint:Vendors-BulkCreateVendors). var ( batchCreateVendorsResponseFieldErrors = big.NewInt(1 << 0) @@ -240,6 +345,9 @@ func (b *BatchCreateVendorsResponse) GetResponses() map[string]*CreateVendorResp } func (b *BatchCreateVendorsResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -292,6 +400,9 @@ func (b *BatchCreateVendorsResponse) MarshalJSON() ([]byte, error) { } func (b *BatchCreateVendorsResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -339,6 +450,9 @@ func (b *BatchGetVendorsResponse) GetResponses() map[string]*GetVendorResponse { } func (b *BatchGetVendorsResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -391,6 +505,9 @@ func (b *BatchGetVendorsResponse) MarshalJSON() ([]byte, error) { } func (b *BatchGetVendorsResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -438,6 +555,9 @@ func (b *BatchUpdateVendorsResponse) GetResponses() map[string]*UpdateVendorResp } func (b *BatchUpdateVendorsResponse) GetExtraProperties() map[string]interface{} { + if b == nil { + return nil + } return b.extraProperties } @@ -490,6 +610,9 @@ func (b *BatchUpdateVendorsResponse) MarshalJSON() ([]byte, error) { } func (b *BatchUpdateVendorsResponse) String() string { + if b == nil { + return "" + } if len(b.rawJSON) > 0 { if value, err := internal.StringifyJSON(b.rawJSON); err == nil { return value @@ -535,6 +658,9 @@ func (c *CreateVendorResponse) GetVendor() *Vendor { } func (c *CreateVendorResponse) GetExtraProperties() map[string]interface{} { + if c == nil { + return nil + } return c.extraProperties } @@ -587,6 +713,9 @@ func (c *CreateVendorResponse) MarshalJSON() ([]byte, error) { } func (c *CreateVendorResponse) String() string { + if c == nil { + return "" + } if len(c.rawJSON) > 0 { if value, err := internal.StringifyJSON(c.rawJSON); err == nil { return value @@ -632,6 +761,9 @@ func (g *GetVendorResponse) GetVendor() *Vendor { } func (g *GetVendorResponse) GetExtraProperties() map[string]interface{} { + if g == nil { + return nil + } return g.extraProperties } @@ -684,6 +816,9 @@ func (g *GetVendorResponse) MarshalJSON() ([]byte, error) { } func (g *GetVendorResponse) String() string { + if g == nil { + return "" + } if len(g.rawJSON) > 0 { if value, err := internal.StringifyJSON(g.rawJSON); err == nil { return value @@ -730,6 +865,9 @@ func (s *SearchVendorsRequestFilter) GetStatus() []VendorStatus { } func (s *SearchVendorsRequestFilter) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -782,6 +920,9 @@ func (s *SearchVendorsRequestFilter) MarshalJSON() ([]byte, error) { } func (s *SearchVendorsRequestFilter) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -829,6 +970,9 @@ func (s *SearchVendorsRequestSort) GetOrder() *SortOrder { } func (s *SearchVendorsRequestSort) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -881,6 +1025,9 @@ func (s *SearchVendorsRequestSort) MarshalJSON() ([]byte, error) { } func (s *SearchVendorsRequestSort) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -962,6 +1109,9 @@ func (s *SearchVendorsResponse) GetCursor() *string { } func (s *SearchVendorsResponse) GetExtraProperties() map[string]interface{} { + if s == nil { + return nil + } return s.extraProperties } @@ -1021,6 +1171,9 @@ func (s *SearchVendorsResponse) MarshalJSON() ([]byte, error) { } func (s *SearchVendorsResponse) String() string { + if s == nil { + return "" + } if len(s.rawJSON) > 0 { if value, err := internal.StringifyJSON(s.rawJSON); err == nil { return value @@ -1071,6 +1224,9 @@ func (u *UpdateVendorRequest) GetVendor() *Vendor { } func (u *UpdateVendorRequest) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -1123,6 +1279,9 @@ func (u *UpdateVendorRequest) MarshalJSON() ([]byte, error) { } func (u *UpdateVendorRequest) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -1168,6 +1327,9 @@ func (u *UpdateVendorResponse) GetVendor() *Vendor { } func (u *UpdateVendorResponse) GetExtraProperties() map[string]interface{} { + if u == nil { + return nil + } return u.extraProperties } @@ -1220,6 +1382,9 @@ func (u *UpdateVendorResponse) MarshalJSON() ([]byte, error) { } func (u *UpdateVendorResponse) String() string { + if u == nil { + return "" + } if len(u.rawJSON) > 0 { if value, err := internal.StringifyJSON(u.rawJSON); err == nil { return value @@ -1350,6 +1515,9 @@ func (v *Vendor) GetStatus() *VendorStatus { } func (v *Vendor) GetExtraProperties() map[string]interface{} { + if v == nil { + return nil + } return v.extraProperties } @@ -1458,6 +1626,9 @@ func (v *Vendor) MarshalJSON() ([]byte, error) { } func (v *Vendor) String() string { + if v == nil { + return "" + } if len(v.rawJSON) > 0 { if value, err := internal.StringifyJSON(v.rawJSON); err == nil { return value @@ -1545,6 +1716,9 @@ func (v *VendorContact) GetOrdinal() int { } func (v *VendorContact) GetExtraProperties() map[string]interface{} { + if v == nil { + return nil + } return v.extraProperties } @@ -1625,6 +1799,9 @@ func (v *VendorContact) MarshalJSON() ([]byte, error) { } func (v *VendorContact) String() string { + if v == nil { + return "" + } if len(v.rawJSON) > 0 { if value, err := internal.StringifyJSON(v.rawJSON); err == nil { return value diff --git a/vendors/vendors_test/vendors_test.go b/vendors/vendors_test/vendors_test.go new file mode 100644 index 0000000..4eea328 --- /dev/null +++ b/vendors/vendors_test/vendors_test.go @@ -0,0 +1,349 @@ +// Code generated by Fern. DO NOT EDIT. + +package vendors_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestVendorsBatchCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.BatchCreateVendorsRequest{ + Vendors: map[string]*square.Vendor{ + "8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe": &square.Vendor{ + Name: square.String( + "Joe's Fresh Seafood", + ), + Address: &square.Address{ + AddressLine1: square.String( + "505 Electric Ave", + ), + AddressLine2: square.String( + "Suite 600", + ), + Locality: square.String( + "New York", + ), + AdministrativeDistrictLevel1: square.String( + "NY", + ), + PostalCode: square.String( + "10003", + ), + Country: square.CountryUs.Ptr(), + }, + Contacts: []*square.VendorContact{ + &square.VendorContact{ + Name: square.String( + "Joe Burrow", + ), + EmailAddress: square.String( + "joe@joesfreshseafood.com", + ), + PhoneNumber: square.String( + "1-212-555-4250", + ), + Ordinal: 1, + }, + }, + AccountNumber: square.String( + "4025391", + ), + Note: square.String( + "a vendor", + ), + }, + }, + } + _, invocationErr := client.Vendors.BatchCreate( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestVendorsBatchCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestVendorsBatchCreateWithWireMock", "POST", "/v2/vendors/bulk-create", nil, 1) +} + +func TestVendorsBatchGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.BatchGetVendorsRequest{ + VendorIDs: []string{ + "INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4", + }, + } + _, invocationErr := client.Vendors.BatchGet( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestVendorsBatchGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestVendorsBatchGetWithWireMock", "POST", "/v2/vendors/bulk-retrieve", nil, 1) +} + +func TestVendorsBatchUpdateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.BatchUpdateVendorsRequest{ + Vendors: map[string]*square.UpdateVendorRequest{ + "FMCYHBWT1TPL8MFH52PBMEN92A": &square.UpdateVendorRequest{ + Vendor: &square.Vendor{}, + }, + "INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4": &square.UpdateVendorRequest{ + Vendor: &square.Vendor{}, + }, + }, + } + _, invocationErr := client.Vendors.BatchUpdate( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestVendorsBatchUpdateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestVendorsBatchUpdateWithWireMock", "PUT", "/v2/vendors/bulk-update", nil, 1) +} + +func TestVendorsCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.CreateVendorRequest{ + IdempotencyKey: "8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe", + Vendor: &square.Vendor{ + Name: square.String( + "Joe's Fresh Seafood", + ), + Address: &square.Address{ + AddressLine1: square.String( + "505 Electric Ave", + ), + AddressLine2: square.String( + "Suite 600", + ), + Locality: square.String( + "New York", + ), + AdministrativeDistrictLevel1: square.String( + "NY", + ), + PostalCode: square.String( + "10003", + ), + Country: square.CountryUs.Ptr(), + }, + Contacts: []*square.VendorContact{ + &square.VendorContact{ + Name: square.String( + "Joe Burrow", + ), + EmailAddress: square.String( + "joe@joesfreshseafood.com", + ), + PhoneNumber: square.String( + "1-212-555-4250", + ), + Ordinal: 1, + }, + }, + AccountNumber: square.String( + "4025391", + ), + Note: square.String( + "a vendor", + ), + }, + } + _, invocationErr := client.Vendors.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestVendorsCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestVendorsCreateWithWireMock", "POST", "/v2/vendors/create", nil, 1) +} + +func TestVendorsSearchWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.SearchVendorsRequest{} + _, invocationErr := client.Vendors.Search( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestVendorsSearchWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestVendorsSearchWithWireMock", "POST", "/v2/vendors/search", nil, 1) +} + +func TestVendorsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.GetVendorsRequest{ + VendorID: "vendor_id", + } + _, invocationErr := client.Vendors.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestVendorsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestVendorsGetWithWireMock", "GET", "/v2/vendors/vendor_id", nil, 1) +} + +func TestVendorsUpdateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &square.UpdateVendorsRequest{ + VendorID: "vendor_id", + Body: &square.UpdateVendorRequest{ + IdempotencyKey: square.String( + "8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe", + ), + Vendor: &square.Vendor{ + ID: square.String( + "INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4", + ), + Name: square.String( + "Jack's Chicken Shack", + ), + Version: square.Int( + 1, + ), + Status: square.VendorStatusActive.Ptr(), + }, + }, + } + _, invocationErr := client.Vendors.Update( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestVendorsUpdateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestVendorsUpdateWithWireMock", "PUT", "/v2/vendors/vendor_id", nil, 1) +} diff --git a/vendors_test.go b/vendors_test.go new file mode 100644 index 0000000..04bfb58 --- /dev/null +++ b/vendors_test.go @@ -0,0 +1,4126 @@ +// Code generated by Fern. DO NOT EDIT. + +package square + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersBatchCreateVendorsRequest(t *testing.T) { + t.Run("SetVendors", func(t *testing.T) { + obj := &BatchCreateVendorsRequest{} + var fernTestValueVendors map[string]*Vendor + obj.SetVendors(fernTestValueVendors) + assert.Equal(t, fernTestValueVendors, obj.Vendors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitBatchCreateVendorsRequest(t *testing.T) { + t.Run("SetVendors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchCreateVendorsRequest{} + var fernTestValueVendors map[string]*Vendor + + // Act + obj.SetVendors(fernTestValueVendors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBatchGetVendorsRequest(t *testing.T) { + t.Run("SetVendorIDs", func(t *testing.T) { + obj := &BatchGetVendorsRequest{} + var fernTestValueVendorIDs []string + obj.SetVendorIDs(fernTestValueVendorIDs) + assert.Equal(t, fernTestValueVendorIDs, obj.VendorIDs) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitBatchGetVendorsRequest(t *testing.T) { + t.Run("SetVendorIDs_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetVendorsRequest{} + var fernTestValueVendorIDs []string + + // Act + obj.SetVendorIDs(fernTestValueVendorIDs) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBatchUpdateVendorsRequest(t *testing.T) { + t.Run("SetVendors", func(t *testing.T) { + obj := &BatchUpdateVendorsRequest{} + var fernTestValueVendors map[string]*UpdateVendorRequest + obj.SetVendors(fernTestValueVendors) + assert.Equal(t, fernTestValueVendors, obj.Vendors) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitBatchUpdateVendorsRequest(t *testing.T) { + t.Run("SetVendors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpdateVendorsRequest{} + var fernTestValueVendors map[string]*UpdateVendorRequest + + // Act + obj.SetVendors(fernTestValueVendors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateVendorRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateVendorRequest{} + var fernTestValueIdempotencyKey string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVendor", func(t *testing.T) { + obj := &CreateVendorRequest{} + var fernTestValueVendor *Vendor + obj.SetVendor(fernTestValueVendor) + assert.Equal(t, fernTestValueVendor, obj.Vendor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateVendorRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateVendorRequest{} + var fernTestValueIdempotencyKey string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVendor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateVendorRequest{} + var fernTestValueVendor *Vendor + + // Act + obj.SetVendor(fernTestValueVendor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetVendorsRequest(t *testing.T) { + t.Run("SetVendorID", func(t *testing.T) { + obj := &GetVendorsRequest{} + var fernTestValueVendorID string + obj.SetVendorID(fernTestValueVendorID) + assert.Equal(t, fernTestValueVendorID, obj.VendorID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetVendorsRequest(t *testing.T) { + t.Run("SetVendorID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetVendorsRequest{} + var fernTestValueVendorID string + + // Act + obj.SetVendorID(fernTestValueVendorID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchVendorsRequest(t *testing.T) { + t.Run("SetFilter", func(t *testing.T) { + obj := &SearchVendorsRequest{} + var fernTestValueFilter *SearchVendorsRequestFilter + obj.SetFilter(fernTestValueFilter) + assert.Equal(t, fernTestValueFilter, obj.Filter) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetSort", func(t *testing.T) { + obj := &SearchVendorsRequest{} + var fernTestValueSort *SearchVendorsRequestSort + obj.SetSort(fernTestValueSort) + assert.Equal(t, fernTestValueSort, obj.Sort) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchVendorsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitSearchVendorsRequest(t *testing.T) { + t.Run("SetFilter_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchVendorsRequest{} + var fernTestValueFilter *SearchVendorsRequestFilter + + // Act + obj.SetFilter(fernTestValueFilter) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetSort_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchVendorsRequest{} + var fernTestValueSort *SearchVendorsRequestSort + + // Act + obj.SetSort(fernTestValueSort) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchVendorsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBatchCreateVendorsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &BatchCreateVendorsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetResponses", func(t *testing.T) { + obj := &BatchCreateVendorsResponse{} + var fernTestValueResponses map[string]*CreateVendorResponse + obj.SetResponses(fernTestValueResponses) + assert.Equal(t, fernTestValueResponses, obj.Responses) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBatchCreateVendorsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchCreateVendorsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchCreateVendorsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchCreateVendorsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetResponses", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchCreateVendorsResponse{} + var expected map[string]*CreateVendorResponse + obj.Responses = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetResponses(), "getter should return the property value") + }) + + t.Run("GetResponses_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchCreateVendorsResponse{} + obj.Responses = nil + + // Act & Assert + assert.Nil(t, obj.GetResponses(), "getter should return nil when property is nil") + }) + + t.Run("GetResponses_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchCreateVendorsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetResponses() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBatchCreateVendorsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchCreateVendorsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetResponses_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchCreateVendorsResponse{} + var fernTestValueResponses map[string]*CreateVendorResponse + + // Act + obj.SetResponses(fernTestValueResponses) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBatchGetVendorsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &BatchGetVendorsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetResponses", func(t *testing.T) { + obj := &BatchGetVendorsResponse{} + var fernTestValueResponses map[string]*GetVendorResponse + obj.SetResponses(fernTestValueResponses) + assert.Equal(t, fernTestValueResponses, obj.Responses) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBatchGetVendorsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetVendorsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetVendorsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetVendorsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetResponses", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetVendorsResponse{} + var expected map[string]*GetVendorResponse + obj.Responses = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetResponses(), "getter should return the property value") + }) + + t.Run("GetResponses_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetVendorsResponse{} + obj.Responses = nil + + // Act & Assert + assert.Nil(t, obj.GetResponses(), "getter should return nil when property is nil") + }) + + t.Run("GetResponses_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetVendorsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetResponses() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBatchGetVendorsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetVendorsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetResponses_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetVendorsResponse{} + var fernTestValueResponses map[string]*GetVendorResponse + + // Act + obj.SetResponses(fernTestValueResponses) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersBatchUpdateVendorsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &BatchUpdateVendorsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetResponses", func(t *testing.T) { + obj := &BatchUpdateVendorsResponse{} + var fernTestValueResponses map[string]*UpdateVendorResponse + obj.SetResponses(fernTestValueResponses) + assert.Equal(t, fernTestValueResponses, obj.Responses) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersBatchUpdateVendorsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpdateVendorsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpdateVendorsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchUpdateVendorsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetResponses", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpdateVendorsResponse{} + var expected map[string]*UpdateVendorResponse + obj.Responses = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetResponses(), "getter should return the property value") + }) + + t.Run("GetResponses_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpdateVendorsResponse{} + obj.Responses = nil + + // Act & Assert + assert.Nil(t, obj.GetResponses(), "getter should return nil when property is nil") + }) + + t.Run("GetResponses_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchUpdateVendorsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetResponses() // Should return zero value + }) + +} + +func TestSettersMarkExplicitBatchUpdateVendorsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpdateVendorsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetResponses_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpdateVendorsResponse{} + var fernTestValueResponses map[string]*UpdateVendorResponse + + // Act + obj.SetResponses(fernTestValueResponses) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersCreateVendorResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &CreateVendorResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVendor", func(t *testing.T) { + obj := &CreateVendorResponse{} + var fernTestValueVendor *Vendor + obj.SetVendor(fernTestValueVendor) + assert.Equal(t, fernTestValueVendor, obj.Vendor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersCreateVendorResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateVendorResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateVendorResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateVendorResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetVendor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateVendorResponse{} + var expected *Vendor + obj.Vendor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVendor(), "getter should return the property value") + }) + + t.Run("GetVendor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateVendorResponse{} + obj.Vendor = nil + + // Act & Assert + assert.Nil(t, obj.GetVendor(), "getter should return nil when property is nil") + }) + + t.Run("GetVendor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateVendorResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVendor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitCreateVendorResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateVendorResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVendor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateVendorResponse{} + var fernTestValueVendor *Vendor + + // Act + obj.SetVendor(fernTestValueVendor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetVendorResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &GetVendorResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVendor", func(t *testing.T) { + obj := &GetVendorResponse{} + var fernTestValueVendor *Vendor + obj.SetVendor(fernTestValueVendor) + assert.Equal(t, fernTestValueVendor, obj.Vendor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersGetVendorResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetVendorResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetVendorResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetVendorResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetVendor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetVendorResponse{} + var expected *Vendor + obj.Vendor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVendor(), "getter should return the property value") + }) + + t.Run("GetVendor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetVendorResponse{} + obj.Vendor = nil + + // Act & Assert + assert.Nil(t, obj.GetVendor(), "getter should return nil when property is nil") + }) + + t.Run("GetVendor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetVendorResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVendor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitGetVendorResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetVendorResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVendor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetVendorResponse{} + var fernTestValueVendor *Vendor + + // Act + obj.SetVendor(fernTestValueVendor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchVendorsRequestFilter(t *testing.T) { + t.Run("SetName", func(t *testing.T) { + obj := &SearchVendorsRequestFilter{} + var fernTestValueName []string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &SearchVendorsRequestFilter{} + var fernTestValueStatus []VendorStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchVendorsRequestFilter(t *testing.T) { + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchVendorsRequestFilter{} + var expected []string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchVendorsRequestFilter{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchVendorsRequestFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchVendorsRequestFilter{} + var expected []VendorStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchVendorsRequestFilter{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchVendorsRequestFilter + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchVendorsRequestFilter(t *testing.T) { + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchVendorsRequestFilter{} + var fernTestValueName []string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchVendorsRequestFilter{} + var fernTestValueStatus []VendorStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchVendorsRequestSort(t *testing.T) { + t.Run("SetField", func(t *testing.T) { + obj := &SearchVendorsRequestSort{} + var fernTestValueField *SearchVendorsRequestSortField + obj.SetField(fernTestValueField) + assert.Equal(t, fernTestValueField, obj.Field) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrder", func(t *testing.T) { + obj := &SearchVendorsRequestSort{} + var fernTestValueOrder *SortOrder + obj.SetOrder(fernTestValueOrder) + assert.Equal(t, fernTestValueOrder, obj.Order) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchVendorsRequestSort(t *testing.T) { + t.Run("GetField", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchVendorsRequestSort{} + var expected *SearchVendorsRequestSortField + obj.Field = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetField(), "getter should return the property value") + }) + + t.Run("GetField_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchVendorsRequestSort{} + obj.Field = nil + + // Act & Assert + assert.Nil(t, obj.GetField(), "getter should return nil when property is nil") + }) + + t.Run("GetField_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchVendorsRequestSort + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetField() // Should return zero value + }) + + t.Run("GetOrder", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchVendorsRequestSort{} + var expected *SortOrder + obj.Order = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrder(), "getter should return the property value") + }) + + t.Run("GetOrder_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchVendorsRequestSort{} + obj.Order = nil + + // Act & Assert + assert.Nil(t, obj.GetOrder(), "getter should return nil when property is nil") + }) + + t.Run("GetOrder_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchVendorsRequestSort + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrder() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchVendorsRequestSort(t *testing.T) { + t.Run("SetField_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchVendorsRequestSort{} + var fernTestValueField *SearchVendorsRequestSortField + + // Act + obj.SetField(fernTestValueField) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrder_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchVendorsRequestSort{} + var fernTestValueOrder *SortOrder + + // Act + obj.SetOrder(fernTestValueOrder) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersSearchVendorsResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &SearchVendorsResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVendors", func(t *testing.T) { + obj := &SearchVendorsResponse{} + var fernTestValueVendors []*Vendor + obj.SetVendors(fernTestValueVendors) + assert.Equal(t, fernTestValueVendors, obj.Vendors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCursor", func(t *testing.T) { + obj := &SearchVendorsResponse{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersSearchVendorsResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchVendorsResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchVendorsResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchVendorsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetVendors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchVendorsResponse{} + var expected []*Vendor + obj.Vendors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVendors(), "getter should return the property value") + }) + + t.Run("GetVendors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchVendorsResponse{} + obj.Vendors = nil + + // Act & Assert + assert.Nil(t, obj.GetVendors(), "getter should return nil when property is nil") + }) + + t.Run("GetVendors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchVendorsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVendors() // Should return zero value + }) + + t.Run("GetCursor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchVendorsResponse{} + var expected *string + obj.Cursor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCursor(), "getter should return the property value") + }) + + t.Run("GetCursor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchVendorsResponse{} + obj.Cursor = nil + + // Act & Assert + assert.Nil(t, obj.GetCursor(), "getter should return nil when property is nil") + }) + + t.Run("GetCursor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchVendorsResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCursor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitSearchVendorsResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchVendorsResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVendors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchVendorsResponse{} + var fernTestValueVendors []*Vendor + + // Act + obj.SetVendors(fernTestValueVendors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchVendorsResponse{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateVendorRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &UpdateVendorRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVendor", func(t *testing.T) { + obj := &UpdateVendorRequest{} + var fernTestValueVendor *Vendor + obj.SetVendor(fernTestValueVendor) + assert.Equal(t, fernTestValueVendor, obj.Vendor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateVendorRequest(t *testing.T) { + t.Run("GetIdempotencyKey", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateVendorRequest{} + var expected *string + obj.IdempotencyKey = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetIdempotencyKey(), "getter should return the property value") + }) + + t.Run("GetIdempotencyKey_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateVendorRequest{} + obj.IdempotencyKey = nil + + // Act & Assert + assert.Nil(t, obj.GetIdempotencyKey(), "getter should return nil when property is nil") + }) + + t.Run("GetIdempotencyKey_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateVendorRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetIdempotencyKey() // Should return zero value + }) + + t.Run("GetVendor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateVendorRequest{} + var expected *Vendor + obj.Vendor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVendor(), "getter should return the property value") + }) + + t.Run("GetVendor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateVendorRequest{} + obj.Vendor = nil + + // Act & Assert + assert.Nil(t, obj.GetVendor(), "getter should return nil when property is nil") + }) + + t.Run("GetVendor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateVendorRequest + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVendor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateVendorRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateVendorRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVendor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateVendorRequest{} + var fernTestValueVendor *Vendor + + // Act + obj.SetVendor(fernTestValueVendor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateVendorResponse(t *testing.T) { + t.Run("SetErrors", func(t *testing.T) { + obj := &UpdateVendorResponse{} + var fernTestValueErrors []*Error + obj.SetErrors(fernTestValueErrors) + assert.Equal(t, fernTestValueErrors, obj.Errors) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVendor", func(t *testing.T) { + obj := &UpdateVendorResponse{} + var fernTestValueVendor *Vendor + obj.SetVendor(fernTestValueVendor) + assert.Equal(t, fernTestValueVendor, obj.Vendor) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersUpdateVendorResponse(t *testing.T) { + t.Run("GetErrors", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateVendorResponse{} + var expected []*Error + obj.Errors = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetErrors(), "getter should return the property value") + }) + + t.Run("GetErrors_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateVendorResponse{} + obj.Errors = nil + + // Act & Assert + assert.Nil(t, obj.GetErrors(), "getter should return nil when property is nil") + }) + + t.Run("GetErrors_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateVendorResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetErrors() // Should return zero value + }) + + t.Run("GetVendor", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateVendorResponse{} + var expected *Vendor + obj.Vendor = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVendor(), "getter should return the property value") + }) + + t.Run("GetVendor_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateVendorResponse{} + obj.Vendor = nil + + // Act & Assert + assert.Nil(t, obj.GetVendor(), "getter should return nil when property is nil") + }) + + t.Run("GetVendor_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateVendorResponse + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVendor() // Should return zero value + }) + +} + +func TestSettersMarkExplicitUpdateVendorResponse(t *testing.T) { + t.Run("SetErrors_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateVendorResponse{} + var fernTestValueErrors []*Error + + // Act + obj.SetErrors(fernTestValueErrors) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVendor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateVendorResponse{} + var fernTestValueVendor *Vendor + + // Act + obj.SetVendor(fernTestValueVendor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersVendor(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &Vendor{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetCreatedAt", func(t *testing.T) { + obj := &Vendor{} + var fernTestValueCreatedAt *string + obj.SetCreatedAt(fernTestValueCreatedAt) + assert.Equal(t, fernTestValueCreatedAt, obj.CreatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetUpdatedAt", func(t *testing.T) { + obj := &Vendor{} + var fernTestValueUpdatedAt *string + obj.SetUpdatedAt(fernTestValueUpdatedAt) + assert.Equal(t, fernTestValueUpdatedAt, obj.UpdatedAt) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &Vendor{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAddress", func(t *testing.T) { + obj := &Vendor{} + var fernTestValueAddress *Address + obj.SetAddress(fernTestValueAddress) + assert.Equal(t, fernTestValueAddress, obj.Address) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetContacts", func(t *testing.T) { + obj := &Vendor{} + var fernTestValueContacts []*VendorContact + obj.SetContacts(fernTestValueContacts) + assert.Equal(t, fernTestValueContacts, obj.Contacts) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetAccountNumber", func(t *testing.T) { + obj := &Vendor{} + var fernTestValueAccountNumber *string + obj.SetAccountNumber(fernTestValueAccountNumber) + assert.Equal(t, fernTestValueAccountNumber, obj.AccountNumber) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetNote", func(t *testing.T) { + obj := &Vendor{} + var fernTestValueNote *string + obj.SetNote(fernTestValueNote) + assert.Equal(t, fernTestValueNote, obj.Note) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetVersion", func(t *testing.T) { + obj := &Vendor{} + var fernTestValueVersion *int + obj.SetVersion(fernTestValueVersion) + assert.Equal(t, fernTestValueVersion, obj.Version) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetStatus", func(t *testing.T) { + obj := &Vendor{} + var fernTestValueStatus *VendorStatus + obj.SetStatus(fernTestValueStatus) + assert.Equal(t, fernTestValueStatus, obj.Status) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersVendor(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Vendor + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetCreatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + var expected *string + obj.CreatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetCreatedAt(), "getter should return the property value") + }) + + t.Run("GetCreatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + obj.CreatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetCreatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetCreatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Vendor + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetCreatedAt() // Should return zero value + }) + + t.Run("GetUpdatedAt", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + var expected *string + obj.UpdatedAt = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetUpdatedAt(), "getter should return the property value") + }) + + t.Run("GetUpdatedAt_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + obj.UpdatedAt = nil + + // Act & Assert + assert.Nil(t, obj.GetUpdatedAt(), "getter should return nil when property is nil") + }) + + t.Run("GetUpdatedAt_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Vendor + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetUpdatedAt() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Vendor + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + var expected *Address + obj.Address = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAddress(), "getter should return the property value") + }) + + t.Run("GetAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + obj.Address = nil + + // Act & Assert + assert.Nil(t, obj.GetAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Vendor + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAddress() // Should return zero value + }) + + t.Run("GetContacts", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + var expected []*VendorContact + obj.Contacts = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetContacts(), "getter should return the property value") + }) + + t.Run("GetContacts_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + obj.Contacts = nil + + // Act & Assert + assert.Nil(t, obj.GetContacts(), "getter should return nil when property is nil") + }) + + t.Run("GetContacts_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Vendor + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetContacts() // Should return zero value + }) + + t.Run("GetAccountNumber", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + var expected *string + obj.AccountNumber = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetAccountNumber(), "getter should return the property value") + }) + + t.Run("GetAccountNumber_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + obj.AccountNumber = nil + + // Act & Assert + assert.Nil(t, obj.GetAccountNumber(), "getter should return nil when property is nil") + }) + + t.Run("GetAccountNumber_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Vendor + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetAccountNumber() // Should return zero value + }) + + t.Run("GetNote", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + var expected *string + obj.Note = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetNote(), "getter should return the property value") + }) + + t.Run("GetNote_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + obj.Note = nil + + // Act & Assert + assert.Nil(t, obj.GetNote(), "getter should return nil when property is nil") + }) + + t.Run("GetNote_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Vendor + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetNote() // Should return zero value + }) + + t.Run("GetVersion", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + var expected *int + obj.Version = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetVersion(), "getter should return the property value") + }) + + t.Run("GetVersion_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + obj.Version = nil + + // Act & Assert + assert.Nil(t, obj.GetVersion(), "getter should return nil when property is nil") + }) + + t.Run("GetVersion_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Vendor + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetVersion() // Should return zero value + }) + + t.Run("GetStatus", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + var expected *VendorStatus + obj.Status = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetStatus(), "getter should return the property value") + }) + + t.Run("GetStatus_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + obj.Status = nil + + // Act & Assert + assert.Nil(t, obj.GetStatus(), "getter should return nil when property is nil") + }) + + t.Run("GetStatus_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Vendor + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetStatus() // Should return zero value + }) + +} + +func TestSettersMarkExplicitVendor(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetCreatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + var fernTestValueCreatedAt *string + + // Act + obj.SetCreatedAt(fernTestValueCreatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetUpdatedAt_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + var fernTestValueUpdatedAt *string + + // Act + obj.SetUpdatedAt(fernTestValueUpdatedAt) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + var fernTestValueAddress *Address + + // Act + obj.SetAddress(fernTestValueAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetContacts_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + var fernTestValueContacts []*VendorContact + + // Act + obj.SetContacts(fernTestValueContacts) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetAccountNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + var fernTestValueAccountNumber *string + + // Act + obj.SetAccountNumber(fernTestValueAccountNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetNote_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + var fernTestValueNote *string + + // Act + obj.SetNote(fernTestValueNote) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + var fernTestValueVersion *int + + // Act + obj.SetVersion(fernTestValueVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetStatus_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + var fernTestValueStatus *VendorStatus + + // Act + obj.SetStatus(fernTestValueStatus) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersVendorContact(t *testing.T) { + t.Run("SetID", func(t *testing.T) { + obj := &VendorContact{} + var fernTestValueID *string + obj.SetID(fernTestValueID) + assert.Equal(t, fernTestValueID, obj.ID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetName", func(t *testing.T) { + obj := &VendorContact{} + var fernTestValueName *string + obj.SetName(fernTestValueName) + assert.Equal(t, fernTestValueName, obj.Name) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEmailAddress", func(t *testing.T) { + obj := &VendorContact{} + var fernTestValueEmailAddress *string + obj.SetEmailAddress(fernTestValueEmailAddress) + assert.Equal(t, fernTestValueEmailAddress, obj.EmailAddress) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetPhoneNumber", func(t *testing.T) { + obj := &VendorContact{} + var fernTestValuePhoneNumber *string + obj.SetPhoneNumber(fernTestValuePhoneNumber) + assert.Equal(t, fernTestValuePhoneNumber, obj.PhoneNumber) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetRemoved", func(t *testing.T) { + obj := &VendorContact{} + var fernTestValueRemoved *bool + obj.SetRemoved(fernTestValueRemoved) + assert.Equal(t, fernTestValueRemoved, obj.Removed) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetOrdinal", func(t *testing.T) { + obj := &VendorContact{} + var fernTestValueOrdinal int + obj.SetOrdinal(fernTestValueOrdinal) + assert.Equal(t, fernTestValueOrdinal, obj.Ordinal) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestGettersVendorContact(t *testing.T) { + t.Run("GetID", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorContact{} + var expected *string + obj.ID = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetID(), "getter should return the property value") + }) + + t.Run("GetID_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorContact{} + obj.ID = nil + + // Act & Assert + assert.Nil(t, obj.GetID(), "getter should return nil when property is nil") + }) + + t.Run("GetID_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorContact + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetID() // Should return zero value + }) + + t.Run("GetName", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorContact{} + var expected *string + obj.Name = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetName(), "getter should return the property value") + }) + + t.Run("GetName_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorContact{} + obj.Name = nil + + // Act & Assert + assert.Nil(t, obj.GetName(), "getter should return nil when property is nil") + }) + + t.Run("GetName_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorContact + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetName() // Should return zero value + }) + + t.Run("GetEmailAddress", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorContact{} + var expected *string + obj.EmailAddress = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetEmailAddress(), "getter should return the property value") + }) + + t.Run("GetEmailAddress_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorContact{} + obj.EmailAddress = nil + + // Act & Assert + assert.Nil(t, obj.GetEmailAddress(), "getter should return nil when property is nil") + }) + + t.Run("GetEmailAddress_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorContact + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetEmailAddress() // Should return zero value + }) + + t.Run("GetPhoneNumber", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorContact{} + var expected *string + obj.PhoneNumber = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetPhoneNumber(), "getter should return the property value") + }) + + t.Run("GetPhoneNumber_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorContact{} + obj.PhoneNumber = nil + + // Act & Assert + assert.Nil(t, obj.GetPhoneNumber(), "getter should return nil when property is nil") + }) + + t.Run("GetPhoneNumber_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorContact + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetPhoneNumber() // Should return zero value + }) + + t.Run("GetRemoved", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorContact{} + var expected *bool + obj.Removed = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetRemoved(), "getter should return the property value") + }) + + t.Run("GetRemoved_NilValue", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorContact{} + obj.Removed = nil + + // Act & Assert + assert.Nil(t, obj.GetRemoved(), "getter should return nil when property is nil") + }) + + t.Run("GetRemoved_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorContact + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetRemoved() // Should return zero value + }) + + t.Run("GetOrdinal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorContact{} + var expected int + obj.Ordinal = expected + + // Act & Assert + assert.Equal(t, expected, obj.GetOrdinal(), "getter should return the property value") + }) + + t.Run("GetOrdinal_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorContact + // Should not panic - getters should handle nil receiver gracefully + defer func() { + if r := recover(); r != nil { + t.Errorf("Getter panicked on nil receiver: %v", r) + } + }() + _ = obj.GetOrdinal() // Should return zero value + }) + +} + +func TestSettersMarkExplicitVendorContact(t *testing.T) { + t.Run("SetID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorContact{} + var fernTestValueID *string + + // Act + obj.SetID(fernTestValueID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetName_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorContact{} + var fernTestValueName *string + + // Act + obj.SetName(fernTestValueName) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEmailAddress_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorContact{} + var fernTestValueEmailAddress *string + + // Act + obj.SetEmailAddress(fernTestValueEmailAddress) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetPhoneNumber_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorContact{} + var fernTestValuePhoneNumber *string + + // Act + obj.SetPhoneNumber(fernTestValuePhoneNumber) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetRemoved_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorContact{} + var fernTestValueRemoved *bool + + // Act + obj.SetRemoved(fernTestValueRemoved) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetOrdinal_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorContact{} + var fernTestValueOrdinal int + + // Act + obj.SetOrdinal(fernTestValueOrdinal) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateVendorsRequest(t *testing.T) { + t.Run("SetVendorID", func(t *testing.T) { + obj := &UpdateVendorsRequest{} + var fernTestValueVendorID string + obj.SetVendorID(fernTestValueVendorID) + assert.Equal(t, fernTestValueVendorID, obj.VendorID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateVendorsRequest(t *testing.T) { + t.Run("SetVendorID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateVendorsRequest{} + var fernTestValueVendorID string + + // Act + obj.SetVendorID(fernTestValueVendorID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestJSONMarshalingBatchCreateVendorsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchCreateVendorsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BatchCreateVendorsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BatchCreateVendorsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BatchCreateVendorsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBatchGetVendorsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchGetVendorsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BatchGetVendorsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BatchGetVendorsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BatchGetVendorsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingBatchUpdateVendorsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &BatchUpdateVendorsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled BatchUpdateVendorsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj BatchUpdateVendorsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj BatchUpdateVendorsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingCreateVendorResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateVendorResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled CreateVendorResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj CreateVendorResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj CreateVendorResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingGetVendorResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetVendorResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled GetVendorResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj GetVendorResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj GetVendorResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchVendorsRequestFilter(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchVendorsRequestFilter{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchVendorsRequestFilter + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchVendorsRequestFilter + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchVendorsRequestFilter + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchVendorsRequestSort(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchVendorsRequestSort{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchVendorsRequestSort + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchVendorsRequestSort + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchVendorsRequestSort + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingSearchVendorsResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &SearchVendorsResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled SearchVendorsResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj SearchVendorsResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj SearchVendorsResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateVendorRequest(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateVendorRequest{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateVendorRequest + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateVendorRequest + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateVendorRequest + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingUpdateVendorResponse(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateVendorResponse{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled UpdateVendorResponse + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj UpdateVendorResponse + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj UpdateVendorResponse + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingVendor(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &Vendor{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled Vendor + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj Vendor + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj Vendor + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestJSONMarshalingVendorContact(t *testing.T) { + t.Run("MarshalUnmarshal", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &VendorContact{} + + // Act - Marshal to JSON + data, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed") + assert.NotNil(t, data, "marshaled data should not be nil") + assert.NotEmpty(t, data, "marshaled data should not be empty") + + // Unmarshal back and verify round-trip + var unmarshaled VendorContact + err = json.Unmarshal(data, &unmarshaled) + assert.NoError(t, err, "round-trip unmarshal should succeed") + }) + + t.Run("UnmarshalInvalidJSON", func(t *testing.T) { + t.Parallel() + var obj VendorContact + err := json.Unmarshal([]byte(`{invalid json}`), &obj) + assert.Error(t, err, "unmarshaling invalid JSON should return an error") + }) + + t.Run("UnmarshalEmptyObject", func(t *testing.T) { + t.Parallel() + var obj VendorContact + err := json.Unmarshal([]byte(`{}`), &obj) + assert.NoError(t, err, "unmarshaling empty object should succeed") + }) +} + +func TestStringBatchCreateVendorsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BatchCreateVendorsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchCreateVendorsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBatchGetVendorsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BatchGetVendorsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetVendorsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringBatchUpdateVendorsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &BatchUpdateVendorsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchUpdateVendorsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringCreateVendorResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &CreateVendorResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateVendorResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringGetVendorResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &GetVendorResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetVendorResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchVendorsRequestFilter(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchVendorsRequestFilter{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchVendorsRequestFilter + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchVendorsRequestSort(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchVendorsRequestSort{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchVendorsRequestSort + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringSearchVendorsResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &SearchVendorsResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchVendorsResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateVendorRequest(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateVendorRequest{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateVendorRequest + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringUpdateVendorResponse(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &UpdateVendorResponse{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateVendorResponse + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringVendor(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &Vendor{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Vendor + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestStringVendorContact(t *testing.T) { + t.Run("StringMethod", func(t *testing.T) { + t.Parallel() + obj := &VendorContact{} + result := obj.String() + assert.NotEmpty(t, result, "String() should return a non-empty representation") + }) + + t.Run("StringMethod_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorContact + result := obj.String() + assert.Equal(t, "", result, "String() should return for nil receiver") + }) +} + +func TestEnumSearchVendorsRequestSortField(t *testing.T) { + t.Run("NewFromString_NAME", func(t *testing.T) { + t.Parallel() + val, err := NewSearchVendorsRequestSortFieldFromString("NAME") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SearchVendorsRequestSortField("NAME"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_CREATED_AT", func(t *testing.T) { + t.Parallel() + val, err := NewSearchVendorsRequestSortFieldFromString("CREATED_AT") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, SearchVendorsRequestSortField("CREATED_AT"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewSearchVendorsRequestSortFieldFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewSearchVendorsRequestSortFieldFromString("NAME") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestEnumVendorStatus(t *testing.T) { + t.Run("NewFromString_ACTIVE", func(t *testing.T) { + t.Parallel() + val, err := NewVendorStatusFromString("ACTIVE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, VendorStatus("ACTIVE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_INACTIVE", func(t *testing.T) { + t.Parallel() + val, err := NewVendorStatusFromString("INACTIVE") + assert.NoError(t, err, "valid enum value should not return error") + assert.Equal(t, VendorStatus("INACTIVE"), val, "enum value should match expected wire value") + }) + + t.Run("NewFromString_Invalid", func(t *testing.T) { + _, err := NewVendorStatusFromString("invalid_value_that_does_not_exist") + assert.Error(t, err) + }) + + t.Run("Ptr", func(t *testing.T) { + val, err := NewVendorStatusFromString("ACTIVE") + assert.NoError(t, err) + ptr := val.Ptr() + assert.NotNil(t, ptr) + assert.Equal(t, val, *ptr) + }) +} + +func TestExtraPropertiesBatchCreateVendorsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BatchCreateVendorsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchCreateVendorsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBatchGetVendorsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BatchGetVendorsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchGetVendorsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesBatchUpdateVendorsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &BatchUpdateVendorsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *BatchUpdateVendorsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesCreateVendorResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &CreateVendorResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *CreateVendorResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesGetVendorResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &GetVendorResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *GetVendorResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchVendorsRequestFilter(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchVendorsRequestFilter{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchVendorsRequestFilter + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchVendorsRequestSort(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchVendorsRequestSort{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchVendorsRequestSort + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesSearchVendorsResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &SearchVendorsResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *SearchVendorsResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateVendorRequest(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateVendorRequest{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateVendorRequest + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesUpdateVendorResponse(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &UpdateVendorResponse{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *UpdateVendorResponse + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesVendor(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &Vendor{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *Vendor + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} + +func TestExtraPropertiesVendorContact(t *testing.T) { + t.Run("GetExtraProperties", func(t *testing.T) { + t.Parallel() + obj := &VendorContact{} + // Should not panic when calling GetExtraProperties() + defer func() { + if r := recover(); r != nil { + t.Errorf("GetExtraProperties() panicked: %v", r) + } + }() + extraProps := obj.GetExtraProperties() + // Result can be nil or an empty/non-empty map + _ = extraProps + }) + + t.Run("GetExtraProperties_NilReceiver", func(t *testing.T) { + t.Parallel() + var obj *VendorContact + extraProps := obj.GetExtraProperties() + assert.Nil(t, extraProps, "nil receiver should return nil without panicking") + }) +} diff --git a/webhooks/event_types_test.go b/webhooks/event_types_test.go new file mode 100644 index 0000000..1e2c13a --- /dev/null +++ b/webhooks/event_types_test.go @@ -0,0 +1,55 @@ +// Code generated by Fern. DO NOT EDIT. + +package webhooks + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersListEventTypesRequest(t *testing.T) { + t.Run("SetAPIVersion", func(t *testing.T) { + obj := &ListEventTypesRequest{} + var fernTestValueAPIVersion *string + obj.SetAPIVersion(fernTestValueAPIVersion) + assert.Equal(t, fernTestValueAPIVersion, obj.APIVersion) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListEventTypesRequest(t *testing.T) { + t.Run("SetAPIVersion_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListEventTypesRequest{} + var fernTestValueAPIVersion *string + + // Act + obj.SetAPIVersion(fernTestValueAPIVersion) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/webhooks/eventtypes/webhooks_event_types_test/webhooks_event_types_test.go b/webhooks/eventtypes/webhooks_event_types_test/webhooks_event_types_test.go new file mode 100644 index 0000000..e3c136b --- /dev/null +++ b/webhooks/eventtypes/webhooks_event_types_test/webhooks_event_types_test.go @@ -0,0 +1,91 @@ +// Code generated by Fern. DO NOT EDIT. + +package webhooks_event_types_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + webhooks "github.com/square/square-go-sdk/v3/webhooks" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestWebhooksEventTypesListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &webhooks.ListEventTypesRequest{ + APIVersion: square.String( + "api_version", + ), + } + _, invocationErr := client.Webhooks.EventTypes.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestWebhooksEventTypesListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestWebhooksEventTypesListWithWireMock", "GET", "/v2/webhooks/event-types", map[string]string{"api_version": "api_version"}, 1) +} diff --git a/webhooks/subscriptions.go b/webhooks/subscriptions.go index 047b31b..81770a8 100644 --- a/webhooks/subscriptions.go +++ b/webhooks/subscriptions.go @@ -3,7 +3,9 @@ package webhooks import ( + json "encoding/json" v3 "github.com/square/square-go-sdk/v3" + internal "github.com/square/square-go-sdk/v3/internal" big "math/big" ) @@ -16,7 +18,7 @@ type CreateWebhookSubscriptionRequest struct { // A unique string that identifies the [CreateWebhookSubscription](api-endpoint:WebhookSubscriptions-CreateWebhookSubscription) request. IdempotencyKey *string `json:"idempotency_key,omitempty" url:"-"` // The [Subscription](entity:WebhookSubscription) to create. - Subscription *v3.WebhookSubscription `json:"subscription,omitempty" url:"-"` + Subscription *v3.WebhookSubscription `json:"subscription" url:"-"` // Private bitmask of fields set to an explicit value and therefore not to be omitted explicitFields *big.Int `json:"-" url:"-"` @@ -43,6 +45,27 @@ func (c *CreateWebhookSubscriptionRequest) SetSubscription(subscription *v3.Webh c.require(createWebhookSubscriptionRequestFieldSubscription) } +func (c *CreateWebhookSubscriptionRequest) UnmarshalJSON(data []byte) error { + type unmarshaler CreateWebhookSubscriptionRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *c = CreateWebhookSubscriptionRequest(body) + return nil +} + +func (c *CreateWebhookSubscriptionRequest) MarshalJSON() ([]byte, error) { + type embed CreateWebhookSubscriptionRequest + var marshaler = struct { + embed + }{ + embed: embed(*c), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, c.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( deleteSubscriptionsRequestFieldSubscriptionID = big.NewInt(1 << 0) ) @@ -197,6 +220,27 @@ func (t *TestWebhookSubscriptionRequest) SetEventType(eventType *string) { t.require(testWebhookSubscriptionRequestFieldEventType) } +func (t *TestWebhookSubscriptionRequest) UnmarshalJSON(data []byte) error { + type unmarshaler TestWebhookSubscriptionRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *t = TestWebhookSubscriptionRequest(body) + return nil +} + +func (t *TestWebhookSubscriptionRequest) MarshalJSON() ([]byte, error) { + type embed TestWebhookSubscriptionRequest + var marshaler = struct { + embed + }{ + embed: embed(*t), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, t.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( updateWebhookSubscriptionRequestFieldSubscriptionID = big.NewInt(1 << 0) updateWebhookSubscriptionRequestFieldSubscription = big.NewInt(1 << 1) @@ -233,6 +277,27 @@ func (u *UpdateWebhookSubscriptionRequest) SetSubscription(subscription *v3.Webh u.require(updateWebhookSubscriptionRequestFieldSubscription) } +func (u *UpdateWebhookSubscriptionRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdateWebhookSubscriptionRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdateWebhookSubscriptionRequest(body) + return nil +} + +func (u *UpdateWebhookSubscriptionRequest) MarshalJSON() ([]byte, error) { + type embed UpdateWebhookSubscriptionRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} + var ( updateWebhookSubscriptionSignatureKeyRequestFieldSubscriptionID = big.NewInt(1 << 0) updateWebhookSubscriptionSignatureKeyRequestFieldIdempotencyKey = big.NewInt(1 << 1) @@ -268,3 +333,24 @@ func (u *UpdateWebhookSubscriptionSignatureKeyRequest) SetIdempotencyKey(idempot u.IdempotencyKey = idempotencyKey u.require(updateWebhookSubscriptionSignatureKeyRequestFieldIdempotencyKey) } + +func (u *UpdateWebhookSubscriptionSignatureKeyRequest) UnmarshalJSON(data []byte) error { + type unmarshaler UpdateWebhookSubscriptionSignatureKeyRequest + var body unmarshaler + if err := json.Unmarshal(data, &body); err != nil { + return err + } + *u = UpdateWebhookSubscriptionSignatureKeyRequest(body) + return nil +} + +func (u *UpdateWebhookSubscriptionSignatureKeyRequest) MarshalJSON() ([]byte, error) { + type embed UpdateWebhookSubscriptionSignatureKeyRequest + var marshaler = struct { + embed + }{ + embed: embed(*u), + } + explicitMarshaler := internal.HandleExplicitFields(marshaler, u.explicitFields) + return json.Marshal(explicitMarshaler) +} diff --git a/webhooks/subscriptions/webhooks_subscriptions_test/webhooks_subscriptions_test.go b/webhooks/subscriptions/webhooks_subscriptions_test/webhooks_subscriptions_test.go new file mode 100644 index 0000000..c4d33b7 --- /dev/null +++ b/webhooks/subscriptions/webhooks_subscriptions_test/webhooks_subscriptions_test.go @@ -0,0 +1,279 @@ +// Code generated by Fern. DO NOT EDIT. + +package webhooks_subscriptions_test + +import ( + bytes "bytes" + context "context" + json "encoding/json" + square "github.com/square/square-go-sdk/v3" + client "github.com/square/square-go-sdk/v3/client" + option "github.com/square/square-go-sdk/v3/option" + webhooks "github.com/square/square-go-sdk/v3/webhooks" + require "github.com/stretchr/testify/require" + http "net/http" + os "os" + testing "testing" +) + +func VerifyRequestCount( + t *testing.T, + testId string, + method string, + urlPath string, + queryParams map[string]string, + expected int, +) { + wiremockURL := os.Getenv("WIREMOCK_URL") + if wiremockURL == "" { + wiremockURL = "http://localhost:8080" + } + WiremockAdminURL := wiremockURL + "/__admin" + var reqBody bytes.Buffer + reqBody.WriteString(`{"method":"`) + reqBody.WriteString(method) + reqBody.WriteString(`","urlPath":"`) + reqBody.WriteString(urlPath) + reqBody.WriteString(`","headers":{"X-Test-Id":{"equalTo":"`) + reqBody.WriteString(testId) + reqBody.WriteString(`"}}`) + if len(queryParams) > 0 { + reqBody.WriteString(`,"queryParameters":{`) + first := true + for key, value := range queryParams { + if !first { + reqBody.WriteString(",") + } + reqBody.WriteString(`"`) + reqBody.WriteString(key) + reqBody.WriteString(`":{"equalTo":"`) + reqBody.WriteString(value) + reqBody.WriteString(`"}`) + first = false + } + reqBody.WriteString("}") + } + reqBody.WriteString("}") + resp, err := http.Post(WiremockAdminURL+"/requests/find", "application/json", &reqBody) + require.NoError(t, err) + var result struct { + Requests []interface{} `json:"requests"` + } + json.NewDecoder(resp.Body).Decode(&result) + require.Equal(t, expected, len(result.Requests)) +} + +func TestWebhooksSubscriptionsListWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &webhooks.ListSubscriptionsRequest{ + Cursor: square.String( + "cursor", + ), + IncludeDisabled: square.Bool( + true, + ), + SortOrder: square.SortOrderDesc.Ptr(), + Limit: square.Int( + 1, + ), + } + _, invocationErr := client.Webhooks.Subscriptions.List( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestWebhooksSubscriptionsListWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestWebhooksSubscriptionsListWithWireMock", "GET", "/v2/webhooks/subscriptions", map[string]string{"cursor": "cursor", "include_disabled": "true", "sort_order": "DESC", "limit": "1"}, 1) +} + +func TestWebhooksSubscriptionsCreateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &webhooks.CreateWebhookSubscriptionRequest{ + IdempotencyKey: square.String( + "63f84c6c-2200-4c99-846c-2670a1311fbf", + ), + Subscription: &square.WebhookSubscription{ + Name: square.String( + "Example Webhook Subscription", + ), + EventTypes: []string{ + "payment.created", + "payment.updated", + }, + NotificationURL: square.String( + "https://example-webhook-url.com", + ), + APIVersion: square.String( + "2021-12-15", + ), + }, + } + _, invocationErr := client.Webhooks.Subscriptions.Create( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestWebhooksSubscriptionsCreateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestWebhooksSubscriptionsCreateWithWireMock", "POST", "/v2/webhooks/subscriptions", nil, 1) +} + +func TestWebhooksSubscriptionsGetWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &webhooks.GetSubscriptionsRequest{ + SubscriptionID: "subscription_id", + } + _, invocationErr := client.Webhooks.Subscriptions.Get( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestWebhooksSubscriptionsGetWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestWebhooksSubscriptionsGetWithWireMock", "GET", "/v2/webhooks/subscriptions/subscription_id", nil, 1) +} + +func TestWebhooksSubscriptionsUpdateWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &webhooks.UpdateWebhookSubscriptionRequest{ + SubscriptionID: "subscription_id", + Subscription: &square.WebhookSubscription{ + Name: square.String( + "Updated Example Webhook Subscription", + ), + Enabled: square.Bool( + false, + ), + }, + } + _, invocationErr := client.Webhooks.Subscriptions.Update( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestWebhooksSubscriptionsUpdateWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestWebhooksSubscriptionsUpdateWithWireMock", "PUT", "/v2/webhooks/subscriptions/subscription_id", nil, 1) +} + +func TestWebhooksSubscriptionsDeleteWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &webhooks.DeleteSubscriptionsRequest{ + SubscriptionID: "subscription_id", + } + _, invocationErr := client.Webhooks.Subscriptions.Delete( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestWebhooksSubscriptionsDeleteWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestWebhooksSubscriptionsDeleteWithWireMock", "DELETE", "/v2/webhooks/subscriptions/subscription_id", nil, 1) +} + +func TestWebhooksSubscriptionsUpdateSignatureKeyWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &webhooks.UpdateWebhookSubscriptionSignatureKeyRequest{ + SubscriptionID: "subscription_id", + IdempotencyKey: square.String( + "ed80ae6b-0654-473b-bbab-a39aee89a60d", + ), + } + _, invocationErr := client.Webhooks.Subscriptions.UpdateSignatureKey( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestWebhooksSubscriptionsUpdateSignatureKeyWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestWebhooksSubscriptionsUpdateSignatureKeyWithWireMock", "POST", "/v2/webhooks/subscriptions/subscription_id/signature-key", nil, 1) +} + +func TestWebhooksSubscriptionsTestWithWireMock( + t *testing.T, +) { + WireMockBaseURL := os.Getenv("WIREMOCK_URL") + if WireMockBaseURL == "" { + WireMockBaseURL = "http://localhost:8080" + } + client := client.NewClient( + option.WithBaseURL(WireMockBaseURL), + ) + request := &webhooks.TestWebhookSubscriptionRequest{ + SubscriptionID: "subscription_id", + EventType: square.String( + "payment.created", + ), + } + _, invocationErr := client.Webhooks.Subscriptions.Test( + context.TODO(), + request, + option.WithHTTPHeader( + http.Header{"X-Test-Id": []string{"TestWebhooksSubscriptionsTestWithWireMock"}}, + ), + ) + + require.NoError(t, invocationErr, "Client method call should succeed") + VerifyRequestCount(t, "TestWebhooksSubscriptionsTestWithWireMock", "POST", "/v2/webhooks/subscriptions/subscription_id/test", nil, 1) +} diff --git a/webhooks/subscriptions_test.go b/webhooks/subscriptions_test.go new file mode 100644 index 0000000..e8f304b --- /dev/null +++ b/webhooks/subscriptions_test.go @@ -0,0 +1,481 @@ +// Code generated by Fern. DO NOT EDIT. + +package webhooks + +import ( + json "encoding/json" + assert "github.com/stretchr/testify/assert" + require "github.com/stretchr/testify/require" + testing "testing" +) + +func TestSettersCreateWebhookSubscriptionRequest(t *testing.T) { + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &CreateWebhookSubscriptionRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitCreateWebhookSubscriptionRequest(t *testing.T) { + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &CreateWebhookSubscriptionRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersDeleteSubscriptionsRequest(t *testing.T) { + t.Run("SetSubscriptionID", func(t *testing.T) { + obj := &DeleteSubscriptionsRequest{} + var fernTestValueSubscriptionID string + obj.SetSubscriptionID(fernTestValueSubscriptionID) + assert.Equal(t, fernTestValueSubscriptionID, obj.SubscriptionID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitDeleteSubscriptionsRequest(t *testing.T) { + t.Run("SetSubscriptionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &DeleteSubscriptionsRequest{} + var fernTestValueSubscriptionID string + + // Act + obj.SetSubscriptionID(fernTestValueSubscriptionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersGetSubscriptionsRequest(t *testing.T) { + t.Run("SetSubscriptionID", func(t *testing.T) { + obj := &GetSubscriptionsRequest{} + var fernTestValueSubscriptionID string + obj.SetSubscriptionID(fernTestValueSubscriptionID) + assert.Equal(t, fernTestValueSubscriptionID, obj.SubscriptionID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitGetSubscriptionsRequest(t *testing.T) { + t.Run("SetSubscriptionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &GetSubscriptionsRequest{} + var fernTestValueSubscriptionID string + + // Act + obj.SetSubscriptionID(fernTestValueSubscriptionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersListSubscriptionsRequest(t *testing.T) { + t.Run("SetCursor", func(t *testing.T) { + obj := &ListSubscriptionsRequest{} + var fernTestValueCursor *string + obj.SetCursor(fernTestValueCursor) + assert.Equal(t, fernTestValueCursor, obj.Cursor) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIncludeDisabled", func(t *testing.T) { + obj := &ListSubscriptionsRequest{} + var fernTestValueIncludeDisabled *bool + obj.SetIncludeDisabled(fernTestValueIncludeDisabled) + assert.Equal(t, fernTestValueIncludeDisabled, obj.IncludeDisabled) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetLimit", func(t *testing.T) { + obj := &ListSubscriptionsRequest{} + var fernTestValueLimit *int + obj.SetLimit(fernTestValueLimit) + assert.Equal(t, fernTestValueLimit, obj.Limit) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitListSubscriptionsRequest(t *testing.T) { + t.Run("SetCursor_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListSubscriptionsRequest{} + var fernTestValueCursor *string + + // Act + obj.SetCursor(fernTestValueCursor) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIncludeDisabled_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListSubscriptionsRequest{} + var fernTestValueIncludeDisabled *bool + + // Act + obj.SetIncludeDisabled(fernTestValueIncludeDisabled) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetLimit_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &ListSubscriptionsRequest{} + var fernTestValueLimit *int + + // Act + obj.SetLimit(fernTestValueLimit) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersTestWebhookSubscriptionRequest(t *testing.T) { + t.Run("SetSubscriptionID", func(t *testing.T) { + obj := &TestWebhookSubscriptionRequest{} + var fernTestValueSubscriptionID string + obj.SetSubscriptionID(fernTestValueSubscriptionID) + assert.Equal(t, fernTestValueSubscriptionID, obj.SubscriptionID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetEventType", func(t *testing.T) { + obj := &TestWebhookSubscriptionRequest{} + var fernTestValueEventType *string + obj.SetEventType(fernTestValueEventType) + assert.Equal(t, fernTestValueEventType, obj.EventType) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitTestWebhookSubscriptionRequest(t *testing.T) { + t.Run("SetSubscriptionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TestWebhookSubscriptionRequest{} + var fernTestValueSubscriptionID string + + // Act + obj.SetSubscriptionID(fernTestValueSubscriptionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetEventType_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &TestWebhookSubscriptionRequest{} + var fernTestValueEventType *string + + // Act + obj.SetEventType(fernTestValueEventType) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateWebhookSubscriptionRequest(t *testing.T) { + t.Run("SetSubscriptionID", func(t *testing.T) { + obj := &UpdateWebhookSubscriptionRequest{} + var fernTestValueSubscriptionID string + obj.SetSubscriptionID(fernTestValueSubscriptionID) + assert.Equal(t, fernTestValueSubscriptionID, obj.SubscriptionID) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateWebhookSubscriptionRequest(t *testing.T) { + t.Run("SetSubscriptionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWebhookSubscriptionRequest{} + var fernTestValueSubscriptionID string + + // Act + obj.SetSubscriptionID(fernTestValueSubscriptionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} + +func TestSettersUpdateWebhookSubscriptionSignatureKeyRequest(t *testing.T) { + t.Run("SetSubscriptionID", func(t *testing.T) { + obj := &UpdateWebhookSubscriptionSignatureKeyRequest{} + var fernTestValueSubscriptionID string + obj.SetSubscriptionID(fernTestValueSubscriptionID) + assert.Equal(t, fernTestValueSubscriptionID, obj.SubscriptionID) + assert.NotNil(t, obj.explicitFields) + }) + + t.Run("SetIdempotencyKey", func(t *testing.T) { + obj := &UpdateWebhookSubscriptionSignatureKeyRequest{} + var fernTestValueIdempotencyKey *string + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + assert.Equal(t, fernTestValueIdempotencyKey, obj.IdempotencyKey) + assert.NotNil(t, obj.explicitFields) + }) + +} + +func TestSettersMarkExplicitUpdateWebhookSubscriptionSignatureKeyRequest(t *testing.T) { + t.Run("SetSubscriptionID_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWebhookSubscriptionSignatureKeyRequest{} + var fernTestValueSubscriptionID string + + // Act + obj.SetSubscriptionID(fernTestValueSubscriptionID) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + + t.Run("SetIdempotencyKey_MarksExplicit", func(t *testing.T) { + t.Parallel() + // Arrange + obj := &UpdateWebhookSubscriptionSignatureKeyRequest{} + var fernTestValueIdempotencyKey *string + + // Act + obj.SetIdempotencyKey(fernTestValueIdempotencyKey) + + // Assert - object with explicitly set field can be marshaled/unmarshaled + bytes, err := json.Marshal(obj) + require.NoError(t, err, "marshaling should succeed for test setup") + + // This test ensures JSON marshaling and unmarshaling succeed when the field has a zero/nil value + // Detect if marshaled JSON is an object or primitive to use correct unmarshal target + if len(bytes) > 0 && bytes[0] == '{' { + // JSON object - unmarshal into map + var unmarshaled map[string]interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } else { + // JSON primitive (string, number, boolean, null) - unmarshal into interface{} + var unmarshaled interface{} + err = json.Unmarshal(bytes, &unmarshaled) + require.NoError(t, err, "unmarshaling should succeed for test verification") + } + + // Note: This does not explicitly assert the presence of a specific JSON field + // It verifies that setting a field via setter allows successful JSON round-trip + }) + +} diff --git a/wiremock/docker-compose.test.yml b/wiremock/docker-compose.test.yml new file mode 100644 index 0000000..fabb06a --- /dev/null +++ b/wiremock/docker-compose.test.yml @@ -0,0 +1,14 @@ +services: + wiremock: + image: wiremock/wiremock:3.9.1 + ports: + - "0:8080" + volumes: + - ./wiremock-mappings.json:/home/wiremock/mappings/wiremock-mappings.json + command: ["--global-response-templating", "--verbose"] + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8080/__admin/health"] + interval: 2s + timeout: 5s + retries: 15 + start_period: 5s diff --git a/wiremock/wiremock-mappings.json b/wiremock/wiremock-mappings.json new file mode 100644 index 0000000..9699aaa --- /dev/null +++ b/wiremock/wiremock-mappings.json @@ -0,0 +1 @@ +{"mappings":[{"id":"7796440a-8c02-4510-928a-419b0ee1d036","name":"RevokeToken - default","request":{"urlPathTemplate":"/oauth2/revoke","method":"POST"},"response":{"status":200,"body":"{\n \"success\": true,\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"7796440a-8c02-4510-928a-419b0ee1d036","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"dd81aa7d-2a33-4d85-b556-b14c29fc5009","name":"ObtainToken - default","request":{"urlPathTemplate":"/oauth2/token","method":"POST"},"response":{"status":200,"body":"{\n \"access_token\": \"EAAl3ikZIe18J-2-cHlV2bL4-EaZHGoJUhtEBT7QA6-7AgwIHw8Xe1IoUvGsNxA\",\n \"token_type\": \"bearer\",\n \"expires_at\": \"2025-04-03T18:31:06Z\",\n \"merchant_id\": \"MLQW2MYBY81PZ\",\n \"subscription_id\": \"subscription_id\",\n \"plan_id\": \"plan_id\",\n \"id_token\": \"id_token\",\n \"refresh_token\": \"EQAAl0OcByu3IYJYScGGg-8E5YNf0r0b6jCTCMy5nOcRZ4ok0wbWAL8vY3tZWNcc\",\n \"short_lived\": false,\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"refresh_token_expires_at\": \"refresh_token_expires_at\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"dd81aa7d-2a33-4d85-b556-b14c29fc5009","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3acb1748-333c-4382-a31f-e73c8d493499","name":"RetrieveTokenStatus - default","request":{"urlPathTemplate":"/oauth2/token/status","method":"POST"},"response":{"status":200,"body":"{\n \"scopes\": [\n \"PAYMENTS_READ\",\n \"PAYMENTS_WRITE\"\n ],\n \"expires_at\": \"2022-10-14T14:44:00Z\",\n \"client_id\": \"CLIENT_ID\",\n \"merchant_id\": \"MERCHANT_ID\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"3acb1748-333c-4382-a31f-e73c8d493499","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a94c2bf0-7338-4c37-9343-219dbdbd3049","name":"authorize - default","request":{"urlPathTemplate":"/oauth2/authorize","method":"GET"},"response":{"status":200,"body":"\"\"","headers":{"Content-Type":"application/json"}},"uuid":"a94c2bf0-7338-4c37-9343-219dbdbd3049","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"e2659590-e75f-4053-833c-b3481d61bed9","name":"V1ListOrders - default","request":{"urlPathTemplate":"/v1/{location_id}/orders","method":"GET","pathParameters":{"location_id":{"equalTo":"location_id"}},"queryParameters":{"order":{"equalTo":"DESC"},"limit":{"equalTo":"1"},"batch_token":{"equalTo":"batch_token"}}},"response":{"status":200,"body":"[\n {\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ],\n \"id\": \"id\",\n \"buyer_email\": \"buyer_email\",\n \"recipient_name\": \"recipient_name\",\n \"recipient_phone_number\": \"recipient_phone_number\",\n \"state\": \"PENDING\",\n \"shipping_address\": {\n \"address_line_1\": \"address_line_1\",\n \"address_line_2\": \"address_line_2\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"locality\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"administrative_district_level_1\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"postal_code\",\n \"country\": \"ZZ\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n },\n \"subtotal_money\": {\n \"amount\": 1,\n \"currency_code\": \"UNKNOWN_CURRENCY\"\n },\n \"total_shipping_money\": {\n \"amount\": 1,\n \"currency_code\": \"UNKNOWN_CURRENCY\"\n },\n \"total_tax_money\": {\n \"amount\": 1,\n \"currency_code\": \"UNKNOWN_CURRENCY\"\n },\n \"total_price_money\": {\n \"amount\": 1,\n \"currency_code\": \"UNKNOWN_CURRENCY\"\n },\n \"total_discount_money\": {\n \"amount\": 1,\n \"currency_code\": \"UNKNOWN_CURRENCY\"\n },\n \"created_at\": \"created_at\",\n \"updated_at\": \"updated_at\",\n \"expires_at\": \"expires_at\",\n \"payment_id\": \"payment_id\",\n \"buyer_note\": \"buyer_note\",\n \"completed_note\": \"completed_note\",\n \"refunded_note\": \"refunded_note\",\n \"canceled_note\": \"canceled_note\",\n \"tender\": {\n \"id\": \"id\",\n \"type\": \"CREDIT_CARD\",\n \"name\": \"name\",\n \"employee_id\": \"employee_id\",\n \"receipt_url\": \"receipt_url\",\n \"card_brand\": \"OTHER_BRAND\",\n \"pan_suffix\": \"pan_suffix\",\n \"entry_method\": \"MANUAL\",\n \"payment_note\": \"payment_note\",\n \"tendered_at\": \"tendered_at\",\n \"settled_at\": \"settled_at\",\n \"is_exchange\": true\n },\n \"order_history\": [\n {}\n ],\n \"promo_code\": \"promo_code\",\n \"btc_receive_address\": \"btc_receive_address\",\n \"btc_price_satoshi\": 1.1\n }\n]","headers":{"Content-Type":"application/json"}},"uuid":"e2659590-e75f-4053-833c-b3481d61bed9","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"80570fd6-0216-4cc7-8d78-6f390a25fc8a","name":"V1RetrieveOrder - default","request":{"urlPathTemplate":"/v1/{location_id}/orders/{order_id}","method":"GET","pathParameters":{"location_id":{"equalTo":"location_id"},"order_id":{"equalTo":"order_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"id\": \"id\",\n \"buyer_email\": \"buyer_email\",\n \"recipient_name\": \"recipient_name\",\n \"recipient_phone_number\": \"recipient_phone_number\",\n \"state\": \"PENDING\",\n \"shipping_address\": {\n \"address_line_1\": \"address_line_1\",\n \"address_line_2\": \"address_line_2\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"locality\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"administrative_district_level_1\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"postal_code\",\n \"country\": \"ZZ\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n },\n \"subtotal_money\": {\n \"amount\": 1,\n \"currency_code\": \"UNKNOWN_CURRENCY\"\n },\n \"total_shipping_money\": {\n \"amount\": 1,\n \"currency_code\": \"UNKNOWN_CURRENCY\"\n },\n \"total_tax_money\": {\n \"amount\": 1,\n \"currency_code\": \"UNKNOWN_CURRENCY\"\n },\n \"total_price_money\": {\n \"amount\": 1,\n \"currency_code\": \"UNKNOWN_CURRENCY\"\n },\n \"total_discount_money\": {\n \"amount\": 1,\n \"currency_code\": \"UNKNOWN_CURRENCY\"\n },\n \"created_at\": \"created_at\",\n \"updated_at\": \"updated_at\",\n \"expires_at\": \"expires_at\",\n \"payment_id\": \"payment_id\",\n \"buyer_note\": \"buyer_note\",\n \"completed_note\": \"completed_note\",\n \"refunded_note\": \"refunded_note\",\n \"canceled_note\": \"canceled_note\",\n \"tender\": {\n \"id\": \"id\",\n \"type\": \"CREDIT_CARD\",\n \"name\": \"name\",\n \"employee_id\": \"employee_id\",\n \"receipt_url\": \"receipt_url\",\n \"card_brand\": \"OTHER_BRAND\",\n \"pan_suffix\": \"pan_suffix\",\n \"entry_method\": \"MANUAL\",\n \"payment_note\": \"payment_note\",\n \"total_money\": {\n \"amount\": 1,\n \"currency_code\": \"UNKNOWN_CURRENCY\"\n },\n \"tendered_money\": {\n \"amount\": 1,\n \"currency_code\": \"UNKNOWN_CURRENCY\"\n },\n \"tendered_at\": \"tendered_at\",\n \"settled_at\": \"settled_at\",\n \"change_back_money\": {\n \"amount\": 1,\n \"currency_code\": \"UNKNOWN_CURRENCY\"\n },\n \"refunded_money\": {\n \"amount\": 1,\n \"currency_code\": \"UNKNOWN_CURRENCY\"\n },\n \"is_exchange\": true\n },\n \"order_history\": [\n {\n \"action\": \"ORDER_PLACED\",\n \"created_at\": \"created_at\"\n }\n ],\n \"promo_code\": \"promo_code\",\n \"btc_receive_address\": \"btc_receive_address\",\n \"btc_price_satoshi\": 1.1\n}","headers":{"Content-Type":"application/json"}},"uuid":"80570fd6-0216-4cc7-8d78-6f390a25fc8a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f1fd2595-054e-4c47-89ce-c6e8bcf0c625","name":"V1UpdateOrder - default","request":{"urlPathTemplate":"/v1/{location_id}/orders/{order_id}","method":"PUT","pathParameters":{"location_id":{"equalTo":"location_id"},"order_id":{"equalTo":"order_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"id\": \"id\",\n \"buyer_email\": \"buyer_email\",\n \"recipient_name\": \"recipient_name\",\n \"recipient_phone_number\": \"recipient_phone_number\",\n \"state\": \"PENDING\",\n \"shipping_address\": {\n \"address_line_1\": \"address_line_1\",\n \"address_line_2\": \"address_line_2\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"locality\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"administrative_district_level_1\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"postal_code\",\n \"country\": \"ZZ\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n },\n \"subtotal_money\": {\n \"amount\": 1,\n \"currency_code\": \"UNKNOWN_CURRENCY\"\n },\n \"total_shipping_money\": {\n \"amount\": 1,\n \"currency_code\": \"UNKNOWN_CURRENCY\"\n },\n \"total_tax_money\": {\n \"amount\": 1,\n \"currency_code\": \"UNKNOWN_CURRENCY\"\n },\n \"total_price_money\": {\n \"amount\": 1,\n \"currency_code\": \"UNKNOWN_CURRENCY\"\n },\n \"total_discount_money\": {\n \"amount\": 1,\n \"currency_code\": \"UNKNOWN_CURRENCY\"\n },\n \"created_at\": \"created_at\",\n \"updated_at\": \"updated_at\",\n \"expires_at\": \"expires_at\",\n \"payment_id\": \"payment_id\",\n \"buyer_note\": \"buyer_note\",\n \"completed_note\": \"completed_note\",\n \"refunded_note\": \"refunded_note\",\n \"canceled_note\": \"canceled_note\",\n \"tender\": {\n \"id\": \"id\",\n \"type\": \"CREDIT_CARD\",\n \"name\": \"name\",\n \"employee_id\": \"employee_id\",\n \"receipt_url\": \"receipt_url\",\n \"card_brand\": \"OTHER_BRAND\",\n \"pan_suffix\": \"pan_suffix\",\n \"entry_method\": \"MANUAL\",\n \"payment_note\": \"payment_note\",\n \"total_money\": {\n \"amount\": 1,\n \"currency_code\": \"UNKNOWN_CURRENCY\"\n },\n \"tendered_money\": {\n \"amount\": 1,\n \"currency_code\": \"UNKNOWN_CURRENCY\"\n },\n \"tendered_at\": \"tendered_at\",\n \"settled_at\": \"settled_at\",\n \"change_back_money\": {\n \"amount\": 1,\n \"currency_code\": \"UNKNOWN_CURRENCY\"\n },\n \"refunded_money\": {\n \"amount\": 1,\n \"currency_code\": \"UNKNOWN_CURRENCY\"\n },\n \"is_exchange\": true\n },\n \"order_history\": [\n {\n \"action\": \"ORDER_PLACED\",\n \"created_at\": \"created_at\"\n }\n ],\n \"promo_code\": \"promo_code\",\n \"btc_receive_address\": \"btc_receive_address\",\n \"btc_price_satoshi\": 1.1\n}","headers":{"Content-Type":"application/json"}},"uuid":"f1fd2595-054e-4c47-89ce-c6e8bcf0c625","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"cb87406d-b094-40b7-9663-5a9df8a23099","name":"RegisterDomain - default","request":{"urlPathTemplate":"/v2/apple-pay/domains","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"status\": \"VERIFIED\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"cb87406d-b094-40b7-9663-5a9df8a23099","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c947fa5f-f11d-4fd5-ad17-1d40c4989495","name":"ListBankAccounts - default","request":{"urlPathTemplate":"/v2/bank-accounts","method":"GET","queryParameters":{"cursor":{"equalTo":"cursor"},"limit":{"equalTo":"1"},"location_id":{"equalTo":"location_id"},"customer_id":{"equalTo":"customer_id"}}},"response":{"status":200,"body":"{\n \"bank_accounts\": [\n {\n \"id\": \"bact:OxfBTiXgByaXds1K4GB\",\n \"account_number_suffix\": \"000\",\n \"country\": \"US\",\n \"currency\": \"USD\",\n \"account_type\": \"CHECKING\",\n \"holder_name\": \"Nicola Snow\",\n \"primary_bank_identification_number\": \"011401533\",\n \"secondary_bank_identification_number\": \"secondary_bank_identification_number\",\n \"debit_mandate_reference_id\": \"debit_mandate_reference_id\",\n \"reference_id\": \"reference_id\",\n \"location_id\": \"location_id\",\n \"status\": \"VERIFIED\",\n \"creditable\": true,\n \"debitable\": true,\n \"fingerprint\": \"sq-1-mO3XNctJpTLL8uYowOWpioS8nQyTc838gcBo90254XonoEJ_c7Uw6yqL6qihFNY8fA\",\n \"version\": 2,\n \"bank_name\": \"Citizens Bank\",\n \"customer_id\": \"HM3B2D5JKGZ69359BTEHXM2V8M\"\n },\n {\n \"id\": \"bact:Msdfa2kgUDR9lMgk4GB\",\n \"account_number_suffix\": \"118\",\n \"country\": \"US\",\n \"currency\": \"USD\",\n \"account_type\": \"CHECKING\",\n \"holder_name\": \"Nicola Snow\",\n \"primary_bank_identification_number\": \"100210004\",\n \"secondary_bank_identification_number\": \"secondary_bank_identification_number\",\n \"debit_mandate_reference_id\": \"debit_mandate_reference_id\",\n \"reference_id\": \"reference_id\",\n \"location_id\": \"location_id\",\n \"status\": \"DISABLED\",\n \"creditable\": true,\n \"debitable\": true,\n \"fingerprint\": \"sq-1-Poacr0bohmds1N--OseZUsG5kPwfCGxqYKlb-Q1Rxwsk0lxd1JLs4yaPDuMqIae7Qg\",\n \"version\": 3,\n \"bank_name\": \"Bank of America\",\n \"customer_id\": \"HM3B2D5JKGZ69359BTEHXM2V8M\"\n }\n ],\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"cursor\": \"cursor\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c947fa5f-f11d-4fd5-ad17-1d40c4989495","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"901eab8d-548b-42b6-a3de-7bb83289806d","name":"CreateBankAccount - default","request":{"urlPathTemplate":"/v2/bank-accounts","method":"POST"},"response":{"status":200,"body":"{\n \"bank_account\": {\n \"id\": \"bact:OxfBTiXgByaXds1K4GB\",\n \"account_number_suffix\": \"000\",\n \"country\": \"US\",\n \"currency\": \"USD\",\n \"account_type\": \"CHECKING\",\n \"holder_name\": \"Nicola Snow\",\n \"primary_bank_identification_number\": \"011401533\",\n \"secondary_bank_identification_number\": \"secondary_bank_identification_number\",\n \"debit_mandate_reference_id\": \"debit_mandate_reference_id\",\n \"reference_id\": \"reference_id\",\n \"location_id\": \"location_id\",\n \"status\": \"VERIFIED\",\n \"creditable\": true,\n \"debitable\": true,\n \"fingerprint\": \"sq-1-mO3XNctJpTLL8uYowOWpioS8nQyTc838gcBo90254XonoEJ_c7Uw6yqL6qihFNY8fA\",\n \"version\": 2,\n \"bank_name\": \"Citizens Bank\",\n \"customer_id\": \"HM3B2D5JKGZ69359BTEHXM2V8M\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"901eab8d-548b-42b6-a3de-7bb83289806d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"896c4656-0024-4a69-a221-c79b8fbcf1ab","name":"GetBankAccountByV1Id - default","request":{"urlPathTemplate":"/v2/bank-accounts/by-v1-id/{v1_bank_account_id}","method":"GET","pathParameters":{"v1_bank_account_id":{"equalTo":"v1_bank_account_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"bank_account\": {\n \"id\": \"w3yRgCGYQnwmdl0R3GB\",\n \"account_number_suffix\": \"971\",\n \"country\": \"US\",\n \"currency\": \"USD\",\n \"account_type\": \"CHECKING\",\n \"holder_name\": \"Jane Doe\",\n \"primary_bank_identification_number\": \"112200303\",\n \"secondary_bank_identification_number\": \"secondary_bank_identification_number\",\n \"debit_mandate_reference_id\": \"debit_mandate_reference_id\",\n \"reference_id\": \"reference_id\",\n \"location_id\": \"S8GWD5example\",\n \"status\": \"VERIFICATION_IN_PROGRESS\",\n \"creditable\": false,\n \"debitable\": false,\n \"fingerprint\": \"fingerprint\",\n \"version\": 5,\n \"bank_name\": \"Bank Name\",\n \"customer_id\": \"customer_id\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"896c4656-0024-4a69-a221-c79b8fbcf1ab","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"1d33601b-c9c3-461d-b81f-4619b4223095","name":"GetBankAccount - default","request":{"urlPathTemplate":"/v2/bank-accounts/{bank_account_id}","method":"GET","pathParameters":{"bank_account_id":{"equalTo":"bank_account_id"}}},"response":{"status":200,"body":"{\n \"bank_account\": {\n \"id\": \"bact:OxfBTiXgByaXds1K4GB\",\n \"account_number_suffix\": \"000\",\n \"country\": \"US\",\n \"currency\": \"USD\",\n \"account_type\": \"CHECKING\",\n \"holder_name\": \"Nicola Snow\",\n \"primary_bank_identification_number\": \"011401533\",\n \"secondary_bank_identification_number\": \"secondary_bank_identification_number\",\n \"debit_mandate_reference_id\": \"debit_mandate_reference_id\",\n \"reference_id\": \"reference_id\",\n \"location_id\": \"location_id\",\n \"status\": \"VERIFIED\",\n \"creditable\": true,\n \"debitable\": true,\n \"fingerprint\": \"sq-1-mO3XNctJpTLL8uYowOWpioS8nQyTc838gcBo90254XonoEJ_c7Uw6yqL6qihFNY8fA\",\n \"version\": 2,\n \"bank_name\": \"Citizens Bank\",\n \"customer_id\": \"HM3B2D5JKGZ69359BTEHXM2V8M\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"1d33601b-c9c3-461d-b81f-4619b4223095","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ae0b588d-6e8d-449b-a100-a7edae698fd8","name":"DisableBankAccount - default","request":{"urlPathTemplate":"/v2/bank-accounts/{bank_account_id}/disable","method":"POST","pathParameters":{"bank_account_id":{"equalTo":"bank_account_id"}}},"response":{"status":200,"body":"{\n \"bank_account\": {\n \"id\": \"bact:OxfBTiXgByaXds1K4GB\",\n \"account_number_suffix\": \"000\",\n \"country\": \"US\",\n \"currency\": \"USD\",\n \"account_type\": \"CHECKING\",\n \"holder_name\": \"Nicola Snow\",\n \"primary_bank_identification_number\": \"011401533\",\n \"secondary_bank_identification_number\": \"secondary_bank_identification_number\",\n \"debit_mandate_reference_id\": \"debit_mandate_reference_id\",\n \"reference_id\": \"reference_id\",\n \"location_id\": \"location_id\",\n \"status\": \"DISABLED\",\n \"creditable\": true,\n \"debitable\": true,\n \"fingerprint\": \"sq-1-mO3XNctJpTLL8uYowOWpioS8nQyTc838gcBo90254XonoEJ_c7Uw6yqL6qihFNY8fA\",\n \"version\": 3,\n \"bank_name\": \"Citizens Bank\",\n \"customer_id\": \"HM3B2D5JKGZ69359BTEHXM2V8M\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"ae0b588d-6e8d-449b-a100-a7edae698fd8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"9a27533f-a09c-4359-857b-988a2448f22d","name":"ListBookings - default","request":{"urlPathTemplate":"/v2/bookings","method":"GET","queryParameters":{"limit":{"equalTo":"1"},"cursor":{"equalTo":"cursor"},"customer_id":{"equalTo":"customer_id"},"team_member_id":{"equalTo":"team_member_id"},"location_id":{"equalTo":"location_id"},"start_at_min":{"equalTo":"start_at_min"},"start_at_max":{"equalTo":"start_at_max"}}},"response":{"status":200,"body":"{\n \"bookings\": [\n {\n \"id\": \"zkras0xv0xwswx\",\n \"version\": 1,\n \"status\": \"ACCEPTED\",\n \"created_at\": \"2020-10-28T15:47:41Z\",\n \"updated_at\": \"2020-10-28T15:49:25Z\",\n \"start_at\": \"2020-11-26T13:00:00Z\",\n \"location_id\": \"LEQHH0YY8B42M\",\n \"customer_id\": \"EX2QSVGTZN4K1E5QE1CBFNVQ8M\",\n \"customer_note\": \"\",\n \"seller_note\": \"\",\n \"appointment_segments\": [\n {\n \"duration_minutes\": 60,\n \"service_variation_id\": \"RU3PBTZTK7DXZDQFCJHOK2MC\",\n \"team_member_id\": \"TMXUrsBWWcHTt79t\",\n \"service_variation_version\": 1599775456731\n }\n ],\n \"transition_time_minutes\": 1,\n \"all_day\": true,\n \"location_type\": \"BUSINESS_LOCATION\",\n \"source\": \"FIRST_PARTY_MERCHANT\"\n }\n ],\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"9a27533f-a09c-4359-857b-988a2448f22d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"82ecbd8d-e3c6-405e-9b56-dccb7d2a11c6","name":"CreateBooking - default","request":{"urlPathTemplate":"/v2/bookings","method":"POST"},"response":{"status":200,"body":"{\n \"booking\": {\n \"id\": \"zkras0xv0xwswx\",\n \"version\": 0,\n \"status\": \"ACCEPTED\",\n \"created_at\": \"2020-10-28T15:47:41Z\",\n \"updated_at\": \"2020-10-28T15:47:41Z\",\n \"start_at\": \"2020-11-26T13:00:00Z\",\n \"location_id\": \"LEQHH0YY8B42M\",\n \"customer_id\": \"EX2QSVGTZN4K1E5QE1CBFNVQ8M\",\n \"customer_note\": \"\",\n \"seller_note\": \"\",\n \"appointment_segments\": [\n {\n \"duration_minutes\": 60,\n \"service_variation_id\": \"RU3PBTZTK7DXZDQFCJHOK2MC\",\n \"team_member_id\": \"TMXUrsBWWcHTt79t\",\n \"service_variation_version\": 1599775456731\n }\n ],\n \"transition_time_minutes\": 1,\n \"all_day\": true,\n \"location_type\": \"BUSINESS_LOCATION\",\n \"creator_details\": {\n \"creator_type\": \"TEAM_MEMBER\",\n \"team_member_id\": \"team_member_id\",\n \"customer_id\": \"customer_id\"\n },\n \"source\": \"FIRST_PARTY_MERCHANT\",\n \"address\": {\n \"address_line_1\": \"address_line_1\",\n \"address_line_2\": \"address_line_2\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"locality\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"administrative_district_level_1\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"postal_code\",\n \"country\": \"ZZ\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"82ecbd8d-e3c6-405e-9b56-dccb7d2a11c6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0e249af6-5ef4-44f2-b392-d7b9077f7636","name":"SearchAvailability - default","request":{"urlPathTemplate":"/v2/bookings/availability/search","method":"POST"},"response":{"status":200,"body":"{\n \"availabilities\": [\n {\n \"start_at\": \"2020-11-26T13:00:00Z\",\n \"location_id\": \"LEQHH0YY8B42M\",\n \"appointment_segments\": [\n {\n \"duration_minutes\": 60,\n \"service_variation_id\": \"RU3PBTZTK7DXZDQFCJHOK2MC\",\n \"team_member_id\": \"TMXUrsBWWcHTt79t\",\n \"service_variation_version\": 1599775456731\n }\n ]\n },\n {\n \"start_at\": \"2020-11-26T13:30:00Z\",\n \"location_id\": \"LEQHH0YY8B42M\",\n \"appointment_segments\": [\n {\n \"duration_minutes\": 60,\n \"service_variation_id\": \"RU3PBTZTK7DXZDQFCJHOK2MC\",\n \"team_member_id\": \"TMXUrsBWWcHTt79t\",\n \"service_variation_version\": 1599775456731\n }\n ]\n },\n {\n \"start_at\": \"2020-11-26T14:00:00Z\",\n \"location_id\": \"LEQHH0YY8B42M\",\n \"appointment_segments\": [\n {\n \"duration_minutes\": 60,\n \"service_variation_id\": \"RU3PBTZTK7DXZDQFCJHOK2MC\",\n \"team_member_id\": \"TMaJcbiRqPIGZuS9\",\n \"service_variation_version\": 1599775456731\n }\n ]\n },\n {\n \"start_at\": \"2020-11-26T14:30:00Z\",\n \"location_id\": \"LEQHH0YY8B42M\",\n \"appointment_segments\": [\n {\n \"duration_minutes\": 60,\n \"service_variation_id\": \"RU3PBTZTK7DXZDQFCJHOK2MC\",\n \"team_member_id\": \"TMaJcbiRqPIGZuS9\",\n \"service_variation_version\": 1599775456731\n }\n ]\n },\n {\n \"start_at\": \"2020-11-26T15:00:00Z\",\n \"location_id\": \"LEQHH0YY8B42M\",\n \"appointment_segments\": [\n {\n \"duration_minutes\": 60,\n \"service_variation_id\": \"RU3PBTZTK7DXZDQFCJHOK2MC\",\n \"team_member_id\": \"TMaJcbiRqPIGZuS9\",\n \"service_variation_version\": 1599775456731\n }\n ]\n },\n {\n \"start_at\": \"2020-11-26T15:30:00Z\",\n \"location_id\": \"LEQHH0YY8B42M\",\n \"appointment_segments\": [\n {\n \"duration_minutes\": 60,\n \"service_variation_id\": \"RU3PBTZTK7DXZDQFCJHOK2MC\",\n \"team_member_id\": \"TMaJcbiRqPIGZuS9\",\n \"service_variation_version\": 1599775456731\n }\n ]\n },\n {\n \"start_at\": \"2020-11-26T16:00:00Z\",\n \"location_id\": \"LEQHH0YY8B42M\",\n \"appointment_segments\": [\n {\n \"duration_minutes\": 60,\n \"service_variation_id\": \"RU3PBTZTK7DXZDQFCJHOK2MC\",\n \"team_member_id\": \"TMaJcbiRqPIGZuS9\",\n \"service_variation_version\": 1599775456731\n }\n ]\n },\n {\n \"start_at\": \"2020-11-27T09:00:00Z\",\n \"location_id\": \"LEQHH0YY8B42M\",\n \"appointment_segments\": [\n {\n \"duration_minutes\": 60,\n \"service_variation_id\": \"RU3PBTZTK7DXZDQFCJHOK2MC\",\n \"team_member_id\": \"TMXUrsBWWcHTt79t\",\n \"service_variation_version\": 1599775456731\n }\n ]\n },\n {\n \"start_at\": \"2020-11-27T09:30:00Z\",\n \"location_id\": \"LEQHH0YY8B42M\",\n \"appointment_segments\": [\n {\n \"duration_minutes\": 60,\n \"service_variation_id\": \"RU3PBTZTK7DXZDQFCJHOK2MC\",\n \"team_member_id\": \"TMaJcbiRqPIGZuS9\",\n \"service_variation_version\": 1599775456731\n }\n ]\n },\n {\n \"start_at\": \"2020-11-27T10:00:00Z\",\n \"location_id\": \"LEQHH0YY8B42M\",\n \"appointment_segments\": [\n {\n \"duration_minutes\": 60,\n \"service_variation_id\": \"RU3PBTZTK7DXZDQFCJHOK2MC\",\n \"team_member_id\": \"TMXUrsBWWcHTt79t\",\n \"service_variation_version\": 1599775456731\n }\n ]\n },\n {\n \"start_at\": \"2020-11-27T10:30:00Z\",\n \"location_id\": \"LEQHH0YY8B42M\",\n \"appointment_segments\": [\n {\n \"duration_minutes\": 60,\n \"service_variation_id\": \"RU3PBTZTK7DXZDQFCJHOK2MC\",\n \"team_member_id\": \"TMXUrsBWWcHTt79t\",\n \"service_variation_version\": 1599775456731\n }\n ]\n },\n {\n \"start_at\": \"2020-11-27T11:00:00Z\",\n \"location_id\": \"LEQHH0YY8B42M\",\n \"appointment_segments\": [\n {\n \"duration_minutes\": 60,\n \"service_variation_id\": \"RU3PBTZTK7DXZDQFCJHOK2MC\",\n \"team_member_id\": \"TMXUrsBWWcHTt79t\",\n \"service_variation_version\": 1599775456731\n }\n ]\n },\n {\n \"start_at\": \"2020-11-27T11:30:00Z\",\n \"location_id\": \"LEQHH0YY8B42M\",\n \"appointment_segments\": [\n {\n \"duration_minutes\": 60,\n \"service_variation_id\": \"RU3PBTZTK7DXZDQFCJHOK2MC\",\n \"team_member_id\": \"TMaJcbiRqPIGZuS9\",\n \"service_variation_version\": 1599775456731\n }\n ]\n },\n {\n \"start_at\": \"2020-11-27T12:00:00Z\",\n \"location_id\": \"LEQHH0YY8B42M\",\n \"appointment_segments\": [\n {\n \"duration_minutes\": 60,\n \"service_variation_id\": \"RU3PBTZTK7DXZDQFCJHOK2MC\",\n \"team_member_id\": \"TMaJcbiRqPIGZuS9\",\n \"service_variation_version\": 1599775456731\n }\n ]\n },\n {\n \"start_at\": \"2020-11-27T12:30:00Z\",\n \"location_id\": \"LEQHH0YY8B42M\",\n \"appointment_segments\": [\n {\n \"duration_minutes\": 60,\n \"service_variation_id\": \"RU3PBTZTK7DXZDQFCJHOK2MC\",\n \"team_member_id\": \"TMaJcbiRqPIGZuS9\",\n \"service_variation_version\": 1599775456731\n }\n ]\n },\n {\n \"start_at\": \"2020-11-27T13:00:00Z\",\n \"location_id\": \"LEQHH0YY8B42M\",\n \"appointment_segments\": [\n {\n \"duration_minutes\": 60,\n \"service_variation_id\": \"RU3PBTZTK7DXZDQFCJHOK2MC\",\n \"team_member_id\": \"TMXUrsBWWcHTt79t\",\n \"service_variation_version\": 1599775456731\n }\n ]\n },\n {\n \"start_at\": \"2020-11-27T13:30:00Z\",\n \"location_id\": \"LEQHH0YY8B42M\",\n \"appointment_segments\": [\n {\n \"duration_minutes\": 60,\n \"service_variation_id\": \"RU3PBTZTK7DXZDQFCJHOK2MC\",\n \"team_member_id\": \"TMXUrsBWWcHTt79t\",\n \"service_variation_version\": 1599775456731\n }\n ]\n },\n {\n \"start_at\": \"2020-11-27T14:00:00Z\",\n \"location_id\": \"LEQHH0YY8B42M\",\n \"appointment_segments\": [\n {\n \"duration_minutes\": 60,\n \"service_variation_id\": \"RU3PBTZTK7DXZDQFCJHOK2MC\",\n \"team_member_id\": \"TMaJcbiRqPIGZuS9\",\n \"service_variation_version\": 1599775456731\n }\n ]\n }\n ],\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"0e249af6-5ef4-44f2-b392-d7b9077f7636","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8a31bbea-0c46-48dd-b95c-9742dcb89637","name":"BulkRetrieveBookings - default","request":{"urlPathTemplate":"/v2/bookings/bulk-retrieve","method":"POST"},"response":{"status":200,"body":"{\n \"bookings\": {\n \"sc3p3m7dvctfr1\": {\n \"booking\": {\n \"id\": \"sc3p3m7dvctfr1\",\n \"version\": 0,\n \"status\": \"ACCEPTED\",\n \"created_at\": \"2023-04-26T18:19:21Z\",\n \"updated_at\": \"2023-04-26T18:19:21Z\",\n \"start_at\": \"2023-05-01T14:00:00Z\",\n \"location_id\": \"LY6WNBPVM6VGV\",\n \"customer_id\": \"4TDWKN9E8165X8Z77MRS0VFMJM\",\n \"appointment_segments\": [\n {\n \"duration_minutes\": 60,\n \"service_variation_id\": \"VG4FYBKK3UL6UITOEYQ6MFLS\",\n \"team_member_id\": \"TMjiqI3PxyLMKr4k\",\n \"service_variation_version\": 1641341724039,\n \"any_team_member\": false\n }\n ],\n \"all_day\": false\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"tdegug1dvctdef\": {\n \"errors\": [\n {\n \"category\": \"INVALID_REQUEST_ERROR\",\n \"code\": \"NOT_FOUND\",\n \"detail\": \"Specified booking was not found.\",\n \"field\": \"booking_id\"\n }\n ]\n },\n \"tdegug1fqni3wh\": {\n \"booking\": {\n \"id\": \"tdegug1fqni3wh\",\n \"version\": 0,\n \"status\": \"ACCEPTED\",\n \"created_at\": \"2023-04-26T18:19:30Z\",\n \"updated_at\": \"2023-04-26T18:19:30Z\",\n \"start_at\": \"2023-05-02T14:00:00Z\",\n \"location_id\": \"LY6WNBPVM6VGV\",\n \"customer_id\": \"4TDWKN9E8165X8Z77MRS0VFMJM\",\n \"appointment_segments\": [\n {\n \"duration_minutes\": 60,\n \"service_variation_id\": \"VG4FYBKK3UL6UITOEYQ6MFLS\",\n \"team_member_id\": \"TMjiqI3PxyLMKr4k\",\n \"service_variation_version\": 1641341724039,\n \"any_team_member\": false\n }\n ],\n \"all_day\": false\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"8a31bbea-0c46-48dd-b95c-9742dcb89637","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d133a672-79f7-4179-9830-e8969e9951a0","name":"RetrieveBusinessBookingProfile - default","request":{"urlPathTemplate":"/v2/bookings/business-booking-profile","method":"GET"},"response":{"status":200,"body":"{\n \"business_booking_profile\": {\n \"seller_id\": \"MLJQYZZRM0D3Y\",\n \"created_at\": \"2020-09-10T21:40:38Z\",\n \"booking_enabled\": true,\n \"customer_timezone_choice\": \"CUSTOMER_CHOICE\",\n \"booking_policy\": \"ACCEPT_ALL\",\n \"allow_user_cancel\": true,\n \"business_appointment_settings\": {\n \"location_types\": [\n \"BUSINESS_LOCATION\"\n ],\n \"alignment_time\": \"HALF_HOURLY\",\n \"min_booking_lead_time_seconds\": 0,\n \"max_booking_lead_time_seconds\": 31536000,\n \"any_team_member_booking_enabled\": true,\n \"multiple_service_booking_enabled\": true,\n \"max_appointments_per_day_limit_type\": \"PER_TEAM_MEMBER\",\n \"max_appointments_per_day_limit\": 1,\n \"cancellation_window_seconds\": 1,\n \"cancellation_fee_money\": {\n \"currency\": \"USD\"\n },\n \"cancellation_policy\": \"CUSTOM_POLICY\",\n \"cancellation_policy_text\": \"cancellation_policy_text\",\n \"skip_booking_flow_staff_selection\": false\n },\n \"support_seller_level_writes\": true\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"d133a672-79f7-4179-9830-e8969e9951a0","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"dd3ba690-2ef5-4eed-ad65-d2fcd587570a","name":"RetrieveLocationBookingProfile - default","request":{"urlPathTemplate":"/v2/bookings/location-booking-profiles/{location_id}","method":"GET","pathParameters":{"location_id":{"equalTo":"location_id"}}},"response":{"status":200,"body":"{\n \"location_booking_profile\": {\n \"location_id\": \"L3HETDGYQ4A2C\",\n \"booking_site_url\": \"https://square.site/book/L3HETDGYQ4A2C/prod-business\",\n \"online_booking_enabled\": true\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"dd3ba690-2ef5-4eed-ad65-d2fcd587570a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e8db086a-2e57-4c8b-ad1d-ecf10a3a02e6","name":"BulkRetrieveTeamMemberBookingProfiles - default","request":{"urlPathTemplate":"/v2/bookings/team-member-booking-profiles/bulk-retrieve","method":"POST"},"response":{"status":200,"body":"{\n \"team_member_booking_profiles\": {\n \"TMXUrsBWWcHTt79t\": {\n \"errors\": [\n {\n \"category\": \"INVALID_REQUEST_ERROR\",\n \"code\": \"NOT_FOUND\",\n \"detail\": \"Resource not found.\"\n }\n ]\n },\n \"TMaJcbiRqPIGZuS9\": {\n \"team_member_booking_profile\": {\n \"team_member_id\": \"TMaJcbiRqPIGZuS9\",\n \"display_name\": \"Sandbox Staff 1\",\n \"is_bookable\": true\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"TMtdegug1fqni3wh\": {\n \"team_member_booking_profile\": {\n \"team_member_id\": \"TMtdegug1fqni3wh\",\n \"display_name\": \"Sandbox Staff 2\",\n \"is_bookable\": true\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"e8db086a-2e57-4c8b-ad1d-ecf10a3a02e6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"43c41d0a-172c-4292-be03-75e88301bf66","name":"RetrieveBooking - default","request":{"urlPathTemplate":"/v2/bookings/{booking_id}","method":"GET","pathParameters":{"booking_id":{"equalTo":"booking_id"}}},"response":{"status":200,"body":"{\n \"booking\": {\n \"id\": \"zkras0xv0xwswx\",\n \"version\": 1,\n \"status\": \"ACCEPTED\",\n \"created_at\": \"2020-10-28T15:47:41Z\",\n \"updated_at\": \"2020-10-28T15:49:25Z\",\n \"start_at\": \"2020-11-26T13:00:00Z\",\n \"location_id\": \"LEQHH0YY8B42M\",\n \"customer_id\": \"EX2QSVGTZN4K1E5QE1CBFNVQ8M\",\n \"customer_note\": \"\",\n \"seller_note\": \"\",\n \"appointment_segments\": [\n {\n \"duration_minutes\": 60,\n \"service_variation_id\": \"RU3PBTZTK7DXZDQFCJHOK2MC\",\n \"team_member_id\": \"TMXUrsBWWcHTt79t\",\n \"service_variation_version\": 1599775456731\n }\n ],\n \"transition_time_minutes\": 1,\n \"all_day\": true,\n \"location_type\": \"BUSINESS_LOCATION\",\n \"creator_details\": {\n \"creator_type\": \"TEAM_MEMBER\",\n \"team_member_id\": \"team_member_id\",\n \"customer_id\": \"customer_id\"\n },\n \"source\": \"FIRST_PARTY_MERCHANT\",\n \"address\": {\n \"address_line_1\": \"address_line_1\",\n \"address_line_2\": \"address_line_2\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"locality\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"administrative_district_level_1\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"postal_code\",\n \"country\": \"ZZ\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"43c41d0a-172c-4292-be03-75e88301bf66","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c1f95b4e-1346-4dcc-b9c4-6f84e8a26f38","name":"UpdateBooking - default","request":{"urlPathTemplate":"/v2/bookings/{booking_id}","method":"PUT","pathParameters":{"booking_id":{"equalTo":"booking_id"}}},"response":{"status":200,"body":"{\n \"booking\": {\n \"id\": \"zkras0xv0xwswx\",\n \"version\": 2,\n \"status\": \"ACCEPTED\",\n \"created_at\": \"2020-10-28T15:47:41Z\",\n \"updated_at\": \"2020-10-28T15:49:25Z\",\n \"start_at\": \"2020-11-26T13:00:00Z\",\n \"location_id\": \"LEQHH0YY8B42M\",\n \"customer_id\": \"EX2QSVGTZN4K1E5QE1CBFNVQ8M\",\n \"customer_note\": \"I would like to sit near the window please\",\n \"seller_note\": \"\",\n \"appointment_segments\": [\n {\n \"duration_minutes\": 60,\n \"service_variation_id\": \"RU3PBTZTK7DXZDQFCJHOK2MC\",\n \"team_member_id\": \"TMXUrsBWWcHTt79t\",\n \"service_variation_version\": 1599775456731\n }\n ],\n \"transition_time_minutes\": 1,\n \"all_day\": true,\n \"location_type\": \"CUSTOMER_LOCATION\",\n \"creator_details\": {\n \"creator_type\": \"TEAM_MEMBER\",\n \"team_member_id\": \"team_member_id\",\n \"customer_id\": \"customer_id\"\n },\n \"source\": \"FIRST_PARTY_MERCHANT\",\n \"address\": {\n \"address_line_1\": \"1955 Broadway\",\n \"address_line_2\": \"Suite 600\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"Oakland\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"CA\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"94612\",\n \"country\": \"ZZ\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"c1f95b4e-1346-4dcc-b9c4-6f84e8a26f38","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2e1772a0-e75e-4688-823b-6617c3431e49","name":"CancelBooking - default","request":{"urlPathTemplate":"/v2/bookings/{booking_id}/cancel","method":"POST","pathParameters":{"booking_id":{"equalTo":"booking_id"}}},"response":{"status":200,"body":"{\n \"booking\": {\n \"id\": \"zkras0xv0xwswx\",\n \"version\": 1,\n \"status\": \"CANCELLED_BY_CUSTOMER\",\n \"created_at\": \"2020-10-28T15:47:41Z\",\n \"updated_at\": \"2020-10-28T15:49:25Z\",\n \"start_at\": \"2020-11-26T13:00:00Z\",\n \"location_id\": \"LEQHH0YY8B42M\",\n \"customer_id\": \"EX2QSVGTZN4K1E5QE1CBFNVQ8M\",\n \"customer_note\": \"\",\n \"seller_note\": \"\",\n \"appointment_segments\": [\n {\n \"duration_minutes\": 60,\n \"service_variation_id\": \"RU3PBTZTK7DXZDQFCJHOK2MC\",\n \"team_member_id\": \"TMXUrsBWWcHTt79t\",\n \"service_variation_version\": 1599775456731\n }\n ],\n \"transition_time_minutes\": 1,\n \"all_day\": true,\n \"location_type\": \"BUSINESS_LOCATION\",\n \"creator_details\": {\n \"creator_type\": \"TEAM_MEMBER\",\n \"team_member_id\": \"team_member_id\",\n \"customer_id\": \"customer_id\"\n },\n \"source\": \"FIRST_PARTY_MERCHANT\",\n \"address\": {\n \"address_line_1\": \"address_line_1\",\n \"address_line_2\": \"address_line_2\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"locality\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"administrative_district_level_1\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"postal_code\",\n \"country\": \"ZZ\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"2e1772a0-e75e-4688-823b-6617c3431e49","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"787c1f42-877c-4f3a-ad44-74c9c6afb5c0","name":"ListCards - default","request":{"urlPathTemplate":"/v2/cards","method":"GET","queryParameters":{"cursor":{"equalTo":"cursor"},"customer_id":{"equalTo":"customer_id"},"include_disabled":{"equalTo":"true"},"reference_id":{"equalTo":"reference_id"},"sort_order":{"equalTo":"DESC"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"cards\": [\n {\n \"id\": \"ccof:uIbfJXhXETSP197M3GB\",\n \"card_brand\": \"VISA\",\n \"last_4\": \"1111\",\n \"exp_month\": 11,\n \"exp_year\": 2022,\n \"cardholder_name\": \"Amelia Earhart\",\n \"billing_address\": {\n \"address_line_1\": \"500 Electric Ave\",\n \"address_line_2\": \"Suite 600\",\n \"locality\": \"New York\",\n \"administrative_district_level_1\": \"NY\",\n \"postal_code\": \"10003\",\n \"country\": \"US\"\n },\n \"fingerprint\": \"ex-p-cs80EK9Flz7LsCMv-szbptQ_ssAGrhemzSTsPFgt9nzyE6t7okiLIQc-qw_quqKX4Q\",\n \"customer_id\": \"VDKXEEKPJN48QDG3BGGFAK05P8\",\n \"merchant_id\": \"6SSW7HV8K2ST5\",\n \"reference_id\": \"user-id-1\",\n \"enabled\": true,\n \"card_type\": \"CREDIT\",\n \"prepaid_type\": \"NOT_PREPAID\",\n \"bin\": \"411111\",\n \"created_at\": \"created_at\",\n \"disabled_at\": \"disabled_at\",\n \"version\": 1,\n \"card_co_brand\": \"UNKNOWN\",\n \"issuer_alert\": \"ISSUER_ALERT_CARD_CLOSED\",\n \"issuer_alert_at\": \"issuer_alert_at\",\n \"hsa_fsa\": false\n }\n ],\n \"cursor\": \"cursor\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"787c1f42-877c-4f3a-ad44-74c9c6afb5c0","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"eb0e1637-4533-4b5c-a901-dc85dc8131a9","name":"CreateCard - default","request":{"urlPathTemplate":"/v2/cards","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"card\": {\n \"id\": \"ccof:uIbfJXhXETSP197M3GB\",\n \"card_brand\": \"VISA\",\n \"last_4\": \"1111\",\n \"exp_month\": 11,\n \"exp_year\": 2022,\n \"cardholder_name\": \"Amelia Earhart\",\n \"billing_address\": {\n \"address_line_1\": \"500 Electric Ave\",\n \"address_line_2\": \"Suite 600\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"New York\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"NY\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"10003\",\n \"country\": \"US\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n },\n \"fingerprint\": \"ex-p-cs80EK9Flz7LsCMv-szbptQ_ssAGrhemzSTsPFgt9nzyE6t7okiLIQc-qw_quqKX4Q\",\n \"customer_id\": \"VDKXEEKPJN48QDG3BGGFAK05P8\",\n \"merchant_id\": \"6SSW7HV8K2ST5\",\n \"reference_id\": \"user-id-1\",\n \"enabled\": true,\n \"card_type\": \"CREDIT\",\n \"prepaid_type\": \"NOT_PREPAID\",\n \"bin\": \"411111\",\n \"created_at\": \"created_at\",\n \"disabled_at\": \"disabled_at\",\n \"version\": 1,\n \"card_co_brand\": \"UNKNOWN\",\n \"issuer_alert\": \"ISSUER_ALERT_CARD_CLOSED\",\n \"issuer_alert_at\": \"issuer_alert_at\",\n \"hsa_fsa\": false\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"eb0e1637-4533-4b5c-a901-dc85dc8131a9","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2c2ca973-0bc2-42a7-97ce-cda1f29995cf","name":"RetrieveCard - default","request":{"urlPathTemplate":"/v2/cards/{card_id}","method":"GET","pathParameters":{"card_id":{"equalTo":"card_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"card\": {\n \"id\": \"ccof:uIbfJXhXETSP197M3GB\",\n \"card_brand\": \"VISA\",\n \"last_4\": \"1111\",\n \"exp_month\": 11,\n \"exp_year\": 2022,\n \"cardholder_name\": \"Amelia Earhart\",\n \"billing_address\": {\n \"address_line_1\": \"500 Electric Ave\",\n \"address_line_2\": \"Suite 600\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"New York\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"NY\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"10003\",\n \"country\": \"US\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n },\n \"fingerprint\": \"ex-p-cs80EK9Flz7LsCMv-szbptQ_ssAGrhemzSTsPFgt9nzyE6t7okiLIQc-qw_quqKX4Q\",\n \"customer_id\": \"VDKXEEKPJN48QDG3BGGFAK05P8\",\n \"merchant_id\": \"6SSW7HV8K2ST5\",\n \"reference_id\": \"user-id-1\",\n \"enabled\": true,\n \"card_type\": \"CREDIT\",\n \"prepaid_type\": \"NOT_PREPAID\",\n \"bin\": \"411111\",\n \"created_at\": \"created_at\",\n \"disabled_at\": \"disabled_at\",\n \"version\": 1,\n \"card_co_brand\": \"UNKNOWN\",\n \"issuer_alert\": \"ISSUER_ALERT_CARD_CLOSED\",\n \"issuer_alert_at\": \"issuer_alert_at\",\n \"hsa_fsa\": false\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"2c2ca973-0bc2-42a7-97ce-cda1f29995cf","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"862c4015-67e5-43ac-8c7e-52d42d6c8511","name":"DisableCard - default","request":{"urlPathTemplate":"/v2/cards/{card_id}/disable","method":"POST","pathParameters":{"card_id":{"equalTo":"card_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"card\": {\n \"id\": \"ccof:uIbfJXhXETSP197M3GB\",\n \"card_brand\": \"VISA\",\n \"last_4\": \"1111\",\n \"exp_month\": 11,\n \"exp_year\": 2022,\n \"cardholder_name\": \"Amelia Earhart\",\n \"billing_address\": {\n \"address_line_1\": \"500 Electric Ave\",\n \"address_line_2\": \"Suite 600\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"New York\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"NY\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"10003\",\n \"country\": \"US\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n },\n \"fingerprint\": \"ex-p-cs80EK9Flz7LsCMv-szbptQ_ssAGrhemzSTsPFgt9nzyE6t7okiLIQc-qw_quqKX4Q\",\n \"customer_id\": \"VDKXEEKPJN48QDG3BGGFAK05P8\",\n \"merchant_id\": \"6SSW7HV8K2ST5\",\n \"reference_id\": \"user-id-1\",\n \"enabled\": false,\n \"card_type\": \"CREDIT\",\n \"prepaid_type\": \"NOT_PREPAID\",\n \"bin\": \"411111\",\n \"created_at\": \"created_at\",\n \"disabled_at\": \"disabled_at\",\n \"version\": 2,\n \"card_co_brand\": \"UNKNOWN\",\n \"issuer_alert\": \"ISSUER_ALERT_CARD_CLOSED\",\n \"issuer_alert_at\": \"issuer_alert_at\",\n \"hsa_fsa\": false\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"862c4015-67e5-43ac-8c7e-52d42d6c8511","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"7e6bdfc1-427f-420a-825a-ccf0c04a8b64","name":"BatchDeleteCatalogObjects - default","request":{"urlPathTemplate":"/v2/catalog/batch-delete","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"deleted_object_ids\": [\n \"W62UWFY35CWMYGVWK6TWJDNI\",\n \"AA27W3M2GGTF3H6AVPNB77CK\"\n ],\n \"deleted_at\": \"2016-11-16T22:25:24.878Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"7e6bdfc1-427f-420a-825a-ccf0c04a8b64","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d9e2abf4-33f7-4312-94ca-f34b61620c7d","name":"BatchRetrieveCatalogObjects - default","request":{"urlPathTemplate":"/v2/catalog/batch-retrieve","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"objects\": [\n {\n \"id\": \"id\",\n \"updated_at\": \"updated_at\",\n \"version\": 1000000,\n \"is_deleted\": true,\n \"custom_attribute_values\": {\n \"key\": {}\n },\n \"catalog_v1_ids\": [\n {}\n ],\n \"present_at_all_locations\": true,\n \"present_at_location_ids\": [\n \"present_at_location_ids\"\n ],\n \"absent_at_location_ids\": [\n \"absent_at_location_ids\"\n ],\n \"image_id\": \"image_id\",\n \"type\": \"ITEM\"\n },\n {\n \"id\": \"id\",\n \"updated_at\": \"updated_at\",\n \"version\": 1000000,\n \"is_deleted\": true,\n \"custom_attribute_values\": {\n \"key\": {}\n },\n \"catalog_v1_ids\": [\n {}\n ],\n \"present_at_all_locations\": true,\n \"present_at_location_ids\": [\n \"present_at_location_ids\"\n ],\n \"absent_at_location_ids\": [\n \"absent_at_location_ids\"\n ],\n \"image_id\": \"image_id\",\n \"type\": \"ITEM\"\n }\n ],\n \"related_objects\": [\n {\n \"id\": \"id\",\n \"updated_at\": \"updated_at\",\n \"version\": 1000000,\n \"is_deleted\": true,\n \"custom_attribute_values\": {\n \"key\": {}\n },\n \"catalog_v1_ids\": [\n {}\n ],\n \"present_at_all_locations\": true,\n \"present_at_location_ids\": [\n \"present_at_location_ids\"\n ],\n \"absent_at_location_ids\": [\n \"absent_at_location_ids\"\n ],\n \"image_id\": \"image_id\",\n \"ordinal\": 1000000,\n \"type\": \"CATEGORY\"\n },\n {\n \"id\": \"id\",\n \"updated_at\": \"updated_at\",\n \"version\": 1000000,\n \"is_deleted\": true,\n \"custom_attribute_values\": {\n \"key\": {}\n },\n \"catalog_v1_ids\": [\n {}\n ],\n \"present_at_all_locations\": true,\n \"present_at_location_ids\": [\n \"present_at_location_ids\"\n ],\n \"absent_at_location_ids\": [\n \"absent_at_location_ids\"\n ],\n \"image_id\": \"image_id\",\n \"type\": \"TAX\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"d9e2abf4-33f7-4312-94ca-f34b61620c7d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"bbcfc0cb-2877-4fe4-b900-c2763a1a420b","name":"BatchUpsertCatalogObjects - default","request":{"urlPathTemplate":"/v2/catalog/batch-upsert","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"objects\": [\n {\n \"id\": \"id\",\n \"updated_at\": \"updated_at\",\n \"version\": 1000000,\n \"is_deleted\": true,\n \"custom_attribute_values\": {\n \"key\": {}\n },\n \"catalog_v1_ids\": [\n {}\n ],\n \"present_at_all_locations\": true,\n \"present_at_location_ids\": [\n \"present_at_location_ids\"\n ],\n \"absent_at_location_ids\": [\n \"absent_at_location_ids\"\n ],\n \"image_id\": \"image_id\",\n \"type\": \"ITEM\"\n },\n {\n \"id\": \"id\",\n \"updated_at\": \"updated_at\",\n \"version\": 1000000,\n \"is_deleted\": true,\n \"custom_attribute_values\": {\n \"key\": {}\n },\n \"catalog_v1_ids\": [\n {}\n ],\n \"present_at_all_locations\": true,\n \"present_at_location_ids\": [\n \"present_at_location_ids\"\n ],\n \"absent_at_location_ids\": [\n \"absent_at_location_ids\"\n ],\n \"image_id\": \"image_id\",\n \"type\": \"ITEM\"\n },\n {\n \"id\": \"id\",\n \"updated_at\": \"updated_at\",\n \"version\": 1000000,\n \"is_deleted\": true,\n \"custom_attribute_values\": {\n \"key\": {}\n },\n \"catalog_v1_ids\": [\n {}\n ],\n \"present_at_all_locations\": true,\n \"present_at_location_ids\": [\n \"present_at_location_ids\"\n ],\n \"absent_at_location_ids\": [\n \"absent_at_location_ids\"\n ],\n \"image_id\": \"image_id\",\n \"ordinal\": 1000000,\n \"type\": \"CATEGORY\"\n },\n {\n \"id\": \"id\",\n \"updated_at\": \"updated_at\",\n \"version\": 1000000,\n \"is_deleted\": true,\n \"custom_attribute_values\": {\n \"key\": {}\n },\n \"catalog_v1_ids\": [\n {}\n ],\n \"present_at_all_locations\": true,\n \"present_at_location_ids\": [\n \"present_at_location_ids\"\n ],\n \"absent_at_location_ids\": [\n \"absent_at_location_ids\"\n ],\n \"image_id\": \"image_id\",\n \"type\": \"TAX\"\n }\n ],\n \"updated_at\": \"updated_at\",\n \"id_mappings\": [\n {\n \"client_object_id\": \"#Tea\",\n \"object_id\": \"67GA7XA2FWMRYY2VCONTYZJR\"\n },\n {\n \"client_object_id\": \"#Coffee\",\n \"object_id\": \"MQ4TZKOG3SR2EQI3TWEK4AH7\"\n },\n {\n \"client_object_id\": \"#Beverages\",\n \"object_id\": \"XCS4SCGN4WQYE2VU4U3TKXEH\"\n },\n {\n \"client_object_id\": \"#SalesTax\",\n \"object_id\": \"HP5VNYPKZKTNCKZ2Z5NPUH6A\"\n },\n {\n \"client_object_id\": \"#Tea_Mug\",\n \"object_id\": \"CAJBHUIQH7ONTSZI2KTVOUP6\"\n },\n {\n \"client_object_id\": \"#Coffee_Regular\",\n \"object_id\": \"GY2GXJTVVPQAPW43GFRR3NG6\"\n },\n {\n \"client_object_id\": \"#Coffee_Large\",\n \"object_id\": \"JE6VHPSRQL6IWSN26C36CJ7W\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"bbcfc0cb-2877-4fe4-b900-c2763a1a420b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"766e76ba-d57e-4638-91ea-1721b5c09c4a","name":"CatalogInfo - default","request":{"urlPathTemplate":"/v2/catalog/info","method":"GET"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"limits\": {\n \"batch_upsert_max_objects_per_batch\": 1000,\n \"batch_upsert_max_total_objects\": 10000,\n \"batch_retrieve_max_object_ids\": 1000,\n \"search_max_page_limit\": 1000,\n \"batch_delete_max_object_ids\": 200,\n \"update_item_taxes_max_item_ids\": 1000,\n \"update_item_taxes_max_taxes_to_enable\": 1000,\n \"update_item_taxes_max_taxes_to_disable\": 1000,\n \"update_item_modifier_lists_max_item_ids\": 1000,\n \"update_item_modifier_lists_max_modifier_lists_to_enable\": 1000,\n \"update_item_modifier_lists_max_modifier_lists_to_disable\": 1000\n },\n \"standard_unit_description_group\": {\n \"standard_unit_descriptions\": [\n {}\n ],\n \"language_code\": \"language_code\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"766e76ba-d57e-4638-91ea-1721b5c09c4a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"e4c8520a-286c-49e9-8517-6a48dcc24bd9","name":"ListCatalog - default","request":{"urlPathTemplate":"/v2/catalog/list","method":"GET","queryParameters":{"cursor":{"equalTo":"cursor"},"types":{"equalTo":"types"},"catalog_version":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"cursor\": \"cursor\",\n \"objects\": [\n {\n \"id\": \"id\",\n \"updated_at\": \"updated_at\",\n \"version\": 1000000,\n \"is_deleted\": true,\n \"custom_attribute_values\": {\n \"key\": {}\n },\n \"catalog_v1_ids\": [\n {}\n ],\n \"present_at_all_locations\": true,\n \"present_at_location_ids\": [\n \"present_at_location_ids\"\n ],\n \"absent_at_location_ids\": [\n \"absent_at_location_ids\"\n ],\n \"image_id\": \"image_id\",\n \"ordinal\": 1000000,\n \"type\": \"CATEGORY\"\n },\n {\n \"id\": \"id\",\n \"updated_at\": \"updated_at\",\n \"version\": 1000000,\n \"is_deleted\": true,\n \"custom_attribute_values\": {\n \"key\": {}\n },\n \"catalog_v1_ids\": [\n {}\n ],\n \"present_at_all_locations\": true,\n \"present_at_location_ids\": [\n \"present_at_location_ids\"\n ],\n \"absent_at_location_ids\": [\n \"absent_at_location_ids\"\n ],\n \"image_id\": \"image_id\",\n \"type\": \"TAX\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"e4c8520a-286c-49e9-8517-6a48dcc24bd9","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"290c1e8b-2493-44fd-b50f-f87169c3c524","name":"SearchCatalogObjects - default","request":{"urlPathTemplate":"/v2/catalog/search","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"cursor\": \"cursor\",\n \"objects\": [\n {\n \"id\": \"id\",\n \"updated_at\": \"updated_at\",\n \"version\": 1000000,\n \"is_deleted\": true,\n \"custom_attribute_values\": {\n \"key\": {}\n },\n \"catalog_v1_ids\": [\n {}\n ],\n \"present_at_all_locations\": true,\n \"present_at_location_ids\": [\n \"present_at_location_ids\"\n ],\n \"absent_at_location_ids\": [\n \"absent_at_location_ids\"\n ],\n \"image_id\": \"image_id\",\n \"type\": \"ITEM\"\n },\n {\n \"id\": \"id\",\n \"updated_at\": \"updated_at\",\n \"version\": 1000000,\n \"is_deleted\": true,\n \"custom_attribute_values\": {\n \"key\": {}\n },\n \"catalog_v1_ids\": [\n {}\n ],\n \"present_at_all_locations\": true,\n \"present_at_location_ids\": [\n \"present_at_location_ids\"\n ],\n \"absent_at_location_ids\": [\n \"absent_at_location_ids\"\n ],\n \"image_id\": \"image_id\",\n \"type\": \"ITEM\"\n }\n ],\n \"related_objects\": [\n {\n \"id\": \"id\",\n \"updated_at\": \"updated_at\",\n \"version\": 1000000,\n \"is_deleted\": true,\n \"custom_attribute_values\": {\n \"key\": {}\n },\n \"catalog_v1_ids\": [\n {}\n ],\n \"present_at_all_locations\": true,\n \"present_at_location_ids\": [\n \"present_at_location_ids\"\n ],\n \"absent_at_location_ids\": [\n \"absent_at_location_ids\"\n ],\n \"image_id\": \"image_id\",\n \"type\": \"ITEM\"\n }\n ],\n \"latest_time\": \"latest_time\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"290c1e8b-2493-44fd-b50f-f87169c3c524","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d16e638a-e2cb-4129-a175-1a5fc7da7cad","name":"SearchCatalogItems - default","request":{"urlPathTemplate":"/v2/catalog/search-catalog-items","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"items\": [\n {\n \"id\": \"id\",\n \"updated_at\": \"updated_at\",\n \"version\": 1000000,\n \"is_deleted\": true,\n \"custom_attribute_values\": {\n \"key\": {}\n },\n \"catalog_v1_ids\": [\n {}\n ],\n \"present_at_all_locations\": true,\n \"present_at_location_ids\": [\n \"present_at_location_ids\"\n ],\n \"absent_at_location_ids\": [\n \"absent_at_location_ids\"\n ],\n \"image_id\": \"image_id\",\n \"type\": \"ITEM\"\n }\n ],\n \"cursor\": \"cursor\",\n \"matched_variation_ids\": [\n \"VBJNPHCOKDFECR6VU25WRJUD\"\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"d16e638a-e2cb-4129-a175-1a5fc7da7cad","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3a426d67-f862-4ad2-9089-b78ed36a31b0","name":"UpdateItemModifierLists - default","request":{"urlPathTemplate":"/v2/catalog/update-item-modifier-lists","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"updated_at\": \"2016-11-16T22:25:24.878Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"3a426d67-f862-4ad2-9089-b78ed36a31b0","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"1e7fc2fd-a60a-44e1-bd4f-7643798beeb2","name":"UpdateItemTaxes - default","request":{"urlPathTemplate":"/v2/catalog/update-item-taxes","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"updated_at\": \"2016-11-16T22:25:24.878Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"1e7fc2fd-a60a-44e1-bd4f-7643798beeb2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0a6bfbb4-9758-489b-ad88-751af98389a7","name":"ListChannels - default","request":{"urlPathTemplate":"/v2/channels","method":"GET","queryParameters":{"reference_type":{"equalTo":"UNKNOWN_TYPE"},"reference_id":{"equalTo":"reference_id"},"status":{"equalTo":"ACTIVE"},"cursor":{"equalTo":"cursor"},"limit":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"channels\": [\n {\n \"id\": \"CH_9C03D0B59\",\n \"merchant_id\": \"ML64FACEA\",\n \"name\": \"Contoso Fulfillment Application\",\n \"version\": 1,\n \"reference\": {\n \"type\": \"OAUTH_APPLICATION\",\n \"id\": \"OA_9C03D0444\"\n },\n \"status\": \"ACTIVE\",\n \"created_at\": \"2022-10-25T16:27:00Z\",\n \"updated_at\": \"2022-10-25T16:48:00Z\"\n }\n ],\n \"cursor\": \"cursor\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"0a6bfbb4-9758-489b-ad88-751af98389a7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"a35c34ce-6011-404b-9f2a-09ce49379d06","name":"BulkRetrieveChannels - default","request":{"urlPathTemplate":"/v2/channels/bulk-retrieve","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"responses\": {\n \"CH_6X139B5MN\": {\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ],\n \"channel\": {\n \"id\": \"CH_6X139B5MN\",\n \"merchant_id\": \"ML64FACEA\",\n \"name\": \"Contoso Fulfillment Application\",\n \"version\": 1,\n \"reference\": {\n \"type\": \"OAUTH_APPLICATION\",\n \"id\": \"OA_9C03D0444\"\n },\n \"status\": \"ACTIVE\",\n \"created_at\": \"2022-10-25T16:27:00Z\",\n \"updated_at\": \"2022-10-25T16:48:00Z\"\n }\n },\n \"CH_9C03D0B59\": {\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ],\n \"channel\": {\n \"id\": \"CH_9C03D0B59\",\n \"merchant_id\": \"ML64FACEA\",\n \"name\": \"State Street Store\",\n \"version\": 1,\n \"reference\": {\n \"type\": \"LOCATION\",\n \"id\": \"OA_9C03D0B59\"\n },\n \"status\": \"ACTIVE\",\n \"created_at\": \"2022-10-25T16:27:00Z\",\n \"updated_at\": \"2022-10-25T16:48:00Z\"\n }\n },\n \"NOT_EXISTING\": {\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"NOT_FOUND\"\n }\n ]\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"a35c34ce-6011-404b-9f2a-09ce49379d06","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b30fc81b-57e0-439a-bbe8-e1abb66b0fd8","name":"RetrieveChannel - default","request":{"urlPathTemplate":"/v2/channels/{channel_id}","method":"GET","pathParameters":{"channel_id":{"equalTo":"channel_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"channel\": {\n \"id\": \"CH_9C03D0B59\",\n \"merchant_id\": \"ML64FACEA\",\n \"name\": \"Contoso Fulfillment Application\",\n \"version\": 1,\n \"reference\": {\n \"type\": \"OAUTH_APPLICATION\",\n \"id\": \"OA_9C03D0444\"\n },\n \"status\": \"ACTIVE\",\n \"created_at\": \"2022-10-25T16:27:00Z\",\n \"updated_at\": \"2022-10-25T16:48:00Z\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"b30fc81b-57e0-439a-bbe8-e1abb66b0fd8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"bb668b2c-2f8d-44f0-86f6-9ccb8d811826","name":"ListCustomers - default","request":{"urlPathTemplate":"/v2/customers","method":"GET","queryParameters":{"cursor":{"equalTo":"cursor"},"limit":{"equalTo":"1"},"sort_field":{"equalTo":"DEFAULT"},"sort_order":{"equalTo":"DESC"},"count":{"equalTo":"true"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"customers\": [\n {\n \"id\": \"JDKYHBWT1D4F8MFH63DBMEN8Y4\",\n \"created_at\": \"2016-03-23T20:21:54.859Z\",\n \"updated_at\": \"2016-03-23T20:21:55Z\",\n \"given_name\": \"Amelia\",\n \"family_name\": \"Earhart\",\n \"nickname\": \"nickname\",\n \"company_name\": \"company_name\",\n \"email_address\": \"Amelia.Earhart@example.com\",\n \"address\": {\n \"address_line_1\": \"500 Electric Ave\",\n \"address_line_2\": \"Suite 600\",\n \"locality\": \"New York\",\n \"administrative_district_level_1\": \"NY\",\n \"postal_code\": \"10003\",\n \"country\": \"US\"\n },\n \"phone_number\": \"+1-212-555-4240\",\n \"birthday\": \"birthday\",\n \"reference_id\": \"YOUR_REFERENCE_ID\",\n \"note\": \"a customer\",\n \"preferences\": {\n \"email_unsubscribed\": false\n },\n \"creation_source\": \"THIRD_PARTY\",\n \"group_ids\": [\n \"545AXB44B4XXWMVQ4W8SBT3HHF\"\n ],\n \"segment_ids\": [\n \"1KB9JE5EGJXCW.REACHABLE\"\n ],\n \"version\": 1\n }\n ],\n \"cursor\": \"cursor\",\n \"count\": 1000000\n}","headers":{"Content-Type":"application/json"}},"uuid":"bb668b2c-2f8d-44f0-86f6-9ccb8d811826","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"9b870b51-0a21-4621-a86c-500fe5a1cc3b","name":"CreateCustomer - default","request":{"urlPathTemplate":"/v2/customers","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"customer\": {\n \"id\": \"JDKYHBWT1D4F8MFH63DBMEN8Y4\",\n \"created_at\": \"2016-03-23T20:21:54.859Z\",\n \"updated_at\": \"2016-03-23T20:21:54.859Z\",\n \"given_name\": \"Amelia\",\n \"family_name\": \"Earhart\",\n \"nickname\": \"nickname\",\n \"company_name\": \"company_name\",\n \"email_address\": \"Amelia.Earhart@example.com\",\n \"address\": {\n \"address_line_1\": \"500 Electric Ave\",\n \"address_line_2\": \"Suite 600\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"New York\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"NY\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"10003\",\n \"country\": \"US\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n },\n \"phone_number\": \"+1-212-555-4240\",\n \"birthday\": \"birthday\",\n \"reference_id\": \"YOUR_REFERENCE_ID\",\n \"note\": \"a customer\",\n \"preferences\": {\n \"email_unsubscribed\": false\n },\n \"creation_source\": \"THIRD_PARTY\",\n \"group_ids\": [\n \"group_ids\"\n ],\n \"segment_ids\": [\n \"segment_ids\"\n ],\n \"version\": 0,\n \"tax_ids\": {\n \"eu_vat\": \"eu_vat\"\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"9b870b51-0a21-4621-a86c-500fe5a1cc3b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"bacbcb8a-9e4f-4bc2-8446-2139f52c2064","name":"BulkCreateCustomers - default","request":{"urlPathTemplate":"/v2/customers/bulk-create","method":"POST"},"response":{"status":200,"body":"{\n \"responses\": {\n \"8bb76c4f-e35d-4c5b-90de-1194cd9179f4\": {\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ],\n \"customer\": {\n \"id\": \"8DDA5NZVBZFGAX0V3HPF81HHE0\",\n \"created_at\": \"2024-03-23T20:21:54.859Z\",\n \"updated_at\": \"2024-03-23T20:21:54.859Z\",\n \"given_name\": \"Amelia\",\n \"family_name\": \"Earhart\",\n \"email_address\": \"Amelia.Earhart@example.com\",\n \"address\": {\n \"address_line_1\": \"500 Electric Ave\",\n \"address_line_2\": \"Suite 600\",\n \"locality\": \"New York\",\n \"administrative_district_level_1\": \"NY\",\n \"postal_code\": \"10003\",\n \"country\": \"US\"\n },\n \"phone_number\": \"+1-212-555-4240\",\n \"reference_id\": \"YOUR_REFERENCE_ID\",\n \"note\": \"a customer\",\n \"preferences\": {\n \"email_unsubscribed\": false\n },\n \"creation_source\": \"THIRD_PARTY\",\n \"version\": 0\n }\n },\n \"d1689f23-b25d-4932-b2f0-aed00f5e2029\": {\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ],\n \"customer\": {\n \"id\": \"N18CPRVXR5214XPBBA6BZQWF3C\",\n \"created_at\": \"2024-03-23T20:21:54.859Z\",\n \"updated_at\": \"2024-03-23T20:21:54.859Z\",\n \"given_name\": \"Marie\",\n \"family_name\": \"Curie\",\n \"email_address\": \"Marie.Curie@example.com\",\n \"address\": {\n \"address_line_1\": \"500 Electric Ave\",\n \"address_line_2\": \"Suite 601\",\n \"locality\": \"New York\",\n \"administrative_district_level_1\": \"NY\",\n \"postal_code\": \"10003\",\n \"country\": \"US\"\n },\n \"phone_number\": \"+1-212-444-4240\",\n \"reference_id\": \"YOUR_REFERENCE_ID\",\n \"note\": \"another customer\",\n \"preferences\": {\n \"email_unsubscribed\": false\n },\n \"creation_source\": \"THIRD_PARTY\",\n \"version\": 0\n }\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"bacbcb8a-9e4f-4bc2-8446-2139f52c2064","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"31688922-c91b-49ab-aa41-30b0b2f5af33","name":"BulkDeleteCustomers - default","request":{"urlPathTemplate":"/v2/customers/bulk-delete","method":"POST"},"response":{"status":200,"body":"{\n \"responses\": {\n \"2GYD7WNXF7BJZW1PMGNXZ3Y8M8\": {\n \"errors\": [\n {\n \"category\": \"INVALID_REQUEST_ERROR\",\n \"code\": \"NOT_FOUND\",\n \"detail\": \"Customer with ID `2GYD7WNXF7BJZW1PMGNXZ3Y8M8` not found.\"\n }\n ]\n },\n \"8DDA5NZVBZFGAX0V3HPF81HHE0\": {\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"N18CPRVXR5214XPBBA6BZQWF3C\": {\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"31688922-c91b-49ab-aa41-30b0b2f5af33","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c9f28036-a5c6-4873-b2d0-cedbde0b1be1","name":"BulkRetrieveCustomers - default","request":{"urlPathTemplate":"/v2/customers/bulk-retrieve","method":"POST"},"response":{"status":200,"body":"{\n \"responses\": {\n \"2GYD7WNXF7BJZW1PMGNXZ3Y8M8\": {\n \"errors\": [\n {\n \"category\": \"INVALID_REQUEST_ERROR\",\n \"code\": \"NOT_FOUND\",\n \"detail\": \"Customer with ID `2GYD7WNXF7BJZW1PMGNXZ3Y8M8` not found.\"\n }\n ]\n },\n \"8DDA5NZVBZFGAX0V3HPF81HHE0\": {\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ],\n \"customer\": {\n \"id\": \"8DDA5NZVBZFGAX0V3HPF81HHE0\",\n \"created_at\": \"2024-01-19T00:27:54.59Z\",\n \"updated_at\": \"2024-01-19T00:38:06Z\",\n \"given_name\": \"Amelia\",\n \"family_name\": \"Earhart\",\n \"email_address\": \"New.Amelia.Earhart@example.com\",\n \"birthday\": \"1897-07-24\",\n \"note\": \"updated customer note\",\n \"preferences\": {\n \"email_unsubscribed\": false\n },\n \"creation_source\": \"THIRD_PARTY\",\n \"version\": 3\n }\n },\n \"N18CPRVXR5214XPBBA6BZQWF3C\": {\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ],\n \"customer\": {\n \"id\": \"N18CPRVXR5214XPBBA6BZQWF3C\",\n \"created_at\": \"2024-01-19T00:27:54.59Z\",\n \"updated_at\": \"2024-01-19T00:38:06Z\",\n \"given_name\": \"Marie\",\n \"family_name\": \"Curie\",\n \"preferences\": {\n \"email_unsubscribed\": false\n },\n \"creation_source\": \"THIRD_PARTY\",\n \"version\": 1\n }\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"c9f28036-a5c6-4873-b2d0-cedbde0b1be1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"feb9d1e3-6d57-441f-ab28-52e8644eb1d7","name":"BulkUpdateCustomers - default","request":{"urlPathTemplate":"/v2/customers/bulk-update","method":"POST"},"response":{"status":200,"body":"{\n \"responses\": {\n \"8DDA5NZVBZFGAX0V3HPF81HHE0\": {\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ],\n \"customer\": {\n \"id\": \"8DDA5NZVBZFGAX0V3HPF81HHE0\",\n \"created_at\": \"2024-01-19T00:27:54.59Z\",\n \"updated_at\": \"2024-01-19T00:38:06Z\",\n \"given_name\": \"Amelia\",\n \"family_name\": \"Earhart\",\n \"email_address\": \"New.Amelia.Earhart@example.com\",\n \"birthday\": \"1897-07-24\",\n \"note\": \"updated customer note\",\n \"preferences\": {\n \"email_unsubscribed\": false\n },\n \"creation_source\": \"THIRD_PARTY\",\n \"version\": 3\n }\n },\n \"N18CPRVXR5214XPBBA6BZQWF3C\": {\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ],\n \"customer\": {\n \"id\": \"N18CPRVXR5214XPBBA6BZQWF3C\",\n \"created_at\": \"2024-01-19T00:27:54.59Z\",\n \"updated_at\": \"2024-01-19T00:38:06Z\",\n \"given_name\": \"Marie\",\n \"family_name\": \"Curie\",\n \"preferences\": {\n \"email_unsubscribed\": false\n },\n \"creation_source\": \"THIRD_PARTY\",\n \"version\": 1\n }\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"feb9d1e3-6d57-441f-ab28-52e8644eb1d7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c1037f1b-7314-40e7-a499-ca49400f0c63","name":"SearchCustomers - default","request":{"urlPathTemplate":"/v2/customers/search","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"customers\": [\n {\n \"id\": \"JDKYHBWT1D4F8MFH63DBMEN8Y4\",\n \"created_at\": \"2018-01-23T20:21:54.859Z\",\n \"updated_at\": \"2020-04-20T10:02:43.083Z\",\n \"given_name\": \"James\",\n \"family_name\": \"Bond\",\n \"nickname\": \"nickname\",\n \"company_name\": \"company_name\",\n \"email_address\": \"james.bond@example.com\",\n \"address\": {\n \"address_line_1\": \"505 Electric Ave\",\n \"address_line_2\": \"Suite 600\",\n \"locality\": \"New York\",\n \"administrative_district_level_1\": \"NY\",\n \"postal_code\": \"10003\",\n \"country\": \"US\"\n },\n \"phone_number\": \"+1-212-555-4250\",\n \"birthday\": \"birthday\",\n \"reference_id\": \"YOUR_REFERENCE_ID_2\",\n \"note\": \"note\",\n \"preferences\": {\n \"email_unsubscribed\": false\n },\n \"creation_source\": \"DIRECTORY\",\n \"group_ids\": [\n \"545AXB44B4XXWMVQ4W8SBT3HHF\"\n ],\n \"segment_ids\": [\n \"1KB9JE5EGJXCW.REACHABLE\"\n ],\n \"version\": 7\n },\n {\n \"id\": \"A9641GZW2H7Z56YYSD41Q12HDW\",\n \"created_at\": \"2018-01-30T14:10:54.859Z\",\n \"updated_at\": \"2018-03-08T18:25:21.342Z\",\n \"given_name\": \"Amelia\",\n \"family_name\": \"Earhart\",\n \"nickname\": \"nickname\",\n \"company_name\": \"company_name\",\n \"email_address\": \"amelia.earhart@example.com\",\n \"address\": {\n \"address_line_1\": \"500 Electric Ave\",\n \"address_line_2\": \"Suite 600\",\n \"locality\": \"New York\",\n \"administrative_district_level_1\": \"NY\",\n \"postal_code\": \"10003\",\n \"country\": \"US\"\n },\n \"phone_number\": \"+1-212-555-9238\",\n \"birthday\": \"birthday\",\n \"reference_id\": \"YOUR_REFERENCE_ID_1\",\n \"note\": \"a customer\",\n \"preferences\": {\n \"email_unsubscribed\": false\n },\n \"creation_source\": \"THIRD_PARTY\",\n \"group_ids\": [\n \"545AXB44B4XXWMVQ4W8SBT3HHF\"\n ],\n \"segment_ids\": [\n \"1KB9JE5EGJXCW.REACHABLE\"\n ],\n \"version\": 1\n }\n ],\n \"cursor\": \"9dpS093Uy12AzeE\",\n \"count\": 1000000\n}","headers":{"Content-Type":"application/json"}},"uuid":"c1037f1b-7314-40e7-a499-ca49400f0c63","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a65cbdce-e1ba-4762-bca7-8801d10a4729","name":"RetrieveCustomer - default","request":{"urlPathTemplate":"/v2/customers/{customer_id}","method":"GET","pathParameters":{"customer_id":{"equalTo":"customer_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"customer\": {\n \"id\": \"JDKYHBWT1D4F8MFH63DBMEN8Y4\",\n \"created_at\": \"2016-03-23T20:21:54.859Z\",\n \"updated_at\": \"2016-03-23T20:21:54.859Z\",\n \"given_name\": \"Amelia\",\n \"family_name\": \"Earhart\",\n \"nickname\": \"nickname\",\n \"company_name\": \"company_name\",\n \"email_address\": \"Amelia.Earhart@example.com\",\n \"address\": {\n \"address_line_1\": \"500 Electric Ave\",\n \"address_line_2\": \"Suite 600\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"New York\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"NY\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"10003\",\n \"country\": \"US\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n },\n \"phone_number\": \"+1-212-555-4240\",\n \"birthday\": \"birthday\",\n \"reference_id\": \"YOUR_REFERENCE_ID\",\n \"note\": \"a customer\",\n \"preferences\": {\n \"email_unsubscribed\": false\n },\n \"creation_source\": \"THIRD_PARTY\",\n \"group_ids\": [\n \"545AXB44B4XXWMVQ4W8SBT3HHF\"\n ],\n \"segment_ids\": [\n \"1KB9JE5EGJXCW.REACHABLE\"\n ],\n \"version\": 1,\n \"tax_ids\": {\n \"eu_vat\": \"eu_vat\"\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"a65cbdce-e1ba-4762-bca7-8801d10a4729","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"bf147653-6a5e-4ae8-849d-75582d7336aa","name":"UpdateCustomer - default","request":{"urlPathTemplate":"/v2/customers/{customer_id}","method":"PUT","pathParameters":{"customer_id":{"equalTo":"customer_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"customer\": {\n \"id\": \"JDKYHBWT1D4F8MFH63DBMEN8Y4\",\n \"created_at\": \"2016-03-23T20:21:54.859Z\",\n \"updated_at\": \"2016-05-15T20:21:55Z\",\n \"given_name\": \"Amelia\",\n \"family_name\": \"Earhart\",\n \"nickname\": \"nickname\",\n \"company_name\": \"company_name\",\n \"email_address\": \"New.Amelia.Earhart@example.com\",\n \"address\": {\n \"address_line_1\": \"500 Electric Ave\",\n \"address_line_2\": \"Suite 600\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"New York\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"NY\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"10003\",\n \"country\": \"US\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n },\n \"phone_number\": \"phone_number\",\n \"birthday\": \"birthday\",\n \"reference_id\": \"YOUR_REFERENCE_ID\",\n \"note\": \"updated customer note\",\n \"preferences\": {\n \"email_unsubscribed\": false\n },\n \"creation_source\": \"THIRD_PARTY\",\n \"group_ids\": [\n \"group_ids\"\n ],\n \"segment_ids\": [\n \"segment_ids\"\n ],\n \"version\": 3,\n \"tax_ids\": {\n \"eu_vat\": \"eu_vat\"\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"bf147653-6a5e-4ae8-849d-75582d7336aa","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"813a5fb4-4319-4a6a-8f77-08c9de65058b","name":"DeleteCustomer - default","request":{"urlPathTemplate":"/v2/customers/{customer_id}","method":"DELETE","pathParameters":{"customer_id":{"equalTo":"customer_id"}},"queryParameters":{"version":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"813a5fb4-4319-4a6a-8f77-08c9de65058b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"bf0c318f-0d7f-4bbe-b3c5-8305b4173c7c","name":"ListDevices - default","request":{"urlPathTemplate":"/v2/devices","method":"GET","queryParameters":{"cursor":{"equalTo":"cursor"},"sort_order":{"equalTo":"DESC"},"limit":{"equalTo":"1"},"location_id":{"equalTo":"location_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"devices\": [\n {\n \"id\": \"device:995CS397A6475287\",\n \"attributes\": {\n \"type\": \"TERMINAL\",\n \"manufacturer\": \"Square\",\n \"model\": \"Square Terminal (1st Gen, v2)\",\n \"name\": \"Square Terminal 5287\",\n \"manufacturers_id\": \"995CS397A6475287\",\n \"updated_at\": \"2025-08-19T13:04:56.335762883Z\",\n \"version\": \"5.57.0067\",\n \"merchant_token\": \"MLCHNZCBWFDZB\"\n },\n \"components\": [\n {\n \"type\": \"APPLICATION\",\n \"application_details\": {\n \"application_type\": \"TERMINAL_API\",\n \"version\": \"6.77\",\n \"session_location\": \"LMN2K7S3RTOU3\"\n }\n },\n {\n \"type\": \"CARD_READER\",\n \"card_reader_details\": {\n \"version\": \"4.1.51\"\n }\n },\n {\n \"type\": \"BATTERY\",\n \"battery_details\": {\n \"visible_percent\": 77,\n \"external_power\": \"AVAILABLE_CHARGING\"\n }\n },\n {\n \"type\": \"WIFI\",\n \"wifi_details\": {\n \"active\": true,\n \"ssid\": \"Staff Network\",\n \"ip_address_v4\": \"10.0.0.7\",\n \"secure_connection\": \"WPA/WPA2 PSK\",\n \"signal_strength\": {\n \"value\": 2\n }\n }\n },\n {\n \"type\": \"ETHERNET\",\n \"ethernet_details\": {\n \"active\": false\n }\n }\n ],\n \"status\": {\n \"category\": \"AVAILABLE\"\n }\n },\n {\n \"id\": \"device:998WS21803L03559\",\n \"attributes\": {\n \"type\": \"HANDHELD\",\n \"manufacturer\": \"Square\",\n \"model\": \"Square Handheld (1st Gen, v1)\",\n \"name\": \"Square Terminal 3559\",\n \"manufacturers_id\": \"998WS21803L03559\",\n \"updated_at\": \"2025-08-19T12:39:56.335742073Z\",\n \"version\": \"7.21.0017\",\n \"merchant_token\": \"MLCHXZCBWFGDW\"\n },\n \"components\": [\n {\n \"type\": \"APPLICATION\",\n \"application_details\": {\n \"application_type\": \"TERMINAL_API\",\n \"version\": \"6.77\",\n \"session_location\": \"LMN2K7S3RTOU3\"\n }\n },\n {\n \"type\": \"CARD_READER\",\n \"card_reader_details\": {\n \"version\": \"4.5.58\"\n }\n },\n {\n \"type\": \"BATTERY\",\n \"battery_details\": {\n \"visible_percent\": 22,\n \"external_power\": \"AVAILABLE_CHARGING\"\n }\n },\n {\n \"type\": \"WIFI\",\n \"wifi_details\": {\n \"active\": true,\n \"ssid\": \"Staff Network\",\n \"ip_address_v4\": \"10.0.0.7\",\n \"secure_connection\": \"WPA/WPA2 PSK\",\n \"signal_strength\": {\n \"value\": 2\n }\n }\n },\n {\n \"type\": \"ETHERNET\",\n \"ethernet_details\": {\n \"active\": false\n }\n }\n ],\n \"status\": {\n \"category\": \"NEEDS_ATTENTION\"\n }\n }\n ],\n \"cursor\": \"GcXjlV2iaizH7R0fMT6wUDbw6l4otigjzx8XOOspUKHo9EPLRByM\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"bf0c318f-0d7f-4bbe-b3c5-8305b4173c7c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"f4c1193b-62ae-43bb-a589-0fbe3d5a8eec","name":"GetDevice - default","request":{"urlPathTemplate":"/v2/devices/{device_id}","method":"GET","pathParameters":{"device_id":{"equalTo":"device_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"device\": {\n \"id\": \"device:995CS397A6475287\",\n \"attributes\": {\n \"type\": \"TERMINAL\",\n \"manufacturer\": \"Square\",\n \"model\": \"T2\",\n \"name\": \"Square Terminal 995\",\n \"manufacturers_id\": \"995CS397A6475287\",\n \"updated_at\": \"2023-09-29T13:12:22.365049321Z\",\n \"version\": \"5.41.0085\",\n \"merchant_token\": \"MLCHXZCBWFGDW\"\n },\n \"components\": [\n {\n \"type\": \"APPLICATION\",\n \"application_details\": {\n \"application_type\": \"TERMINAL_API\",\n \"version\": \"6.25\",\n \"session_location\": \"LMN2K7S3RTOU3\"\n }\n },\n {\n \"type\": \"CARD_READER\",\n \"card_reader_details\": {\n \"version\": \"3.53.70\"\n }\n },\n {\n \"type\": \"BATTERY\",\n \"battery_details\": {\n \"visible_percent\": 5,\n \"external_power\": \"AVAILABLE_CHARGING\"\n }\n },\n {\n \"type\": \"WIFI\",\n \"wifi_details\": {\n \"active\": true,\n \"ssid\": \"Staff Network\",\n \"ip_address_v4\": \"10.0.0.7\",\n \"secure_connection\": \"WPA/WPA2 PSK\",\n \"signal_strength\": {\n \"value\": 2\n }\n }\n },\n {\n \"type\": \"ETHERNET\",\n \"ethernet_details\": {\n \"active\": false\n }\n }\n ],\n \"status\": {\n \"category\": \"AVAILABLE\"\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"f4c1193b-62ae-43bb-a589-0fbe3d5a8eec","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"41e67f2f-55df-48f0-88f3-8f9d8d4c9321","name":"ListDisputes - default","request":{"urlPathTemplate":"/v2/disputes","method":"GET","queryParameters":{"cursor":{"equalTo":"cursor"},"states":{"equalTo":"INQUIRY_EVIDENCE_REQUIRED"},"location_id":{"equalTo":"location_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"disputes\": [\n {\n \"dispute_id\": \"dispute_id\",\n \"id\": \"XDgyFu7yo1E2S5lQGGpYn\",\n \"amount_money\": {\n \"amount\": 2500,\n \"currency\": \"USD\"\n },\n \"reason\": \"NO_KNOWLEDGE\",\n \"state\": \"ACCEPTED\",\n \"due_at\": \"2022-07-13T00:00:00.000Z\",\n \"disputed_payment\": {\n \"payment_id\": \"zhyh1ch64kRBrrlfVhwjCEjZWzNZY\"\n },\n \"evidence_ids\": [\n \"evidence_ids\"\n ],\n \"card_brand\": \"VISA\",\n \"created_at\": \"2022-06-29T18:45:22.265Z\",\n \"updated_at\": \"2022-07-07T19:14:42.650Z\",\n \"brand_dispute_id\": \"100000809947\",\n \"reported_date\": \"reported_date\",\n \"reported_at\": \"2022-06-29T00:00:00.000Z\",\n \"version\": 2,\n \"location_id\": \"L1HN3ZMQK64X9\"\n },\n {\n \"dispute_id\": \"dispute_id\",\n \"id\": \"jLGg7aXC7lvKPr9PISt0T\",\n \"amount_money\": {\n \"amount\": 2209,\n \"currency\": \"USD\"\n },\n \"reason\": \"NOT_AS_DESCRIBED\",\n \"state\": \"EVIDENCE_REQUIRED\",\n \"due_at\": \"2022-05-13T00:00:00.000Z\",\n \"disputed_payment\": {\n \"payment_id\": \"zhyh1ch64kRBrrlfVhwjCEjZWzNZY\"\n },\n \"evidence_ids\": [\n \"evidence_ids\"\n ],\n \"card_brand\": \"VISA\",\n \"created_at\": \"2022-04-29T18:45:22.265Z\",\n \"updated_at\": \"2022-04-29T18:45:22.265Z\",\n \"brand_dispute_id\": \"r5Of6YaGT7AdeRaVoAGCJw\",\n \"reported_date\": \"reported_date\",\n \"reported_at\": \"2022-04-29T00:00:00.000Z\",\n \"version\": 1,\n \"location_id\": \"18YC4JDH91E1H\"\n }\n ],\n \"cursor\": \"G1aSTRm48CLjJsg6Sg3hQN1b1OMaoVuG\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"41e67f2f-55df-48f0-88f3-8f9d8d4c9321","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"3d35a2cb-3752-4105-9c8c-ce0f8613141a","name":"RetrieveDispute - default","request":{"urlPathTemplate":"/v2/disputes/{dispute_id}","method":"GET","pathParameters":{"dispute_id":{"equalTo":"dispute_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"dispute\": {\n \"dispute_id\": \"dispute_id\",\n \"id\": \"XDgyFu7yo1E2S5lQGGpYn\",\n \"amount_money\": {\n \"amount\": 2500,\n \"currency\": \"USD\"\n },\n \"reason\": \"NO_KNOWLEDGE\",\n \"state\": \"ACCEPTED\",\n \"due_at\": \"2022-07-13T00:00:00.000Z\",\n \"disputed_payment\": {\n \"payment_id\": \"zhyh1ch64kRBrrlfVhwjCEjZWzNZY\"\n },\n \"evidence_ids\": [\n \"evidence_ids\"\n ],\n \"card_brand\": \"VISA\",\n \"created_at\": \"2022-06-29T18:45:22.265Z\",\n \"updated_at\": \"2022-07-07T19:14:42.650Z\",\n \"brand_dispute_id\": \"100000809947\",\n \"reported_date\": \"reported_date\",\n \"reported_at\": \"2022-06-29T00:00:00.000Z\",\n \"version\": 2,\n \"location_id\": \"L1HN3ZMQK64X9\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"3d35a2cb-3752-4105-9c8c-ce0f8613141a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6280b6b5-7a7c-4d32-9574-e5368a5b5f8f","name":"AcceptDispute - default","request":{"urlPathTemplate":"/v2/disputes/{dispute_id}/accept","method":"POST","pathParameters":{"dispute_id":{"equalTo":"dispute_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"dispute\": {\n \"dispute_id\": \"dispute_id\",\n \"id\": \"XDgyFu7yo1E2S5lQGGpYn\",\n \"amount_money\": {\n \"amount\": 2500,\n \"currency\": \"USD\"\n },\n \"reason\": \"NO_KNOWLEDGE\",\n \"state\": \"ACCEPTED\",\n \"due_at\": \"2022-07-13T00:00:00.000Z\",\n \"disputed_payment\": {\n \"payment_id\": \"zhyh1ch64kRBrrlfVhwjCEjZWzNZY\"\n },\n \"evidence_ids\": [\n \"evidence_ids\"\n ],\n \"card_brand\": \"VISA\",\n \"created_at\": \"2022-06-29T18:45:22.265Z\",\n \"updated_at\": \"2022-07-07T19:14:42.650Z\",\n \"brand_dispute_id\": \"100000809947\",\n \"reported_date\": \"reported_date\",\n \"reported_at\": \"2022-06-29T00:00:00.000Z\",\n \"version\": 2,\n \"location_id\": \"L1HN3ZMQK64X9\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"6280b6b5-7a7c-4d32-9574-e5368a5b5f8f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"afdebbd4-33f4-46cf-82be-e5c9992d5433","name":"CreateDisputeEvidenceFile - default","request":{"urlPathTemplate":"/v2/disputes/{dispute_id}/evidence-files","method":"POST","pathParameters":{"dispute_id":{"equalTo":"dispute_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"evidence\": {\n \"evidence_id\": \"evidence_id\",\n \"id\": \"TOomLInj6iWmP3N8qfCXrB\",\n \"dispute_id\": \"bVTprrwk0gygTLZ96VX1oB\",\n \"evidence_file\": {\n \"filename\": \"customer-interaction.jpg\",\n \"filetype\": \"image/jpeg\"\n },\n \"evidence_text\": \"evidence_text\",\n \"uploaded_at\": \"2022-05-18T16:01:10.000Z\",\n \"evidence_type\": \"GENERIC_EVIDENCE\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"afdebbd4-33f4-46cf-82be-e5c9992d5433","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2b5d2e11-f8ac-4002-adad-fdad02581fad","name":"CreateDisputeEvidenceText - default","request":{"urlPathTemplate":"/v2/disputes/{dispute_id}/evidence-text","method":"POST","pathParameters":{"dispute_id":{"equalTo":"dispute_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"evidence\": {\n \"evidence_id\": \"evidence_id\",\n \"id\": \"TOomLInj6iWmP3N8qfCXrB\",\n \"dispute_id\": \"bVTprrwk0gygTLZ96VX1oB\",\n \"evidence_file\": {\n \"filename\": \"filename\",\n \"filetype\": \"filetype\"\n },\n \"evidence_text\": \"The customer purchased the item twice, on April 11 and April 28.\",\n \"uploaded_at\": \"2022-05-18T16:01:10.000Z\",\n \"evidence_type\": \"REBUTTAL_EXPLANATION\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"2b5d2e11-f8ac-4002-adad-fdad02581fad","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"7ad31033-6abe-4521-a675-e93502fc5ff9","name":"SubmitEvidence - default","request":{"urlPathTemplate":"/v2/disputes/{dispute_id}/submit-evidence","method":"POST","pathParameters":{"dispute_id":{"equalTo":"dispute_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"dispute\": {\n \"dispute_id\": \"dispute_id\",\n \"id\": \"EAZoK70gX3fyvibecLwIGB\",\n \"amount_money\": {\n \"amount\": 4350,\n \"currency\": \"USD\"\n },\n \"reason\": \"CUSTOMER_REQUESTS_CREDIT\",\n \"state\": \"PROCESSING\",\n \"due_at\": \"2022-06-01T00:00:00.000Z\",\n \"disputed_payment\": {\n \"payment_id\": \"2yeBUWJzllJTpmnSqtMRAL19taB\"\n },\n \"evidence_ids\": [\n \"evidence_ids\"\n ],\n \"card_brand\": \"VISA\",\n \"created_at\": \"2022-05-18T16:02:15.313Z\",\n \"updated_at\": \"2022-05-18T16:02:15.313Z\",\n \"brand_dispute_id\": \"100000399240\",\n \"reported_date\": \"reported_date\",\n \"reported_at\": \"2022-05-18T00:00:00.000Z\",\n \"version\": 4,\n \"location_id\": \"LSY8XKGSMMX94\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"7ad31033-6abe-4521-a675-e93502fc5ff9","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"32eea0a8-7028-4916-b446-357266ec8857","name":"ListEmployees - default","request":{"urlPathTemplate":"/v2/employees","method":"GET","queryParameters":{"location_id":{"equalTo":"location_id"},"status":{"equalTo":"ACTIVE"},"limit":{"equalTo":"1"},"cursor":{"equalTo":"cursor"}}},"response":{"status":200,"body":"{\n \"employees\": [\n {\n \"id\": \"id\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\",\n \"email\": \"email\",\n \"phone_number\": \"phone_number\",\n \"location_ids\": [\n \"location_ids\"\n ],\n \"status\": \"ACTIVE\",\n \"is_owner\": true,\n \"created_at\": \"created_at\",\n \"updated_at\": \"updated_at\"\n }\n ],\n \"cursor\": \"cursor\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"32eea0a8-7028-4916-b446-357266ec8857","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"bfc0f2db-4a36-4bfb-9dfc-593bd1bfaf90","name":"RetrieveEmployee - default","request":{"urlPathTemplate":"/v2/employees/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"employee\": {\n \"id\": \"id\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\",\n \"email\": \"email\",\n \"phone_number\": \"phone_number\",\n \"location_ids\": [\n \"location_ids\"\n ],\n \"status\": \"ACTIVE\",\n \"is_owner\": true,\n \"created_at\": \"created_at\",\n \"updated_at\": \"updated_at\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"bfc0f2db-4a36-4bfb-9dfc-593bd1bfaf90","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f5b12f80-5b0b-4ad0-855a-20b33fb648d6","name":"SearchEvents - default","request":{"urlPathTemplate":"/v2/events","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"events\": [\n {\n \"merchant_id\": \"0HPGX5JYE6EE1\",\n \"location_id\": \"VJDQQP3CG14EY\",\n \"type\": \"dispute.state.updated\",\n \"event_id\": \"73ecd468-0aba-424f-b862-583d44efe7c8\",\n \"created_at\": \"2022-04-26T10:08:40.454726\",\n \"data\": {\n \"type\": \"dispute\",\n \"id\": \"ORSEVtZAJxb37RA1EiGw\",\n \"object\": {\n \"dispute\": {\n \"amount_money\": {\n \"amount\": 8801,\n \"currency\": \"USD\"\n },\n \"brand_dispute_id\": \"r9rKGSBBQbywBNnWWIiGFg\",\n \"card_brand\": \"VISA\",\n \"created_at\": \"2020-02-19T21:24:53.258Z\",\n \"disputed_payment\": {\n \"payment_id\": \"fbmsaEOpoARDKxiSGH1fqPuqoqFZY\"\n },\n \"due_at\": \"2020-03-04T00:00:00.000Z\",\n \"id\": \"ORSEVtZAJxb37RA1EiGw\",\n \"location_id\": \"VJDQQP3CG14EY\",\n \"reason\": \"AMOUNT_DIFFERS\",\n \"reported_at\": \"2020-02-19T00:00:00.000Z\",\n \"state\": \"WON\",\n \"updated_at\": \"2020-02-19T21:34:41.851Z\",\n \"version\": 6\n }\n }\n }\n }\n ],\n \"metadata\": [\n {\n \"event_id\": \"73ecd468-0aba-424f-b862-583d44efe7c8\",\n \"api_version\": \"2022-12-13\"\n }\n ],\n \"cursor\": \"6b571fc9773647f=\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"f5b12f80-5b0b-4ad0-855a-20b33fb648d6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"714354c6-6afd-4848-827e-938f31fcaad1","name":"DisableEvents - default","request":{"urlPathTemplate":"/v2/events/disable","method":"PUT"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"714354c6-6afd-4848-827e-938f31fcaad1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c47f5149-9eec-453b-a454-c209ee6dce7b","name":"EnableEvents - default","request":{"urlPathTemplate":"/v2/events/enable","method":"PUT"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"c47f5149-9eec-453b-a454-c209ee6dce7b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"7b6a6303-9957-4771-acf3-d0c358fcc288","name":"ListEventTypes - default","request":{"urlPathTemplate":"/v2/events/types","method":"GET","queryParameters":{"api_version":{"equalTo":"api_version"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"event_types\": [\n \"inventory.count.updated\"\n ],\n \"metadata\": [\n {\n \"event_type\": \"inventory.count.updated\",\n \"api_version_introduced\": \"2018-07-12\",\n \"release_status\": \"PUBLIC\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"7b6a6303-9957-4771-acf3-d0c358fcc288","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"81a6a2f7-9b3f-44a6-b681-d002bdaa1d8b","name":"ListGiftCards - default","request":{"urlPathTemplate":"/v2/gift-cards","method":"GET","queryParameters":{"type":{"equalTo":"type"},"state":{"equalTo":"state"},"limit":{"equalTo":"1"},"cursor":{"equalTo":"cursor"},"customer_id":{"equalTo":"customer_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"gift_cards\": [\n {\n \"id\": \"gftc:00113070ba5745f0b2377c1b9570cb03\",\n \"type\": \"DIGITAL\",\n \"gan_source\": \"SQUARE\",\n \"state\": \"ACTIVE\",\n \"balance_money\": {\n \"amount\": 3900,\n \"currency\": \"USD\"\n },\n \"gan\": \"7783320008524605\",\n \"created_at\": \"2021-06-09T22:26:54.000Z\",\n \"customer_ids\": [\n \"customer_ids\"\n ]\n },\n {\n \"id\": \"gftc:00128a12725b41e58e0de1d20497a9dd\",\n \"type\": \"DIGITAL\",\n \"gan_source\": \"SQUARE\",\n \"state\": \"ACTIVE\",\n \"balance_money\": {\n \"amount\": 2000,\n \"currency\": \"USD\"\n },\n \"gan\": \"7783320002692465\",\n \"created_at\": \"2021-05-20T22:26:54.000Z\",\n \"customer_ids\": [\n \"customer_ids\"\n ]\n }\n ],\n \"cursor\": \"JbFmyvUpaNKsfC1hoLSA4WlqkgkZXTWeKuStajR5BkP7OE0ETAbeWSi6U6u7sH\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"81a6a2f7-9b3f-44a6-b681-d002bdaa1d8b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"f70d5f73-bb6a-4254-a631-1a93e4ad8ebf","name":"CreateGiftCard - default","request":{"urlPathTemplate":"/v2/gift-cards","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"gift_card\": {\n \"id\": \"gftc:6cbacbb64cf54e2ca9f573d619038059\",\n \"type\": \"DIGITAL\",\n \"gan_source\": \"SQUARE\",\n \"state\": \"PENDING\",\n \"balance_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"gan\": \"7783320006753271\",\n \"created_at\": \"2021-05-20T22:26:54.000Z\",\n \"customer_ids\": [\n \"customer_ids\"\n ]\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"f70d5f73-bb6a-4254-a631-1a93e4ad8ebf","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"7bab27cc-a453-4754-8032-e3379053d106","name":"RetrieveGiftCardFromGAN - default","request":{"urlPathTemplate":"/v2/gift-cards/from-gan","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"gift_card\": {\n \"id\": \"gftc:6944163553804e439d89adb47caf806a\",\n \"type\": \"DIGITAL\",\n \"gan_source\": \"SQUARE\",\n \"state\": \"ACTIVE\",\n \"balance_money\": {\n \"amount\": 5000,\n \"currency\": \"USD\"\n },\n \"gan\": \"7783320001001635\",\n \"created_at\": \"2021-05-20T22:26:54.000Z\",\n \"customer_ids\": [\n \"customer_ids\"\n ]\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"7bab27cc-a453-4754-8032-e3379053d106","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"691a9da4-3f02-4c6a-b9b3-a2472fb7e7c1","name":"RetrieveGiftCardFromNonce - default","request":{"urlPathTemplate":"/v2/gift-cards/from-nonce","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"gift_card\": {\n \"id\": \"gftc:6944163553804e439d89adb47caf806a\",\n \"type\": \"DIGITAL\",\n \"gan_source\": \"SQUARE\",\n \"state\": \"ACTIVE\",\n \"balance_money\": {\n \"amount\": 5000,\n \"currency\": \"USD\"\n },\n \"gan\": \"7783320001001635\",\n \"created_at\": \"2021-05-20T22:26:54.000Z\",\n \"customer_ids\": [\n \"customer_ids\"\n ]\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"691a9da4-3f02-4c6a-b9b3-a2472fb7e7c1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"12633136-e7d2-4d3a-94a2-cdfeaaec5dcc","name":"LinkCustomerToGiftCard - default","request":{"urlPathTemplate":"/v2/gift-cards/{gift_card_id}/link-customer","method":"POST","pathParameters":{"gift_card_id":{"equalTo":"gift_card_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"gift_card\": {\n \"id\": \"gftc:71ea002277a34f8a945e284b04822edb\",\n \"type\": \"DIGITAL\",\n \"gan_source\": \"SQUARE\",\n \"state\": \"ACTIVE\",\n \"balance_money\": {\n \"amount\": 2500,\n \"currency\": \"USD\"\n },\n \"gan\": \"7783320005440920\",\n \"created_at\": \"2021-03-25T05:13:01Z\",\n \"customer_ids\": [\n \"GKY0FZ3V717AH8Q2D821PNT2ZW\"\n ]\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"12633136-e7d2-4d3a-94a2-cdfeaaec5dcc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e0c3b98f-2872-45cf-866b-4e3934c1a04f","name":"UnlinkCustomerFromGiftCard - default","request":{"urlPathTemplate":"/v2/gift-cards/{gift_card_id}/unlink-customer","method":"POST","pathParameters":{"gift_card_id":{"equalTo":"gift_card_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"gift_card\": {\n \"id\": \"gftc:71ea002277a34f8a945e284b04822edb\",\n \"type\": \"DIGITAL\",\n \"gan_source\": \"SQUARE\",\n \"state\": \"ACTIVE\",\n \"balance_money\": {\n \"amount\": 2500,\n \"currency\": \"USD\"\n },\n \"gan\": \"7783320005440920\",\n \"created_at\": \"2021-03-25T05:13:01Z\",\n \"customer_ids\": [\n \"customer_ids\"\n ]\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"e0c3b98f-2872-45cf-866b-4e3934c1a04f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a0ae6e64-0416-4e7f-9cf5-cf79e9da709c","name":"RetrieveGiftCard - default","request":{"urlPathTemplate":"/v2/gift-cards/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"gift_card\": {\n \"id\": \"gftc:00113070ba5745f0b2377c1b9570cb03\",\n \"type\": \"DIGITAL\",\n \"gan_source\": \"SQUARE\",\n \"state\": \"ACTIVE\",\n \"balance_money\": {\n \"amount\": 1000,\n \"currency\": \"USD\"\n },\n \"gan\": \"7783320001001635\",\n \"created_at\": \"2021-05-20T22:26:54.000Z\",\n \"customer_ids\": [\n \"customer_ids\"\n ]\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"a0ae6e64-0416-4e7f-9cf5-cf79e9da709c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fe4ab8ab-17ad-45ea-917c-d1ed8a63fc0b","name":"DeprecatedRetrieveInventoryAdjustment - default","request":{"urlPathTemplate":"/v2/inventory/adjustment/{adjustment_id}","method":"GET","pathParameters":{"adjustment_id":{"equalTo":"adjustment_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"adjustment\": {\n \"id\": \"UDMOEO78BG6GYWA2XDRYX3KB\",\n \"reference_id\": \"4a366069-4096-47a2-99a5-0084ac879509\",\n \"from_state\": \"IN_STOCK\",\n \"to_state\": \"SOLD\",\n \"location_id\": \"C6W5YS5QM06F5\",\n \"catalog_object_id\": \"W62UWFY35CWMYGVWK6TWJDNI\",\n \"catalog_object_type\": \"ITEM_VARIATION\",\n \"quantity\": \"7\",\n \"total_price_money\": {\n \"amount\": 4550,\n \"currency\": \"USD\"\n },\n \"occurred_at\": \"2016-11-16T25:44:22.837Z\",\n \"created_at\": \"2016-11-17T13:02:15.142Z\",\n \"source\": {\n \"product\": \"SQUARE_POS\",\n \"application_id\": \"416ff29c-86c4-4feb-b58c-9705f21f3ea0\",\n \"name\": \"Square Point of Sale 4.37\"\n },\n \"employee_id\": \"employee_id\",\n \"team_member_id\": \"LRK57NSQ5X7PUD05\",\n \"transaction_id\": \"transaction_id\",\n \"refund_id\": \"refund_id\",\n \"purchase_order_id\": \"purchase_order_id\",\n \"goods_receipt_id\": \"goods_receipt_id\",\n \"adjustment_group\": {\n \"id\": \"id\",\n \"root_adjustment_id\": \"root_adjustment_id\",\n \"from_state\": \"CUSTOM\",\n \"to_state\": \"CUSTOM\"\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"fe4ab8ab-17ad-45ea-917c-d1ed8a63fc0b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0dc3c3a9-1ce0-472d-b856-ffb12ce90fda","name":"RetrieveInventoryAdjustment - default","request":{"urlPathTemplate":"/v2/inventory/adjustments/{adjustment_id}","method":"GET","pathParameters":{"adjustment_id":{"equalTo":"adjustment_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"adjustment\": {\n \"id\": \"UDMOEO78BG6GYWA2XDRYX3KB\",\n \"reference_id\": \"4a366069-4096-47a2-99a5-0084ac879509\",\n \"from_state\": \"IN_STOCK\",\n \"to_state\": \"SOLD\",\n \"location_id\": \"C6W5YS5QM06F5\",\n \"catalog_object_id\": \"W62UWFY35CWMYGVWK6TWJDNI\",\n \"catalog_object_type\": \"ITEM_VARIATION\",\n \"quantity\": \"7\",\n \"total_price_money\": {\n \"amount\": 4550,\n \"currency\": \"USD\"\n },\n \"occurred_at\": \"2016-11-16T25:44:22.837Z\",\n \"created_at\": \"2016-11-17T13:02:15.142Z\",\n \"source\": {\n \"product\": \"SQUARE_POS\",\n \"application_id\": \"416ff29c-86c4-4feb-b58c-9705f21f3ea0\",\n \"name\": \"Square Point of Sale 4.37\"\n },\n \"employee_id\": \"employee_id\",\n \"team_member_id\": \"LRK57NSQ5X7PUD05\",\n \"transaction_id\": \"transaction_id\",\n \"refund_id\": \"refund_id\",\n \"purchase_order_id\": \"purchase_order_id\",\n \"goods_receipt_id\": \"goods_receipt_id\",\n \"adjustment_group\": {\n \"id\": \"id\",\n \"root_adjustment_id\": \"root_adjustment_id\",\n \"from_state\": \"CUSTOM\",\n \"to_state\": \"CUSTOM\"\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"0dc3c3a9-1ce0-472d-b856-ffb12ce90fda","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5f8d9c11-f30c-41b4-8c9f-b4c740b52991","name":"DeprecatedBatchChangeInventory - default","request":{"urlPathTemplate":"/v2/inventory/batch-change","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"counts\": [\n {\n \"catalog_object_id\": \"W62UWFY35CWMYGVWK6TWJDNI\",\n \"catalog_object_type\": \"ITEM_VARIATION\",\n \"state\": \"IN_STOCK\",\n \"location_id\": \"C6W5YS5QM06F5\",\n \"quantity\": \"53\",\n \"calculated_at\": \"2016-11-16T22:28:01.223Z\",\n \"is_estimated\": true\n }\n ],\n \"changes\": [\n {\n \"type\": \"PHYSICAL_COUNT\",\n \"measurement_unit_id\": \"measurement_unit_id\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"5f8d9c11-f30c-41b4-8c9f-b4c740b52991","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"66680c8f-79a1-4fb3-8d19-1a0679c4a7f6","name":"DeprecatedBatchRetrieveInventoryChanges - default","request":{"urlPathTemplate":"/v2/inventory/batch-retrieve-changes","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"changes\": [\n {\n \"type\": \"PHYSICAL_COUNT\",\n \"physical_count\": {\n \"id\": \"46YDTW253DWGGK9HMAE6XCAO\",\n \"reference_id\": \"22c07cf4-5626-4224-89f9-691112019399\",\n \"catalog_object_id\": \"W62UWFY35CWMYGVWK6TWJDNI\",\n \"catalog_object_type\": \"ITEM_VARIATION\",\n \"state\": \"IN_STOCK\",\n \"location_id\": \"C6W5YS5QM06F5\",\n \"quantity\": \"86\",\n \"source\": {\n \"product\": \"SQUARE_POS\",\n \"application_id\": \"416ff29c-86c4-4feb-b58c-9705f21f3ea0\",\n \"name\": \"Square Point of Sale 4.37\"\n },\n \"team_member_id\": \"LRK57NSQ5X7PUD05\",\n \"occurred_at\": \"2016-11-16T22:24:49.028Z\",\n \"created_at\": \"2016-11-16T22:25:24.878Z\"\n },\n \"measurement_unit_id\": \"measurement_unit_id\"\n }\n ],\n \"cursor\": \"cursor\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"66680c8f-79a1-4fb3-8d19-1a0679c4a7f6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"742b1cf7-8551-43b6-a985-73971d12bf86","name":"DeprecatedBatchRetrieveInventoryCounts - default","request":{"urlPathTemplate":"/v2/inventory/batch-retrieve-counts","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"counts\": [\n {\n \"catalog_object_id\": \"W62UWFY35CWMYGVWK6TWJDNI\",\n \"catalog_object_type\": \"ITEM_VARIATION\",\n \"state\": \"IN_STOCK\",\n \"location_id\": \"59TNP9SA8VGDA\",\n \"quantity\": \"79\",\n \"calculated_at\": \"2016-11-16T22:28:01.223Z\",\n \"is_estimated\": true\n }\n ],\n \"cursor\": \"cursor\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"742b1cf7-8551-43b6-a985-73971d12bf86","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"54d6638f-11b1-46cf-8d40-63fc803ff761","name":"BatchChangeInventory - default","request":{"urlPathTemplate":"/v2/inventory/changes/batch-create","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"counts\": [\n {\n \"catalog_object_id\": \"W62UWFY35CWMYGVWK6TWJDNI\",\n \"catalog_object_type\": \"ITEM_VARIATION\",\n \"state\": \"IN_STOCK\",\n \"location_id\": \"C6W5YS5QM06F5\",\n \"quantity\": \"53\",\n \"calculated_at\": \"2016-11-16T22:28:01.223Z\",\n \"is_estimated\": true\n }\n ],\n \"changes\": [\n {\n \"type\": \"PHYSICAL_COUNT\",\n \"measurement_unit_id\": \"measurement_unit_id\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"54d6638f-11b1-46cf-8d40-63fc803ff761","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c2f4bc20-eaf3-43e5-afd6-bcc017bcffa1","name":"BatchRetrieveInventoryChanges - default","request":{"urlPathTemplate":"/v2/inventory/changes/batch-retrieve","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"changes\": [\n {\n \"type\": \"PHYSICAL_COUNT\",\n \"physical_count\": {\n \"id\": \"46YDTW253DWGGK9HMAE6XCAO\",\n \"reference_id\": \"22c07cf4-5626-4224-89f9-691112019399\",\n \"catalog_object_id\": \"W62UWFY35CWMYGVWK6TWJDNI\",\n \"catalog_object_type\": \"ITEM_VARIATION\",\n \"state\": \"IN_STOCK\",\n \"location_id\": \"C6W5YS5QM06F5\",\n \"quantity\": \"86\",\n \"source\": {\n \"product\": \"SQUARE_POS\",\n \"application_id\": \"416ff29c-86c4-4feb-b58c-9705f21f3ea0\",\n \"name\": \"Square Point of Sale 4.37\"\n },\n \"team_member_id\": \"LRK57NSQ5X7PUD05\",\n \"occurred_at\": \"2016-11-16T22:24:49.028Z\",\n \"created_at\": \"2016-11-16T22:25:24.878Z\"\n },\n \"measurement_unit_id\": \"measurement_unit_id\"\n }\n ],\n \"cursor\": \"cursor\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c2f4bc20-eaf3-43e5-afd6-bcc017bcffa1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0f974625-15f2-40be-a2e4-b88f44a58c12","name":"BatchRetrieveInventoryCounts - default","request":{"urlPathTemplate":"/v2/inventory/counts/batch-retrieve","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"counts\": [\n {\n \"catalog_object_id\": \"W62UWFY35CWMYGVWK6TWJDNI\",\n \"catalog_object_type\": \"ITEM_VARIATION\",\n \"state\": \"IN_STOCK\",\n \"location_id\": \"59TNP9SA8VGDA\",\n \"quantity\": \"79\",\n \"calculated_at\": \"2016-11-16T22:28:01.223Z\",\n \"is_estimated\": true\n }\n ],\n \"cursor\": \"cursor\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"0f974625-15f2-40be-a2e4-b88f44a58c12","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6366dc1c-25fa-4f46-b948-67e161ff91a2","name":"DeprecatedRetrieveInventoryPhysicalCount - default","request":{"urlPathTemplate":"/v2/inventory/physical-count/{physical_count_id}","method":"GET","pathParameters":{"physical_count_id":{"equalTo":"physical_count_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"count\": {\n \"id\": \"ANZADNPLKADOJKJIUANKLMLQ\",\n \"reference_id\": \"f857ec37-f9a0-4458-8e23-5b5e0bea4e53\",\n \"catalog_object_id\": \"W62UWFY35CWMYGVWK6TWJDNI\",\n \"catalog_object_type\": \"ITEM_VARIATION\",\n \"state\": \"IN_STOCK\",\n \"location_id\": \"C6W5YS5QM06F5\",\n \"quantity\": \"15\",\n \"source\": {\n \"product\": \"SQUARE_POS\",\n \"application_id\": \"416ff29c-86c4-4feb-b58c-9705f21f3ea0\",\n \"name\": \"Square Point of Sale 4.37\"\n },\n \"employee_id\": \"employee_id\",\n \"team_member_id\": \"LRK57NSQ5X7PUD05\",\n \"occurred_at\": \"2016-11-16T22:25:24.878Z\",\n \"created_at\": \"2016-11-16T22:25:24.878Z\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"6366dc1c-25fa-4f46-b948-67e161ff91a2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e3cf6a26-a81b-4a1b-9dd9-a3809d007a3e","name":"RetrieveInventoryPhysicalCount - default","request":{"urlPathTemplate":"/v2/inventory/physical-counts/{physical_count_id}","method":"GET","pathParameters":{"physical_count_id":{"equalTo":"physical_count_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"count\": {\n \"id\": \"ANZADNPLKADOJKJIUANKLMLQ\",\n \"reference_id\": \"f857ec37-f9a0-4458-8e23-5b5e0bea4e53\",\n \"catalog_object_id\": \"W62UWFY35CWMYGVWK6TWJDNI\",\n \"catalog_object_type\": \"ITEM_VARIATION\",\n \"state\": \"IN_STOCK\",\n \"location_id\": \"C6W5YS5QM06F5\",\n \"quantity\": \"15\",\n \"source\": {\n \"product\": \"SQUARE_POS\",\n \"application_id\": \"416ff29c-86c4-4feb-b58c-9705f21f3ea0\",\n \"name\": \"Square Point of Sale 4.37\"\n },\n \"employee_id\": \"employee_id\",\n \"team_member_id\": \"LRK57NSQ5X7PUD05\",\n \"occurred_at\": \"2016-11-16T22:25:24.878Z\",\n \"created_at\": \"2016-11-16T22:25:24.878Z\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"e3cf6a26-a81b-4a1b-9dd9-a3809d007a3e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"dd3107d0-7f4a-462d-8ef7-ef463895e19f","name":"RetrieveInventoryTransfer - default","request":{"urlPathTemplate":"/v2/inventory/transfers/{transfer_id}","method":"GET","pathParameters":{"transfer_id":{"equalTo":"transfer_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"transfer\": {\n \"id\": \"UDMOEO78BG6GYWA2XDRYX3KB\",\n \"reference_id\": \"4a366069-4096-47a2-99a5-0084ac879509\",\n \"state\": \"IN_STOCK\",\n \"from_location_id\": \"C6W5YS5QM06F5\",\n \"to_location_id\": \"59TNP9SA8VGDA\",\n \"catalog_object_id\": \"W62UWFY35CWMYGVWK6TWJDNI\",\n \"catalog_object_type\": \"ITEM_VARIATION\",\n \"quantity\": \"7\",\n \"occurred_at\": \"2016-11-16T25:44:22.837Z\",\n \"created_at\": \"2016-11-17T13:02:15.142Z\",\n \"source\": {\n \"product\": \"SQUARE_POS\",\n \"application_id\": \"416ff29c-86c4-4feb-b58c-9705f21f3ea0\",\n \"name\": \"Square Point of Sale 4.37\"\n },\n \"employee_id\": \"employee_id\",\n \"team_member_id\": \"LRK57NSQ5X7PUD05\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"dd3107d0-7f4a-462d-8ef7-ef463895e19f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"00688ad5-d0ff-4ab7-b783-d1102e384842","name":"RetrieveInventoryCount - default","request":{"urlPathTemplate":"/v2/inventory/{catalog_object_id}","method":"GET","pathParameters":{"catalog_object_id":{"equalTo":"catalog_object_id"}},"queryParameters":{"location_ids":{"equalTo":"location_ids"},"cursor":{"equalTo":"cursor"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"counts\": [\n {\n \"catalog_object_id\": \"W62UWFY35CWMYGVWK6TWJDNI\",\n \"catalog_object_type\": \"ITEM_VARIATION\",\n \"state\": \"IN_STOCK\",\n \"location_id\": \"C6W5YS5QM06F5\",\n \"quantity\": \"22\",\n \"calculated_at\": \"2016-11-16T22:28:01.223Z\",\n \"is_estimated\": true\n }\n ],\n \"cursor\": \"cursor\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"00688ad5-d0ff-4ab7-b783-d1102e384842","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ff3da57e-33aa-4e4a-b4af-1b1cf54b68c8","name":"RetrieveInventoryChanges - default","request":{"urlPathTemplate":"/v2/inventory/{catalog_object_id}/changes","method":"GET","pathParameters":{"catalog_object_id":{"equalTo":"catalog_object_id"}},"queryParameters":{"location_ids":{"equalTo":"location_ids"},"cursor":{"equalTo":"cursor"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"changes\": [\n {\n \"type\": \"ADJUSTMENT\",\n \"adjustment\": {\n \"id\": \"OJKJIUANKLMLQANZADNPLKAD\",\n \"reference_id\": \"d8207693-168f-4b44-a2fd-a7ff533ddd26\",\n \"from_state\": \"IN_STOCK\",\n \"to_state\": \"SOLD\",\n \"location_id\": \"C6W5YS5QM06F5\",\n \"catalog_object_id\": \"W62UWFY35CWMYGVWK6TWJDNI\",\n \"catalog_object_type\": \"ITEM_VARIATION\",\n \"quantity\": \"3\",\n \"total_price_money\": {\n \"amount\": 5000,\n \"currency\": \"USD\"\n },\n \"occurred_at\": \"2016-11-16T22:25:24.878Z\",\n \"created_at\": \"2016-11-16T22:25:24.878Z\",\n \"source\": {\n \"product\": \"SQUARE_POS\",\n \"application_id\": \"416ff29c-86c4-4feb-b58c-9705f21f3ea0\",\n \"name\": \"Square Point of Sale 4.37\"\n },\n \"team_member_id\": \"AV7YRCGI2H1J5NQ8E1XIZCNA\",\n \"transaction_id\": \"5APV6JYK1SNCZD11AND2RX1Z\"\n },\n \"measurement_unit_id\": \"measurement_unit_id\"\n }\n ],\n \"cursor\": \"cursor\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"ff3da57e-33aa-4e4a-b4af-1b1cf54b68c8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"9994cf01-e292-4a9b-bed2-792307855d36","name":"ListInvoices - default","request":{"urlPathTemplate":"/v2/invoices","method":"GET","queryParameters":{"location_id":{"equalTo":"location_id"},"cursor":{"equalTo":"cursor"},"limit":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"invoices\": [\n {\n \"id\": \"inv:0-ChCHu2mZEabLeeHahQnXDjZQECY\",\n \"version\": 1,\n \"location_id\": \"ES0RJRZYEC39A\",\n \"order_id\": \"CAISENgvlJ6jLWAzERDzjyHVybY\",\n \"primary_recipient\": {\n \"customer_id\": \"JDKYHBWT1D4F8MFH63DBMEN8Y4\",\n \"given_name\": \"Amelia\",\n \"family_name\": \"Earhart\",\n \"email_address\": \"Amelia.Earhart@example.com\",\n \"phone_number\": \"1-212-555-4240\"\n },\n \"payment_requests\": [\n {\n \"uid\": \"2da7964f-f3d2-4f43-81e8-5aa220bf3355\",\n \"request_type\": \"BALANCE\",\n \"due_date\": \"2030-01-24\",\n \"tipping_enabled\": true,\n \"automatic_payment_source\": \"NONE\",\n \"reminders\": [\n {\n \"uid\": \"beebd363-e47f-4075-8785-c235aaa7df11\",\n \"relative_scheduled_days\": -1,\n \"message\": \"Your invoice is due tomorrow\",\n \"status\": \"PENDING\"\n }\n ],\n \"computed_amount_money\": {\n \"amount\": 10000,\n \"currency\": \"USD\"\n },\n \"total_completed_amount_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n }\n ],\n \"delivery_method\": \"EMAIL\",\n \"invoice_number\": \"inv-100\",\n \"title\": \"Event Planning Services\",\n \"description\": \"We appreciate your business!\",\n \"scheduled_at\": \"2030-01-13T10:00:00Z\",\n \"public_url\": \"public_url\",\n \"status\": \"DRAFT\",\n \"timezone\": \"America/Los_Angeles\",\n \"created_at\": \"2030-01-13T17:45:13Z\",\n \"updated_at\": \"2030-01-13T21:24:10Z\",\n \"accepted_payment_methods\": {\n \"card\": true,\n \"square_gift_card\": false,\n \"bank_account\": false,\n \"buy_now_pay_later\": false,\n \"cash_app_pay\": false\n },\n \"custom_fields\": [\n {\n \"label\": \"Event Reference Number\",\n \"value\": \"Ref. #1234\",\n \"placement\": \"ABOVE_LINE_ITEMS\"\n },\n {\n \"label\": \"Terms of Service\",\n \"value\": \"The terms of service are...\",\n \"placement\": \"BELOW_LINE_ITEMS\"\n }\n ],\n \"subscription_id\": \"subscription_id\",\n \"sale_or_service_date\": \"2030-01-24\",\n \"payment_conditions\": \"payment_conditions\",\n \"store_payment_method_enabled\": false,\n \"attachments\": [\n {\n \"id\": \"inva:0-3bB9ZuDHiziThQhuC4fwWt\",\n \"filename\": \"file.jpg\",\n \"description\": \"Service contract\",\n \"filesize\": 102705,\n \"hash\": \"273ee02cb6f5f8a3a8ca23604930dd53\",\n \"mime_type\": \"image/jpeg\",\n \"uploaded_at\": \"2030-01-13T21:24:10Z\"\n }\n ],\n \"creator_team_member_id\": \"creator_team_member_id\"\n },\n {\n \"id\": \"inv:0-ChC366qAfskpGrBI_1bozs9mEA3\",\n \"version\": 3,\n \"location_id\": \"ES0RJRZYEC39A\",\n \"order_id\": \"a65jnS8NXbfprvGJzY9F4fQTuaB\",\n \"primary_recipient\": {\n \"customer_id\": \"JDKYHBWT1D4F8MFH63DBMEN8Y4\",\n \"given_name\": \"Amelia\",\n \"family_name\": \"Earhart\",\n \"email_address\": \"Amelia.Earhart@example.com\",\n \"phone_number\": \"1-212-555-4240\"\n },\n \"payment_requests\": [\n {\n \"uid\": \"66c3bdfd-5090-4ff9-a8a0-c1e1a2ffa176\",\n \"request_type\": \"DEPOSIT\",\n \"due_date\": \"2021-01-23\",\n \"percentage_requested\": \"25\",\n \"tipping_enabled\": false,\n \"automatic_payment_source\": \"CARD_ON_FILE\",\n \"card_id\": \"ccof:IkWfpLj4tNHMyFii3GB\",\n \"computed_amount_money\": {\n \"amount\": 1000,\n \"currency\": \"USD\"\n },\n \"total_completed_amount_money\": {\n \"amount\": 1000,\n \"currency\": \"USD\"\n }\n },\n {\n \"uid\": \"120c5e18-4f80-4f6b-b159-774cb9bf8f99\",\n \"request_type\": \"BALANCE\",\n \"due_date\": \"2021-06-15\",\n \"tipping_enabled\": false,\n \"automatic_payment_source\": \"CARD_ON_FILE\",\n \"card_id\": \"ccof:IkWfpLj4tNHMyFii3GB\",\n \"computed_amount_money\": {\n \"amount\": 3000,\n \"currency\": \"USD\"\n },\n \"total_completed_amount_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n }\n ],\n \"delivery_method\": \"EMAIL\",\n \"invoice_number\": \"inv-455\",\n \"title\": \"title\",\n \"description\": \"description\",\n \"scheduled_at\": \"scheduled_at\",\n \"public_url\": \"https://squareup.com/pay-invoice/invtmp:5e22a2c2-47c1-46d6-b061-808764dfe2b9\",\n \"next_payment_amount_money\": {\n \"amount\": 3000,\n \"currency\": \"USD\"\n },\n \"status\": \"PARTIALLY_PAID\",\n \"timezone\": \"America/Los_Angeles\",\n \"created_at\": \"2021-01-23T15:29:12Z\",\n \"updated_at\": \"2021-01-23T15:29:56Z\",\n \"accepted_payment_methods\": {\n \"card\": true,\n \"square_gift_card\": true,\n \"bank_account\": false,\n \"buy_now_pay_later\": false,\n \"cash_app_pay\": false\n },\n \"custom_fields\": [\n {}\n ],\n \"subscription_id\": \"subscription_id\",\n \"sale_or_service_date\": \"2030-01-24\",\n \"payment_conditions\": \"payment_conditions\",\n \"store_payment_method_enabled\": false,\n \"attachments\": [\n {}\n ],\n \"creator_team_member_id\": \"creator_team_member_id\"\n }\n ],\n \"cursor\": \"ChoIDhIWVm54ZVRhLXhySFBOejBBM2xJb2daUQoFCI4IGAE\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"9994cf01-e292-4a9b-bed2-792307855d36","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"d2bfbfe3-aec4-4064-b9ae-1d07d90ce1f7","name":"CreateInvoice - default","request":{"urlPathTemplate":"/v2/invoices","method":"POST"},"response":{"status":200,"body":"{\n \"invoice\": {\n \"id\": \"inv:0-ChCHu2mZEabLeeHahQnXDjZQECY\",\n \"version\": 0,\n \"location_id\": \"ES0RJRZYEC39A\",\n \"order_id\": \"CAISENgvlJ6jLWAzERDzjyHVybY\",\n \"primary_recipient\": {\n \"customer_id\": \"JDKYHBWT1D4F8MFH63DBMEN8Y4\",\n \"given_name\": \"Amelia\",\n \"family_name\": \"Earhart\",\n \"email_address\": \"Amelia.Earhart@example.com\",\n \"phone_number\": \"1-212-555-4240\",\n \"company_name\": \"company_name\"\n },\n \"payment_requests\": [\n {\n \"uid\": \"2da7964f-f3d2-4f43-81e8-5aa220bf3355\",\n \"request_type\": \"BALANCE\",\n \"due_date\": \"2030-01-24\",\n \"tipping_enabled\": true,\n \"automatic_payment_source\": \"NONE\",\n \"reminders\": [\n {\n \"uid\": \"beebd363-e47f-4075-8785-c235aaa7df11\",\n \"relative_scheduled_days\": -1,\n \"message\": \"Your invoice is due tomorrow\",\n \"status\": \"PENDING\"\n }\n ],\n \"computed_amount_money\": {\n \"amount\": 10000,\n \"currency\": \"USD\"\n },\n \"total_completed_amount_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n }\n ],\n \"delivery_method\": \"EMAIL\",\n \"invoice_number\": \"inv-100\",\n \"title\": \"Event Planning Services\",\n \"description\": \"We appreciate your business!\",\n \"scheduled_at\": \"2030-01-13T10:00:00Z\",\n \"public_url\": \"public_url\",\n \"next_payment_amount_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"status\": \"DRAFT\",\n \"timezone\": \"America/Los_Angeles\",\n \"created_at\": \"2020-06-18T17:45:13Z\",\n \"updated_at\": \"2020-06-18T17:45:13Z\",\n \"accepted_payment_methods\": {\n \"card\": true,\n \"square_gift_card\": false,\n \"bank_account\": false,\n \"buy_now_pay_later\": false,\n \"cash_app_pay\": false\n },\n \"custom_fields\": [\n {\n \"label\": \"Event Reference Number\",\n \"value\": \"Ref. #1234\",\n \"placement\": \"ABOVE_LINE_ITEMS\"\n },\n {\n \"label\": \"Terms of Service\",\n \"value\": \"The terms of service are...\",\n \"placement\": \"BELOW_LINE_ITEMS\"\n }\n ],\n \"subscription_id\": \"subscription_id\",\n \"sale_or_service_date\": \"2030-01-24\",\n \"payment_conditions\": \"payment_conditions\",\n \"store_payment_method_enabled\": false,\n \"attachments\": [\n {}\n ],\n \"creator_team_member_id\": \"creator_team_member_id\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"d2bfbfe3-aec4-4064-b9ae-1d07d90ce1f7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5ac57b6c-fd97-46be-821c-e782be7105a7","name":"SearchInvoices - default","request":{"urlPathTemplate":"/v2/invoices/search","method":"POST"},"response":{"status":200,"body":"{\n \"invoices\": [\n {\n \"id\": \"inv:0-ChCHu2mZEabLeeHahQnXDjZQECY\",\n \"version\": 0,\n \"location_id\": \"ES0RJRZYEC39A\",\n \"order_id\": \"CAISENgvlJ6jLWAzERDzjyHVybY\",\n \"primary_recipient\": {\n \"customer_id\": \"JDKYHBWT1D4F8MFH63DBMEN8Y4\",\n \"given_name\": \"Amelia\",\n \"family_name\": \"Earhart\",\n \"email_address\": \"Amelia.Earhart@example.com\",\n \"phone_number\": \"1-212-555-4240\"\n },\n \"payment_requests\": [\n {\n \"uid\": \"2da7964f-f3d2-4f43-81e8-5aa220bf3355\",\n \"request_type\": \"BALANCE\",\n \"due_date\": \"2030-01-24\",\n \"tipping_enabled\": true,\n \"automatic_payment_source\": \"NONE\",\n \"reminders\": [\n {\n \"uid\": \"beebd363-e47f-4075-8785-c235aaa7df11\",\n \"relative_scheduled_days\": -1,\n \"message\": \"Your invoice is due tomorrow\",\n \"status\": \"PENDING\"\n }\n ],\n \"computed_amount_money\": {\n \"amount\": 10000,\n \"currency\": \"USD\"\n },\n \"total_completed_amount_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n }\n ],\n \"delivery_method\": \"EMAIL\",\n \"invoice_number\": \"inv-100\",\n \"title\": \"Event Planning Services\",\n \"description\": \"We appreciate your business!\",\n \"scheduled_at\": \"2030-01-13T10:00:00Z\",\n \"public_url\": \"public_url\",\n \"status\": \"DRAFT\",\n \"timezone\": \"America/Los_Angeles\",\n \"created_at\": \"2020-06-18T17:45:13Z\",\n \"updated_at\": \"2020-06-18T17:45:13Z\",\n \"accepted_payment_methods\": {\n \"card\": true,\n \"square_gift_card\": false,\n \"bank_account\": false,\n \"buy_now_pay_later\": false,\n \"cash_app_pay\": false\n },\n \"custom_fields\": [\n {\n \"label\": \"Event Reference Number\",\n \"value\": \"Ref. #1234\",\n \"placement\": \"ABOVE_LINE_ITEMS\"\n },\n {\n \"label\": \"Terms of Service\",\n \"value\": \"The terms of service are...\",\n \"placement\": \"BELOW_LINE_ITEMS\"\n }\n ],\n \"subscription_id\": \"subscription_id\",\n \"sale_or_service_date\": \"2030-01-24\",\n \"payment_conditions\": \"payment_conditions\",\n \"store_payment_method_enabled\": false,\n \"attachments\": [\n {}\n ],\n \"creator_team_member_id\": \"creator_team_member_id\"\n },\n {\n \"id\": \"inv:0-ChC366qAfskpGrBI_1bozs9mEA3\",\n \"version\": 3,\n \"location_id\": \"ES0RJRZYEC39A\",\n \"order_id\": \"a65jnS8NXbfprvGJzY9F4fQTuaB\",\n \"primary_recipient\": {\n \"customer_id\": \"JDKYHBWT1D4F8MFH63DBMEN8Y4\",\n \"given_name\": \"Amelia\",\n \"family_name\": \"Earhart\",\n \"email_address\": \"Amelia.Earhart@example.com\",\n \"phone_number\": \"1-212-555-4240\"\n },\n \"payment_requests\": [\n {\n \"uid\": \"66c3bdfd-5090-4ff9-a8a0-c1e1a2ffa176\",\n \"request_type\": \"DEPOSIT\",\n \"due_date\": \"2021-01-23\",\n \"percentage_requested\": \"25\",\n \"tipping_enabled\": false,\n \"automatic_payment_source\": \"CARD_ON_FILE\",\n \"card_id\": \"ccof:IkWfpLj4tNHMyFii3GB\",\n \"computed_amount_money\": {\n \"amount\": 1000,\n \"currency\": \"USD\"\n },\n \"total_completed_amount_money\": {\n \"amount\": 1000,\n \"currency\": \"USD\"\n }\n },\n {\n \"uid\": \"120c5e18-4f80-4f6b-b159-774cb9bf8f99\",\n \"request_type\": \"BALANCE\",\n \"due_date\": \"2021-06-15\",\n \"tipping_enabled\": false,\n \"automatic_payment_source\": \"CARD_ON_FILE\",\n \"card_id\": \"ccof:IkWfpLj4tNHMyFii3GB\",\n \"computed_amount_money\": {\n \"amount\": 3000,\n \"currency\": \"USD\"\n },\n \"total_completed_amount_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n }\n ],\n \"delivery_method\": \"EMAIL\",\n \"invoice_number\": \"inv-455\",\n \"title\": \"title\",\n \"description\": \"description\",\n \"scheduled_at\": \"scheduled_at\",\n \"public_url\": \"https://squareup.com/pay-invoice/invtmp:5e22a2c2-47c1-46d6-b061-808764dfe2b9\",\n \"next_payment_amount_money\": {\n \"amount\": 3000,\n \"currency\": \"USD\"\n },\n \"status\": \"PARTIALLY_PAID\",\n \"timezone\": \"America/Los_Angeles\",\n \"created_at\": \"2021-01-23T15:29:12Z\",\n \"updated_at\": \"2021-01-23T15:29:56Z\",\n \"accepted_payment_methods\": {\n \"card\": true,\n \"square_gift_card\": true,\n \"bank_account\": false,\n \"buy_now_pay_later\": false,\n \"cash_app_pay\": false\n },\n \"custom_fields\": [\n {}\n ],\n \"subscription_id\": \"subscription_id\",\n \"sale_or_service_date\": \"2030-01-24\",\n \"payment_conditions\": \"payment_conditions\",\n \"store_payment_method_enabled\": false,\n \"attachments\": [\n {}\n ],\n \"creator_team_member_id\": \"creator_team_member_id\"\n }\n ],\n \"cursor\": \"ChoIDhIWVm54ZVRhLXhySFBOejBBM2xJb2daUQoFCI4IGAE\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"5ac57b6c-fd97-46be-821c-e782be7105a7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f201db34-0dda-4138-b023-a14953375954","name":"GetInvoice - default","request":{"urlPathTemplate":"/v2/invoices/{invoice_id}","method":"GET","pathParameters":{"invoice_id":{"equalTo":"invoice_id"}}},"response":{"status":200,"body":"{\n \"invoice\": {\n \"id\": \"inv:0-ChCHu2mZEabLeeHahQnXDjZQECY\",\n \"version\": 0,\n \"location_id\": \"ES0RJRZYEC39A\",\n \"order_id\": \"CAISENgvlJ6jLWAzERDzjyHVybY\",\n \"primary_recipient\": {\n \"customer_id\": \"JDKYHBWT1D4F8MFH63DBMEN8Y4\",\n \"given_name\": \"Amelia\",\n \"family_name\": \"Earhart\",\n \"email_address\": \"Amelia.Earhart@example.com\",\n \"phone_number\": \"1-212-555-4240\",\n \"company_name\": \"company_name\"\n },\n \"payment_requests\": [\n {\n \"uid\": \"2da7964f-f3d2-4f43-81e8-5aa220bf3355\",\n \"request_type\": \"BALANCE\",\n \"due_date\": \"2030-01-24\",\n \"tipping_enabled\": true,\n \"automatic_payment_source\": \"NONE\",\n \"reminders\": [\n {\n \"uid\": \"beebd363-e47f-4075-8785-c235aaa7df11\",\n \"relative_scheduled_days\": -1,\n \"message\": \"Your invoice is due tomorrow\",\n \"status\": \"PENDING\"\n }\n ],\n \"computed_amount_money\": {\n \"amount\": 10000,\n \"currency\": \"USD\"\n },\n \"total_completed_amount_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n }\n ],\n \"delivery_method\": \"EMAIL\",\n \"invoice_number\": \"inv-100\",\n \"title\": \"Event Planning Services\",\n \"description\": \"We appreciate your business!\",\n \"scheduled_at\": \"2030-01-13T10:00:00Z\",\n \"public_url\": \"public_url\",\n \"next_payment_amount_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"status\": \"DRAFT\",\n \"timezone\": \"America/Los_Angeles\",\n \"created_at\": \"2020-06-18T17:45:13Z\",\n \"updated_at\": \"2020-06-18T17:45:13Z\",\n \"accepted_payment_methods\": {\n \"card\": true,\n \"square_gift_card\": false,\n \"bank_account\": false,\n \"buy_now_pay_later\": false,\n \"cash_app_pay\": false\n },\n \"custom_fields\": [\n {\n \"label\": \"Event Reference Number\",\n \"value\": \"Ref. #1234\",\n \"placement\": \"ABOVE_LINE_ITEMS\"\n },\n {\n \"label\": \"Terms of Service\",\n \"value\": \"The terms of service are...\",\n \"placement\": \"BELOW_LINE_ITEMS\"\n }\n ],\n \"subscription_id\": \"subscription_id\",\n \"sale_or_service_date\": \"2030-01-24\",\n \"payment_conditions\": \"payment_conditions\",\n \"store_payment_method_enabled\": false,\n \"attachments\": [\n {}\n ],\n \"creator_team_member_id\": \"creator_team_member_id\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"f201db34-0dda-4138-b023-a14953375954","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2ab7822d-7245-4595-8282-f52fba86b641","name":"UpdateInvoice - default","request":{"urlPathTemplate":"/v2/invoices/{invoice_id}","method":"PUT","pathParameters":{"invoice_id":{"equalTo":"invoice_id"}}},"response":{"status":200,"body":"{\n \"invoice\": {\n \"id\": \"inv:0-ChCHu2mZEabLeeHahQnXDjZQECY\",\n \"version\": 2,\n \"location_id\": \"ES0RJRZYEC39A\",\n \"order_id\": \"CAISENgvlJ6jLWAzERDzjyHVybY\",\n \"primary_recipient\": {\n \"customer_id\": \"JDKYHBWT1D4F8MFH63DBMEN8Y4\",\n \"given_name\": \"Amelia\",\n \"family_name\": \"Earhart\",\n \"email_address\": \"Amelia.Earhart@example.com\",\n \"phone_number\": \"1-212-555-4240\",\n \"company_name\": \"company_name\"\n },\n \"payment_requests\": [\n {\n \"uid\": \"2da7964f-f3d2-4f43-81e8-5aa220bf3355\",\n \"request_type\": \"BALANCE\",\n \"due_date\": \"2030-01-24\",\n \"tipping_enabled\": false,\n \"automatic_payment_source\": \"NONE\",\n \"computed_amount_money\": {\n \"amount\": 10000,\n \"currency\": \"USD\"\n },\n \"total_completed_amount_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n }\n ],\n \"delivery_method\": \"EMAIL\",\n \"invoice_number\": \"inv-100\",\n \"title\": \"Event Planning Services\",\n \"description\": \"We appreciate your business!\",\n \"scheduled_at\": \"2030-01-13T10:00:00Z\",\n \"public_url\": \"public_url\",\n \"next_payment_amount_money\": {\n \"amount\": 10000,\n \"currency\": \"USD\"\n },\n \"status\": \"UNPAID\",\n \"timezone\": \"America/Los_Angeles\",\n \"created_at\": \"2020-06-18T17:45:13Z\",\n \"updated_at\": \"2020-06-18T18:23:11Z\",\n \"accepted_payment_methods\": {\n \"card\": true,\n \"square_gift_card\": false,\n \"bank_account\": false,\n \"buy_now_pay_later\": false,\n \"cash_app_pay\": false\n },\n \"custom_fields\": [\n {\n \"label\": \"Event Reference Number\",\n \"value\": \"Ref. #1234\",\n \"placement\": \"ABOVE_LINE_ITEMS\"\n },\n {\n \"label\": \"Terms of Service\",\n \"value\": \"The terms of service are...\",\n \"placement\": \"BELOW_LINE_ITEMS\"\n }\n ],\n \"subscription_id\": \"subscription_id\",\n \"sale_or_service_date\": \"2030-01-24\",\n \"payment_conditions\": \"payment_conditions\",\n \"store_payment_method_enabled\": false,\n \"attachments\": [\n {}\n ],\n \"creator_team_member_id\": \"creator_team_member_id\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"2ab7822d-7245-4595-8282-f52fba86b641","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5c055b4f-5dd5-4f0e-be5e-5733f09fb6e9","name":"DeleteInvoice - default","request":{"urlPathTemplate":"/v2/invoices/{invoice_id}","method":"DELETE","pathParameters":{"invoice_id":{"equalTo":"invoice_id"}},"queryParameters":{"version":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"5c055b4f-5dd5-4f0e-be5e-5733f09fb6e9","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"06b96744-80a1-4a9e-b8ed-1f0d67f21dbd","name":"CreateInvoiceAttachment - default","request":{"urlPathTemplate":"/v2/invoices/{invoice_id}/attachments","method":"POST","pathParameters":{"invoice_id":{"equalTo":"invoice_id"}}},"response":{"status":200,"body":"{\n \"attachment\": {\n \"id\": \"inva:0-3bB9ZuDHiziThQhuC4fwWt\",\n \"filename\": \"file.jpg\",\n \"description\": \"Service contract\",\n \"filesize\": 102705,\n \"hash\": \"273ee02cb6f5f8a3a8ca23604930dd53\",\n \"mime_type\": \"image/jpeg\",\n \"uploaded_at\": \"2023-02-03T20:28:14Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"06b96744-80a1-4a9e-b8ed-1f0d67f21dbd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b8242160-e900-4174-9cb6-5cfb13d86a90","name":"DeleteInvoiceAttachment - default","request":{"urlPathTemplate":"/v2/invoices/{invoice_id}/attachments/{attachment_id}","method":"DELETE","pathParameters":{"invoice_id":{"equalTo":"invoice_id"},"attachment_id":{"equalTo":"attachment_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"b8242160-e900-4174-9cb6-5cfb13d86a90","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"96b22255-0c66-4154-891f-19cac1ef31a0","name":"CancelInvoice - default","request":{"urlPathTemplate":"/v2/invoices/{invoice_id}/cancel","method":"POST","pathParameters":{"invoice_id":{"equalTo":"invoice_id"}}},"response":{"status":200,"body":"{\n \"invoice\": {\n \"id\": \"inv:0-ChCHu2mZEabLeeHahQnXDjZQECY\",\n \"version\": 1,\n \"location_id\": \"ES0RJRZYEC39A\",\n \"order_id\": \"CAISENgvlJ6jLWAzERDzjyHVybY\",\n \"primary_recipient\": {\n \"customer_id\": \"JDKYHBWT1D4F8MFH63DBMEN8Y4\",\n \"given_name\": \"Amelia\",\n \"family_name\": \"Earhart\",\n \"email_address\": \"Amelia.Earhart@example.com\",\n \"phone_number\": \"1-212-555-4240\",\n \"company_name\": \"company_name\"\n },\n \"payment_requests\": [\n {\n \"uid\": \"2da7964f-f3d2-4f43-81e8-5aa220bf3355\",\n \"request_type\": \"BALANCE\",\n \"due_date\": \"2030-01-24\",\n \"tipping_enabled\": true,\n \"automatic_payment_source\": \"NONE\",\n \"reminders\": [\n {\n \"uid\": \"beebd363-e47f-4075-8785-c235aaa7df11\",\n \"relative_scheduled_days\": -1,\n \"message\": \"Your invoice is due tomorrow\",\n \"status\": \"PENDING\"\n }\n ],\n \"computed_amount_money\": {\n \"amount\": 10000,\n \"currency\": \"USD\"\n },\n \"total_completed_amount_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n }\n ],\n \"delivery_method\": \"EMAIL\",\n \"invoice_number\": \"inv-100\",\n \"title\": \"Event Planning Services\",\n \"description\": \"We appreciate your business!\",\n \"scheduled_at\": \"2030-01-13T10:00:00Z\",\n \"public_url\": \"public_url\",\n \"next_payment_amount_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"status\": \"CANCELED\",\n \"timezone\": \"America/Los_Angeles\",\n \"created_at\": \"2020-06-18T17:45:13Z\",\n \"updated_at\": \"2020-06-18T18:23:11Z\",\n \"accepted_payment_methods\": {\n \"card\": true,\n \"square_gift_card\": false,\n \"bank_account\": false,\n \"buy_now_pay_later\": false,\n \"cash_app_pay\": false\n },\n \"custom_fields\": [\n {\n \"label\": \"Event Reference Number\",\n \"value\": \"Ref. #1234\",\n \"placement\": \"ABOVE_LINE_ITEMS\"\n },\n {\n \"label\": \"Terms of Service\",\n \"value\": \"The terms of service are...\",\n \"placement\": \"BELOW_LINE_ITEMS\"\n }\n ],\n \"subscription_id\": \"subscription_id\",\n \"sale_or_service_date\": \"2030-01-24\",\n \"payment_conditions\": \"payment_conditions\",\n \"store_payment_method_enabled\": false,\n \"attachments\": [\n {}\n ],\n \"creator_team_member_id\": \"creator_team_member_id\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"96b22255-0c66-4154-891f-19cac1ef31a0","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"16687388-5412-45f6-871c-c81d7e302ff7","name":"PublishInvoice - default","request":{"urlPathTemplate":"/v2/invoices/{invoice_id}/publish","method":"POST","pathParameters":{"invoice_id":{"equalTo":"invoice_id"}}},"response":{"status":200,"body":"{\n \"invoice\": {\n \"id\": \"inv:0-ChCHu2mZEabLeeHahQnXDjZQECY\",\n \"version\": 1,\n \"location_id\": \"ES0RJRZYEC39A\",\n \"order_id\": \"CAISENgvlJ6jLWAzERDzjyHVybY\",\n \"primary_recipient\": {\n \"customer_id\": \"JDKYHBWT1D4F8MFH63DBMEN8Y4\",\n \"given_name\": \"Amelia\",\n \"family_name\": \"Earhart\",\n \"email_address\": \"Amelia.Earhart@example.com\",\n \"phone_number\": \"1-212-555-4240\",\n \"company_name\": \"company_name\"\n },\n \"payment_requests\": [\n {\n \"uid\": \"2da7964f-f3d2-4f43-81e8-5aa220bf3355\",\n \"request_type\": \"BALANCE\",\n \"due_date\": \"2030-01-24\",\n \"tipping_enabled\": true,\n \"automatic_payment_source\": \"NONE\",\n \"reminders\": [\n {\n \"uid\": \"beebd363-e47f-4075-8785-c235aaa7df11\",\n \"relative_scheduled_days\": -1,\n \"message\": \"Your invoice is due tomorrow\",\n \"status\": \"PENDING\"\n }\n ],\n \"computed_amount_money\": {\n \"amount\": 10000,\n \"currency\": \"USD\"\n },\n \"total_completed_amount_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n }\n ],\n \"delivery_method\": \"EMAIL\",\n \"invoice_number\": \"inv-100\",\n \"title\": \"Event Planning Services\",\n \"description\": \"We appreciate your business!\",\n \"scheduled_at\": \"2030-01-13T10:00:00Z\",\n \"public_url\": \"https://squareup.com/pay-invoice/invtmp:5e22a2c2-47c1-46d6-b061-808764dfe2b9\",\n \"next_payment_amount_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"status\": \"SCHEDULED\",\n \"timezone\": \"America/Los_Angeles\",\n \"created_at\": \"2020-06-18T17:45:13Z\",\n \"updated_at\": \"2020-06-18T18:23:11Z\",\n \"accepted_payment_methods\": {\n \"card\": true,\n \"square_gift_card\": false,\n \"bank_account\": false,\n \"buy_now_pay_later\": false,\n \"cash_app_pay\": false\n },\n \"custom_fields\": [\n {\n \"label\": \"Event Reference Number\",\n \"value\": \"Ref. #1234\",\n \"placement\": \"ABOVE_LINE_ITEMS\"\n },\n {\n \"label\": \"Terms of Service\",\n \"value\": \"The terms of service are...\",\n \"placement\": \"BELOW_LINE_ITEMS\"\n }\n ],\n \"subscription_id\": \"subscription_id\",\n \"sale_or_service_date\": \"2030-01-24\",\n \"payment_conditions\": \"payment_conditions\",\n \"store_payment_method_enabled\": false,\n \"attachments\": [\n {}\n ],\n \"creator_team_member_id\": \"creator_team_member_id\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"16687388-5412-45f6-871c-c81d7e302ff7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6e5513f3-4fd2-448a-a394-6942c027ab39","name":"CreateScheduledShift - default","request":{"urlPathTemplate":"/v2/labor/scheduled-shifts","method":"POST"},"response":{"status":200,"body":"{\n \"scheduled_shift\": {\n \"id\": \"K0YH4CV5462JB\",\n \"draft_shift_details\": {\n \"team_member_id\": \"ormj0jJJZ5OZIzxrZYJI\",\n \"location_id\": \"PAA1RJZZKXBFG\",\n \"job_id\": \"FzbJAtt9qEWncK1BWgVCxQ6M\",\n \"start_at\": \"2019-01-25T03:11:00-05:00\",\n \"end_at\": \"2019-01-25T13:11:00-05:00\",\n \"notes\": \"Dont forget to prep the vegetables\",\n \"is_deleted\": false,\n \"timezone\": \"America/New_York\"\n },\n \"published_shift_details\": {\n \"team_member_id\": \"team_member_id\",\n \"location_id\": \"location_id\",\n \"job_id\": \"job_id\",\n \"start_at\": \"start_at\",\n \"end_at\": \"end_at\",\n \"notes\": \"notes\",\n \"is_deleted\": true,\n \"timezone\": \"timezone\"\n },\n \"version\": 1,\n \"created_at\": \"2019-02-25T03:11:00-05:00\",\n \"updated_at\": \"2019-02-25T03:11:00-05:00\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"6e5513f3-4fd2-448a-a394-6942c027ab39","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ea19cc27-80e4-4c4e-b656-905971a8b5a4","name":"BulkPublishScheduledShifts - default","request":{"urlPathTemplate":"/v2/labor/scheduled-shifts/bulk-publish","method":"POST"},"response":{"status":200,"body":"{\n \"responses\": {\n \"idp_key_1\": {\n \"scheduled_shift\": {\n \"id\": \"K0YH4CV5462JB\",\n \"draft_shift_details\": {\n \"team_member_id\": \"ormj0jJJZ5OZIzxrZYJI\",\n \"location_id\": \"PAA1RJZZKXBFG\",\n \"job_id\": \"FzbJAtt9qEWncK1BWgVCxQ6M\",\n \"start_at\": \"2019-03-25T03:11:00-05:00\",\n \"end_at\": \"2019-03-25T13:18:00-05:00\",\n \"notes\": \"Don't forget to prep the vegetables\",\n \"is_deleted\": false,\n \"timezone\": \"America/New_York\"\n },\n \"published_shift_details\": {\n \"team_member_id\": \"ormj0jJJZ5OZIzxrZYJI\",\n \"location_id\": \"PAA1RJZZKXBFG\",\n \"job_id\": \"FzbJAtt9qEWncK1BWgVCxQ6M\",\n \"start_at\": \"2019-03-25T03:11:00-05:00\",\n \"end_at\": \"2019-03-25T13:18:00-05:00\",\n \"notes\": \"Don't forget to prep the vegetables\",\n \"is_deleted\": false,\n \"timezone\": \"America/New_York\"\n },\n \"version\": 3,\n \"created_at\": \"2019-02-25T03:11:00-05:00\",\n \"updated_at\": \"2019-02-25T03:11:15-05:00\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"idp_key_2\": {\n \"errors\": [\n {\n \"category\": \"INVALID_REQUEST_ERROR\",\n \"code\": \"INVALID_VALUE\",\n \"detail\": \"Scheduled shift with id 'scheduled-shift-2' not found\",\n \"field\": \"scheduled-shifts.scheduled-shift-2\"\n }\n ]\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"ea19cc27-80e4-4c4e-b656-905971a8b5a4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8e667b2c-88b6-41f5-b11d-0693408e5e08","name":"SearchScheduledShifts - default","request":{"urlPathTemplate":"/v2/labor/scheduled-shifts/search","method":"POST"},"response":{"status":200,"body":"{\n \"scheduled_shifts\": [\n {\n \"id\": \"K0YH4CV5462JB\",\n \"draft_shift_details\": {\n \"team_member_id\": \"ormj0jJJZ5OZIzxrZYJI\",\n \"location_id\": \"PAA1RJZZKXBFG\",\n \"job_id\": \"FzbJAtt9qEWncK1BWgVCxQ6M\",\n \"start_at\": \"2019-01-25T03:11:00-05:00\",\n \"end_at\": \"2019-01-25T13:11:00-05:00\",\n \"notes\": \"Dont forget to prep the vegetables\",\n \"is_deleted\": false,\n \"timezone\": \"America/New_York\"\n },\n \"version\": 1,\n \"created_at\": \"2019-02-25T03:11:00-05:00\",\n \"updated_at\": \"2019-02-25T03:11:00-05:00\"\n }\n ],\n \"cursor\": \"xoxp-123-2123-123232\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"8e667b2c-88b6-41f5-b11d-0693408e5e08","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2b63b0c6-5584-4dbc-83f0-9b7a11f84614","name":"RetrieveScheduledShift - default","request":{"urlPathTemplate":"/v2/labor/scheduled-shifts/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"scheduled_shift\": {\n \"id\": \"K0YH4CV5462JB\",\n \"draft_shift_details\": {\n \"team_member_id\": \"ormj0jJJZ5OZIzxrZYJI\",\n \"location_id\": \"PAA1RJZZKXBFG\",\n \"job_id\": \"FzbJAtt9qEWncK1BWgVCxQ6M\",\n \"start_at\": \"2019-03-25T03:11:00-05:00\",\n \"end_at\": \"2019-03-25T13:18:00-05:00\",\n \"notes\": \"Don't forget to prep the vegetables\",\n \"is_deleted\": false,\n \"timezone\": \"America/New_York\"\n },\n \"published_shift_details\": {\n \"team_member_id\": \"team_member_id\",\n \"location_id\": \"location_id\",\n \"job_id\": \"job_id\",\n \"start_at\": \"start_at\",\n \"end_at\": \"end_at\",\n \"notes\": \"notes\",\n \"is_deleted\": true,\n \"timezone\": \"timezone\"\n },\n \"version\": 2,\n \"created_at\": \"2019-02-25T03:11:00-05:00\",\n \"updated_at\": \"2019-02-25T03:11:15-05:00\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"2b63b0c6-5584-4dbc-83f0-9b7a11f84614","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c2beff1c-9d46-4530-8f47-0eadce13cae0","name":"UpdateScheduledShift - default","request":{"urlPathTemplate":"/v2/labor/scheduled-shifts/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"scheduled_shift\": {\n \"id\": \"K0YH4CV5462JB\",\n \"draft_shift_details\": {\n \"team_member_id\": \"ormj0jJJZ5OZIzxrZYJI\",\n \"location_id\": \"PAA1RJZZKXBFG\",\n \"job_id\": \"FzbJAtt9qEWncK1BWgVCxQ6M\",\n \"start_at\": \"2019-03-25T03:11:00-05:00\",\n \"end_at\": \"2019-03-25T13:18:00-05:00\",\n \"notes\": \"Dont forget to prep the vegetables\",\n \"is_deleted\": false,\n \"timezone\": \"America/New_York\"\n },\n \"published_shift_details\": {\n \"team_member_id\": \"team_member_id\",\n \"location_id\": \"location_id\",\n \"job_id\": \"job_id\",\n \"start_at\": \"start_at\",\n \"end_at\": \"end_at\",\n \"notes\": \"notes\",\n \"is_deleted\": true,\n \"timezone\": \"timezone\"\n },\n \"version\": 2,\n \"created_at\": \"2019-02-25T03:11:00-05:00\",\n \"updated_at\": \"2019-02-25T03:11:15-05:00\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"c2beff1c-9d46-4530-8f47-0eadce13cae0","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3b7296a8-f6a0-4e7f-9f62-7256d2017c76","name":"PublishScheduledShift - default","request":{"urlPathTemplate":"/v2/labor/scheduled-shifts/{id}/publish","method":"POST","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"scheduled_shift\": {\n \"id\": \"K0YH4CV5462JB\",\n \"draft_shift_details\": {\n \"team_member_id\": \"ormj0jJJZ5OZIzxrZYJI\",\n \"location_id\": \"PAA1RJZZKXBFG\",\n \"job_id\": \"FzbJAtt9qEWncK1BWgVCxQ6M\",\n \"start_at\": \"2019-01-25T03:11:00-05:00\",\n \"end_at\": \"2019-01-25T13:11:00-05:00\",\n \"notes\": \"Dont forget to prep the vegetables\",\n \"is_deleted\": false,\n \"timezone\": \"America/New_York\"\n },\n \"published_shift_details\": {\n \"team_member_id\": \"ormj0jJJZ5OZIzxrZYJI\",\n \"location_id\": \"PAA1RJZZKXBFG\",\n \"job_id\": \"FzbJAtt9qEWncK1BWgVCxQ6M\",\n \"start_at\": \"2019-01-25T03:11:00-05:00\",\n \"end_at\": \"2019-01-25T13:11:00-05:00\",\n \"notes\": \"Dont forget to prep the vegetables\",\n \"is_deleted\": false,\n \"timezone\": \"America/New_York\"\n },\n \"version\": 2,\n \"created_at\": \"2019-02-25T03:11:00-05:00\",\n \"updated_at\": \"2019-02-25T03:11:00-05:00\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"3b7296a8-f6a0-4e7f-9f62-7256d2017c76","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"40a44562-fba4-4657-aa86-ae7c2dc253dd","name":"CreateTimecard - default","request":{"urlPathTemplate":"/v2/labor/timecards","method":"POST"},"response":{"status":200,"body":"{\n \"timecard\": {\n \"id\": \"K0YH4CV5462JB\",\n \"location_id\": \"PAA1RJZZKXBFG\",\n \"timezone\": \"America/New_York\",\n \"start_at\": \"2019-01-25T03:11:00-05:00\",\n \"end_at\": \"2019-01-25T13:11:00-05:00\",\n \"wage\": {\n \"title\": \"Barista\",\n \"hourly_rate\": {\n \"amount\": 1100,\n \"currency\": \"USD\"\n },\n \"job_id\": \"FzbJAtt9qEWncK1BWgVCxQ6M\",\n \"tip_eligible\": true\n },\n \"breaks\": [\n {\n \"id\": \"X7GAQYVVRRG6P\",\n \"start_at\": \"2019-01-25T06:11:00-05:00\",\n \"end_at\": \"2019-01-25T06:16:00-05:00\",\n \"break_type_id\": \"REGS1EQR1TPZ5\",\n \"name\": \"Tea Break\",\n \"expected_duration\": \"PT5M\",\n \"is_paid\": true\n }\n ],\n \"status\": \"CLOSED\",\n \"version\": 1,\n \"created_at\": \"2019-02-28T00:39:02Z\",\n \"updated_at\": \"2019-02-28T00:39:02Z\",\n \"team_member_id\": \"ormj0jJJZ5OZIzxrZYJI\",\n \"declared_cash_tip_money\": {\n \"amount\": 500,\n \"currency\": \"USD\"\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"40a44562-fba4-4657-aa86-ae7c2dc253dd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"85995051-cff8-48a9-bad6-334dd61ae832","name":"SearchTimecards - default","request":{"urlPathTemplate":"/v2/labor/timecards/search","method":"POST"},"response":{"status":200,"body":"{\n \"timecards\": [\n {\n \"id\": \"X714F3HA6D1PT\",\n \"location_id\": \"PAA1RJZZKXBFG\",\n \"timezone\": \"America/New_York\",\n \"start_at\": \"2019-01-21T03:11:00-05:00\",\n \"end_at\": \"2019-01-21T13:11:00-05:00\",\n \"wage\": {\n \"title\": \"Barista\",\n \"hourly_rate\": {\n \"amount\": 1100,\n \"currency\": \"USD\"\n },\n \"job_id\": \"FzbJAtt9qEWncK1BWgVCxQ6M\",\n \"tip_eligible\": true\n },\n \"breaks\": [\n {\n \"id\": \"SJW7X6AKEJQ65\",\n \"start_at\": \"2019-01-21T06:11:00-05:00\",\n \"end_at\": \"2019-01-21T06:11:00-05:00\",\n \"break_type_id\": \"REGS1EQR1TPZ5\",\n \"name\": \"Tea Break\",\n \"expected_duration\": \"PT10M\",\n \"is_paid\": true\n }\n ],\n \"status\": \"CLOSED\",\n \"version\": 6,\n \"created_at\": \"2019-01-24T01:12:03Z\",\n \"updated_at\": \"2019-02-07T22:21:08Z\",\n \"team_member_id\": \"ormj0jJJZ5OZIzxrZYJI\",\n \"declared_cash_tip_money\": {\n \"amount\": 500,\n \"currency\": \"USD\"\n }\n },\n {\n \"id\": \"GDHYBZYWK0P2V\",\n \"location_id\": \"PAA1RJZZKXBFG\",\n \"timezone\": \"America/New_York\",\n \"start_at\": \"2019-01-22T12:02:00-05:00\",\n \"end_at\": \"2019-01-22T13:02:00-05:00\",\n \"wage\": {\n \"title\": \"Cook\",\n \"hourly_rate\": {\n \"amount\": 1600,\n \"currency\": \"USD\"\n },\n \"job_id\": \"gcbz15vKGnMKmaWJJ152kjim\",\n \"tip_eligible\": true\n },\n \"breaks\": [\n {\n \"id\": \"BKS6VR7WR748A\",\n \"start_at\": \"2019-01-22T14:30:00-05:00\",\n \"end_at\": \"2019-01-22T14:40:00-05:00\",\n \"break_type_id\": \"WQX00VR99F53J\",\n \"name\": \"Tea Break\",\n \"expected_duration\": \"PT10M\",\n \"is_paid\": true\n },\n {\n \"id\": \"BQFEZSHFZSC51\",\n \"start_at\": \"2019-01-22T12:30:00-05:00\",\n \"end_at\": \"2019-01-22T12:44:00-05:00\",\n \"break_type_id\": \"P6Q468ZFRN1AC\",\n \"name\": \"Coffee Break\",\n \"expected_duration\": \"PT15M\",\n \"is_paid\": false\n }\n ],\n \"status\": \"CLOSED\",\n \"version\": 16,\n \"created_at\": \"2019-01-23T23:32:45Z\",\n \"updated_at\": \"2019-01-24T00:56:25Z\",\n \"team_member_id\": \"33fJchumvVdJwxV0H6L9\",\n \"declared_cash_tip_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n }\n ],\n \"cursor\": \"cursor\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"85995051-cff8-48a9-bad6-334dd61ae832","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"113b40ce-73d6-4ea7-b887-c2f1ca5f8ac8","name":"RetrieveTimecard - default","request":{"urlPathTemplate":"/v2/labor/timecards/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"timecard\": {\n \"id\": \"T35HMQSN89SV4\",\n \"location_id\": \"PAA1RJZZKXBFG\",\n \"timezone\": \"America/New_York\",\n \"start_at\": \"2019-02-23T18:00:00-05:00\",\n \"end_at\": \"2019-02-23T21:00:00-05:00\",\n \"wage\": {\n \"title\": \"Cashier\",\n \"hourly_rate\": {\n \"amount\": 1457,\n \"currency\": \"USD\"\n },\n \"job_id\": \"N4YKVLzFj3oGtNocqoYHYpW3\",\n \"tip_eligible\": true\n },\n \"breaks\": [\n {\n \"id\": \"M9BBKEPQAQD2T\",\n \"start_at\": \"2019-02-23T19:00:00-05:00\",\n \"end_at\": \"2019-02-23T20:00:00-05:00\",\n \"break_type_id\": \"92EPDRQKJ5088\",\n \"name\": \"Lunch Break\",\n \"expected_duration\": \"PT1H\",\n \"is_paid\": true\n }\n ],\n \"status\": \"CLOSED\",\n \"version\": 1,\n \"created_at\": \"2019-02-27T00:12:12Z\",\n \"updated_at\": \"2019-02-27T00:12:12Z\",\n \"team_member_id\": \"D71KRMQof6cXGUW0aAv7\",\n \"declared_cash_tip_money\": {\n \"amount\": 500,\n \"currency\": \"USD\"\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"113b40ce-73d6-4ea7-b887-c2f1ca5f8ac8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e5541ac9-c6fe-4a63-b0d0-6bee4f62b1b1","name":"UpdateTimecard - default","request":{"urlPathTemplate":"/v2/labor/timecards/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"timecard\": {\n \"id\": \"K0YH4CV5462JB\",\n \"location_id\": \"PAA1RJZZKXBFG\",\n \"timezone\": \"America/New_York\",\n \"start_at\": \"2019-01-25T03:11:00-05:00\",\n \"end_at\": \"2019-01-25T13:11:00-05:00\",\n \"wage\": {\n \"title\": \"Bartender\",\n \"hourly_rate\": {\n \"amount\": 1500,\n \"currency\": \"USD\"\n },\n \"job_id\": \"dZtrPh5GSDGugyXGByesVp51\",\n \"tip_eligible\": true\n },\n \"breaks\": [\n {\n \"id\": \"X7GAQYVVRRG6P\",\n \"start_at\": \"2019-01-25T06:11:00-05:00\",\n \"end_at\": \"2019-01-25T06:16:00-05:00\",\n \"break_type_id\": \"REGS1EQR1TPZ5\",\n \"name\": \"Tea Break\",\n \"expected_duration\": \"PT5M\",\n \"is_paid\": true\n }\n ],\n \"status\": \"CLOSED\",\n \"version\": 2,\n \"created_at\": \"2019-02-28T00:39:02Z\",\n \"updated_at\": \"2019-02-28T00:42:41Z\",\n \"team_member_id\": \"ormj0jJJZ5OZIzxrZYJI\",\n \"declared_cash_tip_money\": {\n \"amount\": 500,\n \"currency\": \"USD\"\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"e5541ac9-c6fe-4a63-b0d0-6bee4f62b1b1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f1303470-e545-4e46-a10b-41c0f4e4483b","name":"DeleteTimecard - default","request":{"urlPathTemplate":"/v2/labor/timecards/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"f1303470-e545-4e46-a10b-41c0f4e4483b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a3de8ab0-3229-4446-b77c-708325927938","name":"ListLocations - default","request":{"urlPathTemplate":"/v2/locations","method":"GET"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"locations\": [\n {\n \"id\": \"18YC4JDH91E1H\",\n \"name\": \"Grant Park\",\n \"address\": {\n \"address_line_1\": \"123 Main St\",\n \"locality\": \"San Francisco\",\n \"administrative_district_level_1\": \"CA\",\n \"postal_code\": \"94114\",\n \"country\": \"US\"\n },\n \"timezone\": \"America/Los_Angeles\",\n \"capabilities\": [\n \"CREDIT_CARD_PROCESSING\"\n ],\n \"status\": \"ACTIVE\",\n \"created_at\": \"2016-09-19T17:33:12Z\",\n \"merchant_id\": \"3MYCJG5GVYQ8Q\",\n \"country\": \"US\",\n \"language_code\": \"en-US\",\n \"currency\": \"USD\",\n \"phone_number\": \"+1 650-354-7217\",\n \"business_name\": \"Jet Fuel Coffee\",\n \"type\": \"PHYSICAL\",\n \"website_url\": \"website_url\",\n \"business_email\": \"business_email\",\n \"description\": \"description\",\n \"twitter_username\": \"twitter_username\",\n \"instagram_username\": \"instagram_username\",\n \"facebook_url\": \"facebook_url\",\n \"logo_url\": \"logo_url\",\n \"pos_background_url\": \"pos_background_url\",\n \"mcc\": \"mcc\",\n \"full_format_logo_url\": \"full_format_logo_url\"\n },\n {\n \"id\": \"3Z4V4WHQK64X9\",\n \"name\": \"Midtown\",\n \"address\": {\n \"address_line_1\": \"1234 Peachtree St. NE\",\n \"locality\": \"Atlanta\",\n \"administrative_district_level_1\": \"GA\",\n \"postal_code\": \"30309\"\n },\n \"timezone\": \"America/New_York\",\n \"capabilities\": [\n \"CREDIT_CARD_PROCESSING\"\n ],\n \"status\": \"ACTIVE\",\n \"created_at\": \"2022-02-19T17:58:25Z\",\n \"merchant_id\": \"3MYCJG5GVYQ8Q\",\n \"country\": \"US\",\n \"language_code\": \"en-US\",\n \"currency\": \"USD\",\n \"phone_number\": \"phone_number\",\n \"business_name\": \"Jet Fuel Coffee\",\n \"type\": \"PHYSICAL\",\n \"website_url\": \"website_url\",\n \"business_email\": \"business_email\",\n \"description\": \"Midtown Atlanta store\",\n \"twitter_username\": \"twitter_username\",\n \"instagram_username\": \"instagram_username\",\n \"facebook_url\": \"facebook_url\",\n \"coordinates\": {\n \"latitude\": 33.7889,\n \"longitude\": -84.3841\n },\n \"logo_url\": \"logo_url\",\n \"pos_background_url\": \"pos_background_url\",\n \"mcc\": \"7299\",\n \"full_format_logo_url\": \"full_format_logo_url\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"a3de8ab0-3229-4446-b77c-708325927938","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"de27d05a-8bc8-493f-803d-d10209744f38","name":"CreateLocation - default","request":{"urlPathTemplate":"/v2/locations","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"location\": {\n \"id\": \"3Z4V4WHQK64X9\",\n \"name\": \"Midtown\",\n \"address\": {\n \"address_line_1\": \"1234 Peachtree St. NE\",\n \"address_line_2\": \"address_line_2\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"Atlanta\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"GA\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"30309\",\n \"country\": \"ZZ\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n },\n \"timezone\": \"America/New_York\",\n \"capabilities\": [\n \"CREDIT_CARD_PROCESSING\"\n ],\n \"status\": \"ACTIVE\",\n \"created_at\": \"2022-02-19T17:58:25Z\",\n \"merchant_id\": \"3MYCJG5GVYQ8Q\",\n \"country\": \"US\",\n \"language_code\": \"en-US\",\n \"currency\": \"USD\",\n \"phone_number\": \"phone_number\",\n \"business_name\": \"Jet Fuel Coffee\",\n \"type\": \"PHYSICAL\",\n \"website_url\": \"website_url\",\n \"business_hours\": {\n \"periods\": [\n {}\n ]\n },\n \"business_email\": \"business_email\",\n \"description\": \"Midtown Atlanta store\",\n \"twitter_username\": \"twitter_username\",\n \"instagram_username\": \"instagram_username\",\n \"facebook_url\": \"facebook_url\",\n \"coordinates\": {\n \"latitude\": 33.7889,\n \"longitude\": -84.3841\n },\n \"logo_url\": \"logo_url\",\n \"pos_background_url\": \"pos_background_url\",\n \"mcc\": \"7299\",\n \"full_format_logo_url\": \"full_format_logo_url\",\n \"tax_ids\": {\n \"eu_vat\": \"eu_vat\",\n \"fr_siret\": \"fr_siret\",\n \"fr_naf\": \"fr_naf\",\n \"es_nif\": \"es_nif\",\n \"jp_qii\": \"jp_qii\"\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"de27d05a-8bc8-493f-803d-d10209744f38","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e88037bf-0f7c-4b6c-b53e-8a3e3bf88a23","name":"RetrieveLocation - default","request":{"urlPathTemplate":"/v2/locations/{location_id}","method":"GET","pathParameters":{"location_id":{"equalTo":"location_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"location\": {\n \"id\": \"18YC4JDH91E1H\",\n \"name\": \"Grant Park\",\n \"address\": {\n \"address_line_1\": \"123 Main St\",\n \"address_line_2\": \"address_line_2\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"San Francisco\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"CA\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"94114\",\n \"country\": \"US\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n },\n \"timezone\": \"America/Los_Angeles\",\n \"capabilities\": [\n \"CREDIT_CARD_PROCESSING\"\n ],\n \"status\": \"ACTIVE\",\n \"created_at\": \"2016-09-19T17:33:12Z\",\n \"merchant_id\": \"3MYCJG5GVYQ8Q\",\n \"country\": \"US\",\n \"language_code\": \"en-US\",\n \"currency\": \"USD\",\n \"phone_number\": \"+1 650-354-7217\",\n \"business_name\": \"Jet Fuel Coffee\",\n \"type\": \"PHYSICAL\",\n \"website_url\": \"website_url\",\n \"business_hours\": {\n \"periods\": [\n {}\n ]\n },\n \"business_email\": \"business_email\",\n \"description\": \"description\",\n \"twitter_username\": \"twitter_username\",\n \"instagram_username\": \"instagram_username\",\n \"facebook_url\": \"facebook_url\",\n \"coordinates\": {\n \"latitude\": 1.1,\n \"longitude\": 1.1\n },\n \"logo_url\": \"logo_url\",\n \"pos_background_url\": \"pos_background_url\",\n \"mcc\": \"mcc\",\n \"full_format_logo_url\": \"full_format_logo_url\",\n \"tax_ids\": {\n \"eu_vat\": \"eu_vat\",\n \"fr_siret\": \"fr_siret\",\n \"fr_naf\": \"fr_naf\",\n \"es_nif\": \"es_nif\",\n \"jp_qii\": \"jp_qii\"\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"e88037bf-0f7c-4b6c-b53e-8a3e3bf88a23","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b840a157-b674-4dc7-9009-547d7c0cb24a","name":"UpdateLocation - default","request":{"urlPathTemplate":"/v2/locations/{location_id}","method":"PUT","pathParameters":{"location_id":{"equalTo":"location_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"location\": {\n \"id\": \"3Z4V4WHQK64X9\",\n \"name\": \"Midtown\",\n \"address\": {\n \"address_line_1\": \"1234 Peachtree St. NE\",\n \"address_line_2\": \"address_line_2\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"Atlanta\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"GA\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"30309\",\n \"country\": \"ZZ\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n },\n \"timezone\": \"America/New_York\",\n \"capabilities\": [\n \"CREDIT_CARD_PROCESSING\"\n ],\n \"status\": \"ACTIVE\",\n \"created_at\": \"2022-02-19T17:58:25Z\",\n \"merchant_id\": \"3MYCJG5GVYQ8Q\",\n \"country\": \"US\",\n \"language_code\": \"en-US\",\n \"currency\": \"USD\",\n \"phone_number\": \"phone_number\",\n \"business_name\": \"Jet Fuel Coffee\",\n \"type\": \"PHYSICAL\",\n \"website_url\": \"website_url\",\n \"business_hours\": {\n \"periods\": [\n {\n \"day_of_week\": \"FRI\",\n \"start_local_time\": \"07:00\",\n \"end_local_time\": \"18:00\"\n },\n {\n \"day_of_week\": \"SAT\",\n \"start_local_time\": \"07:00\",\n \"end_local_time\": \"18:00\"\n },\n {\n \"day_of_week\": \"SUN\",\n \"start_local_time\": \"09:00\",\n \"end_local_time\": \"15:00\"\n }\n ]\n },\n \"business_email\": \"business_email\",\n \"description\": \"Midtown Atlanta store - Open weekends\",\n \"twitter_username\": \"twitter_username\",\n \"instagram_username\": \"instagram_username\",\n \"facebook_url\": \"facebook_url\",\n \"coordinates\": {\n \"latitude\": 33.7889,\n \"longitude\": -84.3841\n },\n \"logo_url\": \"logo_url\",\n \"pos_background_url\": \"pos_background_url\",\n \"mcc\": \"7299\",\n \"full_format_logo_url\": \"full_format_logo_url\",\n \"tax_ids\": {\n \"eu_vat\": \"eu_vat\",\n \"fr_siret\": \"fr_siret\",\n \"fr_naf\": \"fr_naf\",\n \"es_nif\": \"es_nif\",\n \"jp_qii\": \"jp_qii\"\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"b840a157-b674-4dc7-9009-547d7c0cb24a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"cdee21da-c23a-4cfc-b4bf-63631bdd5e38","name":"CreateCheckout - default","request":{"urlPathTemplate":"/v2/locations/{location_id}/checkouts","method":"POST","pathParameters":{"location_id":{"equalTo":"location_id"}}},"response":{"status":200,"body":"{\n \"checkout\": {\n \"id\": \"CAISEHGimXh-C3RIT4og1a6u1qw\",\n \"checkout_page_url\": \"https://connect.squareup.com/v2/checkout?c=CAISEHGimXh-C3RIT4og1a6u1qw&l=CYTKRM7R7JMV8\",\n \"ask_for_shipping_address\": true,\n \"merchant_support_email\": \"merchant+support@website.com\",\n \"pre_populate_buyer_email\": \"example@email.com\",\n \"pre_populate_shipping_address\": {\n \"address_line_1\": \"1455 Market St.\",\n \"address_line_2\": \"Suite 600\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"San Francisco\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"CA\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"94103\",\n \"country\": \"US\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\"\n },\n \"redirect_url\": \"https://merchant.website.com/order-confirm\",\n \"order\": {\n \"id\": \"id\",\n \"location_id\": \"location_id\",\n \"reference_id\": \"reference_id\",\n \"customer_id\": \"customer_id\",\n \"line_items\": [\n {\n \"name\": \"Printed T Shirt\",\n \"quantity\": \"2\",\n \"applied_taxes\": [\n {\n \"tax_uid\": \"38ze1696-z1e3-5628-af6d-f1e04d947fg3\",\n \"applied_money\": {\n \"amount\": 103,\n \"currency\": \"USD\"\n }\n }\n ],\n \"applied_discounts\": [\n {\n \"discount_uid\": \"56ae1696-z1e3-9328-af6d-f1e04d947gd4\",\n \"applied_money\": {\n \"amount\": 100,\n \"currency\": \"USD\"\n }\n }\n ],\n \"base_price_money\": {\n \"amount\": 1500,\n \"currency\": \"USD\"\n },\n \"total_tax_money\": {\n \"amount\": 103,\n \"currency\": \"USD\"\n },\n \"total_discount_money\": {\n \"amount\": 100,\n \"currency\": \"USD\"\n },\n \"total_money\": {\n \"amount\": 1503,\n \"currency\": \"USD\"\n }\n },\n {\n \"name\": \"Slim Jeans\",\n \"quantity\": \"1\",\n \"base_price_money\": {\n \"amount\": 2500,\n \"currency\": \"USD\"\n },\n \"total_money\": {\n \"amount\": 2500,\n \"currency\": \"USD\"\n }\n },\n {\n \"name\": \"Woven Sweater\",\n \"quantity\": \"3\",\n \"base_price_money\": {\n \"amount\": 3500,\n \"currency\": \"USD\"\n },\n \"total_money\": {\n \"amount\": 10500,\n \"currency\": \"USD\"\n }\n }\n ],\n \"taxes\": [\n {\n \"uid\": \"38ze1696-z1e3-5628-af6d-f1e04d947fg3\",\n \"type\": \"INCLUSIVE\",\n \"percentage\": \"7.75\",\n \"scope\": \"LINE_ITEM\"\n }\n ],\n \"discounts\": [\n {\n \"uid\": \"56ae1696-z1e3-9328-af6d-f1e04d947gd4\",\n \"type\": \"FIXED_AMOUNT\",\n \"amount_money\": {\n \"amount\": 100,\n \"currency\": \"USD\"\n },\n \"applied_money\": {\n \"amount\": 100,\n \"currency\": \"USD\"\n },\n \"scope\": \"LINE_ITEM\"\n }\n ],\n \"service_charges\": [\n {}\n ],\n \"fulfillments\": [\n {}\n ],\n \"returns\": [\n {}\n ],\n \"tenders\": [\n {\n \"type\": \"CARD\"\n }\n ],\n \"refunds\": [\n {\n \"id\": \"id\",\n \"location_id\": \"location_id\",\n \"reason\": \"reason\",\n \"amount_money\": {},\n \"status\": \"PENDING\"\n }\n ],\n \"created_at\": \"created_at\",\n \"updated_at\": \"updated_at\",\n \"closed_at\": \"closed_at\",\n \"state\": \"OPEN\",\n \"version\": 1,\n \"total_money\": {\n \"amount\": 14503,\n \"currency\": \"USD\"\n },\n \"total_tax_money\": {\n \"amount\": 103,\n \"currency\": \"USD\"\n },\n \"total_discount_money\": {\n \"amount\": 100,\n \"currency\": \"USD\"\n },\n \"ticket_name\": \"ticket_name\",\n \"rewards\": [\n {\n \"id\": \"id\",\n \"reward_tier_id\": \"reward_tier_id\"\n }\n ]\n },\n \"created_at\": \"2017-06-16T22:25:35Z\",\n \"additional_recipients\": [\n {\n \"location_id\": \"057P5VYJ4A5X1\",\n \"description\": \"Application fees\",\n \"amount_money\": {\n \"amount\": 60,\n \"currency\": \"USD\"\n }\n }\n ]\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"cdee21da-c23a-4cfc-b4bf-63631bdd5e38","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"357f6455-0de7-46db-8a8a-f75d394d1242","name":"SearchLoyaltyEvents - default","request":{"urlPathTemplate":"/v2/loyalty/events/search","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"events\": [\n {\n \"id\": \"c27c8465-806e-36f2-b4b3-71f5887b5ba8\",\n \"type\": \"ACCUMULATE_POINTS\",\n \"created_at\": \"2020-05-08T22:01:30Z\",\n \"accumulate_points\": {\n \"loyalty_program_id\": \"d619f755-2d17-41f3-990d-c04ecedd64dd\",\n \"points\": 5,\n \"order_id\": \"PyATxhYLfsMqpVkcKJITPydgEYfZY\"\n },\n \"adjust_points\": {\n \"points\": 1\n },\n \"loyalty_account_id\": \"5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd\",\n \"location_id\": \"P034NEENMD09F\",\n \"source\": \"LOYALTY_API\",\n \"expire_points\": {\n \"points\": 1\n },\n \"other_event\": {\n \"points\": 1\n }\n },\n {\n \"id\": \"e4a5cbc3-a4d0-3779-98e9-e578885d9430\",\n \"type\": \"REDEEM_REWARD\",\n \"created_at\": \"2020-05-08T22:01:15Z\",\n \"redeem_reward\": {\n \"loyalty_program_id\": \"d619f755-2d17-41f3-990d-c04ecedd64dd\",\n \"reward_id\": \"d03f79f4-815f-3500-b851-cc1e68a457f9\",\n \"order_id\": \"PyATxhYLfsMqpVkcKJITPydgEYfZY\"\n },\n \"adjust_points\": {\n \"points\": 1\n },\n \"loyalty_account_id\": \"5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd\",\n \"location_id\": \"P034NEENMD09F\",\n \"source\": \"LOYALTY_API\",\n \"expire_points\": {\n \"points\": 1\n },\n \"other_event\": {\n \"points\": 1\n }\n },\n {\n \"id\": \"5e127479-0b03-3671-ab1e-15faea8b7188\",\n \"type\": \"CREATE_REWARD\",\n \"created_at\": \"2020-05-08T22:00:44Z\",\n \"create_reward\": {\n \"loyalty_program_id\": \"d619f755-2d17-41f3-990d-c04ecedd64dd\",\n \"reward_id\": \"d03f79f4-815f-3500-b851-cc1e68a457f9\",\n \"points\": -10\n },\n \"adjust_points\": {\n \"points\": 1\n },\n \"loyalty_account_id\": \"5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd\",\n \"location_id\": \"location_id\",\n \"source\": \"LOYALTY_API\",\n \"expire_points\": {\n \"points\": 1\n },\n \"other_event\": {\n \"points\": 1\n }\n }\n ],\n \"cursor\": \"cursor\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"357f6455-0de7-46db-8a8a-f75d394d1242","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"92f707fd-c11e-4e26-823c-8291ff30c2c4","name":"ListMerchants - default","request":{"urlPathTemplate":"/v2/merchants","method":"GET","queryParameters":{"cursor":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"merchant\": [\n {\n \"id\": \"DM7VKY8Q63GNP\",\n \"business_name\": \"Apple A Day\",\n \"country\": \"US\",\n \"language_code\": \"en-US\",\n \"currency\": \"USD\",\n \"status\": \"ACTIVE\",\n \"main_location_id\": \"9A65CGC72ZQG1\",\n \"created_at\": \"2021-12-10T19:25:52.484Z\"\n }\n ],\n \"cursor\": 1\n}","headers":{"Content-Type":"application/json"}},"uuid":"92f707fd-c11e-4e26-823c-8291ff30c2c4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"70e49f41-be2b-4051-9c34-5225abc636aa","name":"RetrieveMerchant - default","request":{"urlPathTemplate":"/v2/merchants/{merchant_id}","method":"GET","pathParameters":{"merchant_id":{"equalTo":"merchant_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"merchant\": {\n \"id\": \"DM7VKY8Q63GNP\",\n \"business_name\": \"Apple A Day\",\n \"country\": \"US\",\n \"language_code\": \"en-US\",\n \"currency\": \"USD\",\n \"status\": \"ACTIVE\",\n \"main_location_id\": \"9A65CGC72ZQG1\",\n \"created_at\": \"2021-12-10T19:25:52.484Z\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"70e49f41-be2b-4051-9c34-5225abc636aa","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0e564201-4980-442e-adac-8cd3742344cf","name":"RetrieveLocationSettings - default","request":{"urlPathTemplate":"/v2/online-checkout/location-settings/{location_id}","method":"GET","pathParameters":{"location_id":{"equalTo":"location_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"location_settings\": {\n \"location_id\": \"LOCATION_ID_1\",\n \"customer_notes_enabled\": true,\n \"policies\": [\n {\n \"uid\": \"POLICY_ID_1\",\n \"title\": \"Return Policy\",\n \"description\": \"This is my Return Policy\"\n }\n ],\n \"branding\": {\n \"header_type\": \"FRAMED_LOGO\",\n \"button_color\": \"#ffffff\",\n \"button_shape\": \"ROUNDED\"\n },\n \"tipping\": {\n \"percentages\": [\n 10,\n 15,\n 20\n ],\n \"smart_tipping_enabled\": true,\n \"default_percent\": 15,\n \"smart_tips\": [\n {}\n ]\n },\n \"coupons\": {\n \"enabled\": true\n },\n \"updated_at\": \"2022-06-16T22:25:35Z\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"0e564201-4980-442e-adac-8cd3742344cf","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c7af2390-41ac-4490-b2c4-80ba8a016dcc","name":"UpdateLocationSettings - default","request":{"urlPathTemplate":"/v2/online-checkout/location-settings/{location_id}","method":"PUT","pathParameters":{"location_id":{"equalTo":"location_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"location_settings\": {\n \"location_id\": \"LOCATION_ID_1\",\n \"customer_notes_enabled\": false,\n \"policies\": [\n {\n \"uid\": \"POLICY_ID_1\",\n \"title\": \"Return Policy\",\n \"description\": \"This is my Return Policy\"\n },\n {\n \"uid\": \"POLICY_ID_2\",\n \"title\": \"Return Policy\",\n \"description\": \"Items may be returned within 30 days of purchase.\"\n }\n ],\n \"branding\": {\n \"header_type\": \"FRAMED_LOGO\",\n \"button_color\": \"#00b23b\",\n \"button_shape\": \"ROUNDED\"\n },\n \"tipping\": {\n \"percentages\": [\n 15,\n 20,\n 25\n ],\n \"smart_tipping_enabled\": true,\n \"default_percent\": 20,\n \"smart_tips\": [\n {}\n ]\n },\n \"coupons\": {\n \"enabled\": true\n },\n \"updated_at\": \"2022-06-16T22:25:35Z\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"c7af2390-41ac-4490-b2c4-80ba8a016dcc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"cb2a10d1-77e5-4618-9211-e2c2402c6a4d","name":"RetrieveMerchantSettings - default","request":{"urlPathTemplate":"/v2/online-checkout/merchant-settings","method":"GET"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"merchant_settings\": {\n \"payment_methods\": {\n \"apple_pay\": {\n \"enabled\": true\n },\n \"google_pay\": {\n \"enabled\": true\n },\n \"afterpay_clearpay\": {\n \"order_eligibility_range\": {\n \"min\": {\n \"amount\": 100,\n \"currency\": \"USD\"\n },\n \"max\": {\n \"amount\": 10000,\n \"currency\": \"USD\"\n }\n },\n \"item_eligibility_range\": {\n \"min\": {\n \"amount\": 100,\n \"currency\": \"USD\"\n },\n \"max\": {\n \"amount\": 10000,\n \"currency\": \"USD\"\n }\n },\n \"enabled\": true\n }\n },\n \"updated_at\": \"2022-06-16T22:25:35Z\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"cb2a10d1-77e5-4618-9211-e2c2402c6a4d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"b6632ff4-dfaf-4519-a2d4-062502a1c013","name":"UpdateMerchantSettings - default","request":{"urlPathTemplate":"/v2/online-checkout/merchant-settings","method":"PUT"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"merchant_settings\": {\n \"payment_methods\": {\n \"apple_pay\": {\n \"enabled\": false\n },\n \"google_pay\": {\n \"enabled\": true\n },\n \"afterpay_clearpay\": {\n \"order_eligibility_range\": {\n \"min\": {\n \"amount\": 100,\n \"currency\": \"USD\"\n },\n \"max\": {\n \"amount\": 10000,\n \"currency\": \"USD\"\n }\n },\n \"item_eligibility_range\": {\n \"min\": {\n \"amount\": 100,\n \"currency\": \"USD\"\n },\n \"max\": {\n \"amount\": 10000,\n \"currency\": \"USD\"\n }\n },\n \"enabled\": true\n }\n },\n \"updated_at\": \"2022-06-16T22:25:35Z\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"b6632ff4-dfaf-4519-a2d4-062502a1c013","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e9a58865-ce06-4510-9d3d-e08d6085e656","name":"CreateOrder - default","request":{"urlPathTemplate":"/v2/orders","method":"POST"},"response":{"status":200,"body":"{\n \"order\": {\n \"id\": \"CAISENgvlJ6jLWAzERDzjyHVybY\",\n \"location_id\": \"057P5VYJ4A5X1\",\n \"reference_id\": \"my-order-001\",\n \"source\": {\n \"name\": \"My App\"\n },\n \"customer_id\": \"customer_id\",\n \"line_items\": [\n {\n \"uid\": \"8uSwfzvUImn3IRrvciqlXC\",\n \"name\": \"New York Strip Steak\",\n \"quantity\": \"1\",\n \"applied_taxes\": [\n {\n \"uid\": \"aKG87ArnDpvMLSZJHxWUl\",\n \"tax_uid\": \"state-sales-tax\",\n \"applied_money\": {\n \"amount\": 136,\n \"currency\": \"USD\"\n }\n }\n ],\n \"applied_discounts\": [\n {\n \"uid\": \"jWdgP1TpHPFBuVrz81mXVC\",\n \"discount_uid\": \"membership-discount\",\n \"applied_money\": {\n \"amount\": 8,\n \"currency\": \"USD\"\n }\n },\n {\n \"uid\": \"jnZOjjVY57eRcQAVgEwFuC\",\n \"discount_uid\": \"labor-day-sale\",\n \"applied_money\": {\n \"amount\": 79,\n \"currency\": \"USD\"\n }\n }\n ],\n \"base_price_money\": {\n \"amount\": 1599,\n \"currency\": \"USD\"\n },\n \"variation_total_price_money\": {\n \"amount\": 1599,\n \"currency\": \"USD\"\n },\n \"gross_sales_money\": {\n \"amount\": 1599,\n \"currency\": \"USD\"\n },\n \"total_tax_money\": {\n \"amount\": 136,\n \"currency\": \"USD\"\n },\n \"total_discount_money\": {\n \"amount\": 87,\n \"currency\": \"USD\"\n },\n \"total_money\": {\n \"amount\": 1648,\n \"currency\": \"USD\"\n },\n \"total_service_charge_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n },\n {\n \"uid\": \"v8ZuEXpOJpb0bazLuvrLDB\",\n \"name\": \"New York Steak\",\n \"quantity\": \"2\",\n \"catalog_object_id\": \"BEMYCSMIJL46OCDV4KYIKXIB\",\n \"variation_name\": \"Larger\",\n \"modifiers\": [\n {\n \"uid\": \"Lo3qMMckDluu9Qsb58d4CC\",\n \"catalog_object_id\": \"CHQX7Y4KY6N5KINJKZCFURPZ\",\n \"name\": \"Well\",\n \"base_price_money\": {\n \"amount\": 50,\n \"currency\": \"USD\"\n },\n \"total_price_money\": {\n \"amount\": 100,\n \"currency\": \"USD\"\n }\n }\n ],\n \"applied_taxes\": [\n {\n \"uid\": \"v1dAgrfUVUPTnVTf9sRPz\",\n \"tax_uid\": \"state-sales-tax\",\n \"applied_money\": {\n \"amount\": 374,\n \"currency\": \"USD\"\n }\n }\n ],\n \"applied_discounts\": [\n {\n \"uid\": \"nUXvdsIItfKko0dbYtY58C\",\n \"discount_uid\": \"membership-discount\",\n \"applied_money\": {\n \"amount\": 22,\n \"currency\": \"USD\"\n }\n },\n {\n \"uid\": \"qSdkOOOernlVQqsJ94SPjB\",\n \"discount_uid\": \"labor-day-sale\",\n \"applied_money\": {\n \"amount\": 224,\n \"currency\": \"USD\"\n }\n },\n {\n \"uid\": \"y7bVl4njrWAnfDwmz19izB\",\n \"discount_uid\": \"one-dollar-off\",\n \"applied_money\": {\n \"amount\": 100,\n \"currency\": \"USD\"\n }\n }\n ],\n \"base_price_money\": {\n \"amount\": 2200,\n \"currency\": \"USD\"\n },\n \"variation_total_price_money\": {\n \"amount\": 4400,\n \"currency\": \"USD\"\n },\n \"gross_sales_money\": {\n \"amount\": 4500,\n \"currency\": \"USD\"\n },\n \"total_tax_money\": {\n \"amount\": 374,\n \"currency\": \"USD\"\n },\n \"total_discount_money\": {\n \"amount\": 346,\n \"currency\": \"USD\"\n },\n \"total_money\": {\n \"amount\": 4528,\n \"currency\": \"USD\"\n },\n \"total_service_charge_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n }\n ],\n \"taxes\": [\n {\n \"uid\": \"state-sales-tax\",\n \"name\": \"State Sales Tax\",\n \"type\": \"ADDITIVE\",\n \"percentage\": \"9\",\n \"applied_money\": {\n \"amount\": 510,\n \"currency\": \"USD\"\n },\n \"scope\": \"ORDER\"\n }\n ],\n \"discounts\": [\n {\n \"uid\": \"membership-discount\",\n \"catalog_object_id\": \"DB7L55ZH2BGWI4H23ULIWOQ7\",\n \"name\": \"Membership Discount\",\n \"type\": \"FIXED_PERCENTAGE\",\n \"percentage\": \"0.5\",\n \"applied_money\": {\n \"amount\": 30,\n \"currency\": \"USD\"\n },\n \"scope\": \"ORDER\"\n },\n {\n \"uid\": \"labor-day-sale\",\n \"name\": \"Labor Day Sale\",\n \"type\": \"FIXED_PERCENTAGE\",\n \"percentage\": \"5\",\n \"applied_money\": {\n \"amount\": 303,\n \"currency\": \"USD\"\n },\n \"scope\": \"ORDER\"\n },\n {\n \"uid\": \"one-dollar-off\",\n \"name\": \"Sale - $1.00 off\",\n \"type\": \"FIXED_AMOUNT\",\n \"amount_money\": {\n \"amount\": 100,\n \"currency\": \"USD\"\n },\n \"applied_money\": {\n \"amount\": 100,\n \"currency\": \"USD\"\n },\n \"scope\": \"LINE_ITEM\"\n }\n ],\n \"service_charges\": [\n {}\n ],\n \"fulfillments\": [\n {}\n ],\n \"returns\": [\n {}\n ],\n \"net_amounts\": {\n \"total_money\": {\n \"amount\": 6176,\n \"currency\": \"USD\"\n },\n \"tax_money\": {\n \"amount\": 510,\n \"currency\": \"USD\"\n },\n \"discount_money\": {\n \"amount\": 433,\n \"currency\": \"USD\"\n },\n \"tip_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"service_charge_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n },\n \"rounding_adjustment\": {\n \"uid\": \"uid\",\n \"name\": \"name\"\n },\n \"tenders\": [\n {\n \"type\": \"CARD\"\n }\n ],\n \"refunds\": [\n {\n \"id\": \"id\",\n \"location_id\": \"location_id\",\n \"reason\": \"reason\",\n \"amount_money\": {},\n \"status\": \"PENDING\"\n }\n ],\n \"metadata\": {\n \"key\": \"value\"\n },\n \"created_at\": \"2020-01-17T20:47:53.293Z\",\n \"updated_at\": \"2020-01-17T20:47:53.293Z\",\n \"closed_at\": \"closed_at\",\n \"state\": \"OPEN\",\n \"version\": 1,\n \"total_money\": {\n \"amount\": 6176,\n \"currency\": \"USD\"\n },\n \"total_tax_money\": {\n \"amount\": 510,\n \"currency\": \"USD\"\n },\n \"total_discount_money\": {\n \"amount\": 433,\n \"currency\": \"USD\"\n },\n \"total_tip_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"total_service_charge_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"ticket_name\": \"ticket_name\",\n \"pricing_options\": {\n \"auto_apply_discounts\": true,\n \"auto_apply_taxes\": true\n },\n \"rewards\": [\n {\n \"id\": \"id\",\n \"reward_tier_id\": \"reward_tier_id\"\n }\n ],\n \"net_amount_due_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"e9a58865-ce06-4510-9d3d-e08d6085e656","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ced16589-38b2-489d-ae61-10441f6e2263","name":"BatchRetrieveOrders - default","request":{"urlPathTemplate":"/v2/orders/batch-retrieve","method":"POST"},"response":{"status":200,"body":"{\n \"orders\": [\n {\n \"id\": \"CAISEM82RcpmcFBM0TfOyiHV3es\",\n \"location_id\": \"057P5VYJ4A5X1\",\n \"reference_id\": \"my-order-001\",\n \"customer_id\": \"customer_id\",\n \"line_items\": [\n {\n \"uid\": \"945986d1-9586-11e6-ad5a-28cfe92138cf\",\n \"name\": \"Awesome product\",\n \"quantity\": \"1\",\n \"base_price_money\": {\n \"amount\": 1599,\n \"currency\": \"USD\"\n },\n \"total_money\": {\n \"amount\": 1599,\n \"currency\": \"USD\"\n }\n },\n {\n \"uid\": \"a8f4168c-9586-11e6-bdf0-28cfe92138cf\",\n \"name\": \"Another awesome product\",\n \"quantity\": \"3\",\n \"base_price_money\": {\n \"amount\": 2000,\n \"currency\": \"USD\"\n },\n \"total_money\": {\n \"amount\": 6000,\n \"currency\": \"USD\"\n }\n }\n ],\n \"taxes\": [\n {}\n ],\n \"discounts\": [\n {}\n ],\n \"service_charges\": [\n {}\n ],\n \"fulfillments\": [\n {}\n ],\n \"returns\": [\n {}\n ],\n \"tenders\": [\n {\n \"type\": \"CARD\"\n }\n ],\n \"refunds\": [\n {\n \"id\": \"id\",\n \"location_id\": \"location_id\",\n \"reason\": \"reason\",\n \"amount_money\": {},\n \"status\": \"PENDING\"\n }\n ],\n \"created_at\": \"created_at\",\n \"updated_at\": \"updated_at\",\n \"closed_at\": \"closed_at\",\n \"state\": \"OPEN\",\n \"version\": 1,\n \"total_money\": {\n \"amount\": 7599,\n \"currency\": \"USD\"\n },\n \"ticket_name\": \"ticket_name\",\n \"rewards\": [\n {\n \"id\": \"id\",\n \"reward_tier_id\": \"reward_tier_id\"\n }\n ]\n }\n ],\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"ced16589-38b2-489d-ae61-10441f6e2263","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8d12a5d9-c3fa-4817-bf5e-92c962b02cd6","name":"CalculateOrder - default","request":{"urlPathTemplate":"/v2/orders/calculate","method":"POST"},"response":{"status":200,"body":"{\n \"order\": {\n \"id\": \"id\",\n \"location_id\": \"D7AVYMEAPJ3A3\",\n \"reference_id\": \"reference_id\",\n \"source\": {\n \"name\": \"name\"\n },\n \"customer_id\": \"customer_id\",\n \"line_items\": [\n {\n \"uid\": \"ULkg0tQTRK2bkU9fNv3IJD\",\n \"name\": \"Item 1\",\n \"quantity\": \"1\",\n \"applied_discounts\": [\n {\n \"uid\": \"9zr9S4dxvPAixvn0lpa1VC\",\n \"discount_uid\": \"zGsRZP69aqSSR9lq9euSPB\",\n \"applied_money\": {\n \"amount\": 250,\n \"currency\": \"USD\"\n }\n }\n ],\n \"base_price_money\": {\n \"amount\": 500,\n \"currency\": \"USD\"\n },\n \"variation_total_price_money\": {\n \"amount\": 500,\n \"currency\": \"USD\"\n },\n \"gross_sales_money\": {\n \"amount\": 500,\n \"currency\": \"USD\"\n },\n \"total_tax_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"total_discount_money\": {\n \"amount\": 250,\n \"currency\": \"USD\"\n },\n \"total_money\": {\n \"amount\": 250,\n \"currency\": \"USD\"\n },\n \"total_service_charge_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n },\n {\n \"uid\": \"mumY8Nun4BC5aKe2yyx5a\",\n \"name\": \"Item 2\",\n \"quantity\": \"2\",\n \"applied_discounts\": [\n {\n \"uid\": \"qa8LwwZK82FgSEkQc2HYVC\",\n \"discount_uid\": \"zGsRZP69aqSSR9lq9euSPB\",\n \"applied_money\": {\n \"amount\": 300,\n \"currency\": \"USD\"\n }\n }\n ],\n \"base_price_money\": {\n \"amount\": 300,\n \"currency\": \"USD\"\n },\n \"variation_total_price_money\": {\n \"amount\": 600,\n \"currency\": \"USD\"\n },\n \"gross_sales_money\": {\n \"amount\": 600,\n \"currency\": \"USD\"\n },\n \"total_tax_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"total_discount_money\": {\n \"amount\": 300,\n \"currency\": \"USD\"\n },\n \"total_money\": {\n \"amount\": 300,\n \"currency\": \"USD\"\n },\n \"total_service_charge_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n }\n ],\n \"taxes\": [\n {}\n ],\n \"discounts\": [\n {\n \"uid\": \"zGsRZP69aqSSR9lq9euSPB\",\n \"name\": \"50% Off\",\n \"type\": \"FIXED_PERCENTAGE\",\n \"percentage\": \"50\",\n \"applied_money\": {\n \"amount\": 550,\n \"currency\": \"USD\"\n },\n \"scope\": \"ORDER\"\n }\n ],\n \"service_charges\": [\n {}\n ],\n \"fulfillments\": [\n {}\n ],\n \"returns\": [\n {}\n ],\n \"net_amounts\": {\n \"total_money\": {\n \"amount\": 550,\n \"currency\": \"USD\"\n },\n \"tax_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"discount_money\": {\n \"amount\": 550,\n \"currency\": \"USD\"\n },\n \"tip_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"service_charge_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n },\n \"rounding_adjustment\": {\n \"uid\": \"uid\",\n \"name\": \"name\"\n },\n \"tenders\": [\n {\n \"type\": \"CARD\"\n }\n ],\n \"refunds\": [\n {\n \"id\": \"id\",\n \"location_id\": \"location_id\",\n \"reason\": \"reason\",\n \"amount_money\": {},\n \"status\": \"PENDING\"\n }\n ],\n \"metadata\": {\n \"key\": \"value\"\n },\n \"created_at\": \"2020-05-18T16:30:49.614Z\",\n \"updated_at\": \"2020-05-18T16:30:49.614Z\",\n \"closed_at\": \"closed_at\",\n \"state\": \"OPEN\",\n \"version\": 1,\n \"total_money\": {\n \"amount\": 550,\n \"currency\": \"USD\"\n },\n \"total_tax_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"total_discount_money\": {\n \"amount\": 550,\n \"currency\": \"USD\"\n },\n \"total_tip_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"total_service_charge_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"ticket_name\": \"ticket_name\",\n \"pricing_options\": {\n \"auto_apply_discounts\": true,\n \"auto_apply_taxes\": true\n },\n \"rewards\": [\n {\n \"id\": \"id\",\n \"reward_tier_id\": \"reward_tier_id\"\n }\n ],\n \"net_amount_due_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"8d12a5d9-c3fa-4817-bf5e-92c962b02cd6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c2db5d42-d811-4ced-8bac-97950c963335","name":"CloneOrder - default","request":{"urlPathTemplate":"/v2/orders/clone","method":"POST"},"response":{"status":200,"body":"{\n \"order\": {\n \"id\": \"CAISENgvlJ6jLWAzERDzjyHVybY\",\n \"location_id\": \"057P5VYJ4A5X1\",\n \"reference_id\": \"my-order-001\",\n \"source\": {\n \"name\": \"My App\"\n },\n \"customer_id\": \"customer_id\",\n \"line_items\": [\n {\n \"uid\": \"8uSwfzvUImn3IRrvciqlXC\",\n \"name\": \"New York Strip Steak\",\n \"quantity\": \"1\",\n \"applied_taxes\": [\n {\n \"uid\": \"aKG87ArnDpvMLSZJHxWUl\",\n \"tax_uid\": \"state-sales-tax\",\n \"applied_money\": {\n \"amount\": 136,\n \"currency\": \"USD\"\n }\n }\n ],\n \"applied_discounts\": [\n {\n \"uid\": \"jWdgP1TpHPFBuVrz81mXVC\",\n \"discount_uid\": \"membership-discount\",\n \"applied_money\": {\n \"amount\": 8,\n \"currency\": \"USD\"\n }\n },\n {\n \"uid\": \"jnZOjjVY57eRcQAVgEwFuC\",\n \"discount_uid\": \"labor-day-sale\",\n \"applied_money\": {\n \"amount\": 79,\n \"currency\": \"USD\"\n }\n }\n ],\n \"base_price_money\": {\n \"amount\": 1599,\n \"currency\": \"USD\"\n },\n \"variation_total_price_money\": {\n \"amount\": 1599,\n \"currency\": \"USD\"\n },\n \"gross_sales_money\": {\n \"amount\": 1599,\n \"currency\": \"USD\"\n },\n \"total_tax_money\": {\n \"amount\": 136,\n \"currency\": \"USD\"\n },\n \"total_discount_money\": {\n \"amount\": 87,\n \"currency\": \"USD\"\n },\n \"total_money\": {\n \"amount\": 1648,\n \"currency\": \"USD\"\n },\n \"total_service_charge_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n },\n {\n \"uid\": \"v8ZuEXpOJpb0bazLuvrLDB\",\n \"name\": \"New York Steak\",\n \"quantity\": \"2\",\n \"catalog_object_id\": \"BEMYCSMIJL46OCDV4KYIKXIB\",\n \"variation_name\": \"Larger\",\n \"modifiers\": [\n {\n \"uid\": \"Lo3qMMckDluu9Qsb58d4CC\",\n \"catalog_object_id\": \"CHQX7Y4KY6N5KINJKZCFURPZ\",\n \"name\": \"Well\",\n \"base_price_money\": {\n \"amount\": 50,\n \"currency\": \"USD\"\n },\n \"total_price_money\": {\n \"amount\": 100,\n \"currency\": \"USD\"\n }\n }\n ],\n \"applied_taxes\": [\n {\n \"uid\": \"v1dAgrfUVUPTnVTf9sRPz\",\n \"tax_uid\": \"state-sales-tax\",\n \"applied_money\": {\n \"amount\": 374,\n \"currency\": \"USD\"\n }\n }\n ],\n \"applied_discounts\": [\n {\n \"uid\": \"nUXvdsIItfKko0dbYtY58C\",\n \"discount_uid\": \"membership-discount\",\n \"applied_money\": {\n \"amount\": 22,\n \"currency\": \"USD\"\n }\n },\n {\n \"uid\": \"qSdkOOOernlVQqsJ94SPjB\",\n \"discount_uid\": \"labor-day-sale\",\n \"applied_money\": {\n \"amount\": 224,\n \"currency\": \"USD\"\n }\n },\n {\n \"uid\": \"y7bVl4njrWAnfDwmz19izB\",\n \"discount_uid\": \"one-dollar-off\",\n \"applied_money\": {\n \"amount\": 100,\n \"currency\": \"USD\"\n }\n }\n ],\n \"base_price_money\": {\n \"amount\": 2200,\n \"currency\": \"USD\"\n },\n \"variation_total_price_money\": {\n \"amount\": 4400,\n \"currency\": \"USD\"\n },\n \"gross_sales_money\": {\n \"amount\": 4500,\n \"currency\": \"USD\"\n },\n \"total_tax_money\": {\n \"amount\": 374,\n \"currency\": \"USD\"\n },\n \"total_discount_money\": {\n \"amount\": 346,\n \"currency\": \"USD\"\n },\n \"total_money\": {\n \"amount\": 4528,\n \"currency\": \"USD\"\n },\n \"total_service_charge_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n }\n ],\n \"taxes\": [\n {\n \"uid\": \"state-sales-tax\",\n \"name\": \"State Sales Tax\",\n \"type\": \"ADDITIVE\",\n \"percentage\": \"9\",\n \"applied_money\": {\n \"amount\": 510,\n \"currency\": \"USD\"\n },\n \"scope\": \"ORDER\"\n }\n ],\n \"discounts\": [\n {\n \"uid\": \"membership-discount\",\n \"catalog_object_id\": \"DB7L55ZH2BGWI4H23ULIWOQ7\",\n \"name\": \"Membership Discount\",\n \"type\": \"FIXED_PERCENTAGE\",\n \"percentage\": \"0.5\",\n \"applied_money\": {\n \"amount\": 30,\n \"currency\": \"USD\"\n },\n \"scope\": \"ORDER\"\n },\n {\n \"uid\": \"labor-day-sale\",\n \"name\": \"Labor Day Sale\",\n \"type\": \"FIXED_PERCENTAGE\",\n \"percentage\": \"5\",\n \"applied_money\": {\n \"amount\": 303,\n \"currency\": \"USD\"\n },\n \"scope\": \"ORDER\"\n },\n {\n \"uid\": \"one-dollar-off\",\n \"name\": \"Sale - $1.00 off\",\n \"type\": \"FIXED_AMOUNT\",\n \"amount_money\": {\n \"amount\": 100,\n \"currency\": \"USD\"\n },\n \"applied_money\": {\n \"amount\": 100,\n \"currency\": \"USD\"\n },\n \"scope\": \"LINE_ITEM\"\n }\n ],\n \"service_charges\": [\n {}\n ],\n \"fulfillments\": [\n {}\n ],\n \"returns\": [\n {}\n ],\n \"net_amounts\": {\n \"total_money\": {\n \"amount\": 6176,\n \"currency\": \"USD\"\n },\n \"tax_money\": {\n \"amount\": 510,\n \"currency\": \"USD\"\n },\n \"discount_money\": {\n \"amount\": 433,\n \"currency\": \"USD\"\n },\n \"tip_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"service_charge_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n },\n \"rounding_adjustment\": {\n \"uid\": \"uid\",\n \"name\": \"name\"\n },\n \"tenders\": [\n {\n \"type\": \"CARD\"\n }\n ],\n \"refunds\": [\n {\n \"id\": \"id\",\n \"location_id\": \"location_id\",\n \"reason\": \"reason\",\n \"amount_money\": {},\n \"status\": \"PENDING\"\n }\n ],\n \"metadata\": {\n \"key\": \"value\"\n },\n \"created_at\": \"2020-01-17T20:47:53.293Z\",\n \"updated_at\": \"2020-01-17T20:47:53.293Z\",\n \"closed_at\": \"closed_at\",\n \"state\": \"DRAFT\",\n \"version\": 1,\n \"total_money\": {\n \"amount\": 6176,\n \"currency\": \"USD\"\n },\n \"total_tax_money\": {\n \"amount\": 510,\n \"currency\": \"USD\"\n },\n \"total_discount_money\": {\n \"amount\": 433,\n \"currency\": \"USD\"\n },\n \"total_tip_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"total_service_charge_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"ticket_name\": \"ticket_name\",\n \"pricing_options\": {\n \"auto_apply_discounts\": true,\n \"auto_apply_taxes\": true\n },\n \"rewards\": [\n {\n \"id\": \"id\",\n \"reward_tier_id\": \"reward_tier_id\"\n }\n ],\n \"net_amount_due_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"c2db5d42-d811-4ced-8bac-97950c963335","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4ba49b1f-f5bb-47a0-bf09-c9e04683996f","name":"SearchOrders - default","request":{"urlPathTemplate":"/v2/orders/search","method":"POST"},"response":{"status":200,"body":"{\n \"order_entries\": [\n {\n \"order_id\": \"CAISEM82RcpmcFBM0TfOyiHV3es\",\n \"version\": 1,\n \"location_id\": \"057P5VYJ4A5X1\"\n },\n {\n \"order_id\": \"CAISENgvlJ6jLWAzERDzjyHVybY\",\n \"version\": 1,\n \"location_id\": \"18YC4JDH91E1H\"\n },\n {\n \"order_id\": \"CAISEM52YcpmcWAzERDOyiWS3ty\",\n \"version\": 1,\n \"location_id\": \"057P5VYJ4A5X1\"\n }\n ],\n \"orders\": [\n {\n \"id\": \"id\",\n \"location_id\": \"location_id\",\n \"reference_id\": \"reference_id\",\n \"customer_id\": \"customer_id\",\n \"line_items\": [\n {\n \"quantity\": \"quantity\"\n }\n ],\n \"taxes\": [\n {}\n ],\n \"discounts\": [\n {}\n ],\n \"service_charges\": [\n {}\n ],\n \"fulfillments\": [\n {}\n ],\n \"returns\": [\n {}\n ],\n \"tenders\": [\n {\n \"type\": \"CARD\"\n }\n ],\n \"refunds\": [\n {\n \"id\": \"id\",\n \"location_id\": \"location_id\",\n \"reason\": \"reason\",\n \"amount_money\": {},\n \"status\": \"PENDING\"\n }\n ],\n \"created_at\": \"created_at\",\n \"updated_at\": \"updated_at\",\n \"closed_at\": \"closed_at\",\n \"state\": \"OPEN\",\n \"version\": 1,\n \"ticket_name\": \"ticket_name\",\n \"rewards\": [\n {\n \"id\": \"id\",\n \"reward_tier_id\": \"reward_tier_id\"\n }\n ]\n }\n ],\n \"cursor\": \"123\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"4ba49b1f-f5bb-47a0-bf09-c9e04683996f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c4a4d5f2-7ad8-4e47-ad19-0f83b902586a","name":"RetrieveOrder - default","request":{"urlPathTemplate":"/v2/orders/{order_id}","method":"GET","pathParameters":{"order_id":{"equalTo":"order_id"}}},"response":{"status":200,"body":"{\n \"order\": {\n \"id\": \"CAISENgvlJ6jLWAzERDzjyHVybY\",\n \"location_id\": \"D7AVYMEAPJ3A3\",\n \"reference_id\": \"reference_id\",\n \"source\": {\n \"name\": \"name\"\n },\n \"customer_id\": \"customer_id\",\n \"line_items\": [\n {\n \"uid\": \"ULkg0tQTRK2bkU9fNv3IJD\",\n \"name\": \"Item 1\",\n \"quantity\": \"1\",\n \"applied_discounts\": [\n {\n \"uid\": \"9zr9S4dxvPAixvn0lpa1VC\",\n \"discount_uid\": \"zGsRZP69aqSSR9lq9euSPB\",\n \"applied_money\": {\n \"amount\": 250,\n \"currency\": \"USD\"\n }\n }\n ],\n \"base_price_money\": {\n \"amount\": 500,\n \"currency\": \"USD\"\n },\n \"variation_total_price_money\": {\n \"amount\": 500,\n \"currency\": \"USD\"\n },\n \"gross_sales_money\": {\n \"amount\": 500,\n \"currency\": \"USD\"\n },\n \"total_tax_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"total_discount_money\": {\n \"amount\": 250,\n \"currency\": \"USD\"\n },\n \"total_money\": {\n \"amount\": 250,\n \"currency\": \"USD\"\n },\n \"total_service_charge_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n },\n {\n \"uid\": \"mumY8Nun4BC5aKe2yyx5a\",\n \"name\": \"Item 2\",\n \"quantity\": \"2\",\n \"applied_discounts\": [\n {\n \"uid\": \"qa8LwwZK82FgSEkQc2HYVC\",\n \"discount_uid\": \"zGsRZP69aqSSR9lq9euSPB\",\n \"applied_money\": {\n \"amount\": 300,\n \"currency\": \"USD\"\n }\n }\n ],\n \"base_price_money\": {\n \"amount\": 300,\n \"currency\": \"USD\"\n },\n \"variation_total_price_money\": {\n \"amount\": 600,\n \"currency\": \"USD\"\n },\n \"gross_sales_money\": {\n \"amount\": 600,\n \"currency\": \"USD\"\n },\n \"total_tax_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"total_discount_money\": {\n \"amount\": 300,\n \"currency\": \"USD\"\n },\n \"total_money\": {\n \"amount\": 300,\n \"currency\": \"USD\"\n },\n \"total_service_charge_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n }\n ],\n \"taxes\": [\n {}\n ],\n \"discounts\": [\n {\n \"uid\": \"zGsRZP69aqSSR9lq9euSPB\",\n \"name\": \"50% Off\",\n \"type\": \"FIXED_PERCENTAGE\",\n \"percentage\": \"50\",\n \"applied_money\": {\n \"amount\": 550,\n \"currency\": \"USD\"\n },\n \"scope\": \"ORDER\"\n }\n ],\n \"service_charges\": [\n {}\n ],\n \"fulfillments\": [\n {}\n ],\n \"returns\": [\n {}\n ],\n \"net_amounts\": {\n \"total_money\": {\n \"amount\": 550,\n \"currency\": \"USD\"\n },\n \"tax_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"discount_money\": {\n \"amount\": 550,\n \"currency\": \"USD\"\n },\n \"tip_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"service_charge_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n },\n \"rounding_adjustment\": {\n \"uid\": \"uid\",\n \"name\": \"name\"\n },\n \"tenders\": [\n {\n \"type\": \"CARD\"\n }\n ],\n \"refunds\": [\n {\n \"id\": \"id\",\n \"location_id\": \"location_id\",\n \"reason\": \"reason\",\n \"amount_money\": {},\n \"status\": \"PENDING\"\n }\n ],\n \"metadata\": {\n \"key\": \"value\"\n },\n \"created_at\": \"2020-05-18T16:30:49.614Z\",\n \"updated_at\": \"2020-05-18T16:30:49.614Z\",\n \"closed_at\": \"closed_at\",\n \"state\": \"OPEN\",\n \"version\": 1,\n \"total_money\": {\n \"amount\": 550,\n \"currency\": \"USD\"\n },\n \"total_tax_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"total_discount_money\": {\n \"amount\": 550,\n \"currency\": \"USD\"\n },\n \"total_tip_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"total_service_charge_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"ticket_name\": \"ticket_name\",\n \"pricing_options\": {\n \"auto_apply_discounts\": true,\n \"auto_apply_taxes\": true\n },\n \"rewards\": [\n {\n \"id\": \"id\",\n \"reward_tier_id\": \"reward_tier_id\"\n }\n ],\n \"net_amount_due_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"c4a4d5f2-7ad8-4e47-ad19-0f83b902586a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"81532f3d-7452-4275-9e72-3073e5625b85","name":"UpdateOrder - default","request":{"urlPathTemplate":"/v2/orders/{order_id}","method":"PUT","pathParameters":{"order_id":{"equalTo":"order_id"}}},"response":{"status":200,"body":"{\n \"order\": {\n \"id\": \"DREk7wJcyXNHqULq8JJ2iPAsluJZY\",\n \"location_id\": \"MXVQSVNDGN3C8\",\n \"reference_id\": \"reference_id\",\n \"source\": {\n \"name\": \"Cookies\"\n },\n \"customer_id\": \"customer_id\",\n \"line_items\": [\n {\n \"uid\": \"EuYkakhmu3ksHIds5Hiot\",\n \"name\": \"Small Coffee\",\n \"quantity\": \"1\",\n \"base_price_money\": {\n \"amount\": 500,\n \"currency\": \"USD\"\n },\n \"variation_total_price_money\": {\n \"amount\": 500,\n \"currency\": \"USD\"\n },\n \"gross_sales_money\": {\n \"amount\": 500,\n \"currency\": \"USD\"\n },\n \"total_tax_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"total_discount_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"total_money\": {\n \"amount\": 500,\n \"currency\": \"USD\"\n },\n \"total_service_charge_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n },\n {\n \"uid\": \"cookie_uid\",\n \"name\": \"COOKIE\",\n \"quantity\": \"2\",\n \"base_price_money\": {\n \"amount\": 200,\n \"currency\": \"USD\"\n },\n \"variation_total_price_money\": {\n \"amount\": 400,\n \"currency\": \"USD\"\n },\n \"gross_sales_money\": {\n \"amount\": 400,\n \"currency\": \"USD\"\n },\n \"total_tax_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"total_discount_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"total_money\": {\n \"amount\": 400,\n \"currency\": \"USD\"\n },\n \"total_service_charge_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n }\n ],\n \"taxes\": [\n {}\n ],\n \"discounts\": [\n {}\n ],\n \"service_charges\": [\n {}\n ],\n \"fulfillments\": [\n {}\n ],\n \"returns\": [\n {}\n ],\n \"net_amounts\": {\n \"total_money\": {\n \"amount\": 900,\n \"currency\": \"USD\"\n },\n \"tax_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"discount_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"service_charge_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n },\n \"rounding_adjustment\": {\n \"uid\": \"uid\",\n \"name\": \"name\"\n },\n \"tenders\": [\n {\n \"type\": \"CARD\"\n }\n ],\n \"refunds\": [\n {\n \"id\": \"id\",\n \"location_id\": \"location_id\",\n \"reason\": \"reason\",\n \"amount_money\": {},\n \"status\": \"PENDING\"\n }\n ],\n \"metadata\": {\n \"key\": \"value\"\n },\n \"created_at\": \"2019-08-23T18:26:18.243Z\",\n \"updated_at\": \"2019-08-23T18:33:47.523Z\",\n \"closed_at\": \"closed_at\",\n \"state\": \"OPEN\",\n \"version\": 2,\n \"total_money\": {\n \"amount\": 900,\n \"currency\": \"USD\"\n },\n \"total_tax_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"total_discount_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"total_tip_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"total_service_charge_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"ticket_name\": \"ticket_name\",\n \"pricing_options\": {\n \"auto_apply_discounts\": true,\n \"auto_apply_taxes\": true\n },\n \"rewards\": [\n {\n \"id\": \"id\",\n \"reward_tier_id\": \"reward_tier_id\"\n }\n ],\n \"net_amount_due_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"81532f3d-7452-4275-9e72-3073e5625b85","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f20fe859-6d3b-4e40-9376-665f2ce27499","name":"PayOrder - default","request":{"urlPathTemplate":"/v2/orders/{order_id}/pay","method":"POST","pathParameters":{"order_id":{"equalTo":"order_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"order\": {\n \"id\": \"lgwOlEityYPJtcuvKTVKT1pA986YY\",\n \"location_id\": \"P3CCK6HSNDAS7\",\n \"reference_id\": \"reference_id\",\n \"source\": {\n \"name\": \"Source Name\"\n },\n \"customer_id\": \"customer_id\",\n \"line_items\": [\n {\n \"uid\": \"QW6kofLHJK7JEKMjlSVP5C\",\n \"name\": \"Item 1\",\n \"quantity\": \"1\",\n \"base_price_money\": {\n \"amount\": 500,\n \"currency\": \"USD\"\n },\n \"gross_sales_money\": {\n \"amount\": 500,\n \"currency\": \"USD\"\n },\n \"total_tax_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"total_discount_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"total_money\": {\n \"amount\": 500,\n \"currency\": \"USD\"\n },\n \"total_service_charge_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n },\n {\n \"uid\": \"zhw8MNfRGdFQMI2WE1UBJD\",\n \"name\": \"Item 2\",\n \"quantity\": \"2\",\n \"base_price_money\": {\n \"amount\": 750,\n \"currency\": \"USD\"\n },\n \"gross_sales_money\": {\n \"amount\": 1500,\n \"currency\": \"USD\"\n },\n \"total_tax_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"total_discount_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"total_money\": {\n \"amount\": 1500,\n \"currency\": \"USD\"\n },\n \"total_service_charge_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n }\n ],\n \"taxes\": [\n {}\n ],\n \"discounts\": [\n {}\n ],\n \"service_charges\": [\n {}\n ],\n \"fulfillments\": [\n {}\n ],\n \"returns\": [\n {}\n ],\n \"net_amounts\": {\n \"total_money\": {\n \"amount\": 2000,\n \"currency\": \"USD\"\n },\n \"tax_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"discount_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"tip_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"service_charge_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n },\n \"rounding_adjustment\": {\n \"uid\": \"uid\",\n \"name\": \"name\"\n },\n \"tenders\": [\n {\n \"id\": \"EnZdNAlWCmfh6Mt5FMNST1o7taB\",\n \"location_id\": \"P3CCK6HSNDAS7\",\n \"transaction_id\": \"lgwOlEityYPJtcuvKTVKT1pA986YY\",\n \"created_at\": \"2019-08-06T02:47:36.293Z\",\n \"amount_money\": {\n \"amount\": 1000,\n \"currency\": \"USD\"\n },\n \"type\": \"CARD\",\n \"card_details\": {\n \"status\": \"CAPTURED\",\n \"card\": {\n \"card_brand\": \"VISA\",\n \"last_4\": \"1111\",\n \"exp_month\": 2,\n \"exp_year\": 2022,\n \"fingerprint\": \"sq-1-n_BL15KP87ClDa4-h2nXOI0fp5VnxNH6hfhzqhptTfAgxgLuGFcg6jIPngDz4IkkTQ\"\n },\n \"entry_method\": \"KEYED\"\n },\n \"payment_id\": \"EnZdNAlWCmfh6Mt5FMNST1o7taB\"\n },\n {\n \"id\": \"0LRiVlbXVwe8ozu4KbZxd12mvaB\",\n \"location_id\": \"P3CCK6HSNDAS7\",\n \"transaction_id\": \"lgwOlEityYPJtcuvKTVKT1pA986YY\",\n \"created_at\": \"2019-08-06T02:47:36.809Z\",\n \"amount_money\": {\n \"amount\": 1000,\n \"currency\": \"USD\"\n },\n \"type\": \"CARD\",\n \"card_details\": {\n \"status\": \"CAPTURED\",\n \"card\": {\n \"card_brand\": \"VISA\",\n \"last_4\": \"1111\",\n \"exp_month\": 2,\n \"exp_year\": 2022,\n \"fingerprint\": \"sq-1-n_BL15KP87ClDa4-h2nXOI0fp5VnxNH6hfhzqhptTfAgxgLuGFcg6jIPngDz4IkkTQ\"\n },\n \"entry_method\": \"KEYED\"\n },\n \"payment_id\": \"0LRiVlbXVwe8ozu4KbZxd12mvaB\"\n }\n ],\n \"refunds\": [\n {\n \"id\": \"id\",\n \"location_id\": \"location_id\",\n \"reason\": \"reason\",\n \"amount_money\": {},\n \"status\": \"PENDING\"\n }\n ],\n \"metadata\": {\n \"key\": \"value\"\n },\n \"created_at\": \"2019-08-06T02:47:35.693Z\",\n \"updated_at\": \"2019-08-06T02:47:37.140Z\",\n \"closed_at\": \"2019-08-06T02:47:37.140Z\",\n \"state\": \"COMPLETED\",\n \"version\": 4,\n \"total_money\": {\n \"amount\": 2000,\n \"currency\": \"USD\"\n },\n \"total_tax_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"total_discount_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"total_tip_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"total_service_charge_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"ticket_name\": \"ticket_name\",\n \"pricing_options\": {\n \"auto_apply_discounts\": true,\n \"auto_apply_taxes\": true\n },\n \"rewards\": [\n {\n \"id\": \"id\",\n \"reward_tier_id\": \"reward_tier_id\"\n }\n ],\n \"net_amount_due_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"f20fe859-6d3b-4e40-9376-665f2ce27499","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6088c3de-7358-4713-8f5a-10866274a07c","name":"ListPayments - default","request":{"urlPathTemplate":"/v2/payments","method":"GET","queryParameters":{"begin_time":{"equalTo":"begin_time"},"end_time":{"equalTo":"end_time"},"sort_order":{"equalTo":"sort_order"},"cursor":{"equalTo":"cursor"},"location_id":{"equalTo":"location_id"},"total":{"equalTo":"1000000"},"last_4":{"equalTo":"last_4"},"card_brand":{"equalTo":"card_brand"},"limit":{"equalTo":"1"},"is_offline_payment":{"equalTo":"true"},"offline_begin_time":{"equalTo":"offline_begin_time"},"offline_end_time":{"equalTo":"offline_end_time"},"updated_at_begin_time":{"equalTo":"updated_at_begin_time"},"updated_at_end_time":{"equalTo":"updated_at_end_time"},"sort_field":{"equalTo":"CREATED_AT"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"payments\": [\n {\n \"id\": \"bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY\",\n \"created_at\": \"2021-10-13T19:34:33.524Z\",\n \"updated_at\": \"2021-10-13T19:34:37.261Z\",\n \"amount_money\": {\n \"amount\": 555,\n \"currency\": \"USD\"\n },\n \"total_money\": {\n \"amount\": 555,\n \"currency\": \"USD\"\n },\n \"approved_money\": {\n \"amount\": 555,\n \"currency\": \"USD\"\n },\n \"processing_fee\": [\n {\n \"effective_at\": \"2021-10-13T21:34:35.000Z\",\n \"type\": \"INITIAL\",\n \"amount_money\": {\n \"amount\": 34,\n \"currency\": \"USD\"\n }\n }\n ],\n \"status\": \"COMPLETED\",\n \"delay_duration\": \"PT168H\",\n \"delay_action\": \"CANCEL\",\n \"delayed_until\": \"2021-10-20T19:34:33.524Z\",\n \"source_type\": \"CARD\",\n \"card_details\": {\n \"status\": \"CAPTURED\",\n \"card\": {\n \"card_brand\": \"VISA\",\n \"last_4\": \"1111\",\n \"exp_month\": 11,\n \"exp_year\": 2022,\n \"fingerprint\": \"sq-1-Hxim77tbdcbGejOejnoAklBVJed2YFLTmirfl8Q5XZzObTc8qY_U8RkwzoNL8dCEcQ\",\n \"card_type\": \"DEBIT\",\n \"prepaid_type\": \"NOT_PREPAID\",\n \"bin\": \"411111\"\n },\n \"entry_method\": \"KEYED\",\n \"cvv_status\": \"CVV_ACCEPTED\",\n \"avs_status\": \"AVS_ACCEPTED\",\n \"auth_result_code\": \"2Nkw7q\",\n \"statement_description\": \"SQ *EXAMPLE TEST GOSQ.C\",\n \"card_payment_timeline\": {\n \"authorized_at\": \"2021-10-13T19:34:33.680Z\",\n \"captured_at\": \"2021-10-13T19:34:34.340Z\"\n }\n },\n \"cash_details\": {\n \"buyer_supplied_money\": {}\n },\n \"external_details\": {\n \"type\": \"type\",\n \"source\": \"source\"\n },\n \"location_id\": \"L88917AVBK2S5\",\n \"order_id\": \"d7eKah653Z579f3gVtjlxpSlmUcZY\",\n \"reference_id\": \"reference_id\",\n \"customer_id\": \"customer_id\",\n \"employee_id\": \"TMoK_ogh6rH1o4dV\",\n \"team_member_id\": \"TMoK_ogh6rH1o4dV\",\n \"refund_ids\": [\n \"refund_ids\"\n ],\n \"terminal_checkout_id\": \"terminal_checkout_id\",\n \"buyer_email_address\": \"buyer_email_address\",\n \"note\": \"Test Note\",\n \"statement_description_identifier\": \"statement_description_identifier\",\n \"capabilities\": [\n \"capabilities\"\n ],\n \"receipt_number\": \"bP9m\",\n \"receipt_url\": \"https://squareup.com/receipt/preview/bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY\",\n \"application_details\": {\n \"square_product\": \"VIRTUAL_TERMINAL\",\n \"application_id\": \"sq0ids-Pw67AZAlLVB7hsRmwlJPuA\"\n },\n \"is_offline_payment\": true,\n \"version_token\": \"vguW2km0KpVCdAXZcNTZ438qg5LlVPTP4HO5OpiHNfa6o\"\n }\n ],\n \"cursor\": \"cursor\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"6088c3de-7358-4713-8f5a-10866274a07c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"34aec6e7-1065-4637-a03a-d88de56f5090","name":"CreatePayment - default","request":{"urlPathTemplate":"/v2/payments","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"payment\": {\n \"id\": \"R2B3Z8WMVt3EAmzYWLZvz7Y69EbZY\",\n \"created_at\": \"2021-10-13T21:14:29.577Z\",\n \"updated_at\": \"2021-10-13T21:14:30.504Z\",\n \"amount_money\": {\n \"amount\": 1000,\n \"currency\": \"USD\"\n },\n \"tip_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"total_money\": {\n \"amount\": 1000,\n \"currency\": \"USD\"\n },\n \"app_fee_money\": {\n \"amount\": 10,\n \"currency\": \"USD\"\n },\n \"approved_money\": {\n \"amount\": 1000,\n \"currency\": \"USD\"\n },\n \"processing_fee\": [\n {}\n ],\n \"refunded_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"status\": \"COMPLETED\",\n \"delay_duration\": \"PT168H\",\n \"delay_action\": \"CANCEL\",\n \"delayed_until\": \"2021-10-20T21:14:29.577Z\",\n \"source_type\": \"CARD\",\n \"card_details\": {\n \"status\": \"CAPTURED\",\n \"card\": {\n \"card_brand\": \"VISA\",\n \"last_4\": \"1111\",\n \"exp_month\": 11,\n \"exp_year\": 2022,\n \"fingerprint\": \"sq-1-Hxim77tbdcbGejOejnoAklBVJed2YFLTmirfl8Q5XZzObTc8qY_U8RkwzoNL8dCEcQ\",\n \"card_type\": \"DEBIT\",\n \"prepaid_type\": \"NOT_PREPAID\",\n \"bin\": \"411111\"\n },\n \"entry_method\": \"ON_FILE\",\n \"cvv_status\": \"CVV_ACCEPTED\",\n \"avs_status\": \"AVS_ACCEPTED\",\n \"auth_result_code\": \"vNEn2f\",\n \"application_identifier\": \"application_identifier\",\n \"application_name\": \"application_name\",\n \"application_cryptogram\": \"application_cryptogram\",\n \"verification_method\": \"verification_method\",\n \"verification_results\": \"verification_results\",\n \"statement_description\": \"SQ *EXAMPLE TEST GOSQ.C\",\n \"card_payment_timeline\": {\n \"authorized_at\": \"2021-10-13T21:14:29.732Z\",\n \"captured_at\": \"2021-10-13T21:14:30.504Z\"\n },\n \"refund_requires_card_presence\": true,\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"cash_details\": {\n \"buyer_supplied_money\": {}\n },\n \"bank_account_details\": {\n \"bank_name\": \"bank_name\",\n \"transfer_type\": \"transfer_type\",\n \"account_ownership_type\": \"account_ownership_type\",\n \"fingerprint\": \"fingerprint\",\n \"country\": \"country\",\n \"statement_description\": \"statement_description\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"external_details\": {\n \"type\": \"type\",\n \"source\": \"source\",\n \"source_id\": \"source_id\"\n },\n \"wallet_details\": {\n \"status\": \"status\",\n \"brand\": \"brand\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"buy_now_pay_later_details\": {\n \"brand\": \"brand\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"square_account_details\": {\n \"payment_source_token\": \"payment_source_token\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"location_id\": \"L88917AVBK2S5\",\n \"order_id\": \"pRsjRTgFWATl7so6DxdKBJa7ssbZY\",\n \"reference_id\": \"123456\",\n \"customer_id\": \"W92WH6P11H4Z77CTET0RNTGFW8\",\n \"employee_id\": \"employee_id\",\n \"team_member_id\": \"team_member_id\",\n \"refund_ids\": [\n \"refund_ids\"\n ],\n \"risk_evaluation\": {\n \"created_at\": \"2021-10-13T21:14:30.423Z\",\n \"risk_level\": \"NORMAL\"\n },\n \"terminal_checkout_id\": \"terminal_checkout_id\",\n \"buyer_email_address\": \"buyer_email_address\",\n \"billing_address\": {\n \"address_line_1\": \"address_line_1\",\n \"address_line_2\": \"address_line_2\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"locality\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"administrative_district_level_1\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"postal_code\",\n \"country\": \"ZZ\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n },\n \"shipping_address\": {\n \"address_line_1\": \"address_line_1\",\n \"address_line_2\": \"address_line_2\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"locality\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"administrative_district_level_1\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"postal_code\",\n \"country\": \"ZZ\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n },\n \"note\": \"Brief Description\",\n \"statement_description_identifier\": \"statement_description_identifier\",\n \"capabilities\": [\n \"capabilities\"\n ],\n \"receipt_number\": \"R2B3\",\n \"receipt_url\": \"https://squareup.com/receipt/preview/EXAMPLE_RECEIPT_ID\",\n \"device_details\": {\n \"device_id\": \"device_id\",\n \"device_installation_id\": \"device_installation_id\",\n \"device_name\": \"device_name\"\n },\n \"application_details\": {\n \"square_product\": \"ECOMMERCE_API\",\n \"application_id\": \"sq0ids-TcgftTEtKxJTRF1lCFJ9TA\"\n },\n \"is_offline_payment\": true,\n \"offline_payment_details\": {\n \"client_created_at\": \"client_created_at\"\n },\n \"version_token\": \"TPtNEOBOa6Qq6E3C3IjckSVOM6b3hMbfhjvTxHBQUsB6o\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"34aec6e7-1065-4637-a03a-d88de56f5090","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c124ca81-a10e-4f28-8141-3f42dea3a815","name":"CancelPaymentByIdempotencyKey - default","request":{"urlPathTemplate":"/v2/payments/cancel","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"c124ca81-a10e-4f28-8141-3f42dea3a815","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d99bfa00-d04d-44ef-84ae-dd030be94106","name":"GetPayment - default","request":{"urlPathTemplate":"/v2/payments/{payment_id}","method":"GET","pathParameters":{"payment_id":{"equalTo":"payment_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"payment\": {\n \"id\": \"bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY\",\n \"created_at\": \"2021-10-13T19:34:33.524Z\",\n \"updated_at\": \"2021-10-13T19:34:34.339Z\",\n \"amount_money\": {\n \"amount\": 555,\n \"currency\": \"USD\"\n },\n \"tip_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"total_money\": {\n \"amount\": 555,\n \"currency\": \"USD\"\n },\n \"app_fee_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"approved_money\": {\n \"amount\": 555,\n \"currency\": \"USD\"\n },\n \"processing_fee\": [\n {\n \"effective_at\": \"2021-10-13T21:34:35.000Z\",\n \"type\": \"INITIAL\",\n \"amount_money\": {\n \"amount\": 34,\n \"currency\": \"USD\"\n }\n }\n ],\n \"refunded_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"status\": \"COMPLETED\",\n \"delay_duration\": \"PT168H\",\n \"delay_action\": \"CANCEL\",\n \"delayed_until\": \"2021-10-20T19:34:33.524Z\",\n \"source_type\": \"CARD\",\n \"card_details\": {\n \"status\": \"CAPTURED\",\n \"card\": {\n \"card_brand\": \"VISA\",\n \"last_4\": \"1111\",\n \"exp_month\": 11,\n \"exp_year\": 2022,\n \"fingerprint\": \"sq-1-Hxim77tbdcbGejOejnoAklBVJed2YFLTmirfl8Q5XZzObTc8qY_U8RkwzoNL8dCEcQ\",\n \"card_type\": \"DEBIT\",\n \"prepaid_type\": \"NOT_PREPAID\",\n \"bin\": \"411111\"\n },\n \"entry_method\": \"KEYED\",\n \"cvv_status\": \"CVV_ACCEPTED\",\n \"avs_status\": \"AVS_ACCEPTED\",\n \"auth_result_code\": \"2Nkw7q\",\n \"application_identifier\": \"application_identifier\",\n \"application_name\": \"application_name\",\n \"application_cryptogram\": \"application_cryptogram\",\n \"verification_method\": \"verification_method\",\n \"verification_results\": \"verification_results\",\n \"statement_description\": \"SQ *EXAMPLE TEST GOSQ.C\",\n \"card_payment_timeline\": {\n \"authorized_at\": \"2021-10-13T19:34:33.680Z\",\n \"captured_at\": \"2021-10-13T19:34:34.340Z\"\n },\n \"refund_requires_card_presence\": true,\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"cash_details\": {\n \"buyer_supplied_money\": {}\n },\n \"bank_account_details\": {\n \"bank_name\": \"bank_name\",\n \"transfer_type\": \"transfer_type\",\n \"account_ownership_type\": \"account_ownership_type\",\n \"fingerprint\": \"fingerprint\",\n \"country\": \"country\",\n \"statement_description\": \"statement_description\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"external_details\": {\n \"type\": \"type\",\n \"source\": \"source\",\n \"source_id\": \"source_id\"\n },\n \"wallet_details\": {\n \"status\": \"status\",\n \"brand\": \"brand\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"buy_now_pay_later_details\": {\n \"brand\": \"brand\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"square_account_details\": {\n \"payment_source_token\": \"payment_source_token\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"location_id\": \"L88917AVBK2S5\",\n \"order_id\": \"d7eKah653Z579f3gVtjlxpSlmUcZY\",\n \"reference_id\": \"reference_id\",\n \"customer_id\": \"customer_id\",\n \"employee_id\": \"TMoK_ogh6rH1o4dV\",\n \"team_member_id\": \"TMoK_ogh6rH1o4dV\",\n \"refund_ids\": [\n \"refund_ids\"\n ],\n \"risk_evaluation\": {\n \"created_at\": \"created_at\",\n \"risk_level\": \"PENDING\"\n },\n \"terminal_checkout_id\": \"terminal_checkout_id\",\n \"buyer_email_address\": \"buyer_email_address\",\n \"billing_address\": {\n \"address_line_1\": \"address_line_1\",\n \"address_line_2\": \"address_line_2\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"locality\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"administrative_district_level_1\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"postal_code\",\n \"country\": \"ZZ\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n },\n \"shipping_address\": {\n \"address_line_1\": \"address_line_1\",\n \"address_line_2\": \"address_line_2\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"locality\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"administrative_district_level_1\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"postal_code\",\n \"country\": \"ZZ\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n },\n \"note\": \"Test Note\",\n \"statement_description_identifier\": \"statement_description_identifier\",\n \"capabilities\": [\n \"capabilities\"\n ],\n \"receipt_number\": \"bP9m\",\n \"receipt_url\": \"https://squareup.com/receipt/preview/bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY\",\n \"device_details\": {\n \"device_id\": \"device_id\",\n \"device_installation_id\": \"device_installation_id\",\n \"device_name\": \"device_name\"\n },\n \"application_details\": {\n \"square_product\": \"VIRTUAL_TERMINAL\",\n \"application_id\": \"sq0ids-Pw67AZAlLVB7hsRmwlJPuA\"\n },\n \"is_offline_payment\": true,\n \"offline_payment_details\": {\n \"client_created_at\": \"client_created_at\"\n },\n \"version_token\": \"56pRkL3slrzet2iQrTp9n0bdJVYTB9YEWdTNjQfZOPV6o\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"d99bfa00-d04d-44ef-84ae-dd030be94106","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"1e90f75f-d91e-4699-986a-7ed07653bf5f","name":"UpdatePayment - default","request":{"urlPathTemplate":"/v2/payments/{payment_id}","method":"PUT","pathParameters":{"payment_id":{"equalTo":"payment_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"payment\": {\n \"id\": \"1QjqpBVyrI9S4H9sTGDWU9JeiWdZY\",\n \"created_at\": \"2021-10-13T20:26:44.191Z\",\n \"updated_at\": \"2021-10-13T20:26:44.364Z\",\n \"amount_money\": {\n \"amount\": 1000,\n \"currency\": \"USD\"\n },\n \"tip_money\": {\n \"amount\": 100,\n \"currency\": \"USD\"\n },\n \"total_money\": {\n \"amount\": 1100,\n \"currency\": \"USD\"\n },\n \"app_fee_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"approved_money\": {\n \"amount\": 1000,\n \"currency\": \"USD\"\n },\n \"processing_fee\": [\n {}\n ],\n \"refunded_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"status\": \"APPROVED\",\n \"delay_duration\": \"PT168H\",\n \"delay_action\": \"CANCEL\",\n \"delayed_until\": \"2021-10-20T20:26:44.191Z\",\n \"source_type\": \"CARD\",\n \"card_details\": {\n \"status\": \"AUTHORIZED\",\n \"card\": {\n \"card_brand\": \"VISA\",\n \"last_4\": \"1111\",\n \"exp_month\": 11,\n \"exp_year\": 2022,\n \"fingerprint\": \"sq-1-Hxim77tbdcbGejOejnoAklBVJed2YFLTmirfl8Q5XZzObTc8qY_U8RkwzoNL8dCEcQ\",\n \"card_type\": \"DEBIT\",\n \"prepaid_type\": \"NOT_PREPAID\",\n \"bin\": \"411111\"\n },\n \"entry_method\": \"ON_FILE\",\n \"cvv_status\": \"CVV_ACCEPTED\",\n \"avs_status\": \"AVS_ACCEPTED\",\n \"auth_result_code\": \"68aLBM\",\n \"application_identifier\": \"application_identifier\",\n \"application_name\": \"application_name\",\n \"application_cryptogram\": \"application_cryptogram\",\n \"verification_method\": \"verification_method\",\n \"verification_results\": \"verification_results\",\n \"statement_description\": \"SQ *EXAMPLE TEST GOSQ.C\",\n \"card_payment_timeline\": {\n \"authorized_at\": \"2021-10-13T20:26:44.364Z\"\n },\n \"refund_requires_card_presence\": true,\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"cash_details\": {\n \"buyer_supplied_money\": {}\n },\n \"bank_account_details\": {\n \"bank_name\": \"bank_name\",\n \"transfer_type\": \"transfer_type\",\n \"account_ownership_type\": \"account_ownership_type\",\n \"fingerprint\": \"fingerprint\",\n \"country\": \"country\",\n \"statement_description\": \"statement_description\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"external_details\": {\n \"type\": \"type\",\n \"source\": \"source\",\n \"source_id\": \"source_id\"\n },\n \"wallet_details\": {\n \"status\": \"status\",\n \"brand\": \"brand\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"buy_now_pay_later_details\": {\n \"brand\": \"brand\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"square_account_details\": {\n \"payment_source_token\": \"payment_source_token\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"location_id\": \"L88917AVBK2S5\",\n \"order_id\": \"nUSN9TdxpiK3SrQg3wzmf6r8LP9YY\",\n \"reference_id\": \"reference_id\",\n \"customer_id\": \"W92WH6P11H4Z77CTET0RNTGFW8\",\n \"employee_id\": \"employee_id\",\n \"team_member_id\": \"team_member_id\",\n \"refund_ids\": [\n \"refund_ids\"\n ],\n \"risk_evaluation\": {\n \"created_at\": \"2021-10-13T20:26:45.271Z\",\n \"risk_level\": \"NORMAL\"\n },\n \"terminal_checkout_id\": \"terminal_checkout_id\",\n \"buyer_email_address\": \"buyer_email_address\",\n \"billing_address\": {\n \"address_line_1\": \"address_line_1\",\n \"address_line_2\": \"address_line_2\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"locality\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"administrative_district_level_1\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"postal_code\",\n \"country\": \"ZZ\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n },\n \"shipping_address\": {\n \"address_line_1\": \"address_line_1\",\n \"address_line_2\": \"address_line_2\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"locality\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"administrative_district_level_1\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"postal_code\",\n \"country\": \"ZZ\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n },\n \"note\": \"Example Note\",\n \"statement_description_identifier\": \"statement_description_identifier\",\n \"capabilities\": [\n \"EDIT_AMOUNT_UP\",\n \"EDIT_AMOUNT_DOWN\",\n \"EDIT_TIP_AMOUNT_UP\",\n \"EDIT_TIP_AMOUNT_DOWN\"\n ],\n \"receipt_number\": \"1Qjq\",\n \"receipt_url\": \"receipt_url\",\n \"device_details\": {\n \"device_id\": \"device_id\",\n \"device_installation_id\": \"device_installation_id\",\n \"device_name\": \"device_name\"\n },\n \"application_details\": {\n \"square_product\": \"ECOMMERCE_API\",\n \"application_id\": \"sq0ids-TcgftTEtKxJTRF1lCFJ9TA\"\n },\n \"is_offline_payment\": true,\n \"offline_payment_details\": {\n \"client_created_at\": \"client_created_at\"\n },\n \"version_token\": \"rDrXnqiS7fJgexccgdpzmwqTiXui1aIKCp9EchZ7trE6o\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"1e90f75f-d91e-4699-986a-7ed07653bf5f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"86108338-55b6-4040-90fd-d4fdd3e77ffa","name":"CancelPayment - default","request":{"urlPathTemplate":"/v2/payments/{payment_id}/cancel","method":"POST","pathParameters":{"payment_id":{"equalTo":"payment_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"payment\": {\n \"id\": \"1QjqpBVyrI9S4H9sTGDWU9JeiWdZY\",\n \"created_at\": \"2021-10-13T20:26:44.191Z\",\n \"updated_at\": \"2021-10-13T20:31:21.597Z\",\n \"amount_money\": {\n \"amount\": 1000,\n \"currency\": \"USD\"\n },\n \"tip_money\": {\n \"amount\": 100,\n \"currency\": \"USD\"\n },\n \"total_money\": {\n \"amount\": 1100,\n \"currency\": \"USD\"\n },\n \"app_fee_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"approved_money\": {\n \"amount\": 1000,\n \"currency\": \"USD\"\n },\n \"processing_fee\": [\n {}\n ],\n \"refunded_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"status\": \"CANCELED\",\n \"delay_duration\": \"PT168H\",\n \"delay_action\": \"CANCEL\",\n \"delayed_until\": \"2021-10-20T20:26:44.191Z\",\n \"source_type\": \"CARD\",\n \"card_details\": {\n \"status\": \"VOIDED\",\n \"card\": {\n \"card_brand\": \"VISA\",\n \"last_4\": \"1111\",\n \"exp_month\": 11,\n \"exp_year\": 2022,\n \"fingerprint\": \"sq-1-Hxim77tbdcbGejOejnoAklBVJed2YFLTmirfl8Q5XZzObTc8qY_U8RkwzoNL8dCEcQ\",\n \"card_type\": \"DEBIT\",\n \"prepaid_type\": \"NOT_PREPAID\",\n \"bin\": \"411111\"\n },\n \"entry_method\": \"ON_FILE\",\n \"cvv_status\": \"CVV_ACCEPTED\",\n \"avs_status\": \"AVS_ACCEPTED\",\n \"auth_result_code\": \"68aLBM\",\n \"application_identifier\": \"application_identifier\",\n \"application_name\": \"application_name\",\n \"application_cryptogram\": \"application_cryptogram\",\n \"verification_method\": \"verification_method\",\n \"verification_results\": \"verification_results\",\n \"statement_description\": \"SQ *EXAMPLE TEST GOSQ.C\",\n \"card_payment_timeline\": {\n \"authorized_at\": \"2021-10-13T20:26:44.364Z\",\n \"voided_at\": \"2021-10-13T20:31:21.597Z\"\n },\n \"refund_requires_card_presence\": true,\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"cash_details\": {\n \"buyer_supplied_money\": {}\n },\n \"bank_account_details\": {\n \"bank_name\": \"bank_name\",\n \"transfer_type\": \"transfer_type\",\n \"account_ownership_type\": \"account_ownership_type\",\n \"fingerprint\": \"fingerprint\",\n \"country\": \"country\",\n \"statement_description\": \"statement_description\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"external_details\": {\n \"type\": \"type\",\n \"source\": \"source\",\n \"source_id\": \"source_id\"\n },\n \"wallet_details\": {\n \"status\": \"status\",\n \"brand\": \"brand\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"buy_now_pay_later_details\": {\n \"brand\": \"brand\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"square_account_details\": {\n \"payment_source_token\": \"payment_source_token\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"location_id\": \"L88917AVBK2S5\",\n \"order_id\": \"nUSN9TdxpiK3SrQg3wzmf6r8LP9YY\",\n \"reference_id\": \"reference_id\",\n \"customer_id\": \"W92WH6P11H4Z77CTET0RNTGFW8\",\n \"employee_id\": \"employee_id\",\n \"team_member_id\": \"team_member_id\",\n \"refund_ids\": [\n \"refund_ids\"\n ],\n \"risk_evaluation\": {\n \"created_at\": \"2021-10-13T20:26:45.271Z\",\n \"risk_level\": \"NORMAL\"\n },\n \"terminal_checkout_id\": \"terminal_checkout_id\",\n \"buyer_email_address\": \"buyer_email_address\",\n \"billing_address\": {\n \"address_line_1\": \"address_line_1\",\n \"address_line_2\": \"address_line_2\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"locality\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"administrative_district_level_1\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"postal_code\",\n \"country\": \"ZZ\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n },\n \"shipping_address\": {\n \"address_line_1\": \"address_line_1\",\n \"address_line_2\": \"address_line_2\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"locality\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"administrative_district_level_1\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"postal_code\",\n \"country\": \"ZZ\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n },\n \"note\": \"Example Note\",\n \"statement_description_identifier\": \"statement_description_identifier\",\n \"capabilities\": [\n \"capabilities\"\n ],\n \"receipt_number\": \"receipt_number\",\n \"receipt_url\": \"receipt_url\",\n \"device_details\": {\n \"device_id\": \"device_id\",\n \"device_installation_id\": \"device_installation_id\",\n \"device_name\": \"device_name\"\n },\n \"application_details\": {\n \"square_product\": \"ECOMMERCE_API\",\n \"application_id\": \"sq0ids-TcgftTEtKxJTRF1lCFJ9TA\"\n },\n \"is_offline_payment\": true,\n \"offline_payment_details\": {\n \"client_created_at\": \"client_created_at\"\n },\n \"version_token\": \"N8AGYgEjCiY9Q57Jw7aVHEpBq8bzGCDCQMRX8Vs56N06o\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"86108338-55b6-4040-90fd-d4fdd3e77ffa","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"9101bf96-8ae5-491b-9509-8f2584bf1120","name":"CompletePayment - default","request":{"urlPathTemplate":"/v2/payments/{payment_id}/complete","method":"POST","pathParameters":{"payment_id":{"equalTo":"payment_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"payment\": {\n \"id\": \"bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY\",\n \"created_at\": \"2021-10-13T19:34:33.524Z\",\n \"updated_at\": \"2021-10-13T19:34:34.339Z\",\n \"amount_money\": {\n \"amount\": 555,\n \"currency\": \"USD\"\n },\n \"tip_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"total_money\": {\n \"amount\": 555,\n \"currency\": \"USD\"\n },\n \"app_fee_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"approved_money\": {\n \"amount\": 555,\n \"currency\": \"USD\"\n },\n \"processing_fee\": [\n {\n \"effective_at\": \"2021-10-13T21:34:35.000Z\",\n \"type\": \"INITIAL\",\n \"amount_money\": {\n \"amount\": 34,\n \"currency\": \"USD\"\n }\n }\n ],\n \"refunded_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"status\": \"COMPLETED\",\n \"delay_duration\": \"PT168H\",\n \"delay_action\": \"CANCEL\",\n \"delayed_until\": \"2021-10-20T19:34:33.524Z\",\n \"source_type\": \"CARD\",\n \"card_details\": {\n \"status\": \"CAPTURED\",\n \"card\": {\n \"card_brand\": \"VISA\",\n \"last_4\": \"1111\",\n \"exp_month\": 11,\n \"exp_year\": 2022,\n \"fingerprint\": \"sq-1-Hxim77tbdcbGejOejnoAklBVJed2YFLTmirfl8Q5XZzObTc8qY_U8RkwzoNL8dCEcQ\",\n \"card_type\": \"DEBIT\",\n \"prepaid_type\": \"NOT_PREPAID\",\n \"bin\": \"411111\"\n },\n \"entry_method\": \"KEYED\",\n \"cvv_status\": \"CVV_ACCEPTED\",\n \"avs_status\": \"AVS_ACCEPTED\",\n \"auth_result_code\": \"2Nkw7q\",\n \"application_identifier\": \"application_identifier\",\n \"application_name\": \"application_name\",\n \"application_cryptogram\": \"application_cryptogram\",\n \"verification_method\": \"verification_method\",\n \"verification_results\": \"verification_results\",\n \"statement_description\": \"SQ *EXAMPLE TEST GOSQ.C\",\n \"card_payment_timeline\": {\n \"authorized_at\": \"2021-10-13T19:34:33.680Z\",\n \"captured_at\": \"2021-10-13T19:34:34.340Z\"\n },\n \"refund_requires_card_presence\": true,\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"cash_details\": {\n \"buyer_supplied_money\": {}\n },\n \"bank_account_details\": {\n \"bank_name\": \"bank_name\",\n \"transfer_type\": \"transfer_type\",\n \"account_ownership_type\": \"account_ownership_type\",\n \"fingerprint\": \"fingerprint\",\n \"country\": \"country\",\n \"statement_description\": \"statement_description\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"external_details\": {\n \"type\": \"type\",\n \"source\": \"source\",\n \"source_id\": \"source_id\"\n },\n \"wallet_details\": {\n \"status\": \"status\",\n \"brand\": \"brand\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"buy_now_pay_later_details\": {\n \"brand\": \"brand\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"square_account_details\": {\n \"payment_source_token\": \"payment_source_token\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"location_id\": \"L88917AVBK2S5\",\n \"order_id\": \"d7eKah653Z579f3gVtjlxpSlmUcZY\",\n \"reference_id\": \"reference_id\",\n \"customer_id\": \"customer_id\",\n \"employee_id\": \"TMoK_ogh6rH1o4dV\",\n \"team_member_id\": \"TMoK_ogh6rH1o4dV\",\n \"refund_ids\": [\n \"refund_ids\"\n ],\n \"risk_evaluation\": {\n \"created_at\": \"created_at\",\n \"risk_level\": \"PENDING\"\n },\n \"terminal_checkout_id\": \"terminal_checkout_id\",\n \"buyer_email_address\": \"buyer_email_address\",\n \"billing_address\": {\n \"address_line_1\": \"address_line_1\",\n \"address_line_2\": \"address_line_2\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"locality\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"administrative_district_level_1\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"postal_code\",\n \"country\": \"ZZ\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n },\n \"shipping_address\": {\n \"address_line_1\": \"address_line_1\",\n \"address_line_2\": \"address_line_2\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"locality\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"administrative_district_level_1\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"postal_code\",\n \"country\": \"ZZ\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n },\n \"note\": \"Test Note\",\n \"statement_description_identifier\": \"statement_description_identifier\",\n \"capabilities\": [\n \"capabilities\"\n ],\n \"receipt_number\": \"bP9m\",\n \"receipt_url\": \"https://squareup.com/receipt/preview/bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY\",\n \"device_details\": {\n \"device_id\": \"device_id\",\n \"device_installation_id\": \"device_installation_id\",\n \"device_name\": \"device_name\"\n },\n \"application_details\": {\n \"square_product\": \"VIRTUAL_TERMINAL\",\n \"application_id\": \"sq0ids-Pw67AZAlLVB7hsRmwlJPuA\"\n },\n \"is_offline_payment\": true,\n \"offline_payment_details\": {\n \"client_created_at\": \"client_created_at\"\n },\n \"version_token\": \"56pRkL3slrzet2iQrTp9n0bdJVYTB9YEWdTNjQfZOPV6o\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"9101bf96-8ae5-491b-9509-8f2584bf1120","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c6af8839-4ada-402c-83da-1b132d92a234","name":"ListPayouts - default","request":{"urlPathTemplate":"/v2/payouts","method":"GET","queryParameters":{"location_id":{"equalTo":"location_id"},"status":{"equalTo":"SENT"},"begin_time":{"equalTo":"begin_time"},"end_time":{"equalTo":"end_time"},"sort_order":{"equalTo":"DESC"},"cursor":{"equalTo":"cursor"},"limit":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"payouts\": [\n {\n \"id\": \"po_b345d2c7-90b3-4f0b-a2aa-df1def7f8afc\",\n \"status\": \"PAID\",\n \"location_id\": \"L88917AVBK2S5\",\n \"created_at\": \"2022-03-29T16:12:31Z\",\n \"updated_at\": \"2022-03-30T01:07:22.875Z\",\n \"amount_money\": {\n \"amount\": 6259\n },\n \"destination\": {\n \"type\": \"CARD\",\n \"id\": \"ccof:ZPp3oedR3AeEUNd3z7\"\n },\n \"version\": 2,\n \"type\": \"BATCH\",\n \"payout_fee\": [\n {\n \"amount_money\": {\n \"amount\": 95\n },\n \"effective_at\": \"2022-03-29T16:12:31Z\",\n \"type\": \"TRANSFER_FEE\"\n }\n ],\n \"arrival_date\": \"2022-03-29\",\n \"end_to_end_id\": \"L2100000005\"\n },\n {\n \"id\": \"po_f3c0fb38-a5ce-427d-b858-52b925b72e45\",\n \"status\": \"PAID\",\n \"location_id\": \"L88917AVBK2S5\",\n \"created_at\": \"2022-03-24T03:07:09Z\",\n \"updated_at\": \"2022-03-24T03:07:09Z\",\n \"amount_money\": {\n \"amount\": -103\n },\n \"destination\": {\n \"type\": \"BANK_ACCOUNT\",\n \"id\": \"bact:ZPp3oedR3AeEUNd3z7\"\n },\n \"version\": 1,\n \"type\": \"BATCH\",\n \"payout_fee\": [\n {}\n ],\n \"arrival_date\": \"2022-03-24\",\n \"end_to_end_id\": \"L2100000006\"\n }\n ],\n \"cursor\": \"EMPCyStibo64hS8wLayZPp3oedR3AeEUNd3z7u6zphi72LQZFIEMbkKVvot9eefpU\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"c6af8839-4ada-402c-83da-1b132d92a234","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"7c150d76-ec9b-42ce-a540-3597cadd0954","name":"GetPayout - default","request":{"urlPathTemplate":"/v2/payouts/{payout_id}","method":"GET","pathParameters":{"payout_id":{"equalTo":"payout_id"}}},"response":{"status":200,"body":"{\n \"payout\": {\n \"id\": \"po_f3c0fb38-a5ce-427d-b858-52b925b72e45\",\n \"status\": \"PAID\",\n \"location_id\": \"L88917AVBK2S5\",\n \"created_at\": \"2022-03-24T03:07:09Z\",\n \"updated_at\": \"2022-03-24T03:07:09Z\",\n \"amount_money\": {\n \"amount\": -103,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"destination\": {\n \"type\": \"BANK_ACCOUNT\",\n \"id\": \"bact:ZPp3oedR3AeEUNd3z7\"\n },\n \"version\": 1,\n \"type\": \"BATCH\",\n \"payout_fee\": [\n {}\n ],\n \"arrival_date\": \"2022-03-24\",\n \"end_to_end_id\": \"end_to_end_id\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"7c150d76-ec9b-42ce-a540-3597cadd0954","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"abf34bdb-c13f-4402-bca9-6df46ac46b42","name":"ListPayoutEntries - default","request":{"urlPathTemplate":"/v2/payouts/{payout_id}/payout-entries","method":"GET","pathParameters":{"payout_id":{"equalTo":"payout_id"}},"queryParameters":{"sort_order":{"equalTo":"DESC"},"cursor":{"equalTo":"cursor"},"limit":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"payout_entries\": [\n {\n \"id\": \"poe_ZQWcw41d0SGJS6IWd4cSi8mKHk\",\n \"payout_id\": \"po_4d28e6c4-7dd5-4de4-8ec9-a059277646a6\",\n \"effective_at\": \"2021-12-14T23:31:49Z\",\n \"type\": \"REFUND\",\n \"gross_amount_money\": {\n \"amount\": -50\n },\n \"fee_amount_money\": {\n \"amount\": -2\n },\n \"net_amount_money\": {\n \"amount\": -48\n },\n \"type_refund_details\": {\n \"payment_id\": \"HVdG62HeMlti8YYf94oxrN\",\n \"refund_id\": \"HVdG62HeMlti8YYf94oxrN_dR8Nztxg7umf94oxrN12Ji5r2KW14FAY\"\n }\n },\n {\n \"id\": \"poe_EibbY9Ob1d0SGJS6IWd4cSiSi6wkaPk\",\n \"payout_id\": \"po_4d28e6c4-7dd5-4de4-8ec9-a059277646a6\",\n \"effective_at\": \"2021-12-14T23:31:49Z\",\n \"type\": \"CHARGE\",\n \"gross_amount_money\": {\n \"amount\": 100\n },\n \"fee_amount_money\": {\n \"amount\": 19\n },\n \"net_amount_money\": {\n \"amount\": 81\n },\n \"type_charge_details\": {\n \"payment_id\": \"HVdG62H5K3291d0SGJS6IWd4cSi8YY\"\n }\n }\n ],\n \"cursor\": \"TbfI80z98Xc2LdApCyZ2NvCYLpkPurYLR16GRIttpMJ55mrSIMzHgtkcRQdT0mOnTtfHO\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"abf34bdb-c13f-4402-bca9-6df46ac46b42","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"948f4146-983f-4eeb-9166-dc640bd89a08","name":"ListPaymentRefunds - default","request":{"urlPathTemplate":"/v2/refunds","method":"GET","queryParameters":{"begin_time":{"equalTo":"begin_time"},"end_time":{"equalTo":"end_time"},"sort_order":{"equalTo":"sort_order"},"cursor":{"equalTo":"cursor"},"location_id":{"equalTo":"location_id"},"status":{"equalTo":"status"},"source_type":{"equalTo":"source_type"},"limit":{"equalTo":"1"},"updated_at_begin_time":{"equalTo":"updated_at_begin_time"},"updated_at_end_time":{"equalTo":"updated_at_end_time"},"sort_field":{"equalTo":"CREATED_AT"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"refunds\": [\n {\n \"id\": \"bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY_69MmgHubkLqx9wGhnmenRUHOaKitE6llfZuxcWYjGxd\",\n \"status\": \"COMPLETED\",\n \"location_id\": \"L88917AVBK2S5\",\n \"unlinked\": true,\n \"destination_type\": \"destination_type\",\n \"amount_money\": {\n \"amount\": 555,\n \"currency\": \"USD\"\n },\n \"processing_fee\": [\n {\n \"effective_at\": \"2021-10-13T21:34:35.000Z\",\n \"type\": \"INITIAL\",\n \"amount_money\": {\n \"amount\": -34,\n \"currency\": \"USD\"\n }\n }\n ],\n \"payment_id\": \"bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY\",\n \"order_id\": \"9ltv0bx5PuvGXUYHYHxYSKEqC3IZY\",\n \"reason\": \"Example Refund\",\n \"created_at\": \"2021-10-13T19:59:05.342Z\",\n \"updated_at\": \"2021-10-13T20:00:03.497Z\",\n \"team_member_id\": \"team_member_id\",\n \"terminal_refund_id\": \"terminal_refund_id\"\n }\n ],\n \"cursor\": \"5evquW1YswHoT4EoyUhzMmTsCnsSXBU9U0WJ4FU4623nrMQcocH0RGU6Up1YkwfiMcF59ood58EBTEGgzMTGHQJpocic7ExOL0NtrTXCeWcv0UJIJNk8eXb\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"948f4146-983f-4eeb-9166-dc640bd89a08","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"6f3be5a1-a577-467f-a18f-a345cd8912ac","name":"RefundPayment - default","request":{"urlPathTemplate":"/v2/refunds","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"refund\": {\n \"id\": \"R2B3Z8WMVt3EAmzYWLZvz7Y69EbZY_KlWP8IC1557ddwc9QWTKrCVU6m0JXDz15R2Qym5eQfR\",\n \"status\": \"PENDING\",\n \"location_id\": \"L88917AVBK2S5\",\n \"unlinked\": true,\n \"destination_type\": \"destination_type\",\n \"destination_details\": {\n \"cash_details\": {\n \"seller_supplied_money\": {}\n },\n \"external_details\": {\n \"type\": \"type\",\n \"source\": \"source\"\n }\n },\n \"amount_money\": {\n \"amount\": 1000,\n \"currency\": \"USD\"\n },\n \"app_fee_money\": {\n \"amount\": 10,\n \"currency\": \"USD\"\n },\n \"processing_fee\": [\n {}\n ],\n \"payment_id\": \"R2B3Z8WMVt3EAmzYWLZvz7Y69EbZY\",\n \"order_id\": \"1JLEUZeEooAIX8HMqm9kvWd69aQZY\",\n \"reason\": \"Example\",\n \"created_at\": \"2021-10-13T21:23:19.116Z\",\n \"updated_at\": \"2021-10-13T21:23:19.508Z\",\n \"team_member_id\": \"team_member_id\",\n \"terminal_refund_id\": \"terminal_refund_id\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"6f3be5a1-a577-467f-a18f-a345cd8912ac","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"602f9dc1-7e51-47ea-a07c-a527454f970e","name":"GetPaymentRefund - default","request":{"urlPathTemplate":"/v2/refunds/{refund_id}","method":"GET","pathParameters":{"refund_id":{"equalTo":"refund_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"refund\": {\n \"id\": \"bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY_69MmgHubkLqx9wGhnmenRUHOaKitE6llfZuxcWYjGxd\",\n \"status\": \"COMPLETED\",\n \"location_id\": \"L88917AVBK2S5\",\n \"unlinked\": true,\n \"destination_type\": \"destination_type\",\n \"destination_details\": {\n \"cash_details\": {\n \"seller_supplied_money\": {}\n },\n \"external_details\": {\n \"type\": \"type\",\n \"source\": \"source\"\n }\n },\n \"amount_money\": {\n \"amount\": 555,\n \"currency\": \"USD\"\n },\n \"app_fee_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"processing_fee\": [\n {\n \"effective_at\": \"2021-10-13T21:34:35.000Z\",\n \"type\": \"INITIAL\",\n \"amount_money\": {\n \"amount\": -34,\n \"currency\": \"USD\"\n }\n }\n ],\n \"payment_id\": \"bP9mAsEMYPUGjjGNaNO5ZDVyLhSZY\",\n \"order_id\": \"9ltv0bx5PuvGXUYHYHxYSKEqC3IZY\",\n \"reason\": \"Example Refund\",\n \"created_at\": \"2021-10-13T19:59:05.073Z\",\n \"updated_at\": \"2021-10-13T20:00:02.442Z\",\n \"team_member_id\": \"team_member_id\",\n \"terminal_refund_id\": \"terminal_refund_id\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"602f9dc1-7e51-47ea-a07c-a527454f970e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e48418b6-c0ad-464d-aa7d-f7fe154a3080","name":"ListSites - default","request":{"urlPathTemplate":"/v2/sites","method":"GET"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"sites\": [\n {\n \"id\": \"site_278075276488921835\",\n \"site_title\": \"My Second Site\",\n \"domain\": \"mysite2.square.site\",\n \"is_published\": false,\n \"created_at\": \"2020-10-28T13:22:51.000000Z\",\n \"updated_at\": \"2020-10-28T13:22:51.000000Z\"\n },\n {\n \"id\": \"site_102725345836253849\",\n \"site_title\": \"My First Site\",\n \"domain\": \"mysite1.square.site\",\n \"is_published\": true,\n \"created_at\": \"2020-06-18T17:45:13.000000Z\",\n \"updated_at\": \"2020-11-23T02:19:10.000000Z\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"e48418b6-c0ad-464d-aa7d-f7fe154a3080","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"d2f1de1a-4322-4f98-b183-8d3bfd60c5fd","name":"RetrieveSnippet - default","request":{"urlPathTemplate":"/v2/sites/{site_id}/snippet","method":"GET","pathParameters":{"site_id":{"equalTo":"site_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"snippet\": {\n \"id\": \"snippet_5d178150-a6c0-11eb-a9f1-437e6a2881e7\",\n \"site_id\": \"site_278075276488921835\",\n \"content\": \"\",\n \"created_at\": \"2021-03-11T25:40:09.000000Z\",\n \"updated_at\": \"2021-03-11T25:40:09.000000Z\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"d2f1de1a-4322-4f98-b183-8d3bfd60c5fd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"212fe21a-b631-428e-8a15-99ce4858cf70","name":"UpsertSnippet - default","request":{"urlPathTemplate":"/v2/sites/{site_id}/snippet","method":"POST","pathParameters":{"site_id":{"equalTo":"site_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"snippet\": {\n \"id\": \"snippet_5d178150-a6c0-11eb-a9f1-437e6a2881e7\",\n \"site_id\": \"site_278075276488921835\",\n \"content\": \"\",\n \"created_at\": \"2021-03-11T25:40:09.000000Z\",\n \"updated_at\": \"2021-03-11T25:40:09.000000Z\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"212fe21a-b631-428e-8a15-99ce4858cf70","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5348360a-7dac-4510-a32e-f84c4f5929e3","name":"DeleteSnippet - default","request":{"urlPathTemplate":"/v2/sites/{site_id}/snippet","method":"DELETE","pathParameters":{"site_id":{"equalTo":"site_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"5348360a-7dac-4510-a32e-f84c4f5929e3","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2b287dd0-97fd-4b67-b0f3-7eeb0ea4b156","name":"CreateSubscription - default","request":{"urlPathTemplate":"/v2/subscriptions","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"subscription\": {\n \"id\": \"56214fb2-cc85-47a1-93bc-44f3766bb56f\",\n \"location_id\": \"S8GWD5R9QB376\",\n \"plan_variation_id\": \"6JHXF3B2CW3YKHDV4XEM674H\",\n \"customer_id\": \"CHFGVKYY8RSV93M5KCYTG4PN0G\",\n \"start_date\": \"2023-06-20\",\n \"canceled_date\": \"canceled_date\",\n \"charged_through_date\": \"charged_through_date\",\n \"status\": \"ACTIVE\",\n \"tax_percentage\": \"tax_percentage\",\n \"invoice_ids\": [\n \"invoice_ids\"\n ],\n \"price_override_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"version\": 1,\n \"created_at\": \"2023-06-20T21:53:10Z\",\n \"card_id\": \"ccof:qy5x8hHGYsgLrp4Q4GB\",\n \"timezone\": \"America/Los_Angeles\",\n \"source\": {\n \"name\": \"My Application\"\n },\n \"actions\": [\n {}\n ],\n \"monthly_billing_anchor_date\": 1,\n \"phases\": [\n {\n \"uid\": \"873451e0-745b-4e87-ab0b-c574933fe616\",\n \"ordinal\": 0,\n \"order_template_id\": \"U2NaowWxzXwpsZU697x7ZHOAnCNZY\",\n \"plan_phase_uid\": \"X2Q2AONPB3RB64Y27S25QCZP\"\n }\n ],\n \"completed_date\": \"completed_date\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"2b287dd0-97fd-4b67-b0f3-7eeb0ea4b156","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ec82b22b-d0fc-4cb3-8862-8be55929a49b","name":"BulkSwapPlan - default","request":{"urlPathTemplate":"/v2/subscriptions/bulk-swap-plan","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"affected_subscriptions\": 12\n}","headers":{"Content-Type":"application/json"}},"uuid":"ec82b22b-d0fc-4cb3-8862-8be55929a49b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"33ac709f-bcb4-4e7a-85cf-65043c7ee579","name":"SearchSubscriptions - default","request":{"urlPathTemplate":"/v2/subscriptions/search","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"subscriptions\": [\n {\n \"id\": \"de86fc96-8664-474b-af1a-abbe59cacf0e\",\n \"location_id\": \"S8GWD5R9QB376\",\n \"plan_variation_id\": \"L3TJVDHVBEQEGQDEZL2JJM7R\",\n \"customer_id\": \"CHFGVKYY8RSV93M5KCYTG4PN0G\",\n \"start_date\": \"2021-10-20\",\n \"canceled_date\": \"2021-10-30\",\n \"charged_through_date\": \"2021-11-20\",\n \"status\": \"CANCELED\",\n \"tax_percentage\": \"tax_percentage\",\n \"invoice_ids\": [\n \"invoice_ids\"\n ],\n \"version\": 1000000,\n \"created_at\": \"2021-10-20T21:53:10Z\",\n \"card_id\": \"ccof:mueUsvgajChmjEbp4GB\",\n \"timezone\": \"UTC\",\n \"source\": {\n \"name\": \"My Application\"\n },\n \"actions\": [\n {}\n ],\n \"monthly_billing_anchor_date\": 1,\n \"phases\": [\n {}\n ],\n \"completed_date\": \"completed_date\"\n },\n {\n \"id\": \"56214fb2-cc85-47a1-93bc-44f3766bb56f\",\n \"location_id\": \"S8GWD5R9QB376\",\n \"plan_variation_id\": \"6JHXF3B2CW3YKHDV4XEM674H\",\n \"customer_id\": \"CHFGVKYY8RSV93M5KCYTG4PN0G\",\n \"start_date\": \"2022-01-19\",\n \"canceled_date\": \"canceled_date\",\n \"charged_through_date\": \"2022-08-19\",\n \"status\": \"PAUSED\",\n \"tax_percentage\": \"5\",\n \"invoice_ids\": [\n \"grebK0Q_l8H4fqoMMVvt-Q\",\n \"rcX_i3sNmHTGKhI4W2mceA\"\n ],\n \"price_override_money\": {\n \"amount\": 1000,\n \"currency\": \"USD\"\n },\n \"version\": 2,\n \"created_at\": \"2022-01-19T21:53:10Z\",\n \"card_id\": \"card_id\",\n \"timezone\": \"America/Los_Angeles\",\n \"source\": {\n \"name\": \"My Application\"\n },\n \"actions\": [\n {}\n ],\n \"monthly_billing_anchor_date\": 1,\n \"phases\": [\n {}\n ],\n \"completed_date\": \"completed_date\"\n },\n {\n \"id\": \"56214fb2-cc85-47a1-93bc-44f3766bb56f\",\n \"location_id\": \"S8GWD5R9QB376\",\n \"plan_variation_id\": \"6JHXF3B2CW3YKHDV4XEM674H\",\n \"customer_id\": \"CHFGVKYY8RSV93M5KCYTG4PN0G\",\n \"start_date\": \"2023-06-20\",\n \"canceled_date\": \"canceled_date\",\n \"charged_through_date\": \"charged_through_date\",\n \"status\": \"ACTIVE\",\n \"tax_percentage\": \"tax_percentage\",\n \"invoice_ids\": [\n \"invoice_ids\"\n ],\n \"version\": 1,\n \"created_at\": \"2023-06-20T21:53:10Z\",\n \"card_id\": \"ccof:qy5x8hHGYsgLrp4Q4GB\",\n \"timezone\": \"America/Los_Angeles\",\n \"source\": {\n \"name\": \"My Application\"\n },\n \"actions\": [\n {}\n ],\n \"monthly_billing_anchor_date\": 1,\n \"phases\": [\n {\n \"uid\": \"873451e0-745b-4e87-ab0b-c574933fe616\",\n \"ordinal\": 0,\n \"order_template_id\": \"U2NaowWxzXwpsZU697x7ZHOAnCNZY\",\n \"plan_phase_uid\": \"X2Q2AONPB3RB64Y27S25QCZP\"\n }\n ],\n \"completed_date\": \"completed_date\"\n }\n ],\n \"cursor\": \"cursor\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"33ac709f-bcb4-4e7a-85cf-65043c7ee579","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"1ed31175-bc6d-4a38-8ed1-d137fda9af75","name":"RetrieveSubscription - default","request":{"urlPathTemplate":"/v2/subscriptions/{subscription_id}","method":"GET","pathParameters":{"subscription_id":{"equalTo":"subscription_id"}},"queryParameters":{"include":{"equalTo":"include"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"subscription\": {\n \"id\": \"8151fc89-da15-4eb9-a685-1a70883cebfc\",\n \"location_id\": \"S8GWD5R9QB376\",\n \"plan_variation_id\": \"6JHXF3B2CW3YKHDV4XEM674H\",\n \"customer_id\": \"JDKYHBWT1D4F8MFH63DBMEN8Y4\",\n \"start_date\": \"2022-07-27\",\n \"canceled_date\": \"canceled_date\",\n \"charged_through_date\": \"2023-11-20\",\n \"status\": \"ACTIVE\",\n \"tax_percentage\": \"tax_percentage\",\n \"invoice_ids\": [\n \"inv:0-ChCHu2mZEabLeeHahQnXDjZQECY\",\n \"inv:0-ChrcX_i3sNmfsHTGKhI4Wg2mceA\"\n ],\n \"price_override_money\": {\n \"amount\": 25000,\n \"currency\": \"USD\"\n },\n \"version\": 1000000,\n \"created_at\": \"2022-07-27T21:53:10Z\",\n \"card_id\": \"ccof:IkWfpLj4tNHMyFii3GB\",\n \"timezone\": \"America/Los_Angeles\",\n \"source\": {\n \"name\": \"My Application\"\n },\n \"actions\": [\n {}\n ],\n \"monthly_billing_anchor_date\": 1,\n \"phases\": [\n {}\n ],\n \"completed_date\": \"completed_date\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"1ed31175-bc6d-4a38-8ed1-d137fda9af75","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2df270aa-5c4b-430c-9273-c82c9ad81143","name":"UpdateSubscription - default","request":{"urlPathTemplate":"/v2/subscriptions/{subscription_id}","method":"PUT","pathParameters":{"subscription_id":{"equalTo":"subscription_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"subscription\": {\n \"id\": \"7217d8ca-1fee-4446-a9e5-8540b5d8c9bb\",\n \"location_id\": \"LPJKHYR7WFDKN\",\n \"plan_variation_id\": \"XOUNEKCE6NSXQW5NTSQ73MMX\",\n \"customer_id\": \"AM69AB81FT4479YH9HGWS1HZY8\",\n \"start_date\": \"2023-01-30\",\n \"canceled_date\": \"canceled_date\",\n \"charged_through_date\": \"2023-03-13\",\n \"status\": \"ACTIVE\",\n \"tax_percentage\": \"tax_percentage\",\n \"invoice_ids\": [\n \"inv:0-ChAPSfVYvNewckgf3x4iigN_ENMM\",\n \"inv:0-ChBQaCCLfjcm9WEUBGxvuydJENMM\"\n ],\n \"price_override_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"version\": 3,\n \"created_at\": \"2023-01-30T19:27:32Z\",\n \"card_id\": \"{NEW CARD ID}\",\n \"timezone\": \"UTC\",\n \"source\": {\n \"name\": \"My Application\"\n },\n \"actions\": [\n {}\n ],\n \"monthly_billing_anchor_date\": 1,\n \"phases\": [\n {}\n ],\n \"completed_date\": \"completed_date\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"2df270aa-5c4b-430c-9273-c82c9ad81143","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"06e0452c-edbc-4e4f-a440-7924ebd8d984","name":"DeleteSubscriptionAction - default","request":{"urlPathTemplate":"/v2/subscriptions/{subscription_id}/actions/{action_id}","method":"DELETE","pathParameters":{"subscription_id":{"equalTo":"subscription_id"},"action_id":{"equalTo":"action_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"subscription\": {\n \"id\": \"8151fc89-da15-4eb9-a685-1a70883cebfc\",\n \"location_id\": \"S8GWD5R9QB376\",\n \"plan_variation_id\": \"6JHXF3B2CW3YKHDV4XEM674H\",\n \"customer_id\": \"JDKYHBWT1D4F8MFH63DBMEN8Y4\",\n \"start_date\": \"2022-07-27\",\n \"canceled_date\": \"canceled_date\",\n \"charged_through_date\": \"2023-11-20\",\n \"status\": \"ACTIVE\",\n \"tax_percentage\": \"tax_percentage\",\n \"invoice_ids\": [\n \"inv:0-ChCHu2mZEabLeeHahQnXDjZQECY\",\n \"inv:0-ChrcX_i3sNmfsHTGKhI4Wg2mceA\"\n ],\n \"price_override_money\": {\n \"amount\": 25000,\n \"currency\": \"USD\"\n },\n \"version\": 1000000,\n \"created_at\": \"2022-07-27T21:53:10Z\",\n \"card_id\": \"ccof:IkWfpLj4tNHMyFii3GB\",\n \"timezone\": \"America/Los_Angeles\",\n \"source\": {\n \"name\": \"My Application\"\n },\n \"actions\": [\n {}\n ],\n \"monthly_billing_anchor_date\": 1,\n \"phases\": [\n {}\n ],\n \"completed_date\": \"completed_date\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"06e0452c-edbc-4e4f-a440-7924ebd8d984","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"92a81b8a-6ddf-41f6-bd01-8548c51a0fec","name":"ChangeBillingAnchorDate - default","request":{"urlPathTemplate":"/v2/subscriptions/{subscription_id}/billing-anchor","method":"POST","pathParameters":{"subscription_id":{"equalTo":"subscription_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"subscription\": {\n \"id\": \"9ba40961-995a-4a3d-8c53-048c40cafc13\",\n \"location_id\": \"S8GWD5R9QB376\",\n \"plan_variation_id\": \"FQ7CDXXWSLUJRPM3GFJSJGZ7\",\n \"customer_id\": \"CHFGVKYY8RSV93M5KCYTG4PN0G\",\n \"start_date\": \"start_date\",\n \"canceled_date\": \"canceled_date\",\n \"charged_through_date\": \"charged_through_date\",\n \"status\": \"ACTIVE\",\n \"tax_percentage\": \"tax_percentage\",\n \"invoice_ids\": [\n \"invoice_ids\"\n ],\n \"price_override_money\": {\n \"amount\": 2000,\n \"currency\": \"USD\"\n },\n \"version\": 3,\n \"created_at\": \"2023-06-20T21:53:10Z\",\n \"card_id\": \"card_id\",\n \"timezone\": \"America/Los_Angeles\",\n \"source\": {\n \"name\": \"My Application\"\n },\n \"actions\": [\n {}\n ],\n \"monthly_billing_anchor_date\": 20,\n \"phases\": [\n {\n \"uid\": \"98d6f53b-40e1-4714-8827-032fd923be25\",\n \"ordinal\": 0,\n \"order_template_id\": \"E6oBY5WfQ2eN4pkYZwq4ka6n7KeZY\",\n \"plan_phase_uid\": \"C66BKH3ASTDYGJJCEZXQQSS7\"\n }\n ],\n \"completed_date\": \"completed_date\"\n },\n \"actions\": [\n {\n \"id\": \"f0a1dfdc-675b-3a14-a640-99f7ac1cee83\",\n \"type\": \"CHANGE_BILLING_ANCHOR_DATE\",\n \"effective_date\": \"2023-11-01\",\n \"monthly_billing_anchor_date\": 1,\n \"phases\": [\n {}\n ],\n \"new_plan_variation_id\": \"new_plan_variation_id\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"92a81b8a-6ddf-41f6-bd01-8548c51a0fec","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0238b4d9-803c-471c-b1b5-11ad20ccefc2","name":"CancelSubscription - default","request":{"urlPathTemplate":"/v2/subscriptions/{subscription_id}/cancel","method":"POST","pathParameters":{"subscription_id":{"equalTo":"subscription_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"subscription\": {\n \"id\": \"910afd30-464a-4e00-a8d8-2296e\",\n \"location_id\": \"S8GWD5R9QB376\",\n \"plan_variation_id\": \"6JHXF3B2CW3YKHDV4XEM674H\",\n \"customer_id\": \"CHFGVKYY8RSV93M5KCYTG4PN0G\",\n \"start_date\": \"2022-01-19\",\n \"canceled_date\": \"2023-06-05\",\n \"charged_through_date\": \"charged_through_date\",\n \"status\": \"ACTIVE\",\n \"tax_percentage\": \"tax_percentage\",\n \"invoice_ids\": [\n \"inv:0-ChCHu2mZEabLeeHahQnXDjZQECY\",\n \"inv:0-ChrcX_i3sNmfsHTGKhI4Wg2mceA\"\n ],\n \"price_override_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"version\": 3,\n \"created_at\": \"2022-01-19T21:53:10Z\",\n \"card_id\": \"ccof:qy5x8hHGYsgLrp4Q4GB\",\n \"timezone\": \"America/Los_Angeles\",\n \"source\": {\n \"name\": \"My Application\"\n },\n \"actions\": [\n {}\n ],\n \"monthly_billing_anchor_date\": 1,\n \"phases\": [\n {}\n ],\n \"completed_date\": \"completed_date\"\n },\n \"actions\": [\n {\n \"id\": \"id\",\n \"type\": \"CANCEL\",\n \"effective_date\": \"effective_date\",\n \"monthly_billing_anchor_date\": 1,\n \"phases\": [\n {}\n ],\n \"new_plan_variation_id\": \"new_plan_variation_id\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"0238b4d9-803c-471c-b1b5-11ad20ccefc2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"48d5f526-2ca6-4934-94a2-a6a5783c9205","name":"ListSubscriptionEvents - default","request":{"urlPathTemplate":"/v2/subscriptions/{subscription_id}/events","method":"GET","pathParameters":{"subscription_id":{"equalTo":"subscription_id"}},"queryParameters":{"cursor":{"equalTo":"cursor"},"limit":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"subscription_events\": [\n {\n \"id\": \"06809161-3867-4598-8269-8aea5be4f9de\",\n \"subscription_event_type\": \"START_SUBSCRIPTION\",\n \"effective_date\": \"2020-04-24\",\n \"monthly_billing_anchor_date\": 1,\n \"phases\": [\n {}\n ],\n \"plan_variation_id\": \"6JHXF3B2CW3YKHDV4XEM674H\"\n },\n {\n \"id\": \"f2736603-cd2e-47ec-8675-f815fff54f88\",\n \"subscription_event_type\": \"DEACTIVATE_SUBSCRIPTION\",\n \"effective_date\": \"2020-05-01\",\n \"monthly_billing_anchor_date\": 1,\n \"info\": {\n \"detail\": \"The customer with ID `V74BMG0GPS2KNCWJE1BTYJ37Y0` does not have a name on record.\",\n \"code\": \"CUSTOMER_NO_NAME\"\n },\n \"phases\": [\n {}\n ],\n \"plan_variation_id\": \"6JHXF3B2CW3YKHDV4XEM674H\"\n },\n {\n \"id\": \"b426fc85-6859-450b-b0d0-fe3a5d1b565f\",\n \"subscription_event_type\": \"RESUME_SUBSCRIPTION\",\n \"effective_date\": \"2022-05-01\",\n \"monthly_billing_anchor_date\": 1,\n \"phases\": [\n {}\n ],\n \"plan_variation_id\": \"6JHXF3B2CW3YKHDV4XEM674H\"\n },\n {\n \"id\": \"09f14de1-2f53-4dae-9091-49aa53f83d01\",\n \"subscription_event_type\": \"PAUSE_SUBSCRIPTION\",\n \"effective_date\": \"2022-09-01\",\n \"monthly_billing_anchor_date\": 1,\n \"phases\": [\n {}\n ],\n \"plan_variation_id\": \"6JHXF3B2CW3YKHDV4XEM674H\"\n },\n {\n \"id\": \"f28a73ac-1a1b-4b0f-8eeb-709a72945776\",\n \"subscription_event_type\": \"RESUME_SUBSCRIPTION\",\n \"effective_date\": \"2022-12-01\",\n \"monthly_billing_anchor_date\": 1,\n \"phases\": [\n {}\n ],\n \"plan_variation_id\": \"6JHXF3B2CW3YKHDV4XEM674H\"\n },\n {\n \"id\": \"1eee8790-472d-4efe-8c69-8ad84e9cefe0\",\n \"subscription_event_type\": \"PLAN_CHANGE\",\n \"effective_date\": \"2023-04-01\",\n \"monthly_billing_anchor_date\": 1,\n \"phases\": [\n {}\n ],\n \"plan_variation_id\": \"02CD53CFA4d1498AFAD42\"\n },\n {\n \"id\": \"a0c08083-5db0-4800-85c7-d398de4fbb6e\",\n \"subscription_event_type\": \"STOP_SUBSCRIPTION\",\n \"effective_date\": \"2023-06-21\",\n \"monthly_billing_anchor_date\": 1,\n \"phases\": [\n {}\n ],\n \"plan_variation_id\": \"6JHXF3B2CW3YKHDV4XEM674H\"\n }\n ],\n \"cursor\": \"cursor\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"48d5f526-2ca6-4934-94a2-a6a5783c9205","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ff96cc91-0307-44c7-93a1-f9325942a685","name":"PauseSubscription - default","request":{"urlPathTemplate":"/v2/subscriptions/{subscription_id}/pause","method":"POST","pathParameters":{"subscription_id":{"equalTo":"subscription_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"subscription\": {\n \"id\": \"56214fb2-cc85-47a1-93bc-44f3766bb56f\",\n \"location_id\": \"S8GWD5R9QB376\",\n \"plan_variation_id\": \"6JHXF3B2CW3YKHDV4XEM674H\",\n \"customer_id\": \"CHFGVKYY8RSV93M5KCYTG4PN0G\",\n \"start_date\": \"2023-06-20\",\n \"canceled_date\": \"canceled_date\",\n \"charged_through_date\": \"charged_through_date\",\n \"status\": \"ACTIVE\",\n \"tax_percentage\": \"tax_percentage\",\n \"invoice_ids\": [\n \"invoice_ids\"\n ],\n \"price_override_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"version\": 1,\n \"created_at\": \"2023-06-20T21:53:10Z\",\n \"card_id\": \"ccof:qy5x8hHGYsgLrp4Q4GB\",\n \"timezone\": \"America/Los_Angeles\",\n \"source\": {\n \"name\": \"My Application\"\n },\n \"actions\": [\n {}\n ],\n \"monthly_billing_anchor_date\": 1,\n \"phases\": [\n {\n \"uid\": \"873451e0-745b-4e87-ab0b-c574933fe616\",\n \"ordinal\": 0,\n \"order_template_id\": \"U2NaowWxzXwpsZU697x7ZHOAnCNZY\",\n \"plan_phase_uid\": \"X2Q2AONPB3RB64Y27S25QCZP\"\n }\n ],\n \"completed_date\": \"completed_date\"\n },\n \"actions\": [\n {\n \"id\": \"99b2439e-63f7-3ad5-95f7-ab2447a80673\",\n \"type\": \"PAUSE\",\n \"effective_date\": \"2023-11-17\",\n \"monthly_billing_anchor_date\": 1,\n \"phases\": [\n {}\n ],\n \"new_plan_variation_id\": \"new_plan_variation_id\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"ff96cc91-0307-44c7-93a1-f9325942a685","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f8268765-83f3-4f84-a128-24039defaa9c","name":"ResumeSubscription - default","request":{"urlPathTemplate":"/v2/subscriptions/{subscription_id}/resume","method":"POST","pathParameters":{"subscription_id":{"equalTo":"subscription_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"subscription\": {\n \"id\": \"56214fb2-cc85-47a1-93bc-44f3766bb56f\",\n \"location_id\": \"S8GWD5R9QB376\",\n \"plan_variation_id\": \"6JHXF3B2CW3YKHDV4XEM674H\",\n \"customer_id\": \"CHFGVKYY8RSV93M5KCYTG4PN0G\",\n \"start_date\": \"2023-06-20\",\n \"canceled_date\": \"canceled_date\",\n \"charged_through_date\": \"charged_through_date\",\n \"status\": \"ACTIVE\",\n \"tax_percentage\": \"tax_percentage\",\n \"invoice_ids\": [\n \"invoice_ids\"\n ],\n \"price_override_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"version\": 1,\n \"created_at\": \"2023-06-20T21:53:10Z\",\n \"card_id\": \"ccof:qy5x8hHGYsgLrp4Q4GB\",\n \"timezone\": \"America/Los_Angeles\",\n \"source\": {\n \"name\": \"My Application\"\n },\n \"actions\": [\n {}\n ],\n \"monthly_billing_anchor_date\": 1,\n \"phases\": [\n {\n \"uid\": \"873451e0-745b-4e87-ab0b-c574933fe616\",\n \"ordinal\": 0,\n \"order_template_id\": \"U2NaowWxzXwpsZU697x7ZHOAnCNZY\",\n \"plan_phase_uid\": \"X2Q2AONPB3RB64Y27S25QCZP\"\n }\n ],\n \"completed_date\": \"completed_date\"\n },\n \"actions\": [\n {\n \"id\": \"18ff74f4-3da4-30c5-929f-7d6fca84f115\",\n \"type\": \"RESUME\",\n \"effective_date\": \"2023-09-01\",\n \"monthly_billing_anchor_date\": 1,\n \"phases\": [\n {}\n ],\n \"new_plan_variation_id\": \"new_plan_variation_id\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"f8268765-83f3-4f84-a128-24039defaa9c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"57c9be95-f4ee-409d-87b7-f7553556fd6e","name":"SwapPlan - default","request":{"urlPathTemplate":"/v2/subscriptions/{subscription_id}/swap-plan","method":"POST","pathParameters":{"subscription_id":{"equalTo":"subscription_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"subscription\": {\n \"id\": \"9ba40961-995a-4a3d-8c53-048c40cafc13\",\n \"location_id\": \"S8GWD5R9QB376\",\n \"plan_variation_id\": \"FQ7CDXXWSLUJRPM3GFJSJGZ7\",\n \"customer_id\": \"CHFGVKYY8RSV93M5KCYTG4PN0G\",\n \"start_date\": \"start_date\",\n \"canceled_date\": \"canceled_date\",\n \"charged_through_date\": \"charged_through_date\",\n \"status\": \"ACTIVE\",\n \"tax_percentage\": \"tax_percentage\",\n \"invoice_ids\": [\n \"invoice_ids\"\n ],\n \"price_override_money\": {\n \"amount\": 2000,\n \"currency\": \"USD\"\n },\n \"version\": 3,\n \"created_at\": \"2023-06-20T21:53:10Z\",\n \"card_id\": \"card_id\",\n \"timezone\": \"America/Los_Angeles\",\n \"source\": {\n \"name\": \"My Application\"\n },\n \"actions\": [\n {}\n ],\n \"monthly_billing_anchor_date\": 1,\n \"phases\": [\n {\n \"uid\": \"98d6f53b-40e1-4714-8827-032fd923be25\",\n \"ordinal\": 0,\n \"order_template_id\": \"E6oBY5WfQ2eN4pkYZwq4ka6n7KeZY\",\n \"plan_phase_uid\": \"C66BKH3ASTDYGJJCEZXQQSS7\"\n }\n ],\n \"completed_date\": \"completed_date\"\n },\n \"actions\": [\n {\n \"id\": \"f0a1dfdc-675b-3a14-a640-99f7ac1cee83\",\n \"type\": \"SWAP_PLAN\",\n \"effective_date\": \"2023-11-17\",\n \"monthly_billing_anchor_date\": 1,\n \"phases\": [\n {\n \"ordinal\": 0,\n \"order_template_id\": \"uhhnjH9osVv3shUADwaC0b3hNxQZY\"\n }\n ],\n \"new_plan_variation_id\": \"FQ7CDXXWSLUJRPM3GFJSJGZ7\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"57c9be95-f4ee-409d-87b7-f7553556fd6e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"93c92692-b925-4be7-a1cb-22580b353dfa","name":"CreateTeamMember - default","request":{"urlPathTemplate":"/v2/team-members","method":"POST"},"response":{"status":200,"body":"{\n \"team_member\": {\n \"id\": \"1yJlHapkseYnNPETIU1B\",\n \"reference_id\": \"reference_id_1\",\n \"is_owner\": false,\n \"status\": \"ACTIVE\",\n \"given_name\": \"Joe\",\n \"family_name\": \"Doe\",\n \"email_address\": \"joe_doe@example.com\",\n \"phone_number\": \"+14159283333\",\n \"created_at\": \"2021-06-11T22:55:45Z\",\n \"updated_at\": \"2021-06-11T22:55:45Z\",\n \"assigned_locations\": {\n \"assignment_type\": \"EXPLICIT_LOCATIONS\",\n \"location_ids\": [\n \"GA2Y9HSJ8KRYT\",\n \"YSGH2WBKG94QZ\"\n ]\n },\n \"wage_setting\": {\n \"team_member_id\": \"1yJlHapkseYnNPETIU1B\",\n \"job_assignments\": [\n {\n \"job_title\": \"Manager\",\n \"pay_type\": \"SALARY\",\n \"hourly_rate\": {\n \"amount\": 1443,\n \"currency\": \"USD\"\n },\n \"annual_rate\": {\n \"amount\": 3000000,\n \"currency\": \"USD\"\n },\n \"weekly_hours\": 40,\n \"job_id\": \"FjS8x95cqHiMenw4f1NAUH4P\"\n },\n {\n \"job_title\": \"Cashier\",\n \"pay_type\": \"HOURLY\",\n \"hourly_rate\": {\n \"amount\": 2000,\n \"currency\": \"USD\"\n },\n \"job_id\": \"VDNpRv8da51NU8qZFC5zDWpF\"\n }\n ],\n \"is_overtime_exempt\": true,\n \"version\": 1,\n \"created_at\": \"2021-06-11T22:55:45Z\",\n \"updated_at\": \"2021-06-11T22:55:45Z\"\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"93c92692-b925-4be7-a1cb-22580b353dfa","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"bd500a65-e664-42f5-8468-33b04ced8423","name":"BulkCreateTeamMembers - default","request":{"urlPathTemplate":"/v2/team-members/bulk-create","method":"POST"},"response":{"status":200,"body":"{\n \"team_members\": {\n \"idempotency-key-1\": {\n \"team_member\": {\n \"id\": \"ywhG1qfIOoqsHfVRubFV\",\n \"reference_id\": \"reference_id_1\",\n \"is_owner\": false,\n \"status\": \"ACTIVE\",\n \"given_name\": \"Joe\",\n \"family_name\": \"Doe\",\n \"email_address\": \"joe_doe@gmail.com\",\n \"phone_number\": \"+14159283333\",\n \"assigned_locations\": {\n \"assignment_type\": \"EXPLICIT_LOCATIONS\",\n \"location_ids\": [\n \"GA2Y9HSJ8KRYT\",\n \"YSGH2WBKG94QZ\"\n ]\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"idempotency-key-2\": {\n \"team_member\": {\n \"id\": \"IF_Ncrg7fHhCqxVI9T6R\",\n \"reference_id\": \"reference_id_2\",\n \"is_owner\": false,\n \"status\": \"ACTIVE\",\n \"given_name\": \"Jane\",\n \"family_name\": \"Smith\",\n \"email_address\": \"jane_smith@gmail.com\",\n \"phone_number\": \"+14159223334\",\n \"assigned_locations\": {\n \"assignment_type\": \"ALL_CURRENT_AND_FUTURE_LOCATIONS\"\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"bd500a65-e664-42f5-8468-33b04ced8423","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"11621634-4fa6-4636-a57b-613f49f8fa46","name":"BulkUpdateTeamMembers - default","request":{"urlPathTemplate":"/v2/team-members/bulk-update","method":"POST"},"response":{"status":200,"body":"{\n \"team_members\": {\n \"AFMwA08kR-MIF-3Vs0OE\": {\n \"team_member\": {\n \"id\": \"AFMwA08kR-MIF-3Vs0OE\",\n \"reference_id\": \"reference_id_2\",\n \"is_owner\": false,\n \"status\": \"ACTIVE\",\n \"given_name\": \"Jane\",\n \"family_name\": \"Smith\",\n \"email_address\": \"jane_smith@example.com\",\n \"phone_number\": \"+14159223334\",\n \"created_at\": \"2020-03-24T18:14:00Z\",\n \"updated_at\": \"2020-03-24T18:18:00Z\",\n \"assigned_locations\": {\n \"assignment_type\": \"ALL_CURRENT_AND_FUTURE_LOCATIONS\"\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"fpgteZNMaf0qOK-a4t6P\": {\n \"team_member\": {\n \"id\": \"fpgteZNMaf0qOK-a4t6P\",\n \"reference_id\": \"reference_id_1\",\n \"is_owner\": false,\n \"status\": \"ACTIVE\",\n \"given_name\": \"Joe\",\n \"family_name\": \"Doe\",\n \"email_address\": \"joe_doe@example.com\",\n \"phone_number\": \"+14159283333\",\n \"created_at\": \"2020-03-24T18:14:00Z\",\n \"updated_at\": \"2020-03-24T18:18:00Z\",\n \"assigned_locations\": {\n \"assignment_type\": \"EXPLICIT_LOCATIONS\",\n \"location_ids\": [\n \"GA2Y9HSJ8KRYT\",\n \"YSGH2WBKG94QZ\"\n ]\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"11621634-4fa6-4636-a57b-613f49f8fa46","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e498e702-9495-4044-8151-7ee4674fc414","name":"SearchTeamMembers - default","request":{"urlPathTemplate":"/v2/team-members/search","method":"POST"},"response":{"status":200,"body":"{\n \"team_members\": [\n {\n \"id\": \"-3oZQKPKVk6gUXU_V5Qa\",\n \"reference_id\": \"12345678\",\n \"is_owner\": false,\n \"status\": \"ACTIVE\",\n \"given_name\": \"Johnny\",\n \"family_name\": \"Cash\",\n \"email_address\": \"johnny_cash@squareup.com\",\n \"phone_number\": \"phone_number\",\n \"created_at\": \"2019-07-10T17:26:48Z\",\n \"updated_at\": \"2020-04-28T21:49:28Z\",\n \"assigned_locations\": {\n \"assignment_type\": \"ALL_CURRENT_AND_FUTURE_LOCATIONS\"\n },\n \"wage_setting\": {\n \"team_member_id\": \"-3oZQKPKVk6gUXU_V5Qa\",\n \"job_assignments\": [\n {\n \"job_title\": \"Manager\",\n \"pay_type\": \"SALARY\",\n \"hourly_rate\": {\n \"amount\": 1443,\n \"currency\": \"USD\"\n },\n \"annual_rate\": {\n \"amount\": 3000000,\n \"currency\": \"USD\"\n },\n \"weekly_hours\": 40,\n \"job_id\": \"FjS8x95cqHiMenw4f1NAUH4P\"\n },\n {\n \"job_title\": \"Cashier\",\n \"pay_type\": \"HOURLY\",\n \"hourly_rate\": {\n \"amount\": 2000,\n \"currency\": \"USD\"\n },\n \"job_id\": \"VDNpRv8da51NU8qZFC5zDWpF\"\n }\n ],\n \"is_overtime_exempt\": true,\n \"version\": 1,\n \"created_at\": \"2021-06-11T22:55:45Z\",\n \"updated_at\": \"2021-06-11T22:55:45Z\"\n }\n },\n {\n \"id\": \"1AVJj0DjkzbmbJw5r4KK\",\n \"reference_id\": \"abcded\",\n \"is_owner\": false,\n \"status\": \"ACTIVE\",\n \"given_name\": \"Lombard\",\n \"family_name\": \"Smith\",\n \"email_address\": \"email_address\",\n \"phone_number\": \"+14155552671\",\n \"created_at\": \"2020-03-24T18:14:01Z\",\n \"updated_at\": \"2020-06-09T17:38:05Z\",\n \"assigned_locations\": {\n \"assignment_type\": \"ALL_CURRENT_AND_FUTURE_LOCATIONS\"\n },\n \"wage_setting\": {\n \"team_member_id\": \"1AVJj0DjkzbmbJw5r4KK\",\n \"job_assignments\": [\n {\n \"job_title\": \"Cashier\",\n \"pay_type\": \"HOURLY\",\n \"hourly_rate\": {\n \"amount\": 2400,\n \"currency\": \"USD\"\n },\n \"job_id\": \"VDNpRv8da51NU8qZFC5zDWpF\"\n }\n ],\n \"is_overtime_exempt\": true,\n \"version\": 2,\n \"created_at\": \"2020-03-24T18:14:01Z\",\n \"updated_at\": \"2020-06-09T17:38:05Z\"\n }\n },\n {\n \"id\": \"2JCmiJol_KKFs9z2Evim\",\n \"reference_id\": \"reference_id\",\n \"is_owner\": false,\n \"status\": \"ACTIVE\",\n \"given_name\": \"Monica\",\n \"family_name\": \"Sway\",\n \"email_address\": \"email_address\",\n \"phone_number\": \"phone_number\",\n \"created_at\": \"2020-03-24T01:09:25Z\",\n \"updated_at\": \"2020-03-24T01:11:25Z\",\n \"assigned_locations\": {\n \"assignment_type\": \"ALL_CURRENT_AND_FUTURE_LOCATIONS\"\n },\n \"wage_setting\": {\n \"team_member_id\": \"2JCmiJol_KKFs9z2Evim\",\n \"job_assignments\": [\n {\n \"job_title\": \"Cashier\",\n \"pay_type\": \"HOURLY\",\n \"hourly_rate\": {\n \"amount\": 2400,\n \"currency\": \"USD\"\n },\n \"job_id\": \"VDNpRv8da51NU8qZFC5zDWpF\"\n }\n ],\n \"is_overtime_exempt\": true,\n \"version\": 1,\n \"created_at\": \"2020-03-24T01:09:25Z\",\n \"updated_at\": \"2020-03-24T01:09:25Z\"\n }\n },\n {\n \"id\": \"4uXcJQSLtbk3F0UQHFNQ\",\n \"reference_id\": \"reference_id\",\n \"is_owner\": false,\n \"status\": \"ACTIVE\",\n \"given_name\": \"Elton\",\n \"family_name\": \"Ipsum\",\n \"email_address\": \"email_address\",\n \"phone_number\": \"phone_number\",\n \"created_at\": \"2020-03-24T01:09:23Z\",\n \"updated_at\": \"2020-03-24T01:15:23Z\",\n \"assigned_locations\": {\n \"assignment_type\": \"ALL_CURRENT_AND_FUTURE_LOCATIONS\"\n }\n },\n {\n \"id\": \"5CoUpyrw1YwGWcRd-eDL\",\n \"reference_id\": \"reference_id\",\n \"is_owner\": false,\n \"status\": \"ACTIVE\",\n \"given_name\": \"Steven\",\n \"family_name\": \"Lo\",\n \"email_address\": \"email_address\",\n \"phone_number\": \"phone_number\",\n \"created_at\": \"2020-03-24T01:09:23Z\",\n \"updated_at\": \"2020-03-24T01:19:23Z\",\n \"assigned_locations\": {\n \"assignment_type\": \"ALL_CURRENT_AND_FUTURE_LOCATIONS\"\n }\n },\n {\n \"id\": \"5MRPTTp8MMBLVSmzrGha\",\n \"reference_id\": \"reference_id\",\n \"is_owner\": false,\n \"status\": \"ACTIVE\",\n \"given_name\": \"Patrick\",\n \"family_name\": \"Steward\",\n \"email_address\": \"email_address\",\n \"phone_number\": \"+14155552671\",\n \"created_at\": \"2020-03-24T18:14:03Z\",\n \"updated_at\": \"2020-03-24T18:18:03Z\",\n \"assigned_locations\": {\n \"assignment_type\": \"ALL_CURRENT_AND_FUTURE_LOCATIONS\"\n },\n \"wage_setting\": {\n \"team_member_id\": \"5MRPTTp8MMBLVSmzrGha\",\n \"job_assignments\": [\n {\n \"job_title\": \"Cashier\",\n \"pay_type\": \"HOURLY\",\n \"hourly_rate\": {\n \"amount\": 2000,\n \"currency\": \"USD\"\n },\n \"job_id\": \"VDNpRv8da51NU8qZFC5zDWpF\"\n }\n ],\n \"is_overtime_exempt\": true,\n \"version\": 1,\n \"created_at\": \"2020-03-24T18:14:03Z\",\n \"updated_at\": \"2020-03-24T18:14:03Z\"\n }\n },\n {\n \"id\": \"7F5ZxsfRnkexhu1PTbfh\",\n \"reference_id\": \"reference_id\",\n \"is_owner\": false,\n \"status\": \"ACTIVE\",\n \"given_name\": \"Ivy\",\n \"family_name\": \"Manny\",\n \"email_address\": \"email_address\",\n \"phone_number\": \"phone_number\",\n \"created_at\": \"2020-03-24T01:09:25Z\",\n \"updated_at\": \"2020-03-24T01:09:25Z\",\n \"assigned_locations\": {\n \"assignment_type\": \"ALL_CURRENT_AND_FUTURE_LOCATIONS\"\n }\n },\n {\n \"id\": \"808X9HR72yKvVaigQXf4\",\n \"reference_id\": \"reference_id\",\n \"is_owner\": false,\n \"status\": \"ACTIVE\",\n \"given_name\": \"John\",\n \"family_name\": \"Smith\",\n \"email_address\": \"john_smith@example.com\",\n \"phone_number\": \"+14155552671\",\n \"created_at\": \"2020-03-24T18:14:02Z\",\n \"updated_at\": \"2020-03-24T18:14:02Z\",\n \"assigned_locations\": {\n \"assignment_type\": \"ALL_CURRENT_AND_FUTURE_LOCATIONS\"\n }\n },\n {\n \"id\": \"9MVDVoY4hazkWKGo_OuZ\",\n \"reference_id\": \"reference_id\",\n \"is_owner\": false,\n \"status\": \"ACTIVE\",\n \"given_name\": \"Robert\",\n \"family_name\": \"Wen\",\n \"email_address\": \"r_wen@example.com\",\n \"phone_number\": \"+14155552671\",\n \"created_at\": \"2020-03-24T18:14:00Z\",\n \"updated_at\": \"2020-03-24T18:14:00Z\",\n \"assigned_locations\": {\n \"assignment_type\": \"ALL_CURRENT_AND_FUTURE_LOCATIONS\"\n }\n },\n {\n \"id\": \"9UglUjOXQ13-hMFypCft\",\n \"reference_id\": \"reference_id\",\n \"is_owner\": false,\n \"status\": \"ACTIVE\",\n \"given_name\": \"Ashley\",\n \"family_name\": \"Simpson\",\n \"email_address\": \"asimpson@example.com\",\n \"phone_number\": \"+14155552671\",\n \"created_at\": \"2020-03-24T18:14:00Z\",\n \"updated_at\": \"2020-03-24T18:18:00Z\",\n \"assigned_locations\": {\n \"assignment_type\": \"ALL_CURRENT_AND_FUTURE_LOCATIONS\"\n },\n \"wage_setting\": {\n \"team_member_id\": \"9UglUjOXQ13-hMFypCft\",\n \"job_assignments\": [\n {\n \"job_title\": \"Cashier\",\n \"pay_type\": \"HOURLY\",\n \"hourly_rate\": {\n \"amount\": 2000,\n \"currency\": \"USD\"\n },\n \"job_id\": \"VDNpRv8da51NU8qZFC5zDWpF\"\n }\n ],\n \"is_overtime_exempt\": true,\n \"version\": 1,\n \"created_at\": \"2020-03-24T18:14:00Z\",\n \"updated_at\": \"2020-03-24T18:14:03Z\"\n }\n }\n ],\n \"cursor\": \"N:9UglUjOXQ13-hMFypCft\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"e498e702-9495-4044-8151-7ee4674fc414","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"476f2f10-55a5-438d-ba7c-91e4c729c16d","name":"RetrieveTeamMember - default","request":{"urlPathTemplate":"/v2/team-members/{team_member_id}","method":"GET","pathParameters":{"team_member_id":{"equalTo":"team_member_id"}}},"response":{"status":200,"body":"{\n \"team_member\": {\n \"id\": \"1yJlHapkseYnNPETIU1B\",\n \"reference_id\": \"reference_id_1\",\n \"is_owner\": false,\n \"status\": \"ACTIVE\",\n \"given_name\": \"Joe\",\n \"family_name\": \"Doe\",\n \"email_address\": \"joe_doe@example.com\",\n \"phone_number\": \"+14159283333\",\n \"created_at\": \"2021-06-11T22:55:45Z\",\n \"updated_at\": \"2021-06-15T17:38:05Z\",\n \"assigned_locations\": {\n \"assignment_type\": \"EXPLICIT_LOCATIONS\",\n \"location_ids\": [\n \"GA2Y9HSJ8KRYT\",\n \"YSGH2WBKG94QZ\"\n ]\n },\n \"wage_setting\": {\n \"team_member_id\": \"1yJlHapkseYnNPETIU1B\",\n \"job_assignments\": [\n {\n \"job_title\": \"Manager\",\n \"pay_type\": \"SALARY\",\n \"hourly_rate\": {\n \"amount\": 1443,\n \"currency\": \"USD\"\n },\n \"annual_rate\": {\n \"amount\": 3000000,\n \"currency\": \"USD\"\n },\n \"weekly_hours\": 40,\n \"job_id\": \"FjS8x95cqHiMenw4f1NAUH4P\"\n },\n {\n \"job_title\": \"Cashier\",\n \"pay_type\": \"HOURLY\",\n \"hourly_rate\": {\n \"amount\": 2000,\n \"currency\": \"USD\"\n },\n \"job_id\": \"VDNpRv8da51NU8qZFC5zDWpF\"\n }\n ],\n \"is_overtime_exempt\": true,\n \"version\": 1,\n \"created_at\": \"2021-06-11T22:55:45Z\",\n \"updated_at\": \"2021-06-11T22:55:45Z\"\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"476f2f10-55a5-438d-ba7c-91e4c729c16d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a313e493-d14c-443e-a552-1b40cab8de77","name":"UpdateTeamMember - default","request":{"urlPathTemplate":"/v2/team-members/{team_member_id}","method":"PUT","pathParameters":{"team_member_id":{"equalTo":"team_member_id"}}},"response":{"status":200,"body":"{\n \"team_member\": {\n \"id\": \"1yJlHapkseYnNPETIU1B\",\n \"reference_id\": \"reference_id_1\",\n \"is_owner\": false,\n \"status\": \"ACTIVE\",\n \"given_name\": \"Joe\",\n \"family_name\": \"Doe\",\n \"email_address\": \"joe_doe@example.com\",\n \"phone_number\": \"+14159283333\",\n \"created_at\": \"2021-06-11T22:55:45Z\",\n \"updated_at\": \"2021-06-15T17:38:05Z\",\n \"assigned_locations\": {\n \"assignment_type\": \"EXPLICIT_LOCATIONS\",\n \"location_ids\": [\n \"GA2Y9HSJ8KRYT\",\n \"YSGH2WBKG94QZ\"\n ]\n },\n \"wage_setting\": {\n \"team_member_id\": \"1yJlHapkseYnNPETIU1B\",\n \"job_assignments\": [\n {\n \"job_title\": \"Manager\",\n \"pay_type\": \"SALARY\",\n \"hourly_rate\": {\n \"amount\": 1443,\n \"currency\": \"USD\"\n },\n \"annual_rate\": {\n \"amount\": 3000000,\n \"currency\": \"USD\"\n },\n \"weekly_hours\": 40,\n \"job_id\": \"FjS8x95cqHiMenw4f1NAUH4P\"\n },\n {\n \"job_title\": \"Cashier\",\n \"pay_type\": \"HOURLY\",\n \"hourly_rate\": {\n \"amount\": 1200,\n \"currency\": \"USD\"\n },\n \"job_id\": \"VDNpRv8da51NU8qZFC5zDWpF\"\n }\n ],\n \"is_overtime_exempt\": true,\n \"version\": 1,\n \"created_at\": \"2021-06-11T22:55:45Z\",\n \"updated_at\": \"2021-06-11T22:55:45Z\"\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"a313e493-d14c-443e-a552-1b40cab8de77","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"59d5dd3d-009b-49f2-a0db-ede1e40a3818","name":"ListJobs - default","request":{"urlPathTemplate":"/v2/team-members/jobs","method":"GET","queryParameters":{"cursor":{"equalTo":"cursor"}}},"response":{"status":200,"body":"{\n \"jobs\": [\n {\n \"id\": \"VDNpRv8da51NU8qZFC5zDWpF\",\n \"title\": \"Cashier\",\n \"is_tip_eligible\": true,\n \"created_at\": \"2021-06-11T22:55:45Z\",\n \"updated_at\": \"2021-06-11T22:55:45Z\",\n \"version\": 2\n },\n {\n \"id\": \"FjS8x95cqHiMenw4f1NAUH4P\",\n \"title\": \"Chef\",\n \"is_tip_eligible\": false,\n \"created_at\": \"2021-06-11T22:55:45Z\",\n \"updated_at\": \"2021-06-11T22:55:45Z\",\n \"version\": 1\n }\n ],\n \"cursor\": \"cursor\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"59d5dd3d-009b-49f2-a0db-ede1e40a3818","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"b7bd9d9f-a565-485d-a597-d75d4c09771f","name":"CreateJob - default","request":{"urlPathTemplate":"/v2/team-members/jobs","method":"POST"},"response":{"status":200,"body":"{\n \"job\": {\n \"id\": \"1yJlHapkseYnNPETIU1B\",\n \"title\": \"Cashier\",\n \"is_tip_eligible\": true,\n \"created_at\": \"2021-06-11T22:55:45Z\",\n \"updated_at\": \"2021-06-11T22:55:45Z\",\n \"version\": 1\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"b7bd9d9f-a565-485d-a597-d75d4c09771f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"43af2eb0-6261-4f69-ad5a-8947e32f86f3","name":"RetrieveJob - default","request":{"urlPathTemplate":"/v2/team-members/jobs/{job_id}","method":"GET","pathParameters":{"job_id":{"equalTo":"job_id"}}},"response":{"status":200,"body":"{\n \"job\": {\n \"id\": \"1yJlHapkseYnNPETIU1B\",\n \"title\": \"Cashier 1\",\n \"is_tip_eligible\": true,\n \"created_at\": \"2021-06-11T22:55:45Z\",\n \"updated_at\": \"2021-06-11T22:55:45Z\",\n \"version\": 2\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"43af2eb0-6261-4f69-ad5a-8947e32f86f3","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"1f0d95be-5be1-4055-939f-776d78d6acf0","name":"UpdateJob - default","request":{"urlPathTemplate":"/v2/team-members/jobs/{job_id}","method":"PUT","pathParameters":{"job_id":{"equalTo":"job_id"}}},"response":{"status":200,"body":"{\n \"job\": {\n \"id\": \"1yJlHapkseYnNPETIU1B\",\n \"title\": \"Cashier 1\",\n \"is_tip_eligible\": true,\n \"created_at\": \"2021-06-11T22:55:45Z\",\n \"updated_at\": \"2021-06-13T12:55:45Z\",\n \"version\": 2\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"1f0d95be-5be1-4055-939f-776d78d6acf0","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"7dec2555-d9dd-468c-994f-370cda188d59","name":"DismissTerminalAction - default","request":{"urlPathTemplate":"/v2/terminals/actions/{action_id}/dismiss","method":"POST","pathParameters":{"action_id":{"equalTo":"action_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"action\": {\n \"id\": \"termapia:abcdefg1234567\",\n \"device_id\": \"DEVICE_ID\",\n \"deadline_duration\": \"PT5M\",\n \"status\": \"COMPLETED\",\n \"cancel_reason\": \"BUYER_CANCELED\",\n \"created_at\": \"2021-07-28T23:22:07.476Z\",\n \"updated_at\": \"2021-07-28T23:22:29.511Z\",\n \"app_id\": \"APP_ID\",\n \"location_id\": \"location_id\",\n \"type\": \"CONFIRMATION\",\n \"qr_code_options\": {\n \"title\": \"title\",\n \"body\": \"body\",\n \"barcode_contents\": \"barcode_contents\"\n },\n \"save_card_options\": {\n \"customer_id\": \"customer_id\",\n \"card_id\": \"card_id\",\n \"reference_id\": \"reference_id\"\n },\n \"signature_options\": {\n \"title\": \"title\",\n \"body\": \"body\",\n \"signature\": [\n {}\n ]\n },\n \"confirmation_options\": {\n \"title\": \"Marketing communications\",\n \"body\": \"I agree to receive promotional emails about future events and activities.\",\n \"agree_button_text\": \"Agree\",\n \"disagree_button_text\": \"Decline\",\n \"decision\": {\n \"has_agreed\": true\n }\n },\n \"receipt_options\": {\n \"payment_id\": \"payment_id\",\n \"print_only\": true,\n \"is_duplicate\": true\n },\n \"data_collection_options\": {\n \"title\": \"title\",\n \"body\": \"body\",\n \"input_type\": \"EMAIL\"\n },\n \"select_options\": {\n \"title\": \"title\",\n \"body\": \"body\",\n \"options\": [\n {\n \"reference_id\": \"reference_id\",\n \"title\": \"title\"\n }\n ],\n \"selected_option\": {\n \"reference_id\": \"reference_id\",\n \"title\": \"title\"\n }\n },\n \"device_metadata\": {\n \"battery_percentage\": \"battery_percentage\",\n \"charging_state\": \"charging_state\",\n \"location_id\": \"location_id\",\n \"merchant_id\": \"merchant_id\",\n \"network_connection_type\": \"network_connection_type\",\n \"payment_region\": \"payment_region\",\n \"serial_number\": \"serial_number\",\n \"os_version\": \"os_version\",\n \"app_version\": \"app_version\",\n \"wifi_network_name\": \"wifi_network_name\",\n \"wifi_network_strength\": \"wifi_network_strength\",\n \"ip_address\": \"ip_address\"\n },\n \"await_next_action\": true,\n \"await_next_action_duration\": \"PT5M\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"7dec2555-d9dd-468c-994f-370cda188d59","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"68a0f3d2-ce8f-4a0e-a06a-2be2da418fdb","name":"DismissTerminalCheckout - default","request":{"urlPathTemplate":"/v2/terminals/checkouts/{checkout_id}/dismiss","method":"POST","pathParameters":{"checkout_id":{"equalTo":"checkout_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"checkout\": {\n \"id\": \"LmZEKbo3SBfqO\",\n \"amount_money\": {\n \"amount\": 2610,\n \"currency\": \"USD\"\n },\n \"reference_id\": \"reference_id\",\n \"note\": \"note\",\n \"order_id\": \"order_id\",\n \"payment_options\": {\n \"autocomplete\": true,\n \"delay_duration\": \"delay_duration\",\n \"accept_partial_authorization\": true,\n \"delay_action\": \"CANCEL\"\n },\n \"device_options\": {\n \"device_id\": \"dbb5d83a-7838-11ea-bc55-0242ac130003\",\n \"skip_receipt_screen\": false,\n \"collect_signature\": true,\n \"tip_settings\": {\n \"allow_tipping\": true,\n \"separate_tip_screen\": true,\n \"custom_tip_field\": false\n },\n \"show_itemized_cart\": true,\n \"allow_auto_card_surcharge\": true\n },\n \"deadline_duration\": \"PT5M\",\n \"status\": \"COMPLETED\",\n \"cancel_reason\": \"BUYER_CANCELED\",\n \"payment_ids\": [\n \"D7vLJqMkvSoAlX4yyFzUitOy4EPZY\"\n ],\n \"created_at\": \"2023-11-29T14:59:50.682Z\",\n \"updated_at\": \"2023-11-29T15:00:18.936Z\",\n \"app_id\": \"APP_ID\",\n \"location_id\": \"LOCATION_ID\",\n \"payment_type\": \"CARD_PRESENT\",\n \"team_member_id\": \"team_member_id\",\n \"customer_id\": \"customer_id\",\n \"app_fee_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"statement_description_identifier\": \"statement_description_identifier\",\n \"tip_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"68a0f3d2-ce8f-4a0e-a06a-2be2da418fdb","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4612564d-4c2d-4ebd-a5dd-4439c4cf5cd1","name":"DismissTerminalRefund - default","request":{"urlPathTemplate":"/v2/terminals/refunds/{terminal_refund_id}/dismiss","method":"POST","pathParameters":{"terminal_refund_id":{"equalTo":"terminal_refund_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"refund\": {\n \"id\": \"vjkNb2HD-xq5kiWWiJ7RhwrQnkxIn2N0l1nPZY\",\n \"refund_id\": \"refund_id\",\n \"payment_id\": \"xq5kiWWiJ7RhwrQnkxIn2N0l1nPZY\",\n \"order_id\": \"s8OMhQcpEp1b61YywlccSHWqUaQZY\",\n \"amount_money\": {\n \"amount\": 111,\n \"currency\": \"CAD\"\n },\n \"reason\": \"Returning item\",\n \"device_id\": \"47776348fd8b32b9\",\n \"deadline_duration\": \"PT5M\",\n \"status\": \"IN_PROGRESS\",\n \"cancel_reason\": \"BUYER_CANCELED\",\n \"created_at\": \"2023-11-30T16:16:39.299Z\",\n \"updated_at\": \"2023-11-30T16:16:57.863Z\",\n \"app_id\": \"APP_ID\",\n \"location_id\": \"location_id\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"4612564d-4c2d-4ebd-a5dd-4439c4cf5cd1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4be9afdd-754b-4e93-a3f9-1a6100cad846","name":"CreateTransferOrder - default","request":{"urlPathTemplate":"/v2/transfer-orders","method":"POST"},"response":{"status":200,"body":"{\n \"transfer_order\": {\n \"id\": \"EXAMPLE_TRANSFER_ORDER_ID_123\",\n \"source_location_id\": \"EXAMPLE_SOURCE_LOCATION_ID_123\",\n \"destination_location_id\": \"EXAMPLE_DEST_LOCATION_ID_456\",\n \"status\": \"DRAFT\",\n \"created_at\": \"2025-01-15T10:30:00Z\",\n \"updated_at\": \"2025-01-15T10:30:00Z\",\n \"expected_at\": \"2025-11-09T05:00:00Z\",\n \"completed_at\": \"completed_at\",\n \"notes\": \"Example transfer order for inventory redistribution between locations\",\n \"tracking_number\": \"TRACK123456789\",\n \"created_by_team_member_id\": \"EXAMPLE_TEAM_MEMBER_ID_789\",\n \"line_items\": [\n {\n \"uid\": \"1\",\n \"item_variation_id\": \"EXAMPLE_ITEM_VARIATION_ID_001\",\n \"quantity_ordered\": \"5\",\n \"quantity_pending\": \"5\",\n \"quantity_received\": \"0\",\n \"quantity_damaged\": \"0\",\n \"quantity_canceled\": \"0\"\n },\n {\n \"uid\": \"2\",\n \"item_variation_id\": \"EXAMPLE_ITEM_VARIATION_ID_002\",\n \"quantity_ordered\": \"3\",\n \"quantity_pending\": \"3\",\n \"quantity_received\": \"0\",\n \"quantity_damaged\": \"0\",\n \"quantity_canceled\": \"0\"\n }\n ],\n \"version\": 1753109537351\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"4be9afdd-754b-4e93-a3f9-1a6100cad846","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8437f976-942d-49a5-96d5-1cdbd9a7f073","name":"SearchTransferOrders - default","request":{"urlPathTemplate":"/v2/transfer-orders/search","method":"POST"},"response":{"status":200,"body":"{\n \"transfer_orders\": [\n {\n \"id\": \"EXAMPLE_TRANSFER_ORDER_ID_123\",\n \"source_location_id\": \"EXAMPLE_SOURCE_LOCATION_ID_123\",\n \"destination_location_id\": \"EXAMPLE_DEST_LOCATION_ID_456\",\n \"status\": \"STARTED\",\n \"created_at\": \"2025-01-15T10:30:00Z\",\n \"updated_at\": \"2025-01-15T10:32:00Z\",\n \"expected_at\": \"2025-11-09T05:00:00Z\",\n \"completed_at\": \"completed_at\",\n \"notes\": \"Inventory rebalance between stores\",\n \"tracking_number\": \"TRACK123456789\",\n \"created_by_team_member_id\": \"EXAMPLE_TEAM_MEMBER_ID_789\",\n \"line_items\": [\n {\n \"uid\": \"1\",\n \"item_variation_id\": \"EXAMPLE_ITEM_VARIATION_ID_001\",\n \"quantity_ordered\": \"5\",\n \"quantity_pending\": \"5\",\n \"quantity_received\": \"0\",\n \"quantity_damaged\": \"0\",\n \"quantity_canceled\": \"0\"\n }\n ],\n \"version\": 1753118664873\n },\n {\n \"id\": \"EXAMPLE_TRANSFER_ORDER_ID_456\",\n \"source_location_id\": \"EXAMPLE_SOURCE_LOCATION_ID_123\",\n \"destination_location_id\": \"EXAMPLE_DEST_LOCATION_ID_456\",\n \"status\": \"PARTIALLY_RECEIVED\",\n \"created_at\": \"2025-01-14T14:20:00Z\",\n \"updated_at\": \"2025-01-15T09:45:00Z\",\n \"expected_at\": \"2025-11-08T12:00:00Z\",\n \"completed_at\": \"completed_at\",\n \"notes\": \"Seasonal stock transfer\",\n \"tracking_number\": \"tracking_number\",\n \"created_by_team_member_id\": \"created_by_team_member_id\",\n \"line_items\": [\n {\n \"uid\": \"1\",\n \"item_variation_id\": \"EXAMPLE_ITEM_VARIATION_ID_002\",\n \"quantity_ordered\": \"10\",\n \"quantity_pending\": \"3\",\n \"quantity_received\": \"7\",\n \"quantity_damaged\": \"0\",\n \"quantity_canceled\": \"0\"\n }\n ],\n \"version\": 1753115540123\n }\n ],\n \"cursor\": \"eyJsYXN0X3VwZGF0ZWRfYXQiOjE3NTMxMTU1NDBfMTIzfQ==\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"8437f976-942d-49a5-96d5-1cdbd9a7f073","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8dca0393-dc55-4037-b713-f1a17916ca2b","name":"RetrieveTransferOrder - default","request":{"urlPathTemplate":"/v2/transfer-orders/{transfer_order_id}","method":"GET","pathParameters":{"transfer_order_id":{"equalTo":"transfer_order_id"}}},"response":{"status":200,"body":"{\n \"transfer_order\": {\n \"id\": \"EXAMPLE_TRANSFER_ORDER_ID_123\",\n \"source_location_id\": \"EXAMPLE_SOURCE_LOCATION_ID_123\",\n \"destination_location_id\": \"EXAMPLE_DEST_LOCATION_ID_456\",\n \"status\": \"STARTED\",\n \"created_at\": \"2025-01-15T10:30:00Z\",\n \"updated_at\": \"2025-01-15T10:35:00Z\",\n \"expected_at\": \"2025-11-09T05:00:00Z\",\n \"completed_at\": \"completed_at\",\n \"notes\": \"Example transfer order for inventory redistribution between locations\",\n \"tracking_number\": \"TRACK123456789\",\n \"created_by_team_member_id\": \"EXAMPLE_TEAM_MEMBER_ID_789\",\n \"line_items\": [\n {\n \"uid\": \"1\",\n \"item_variation_id\": \"EXAMPLE_ITEM_VARIATION_ID_001\",\n \"quantity_ordered\": \"5\",\n \"quantity_pending\": \"5\",\n \"quantity_received\": \"0\",\n \"quantity_damaged\": \"0\",\n \"quantity_canceled\": \"0\"\n },\n {\n \"uid\": \"2\",\n \"item_variation_id\": \"EXAMPLE_ITEM_VARIATION_ID_002\",\n \"quantity_ordered\": \"3\",\n \"quantity_pending\": \"3\",\n \"quantity_received\": \"0\",\n \"quantity_damaged\": \"0\",\n \"quantity_canceled\": \"0\"\n }\n ],\n \"version\": 1753117449752\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"8dca0393-dc55-4037-b713-f1a17916ca2b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"84b11b2a-d747-4818-94b6-95032d82951a","name":"UpdateTransferOrder - default","request":{"urlPathTemplate":"/v2/transfer-orders/{transfer_order_id}","method":"PUT","pathParameters":{"transfer_order_id":{"equalTo":"transfer_order_id"}}},"response":{"status":200,"body":"{\n \"transfer_order\": {\n \"id\": \"EXAMPLE_TRANSFER_ORDER_ID_123\",\n \"source_location_id\": \"EXAMPLE_SOURCE_LOCATION_ID_789\",\n \"destination_location_id\": \"EXAMPLE_DEST_LOCATION_ID_101\",\n \"status\": \"DRAFT\",\n \"created_at\": \"2025-01-15T10:30:00Z\",\n \"updated_at\": \"2025-01-15T11:15:00Z\",\n \"expected_at\": \"2025-11-10T08:00:00Z\",\n \"completed_at\": \"completed_at\",\n \"notes\": \"Updated: Priority transfer due to low stock at destination\",\n \"tracking_number\": \"TRACK987654321\",\n \"created_by_team_member_id\": \"EXAMPLE_TEAM_MEMBER_ID_789\",\n \"line_items\": [\n {\n \"uid\": \"1\",\n \"item_variation_id\": \"EXAMPLE_ITEM_VARIATION_ID_001\",\n \"quantity_ordered\": \"7\",\n \"quantity_pending\": \"7\",\n \"quantity_received\": \"0\",\n \"quantity_damaged\": \"0\",\n \"quantity_canceled\": \"0\"\n },\n {\n \"uid\": \"3\",\n \"item_variation_id\": \"EXAMPLE_NEW_ITEM_VARIATION_ID_003\",\n \"quantity_ordered\": \"2\",\n \"quantity_pending\": \"2\",\n \"quantity_received\": \"0\",\n \"quantity_damaged\": \"0\",\n \"quantity_canceled\": \"0\"\n }\n ],\n \"version\": 1753122900456\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"84b11b2a-d747-4818-94b6-95032d82951a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8e0c4143-3d8c-46c7-9394-2f94990e7044","name":"DeleteTransferOrder - default","request":{"urlPathTemplate":"/v2/transfer-orders/{transfer_order_id}","method":"DELETE","pathParameters":{"transfer_order_id":{"equalTo":"transfer_order_id"}},"queryParameters":{"version":{"equalTo":"1000000"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"8e0c4143-3d8c-46c7-9394-2f94990e7044","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"dcc56670-5484-49f4-bb37-78ab18209588","name":"CancelTransferOrder - default","request":{"urlPathTemplate":"/v2/transfer-orders/{transfer_order_id}/cancel","method":"POST","pathParameters":{"transfer_order_id":{"equalTo":"transfer_order_id"}}},"response":{"status":200,"body":"{\n \"transfer_order\": {\n \"id\": \"EXAMPLE_TRANSFER_ORDER_ID_123\",\n \"source_location_id\": \"EXAMPLE_SOURCE_LOCATION_ID_123\",\n \"destination_location_id\": \"EXAMPLE_DEST_LOCATION_ID_456\",\n \"status\": \"CANCELED\",\n \"created_at\": \"2025-01-15T10:30:00Z\",\n \"updated_at\": \"2025-01-15T10:45:00Z\",\n \"expected_at\": \"2025-11-09T05:00:00Z\",\n \"completed_at\": \"2025-01-15T10:45:00Z\",\n \"notes\": \"Example transfer order for inventory redistribution between locations\",\n \"tracking_number\": \"TRACK123456789\",\n \"created_by_team_member_id\": \"EXAMPLE_TEAM_MEMBER_ID_789\",\n \"line_items\": [\n {\n \"uid\": \"1\",\n \"item_variation_id\": \"EXAMPLE_ITEM_VARIATION_ID_001\",\n \"quantity_ordered\": \"5\",\n \"quantity_pending\": \"0\",\n \"quantity_received\": \"0\",\n \"quantity_damaged\": \"0\",\n \"quantity_canceled\": \"5\"\n },\n {\n \"uid\": \"2\",\n \"item_variation_id\": \"EXAMPLE_ITEM_VARIATION_ID_002\",\n \"quantity_ordered\": \"3\",\n \"quantity_pending\": \"0\",\n \"quantity_received\": \"0\",\n \"quantity_damaged\": \"0\",\n \"quantity_canceled\": \"3\"\n }\n ],\n \"version\": 1753117461842\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"dcc56670-5484-49f4-bb37-78ab18209588","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8be1afe8-e835-4dfd-872e-7b5377d1ecc8","name":"ReceiveTransferOrder - default","request":{"urlPathTemplate":"/v2/transfer-orders/{transfer_order_id}/receive","method":"POST","pathParameters":{"transfer_order_id":{"equalTo":"transfer_order_id"}}},"response":{"status":200,"body":"{\n \"transfer_order\": {\n \"id\": \"EXAMPLE_TRANSFER_ORDER_ID_123\",\n \"source_location_id\": \"EXAMPLE_SOURCE_LOCATION_ID_123\",\n \"destination_location_id\": \"EXAMPLE_DEST_LOCATION_ID_456\",\n \"status\": \"COMPLETED\",\n \"created_at\": \"2025-01-15T10:30:00Z\",\n \"updated_at\": \"2025-01-15T10:55:00Z\",\n \"expected_at\": \"2025-11-09T05:00:00Z\",\n \"completed_at\": \"2025-01-15T10:55:00Z\",\n \"notes\": \"Example transfer order for inventory redistribution between locations\",\n \"tracking_number\": \"TRACK123456789\",\n \"created_by_team_member_id\": \"EXAMPLE_TEAM_MEMBER_ID_789\",\n \"line_items\": [\n {\n \"uid\": \"1\",\n \"item_variation_id\": \"EXAMPLE_ITEM_VARIATION_ID_001\",\n \"quantity_ordered\": \"5\",\n \"quantity_pending\": \"0\",\n \"quantity_received\": \"3\",\n \"quantity_damaged\": \"1\",\n \"quantity_canceled\": \"1\"\n },\n {\n \"uid\": \"2\",\n \"item_variation_id\": \"EXAMPLE_ITEM_VARIATION_ID_002\",\n \"quantity_ordered\": \"3\",\n \"quantity_pending\": \"0\",\n \"quantity_received\": \"2\",\n \"quantity_damaged\": \"0\",\n \"quantity_canceled\": \"1\"\n }\n ],\n \"version\": 1753118667248\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"8be1afe8-e835-4dfd-872e-7b5377d1ecc8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8696bab1-d7e0-4cd8-96d6-63c8526ae61c","name":"StartTransferOrder - default","request":{"urlPathTemplate":"/v2/transfer-orders/{transfer_order_id}/start","method":"POST","pathParameters":{"transfer_order_id":{"equalTo":"transfer_order_id"}}},"response":{"status":200,"body":"{\n \"transfer_order\": {\n \"id\": \"EXAMPLE_TRANSFER_ORDER_ID_123\",\n \"source_location_id\": \"EXAMPLE_SOURCE_LOCATION_ID_123\",\n \"destination_location_id\": \"EXAMPLE_DEST_LOCATION_ID_456\",\n \"status\": \"STARTED\",\n \"created_at\": \"2025-01-15T10:30:00Z\",\n \"updated_at\": \"2025-01-15T10:32:00Z\",\n \"expected_at\": \"2025-11-09T05:00:00Z\",\n \"completed_at\": \"completed_at\",\n \"notes\": \"Example transfer order for inventory redistribution between locations\",\n \"tracking_number\": \"TRACK123456789\",\n \"created_by_team_member_id\": \"EXAMPLE_TEAM_MEMBER_ID_789\",\n \"line_items\": [\n {\n \"uid\": \"1\",\n \"item_variation_id\": \"EXAMPLE_ITEM_VARIATION_ID_001\",\n \"quantity_ordered\": \"5\",\n \"quantity_pending\": \"5\",\n \"quantity_received\": \"0\",\n \"quantity_damaged\": \"0\",\n \"quantity_canceled\": \"0\"\n },\n {\n \"uid\": \"2\",\n \"item_variation_id\": \"EXAMPLE_ITEM_VARIATION_ID_002\",\n \"quantity_ordered\": \"3\",\n \"quantity_pending\": \"3\",\n \"quantity_received\": \"0\",\n \"quantity_damaged\": \"0\",\n \"quantity_canceled\": \"0\"\n }\n ],\n \"version\": 1753118664873\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"8696bab1-d7e0-4cd8-96d6-63c8526ae61c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ec5e4d56-32d3-46ea-b84f-ba28b0fe8174","name":"BulkCreateVendors - default","request":{"urlPathTemplate":"/v2/vendors/bulk-create","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"responses\": {\n \"8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe\": {\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ],\n \"vendor\": {\n \"id\": \"INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4\",\n \"created_at\": \"2022-03-16T10:21:54.859Z\",\n \"updated_at\": \"2022-03-16T10:21:54.859Z\",\n \"name\": \"Joe's Fresh Seafood\",\n \"address\": {\n \"address_line_1\": \"505 Electric Ave\",\n \"address_line_2\": \"Suite 600\",\n \"locality\": \"New York\",\n \"administrative_district_level_1\": \"NY\",\n \"postal_code\": \"10003\",\n \"country\": \"US\"\n },\n \"contacts\": [\n {\n \"id\": \"INV_VC_FMCYHBWT1TPL8MFH52PBMEN92A\",\n \"name\": \"Joe Burrow\",\n \"email_address\": \"joe@joesfreshseafood.com\",\n \"phone_number\": \"1-212-555-4250\",\n \"ordinal\": 1\n }\n ],\n \"account_number\": \"4025391\",\n \"note\": \"a vendor\",\n \"version\": 0,\n \"status\": \"ACTIVE\"\n }\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"ec5e4d56-32d3-46ea-b84f-ba28b0fe8174","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5eff01dc-650c-41bc-8b3b-111e5f2b125a","name":"BulkRetrieveVendors - default","request":{"urlPathTemplate":"/v2/vendors/bulk-retrieve","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"responses\": {\n \"INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4\": {\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ],\n \"vendor\": {\n \"id\": \"INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4\",\n \"created_at\": \"2022-03-16T10:21:54.859Z\",\n \"updated_at\": \"2022-03-16T10:21:54.859Z\",\n \"name\": \"Joe's Fresh Seafood\",\n \"address\": {\n \"address_line_1\": \"505 Electric Ave\",\n \"address_line_2\": \"Suite 600\",\n \"locality\": \"New York\",\n \"administrative_district_level_1\": \"NY\",\n \"postal_code\": \"10003\",\n \"country\": \"US\"\n },\n \"contacts\": [\n {\n \"id\": \"INV_VC_FMCYHBWT1TPL8MFH52PBMEN92A\",\n \"name\": \"Joe Burrow\",\n \"email_address\": \"joe@joesfreshseafood.com\",\n \"phone_number\": \"1-212-555-4250\",\n \"ordinal\": 1\n }\n ],\n \"account_number\": \"4025391\",\n \"note\": \"a vendor\",\n \"version\": 1,\n \"status\": \"ACTIVE\"\n }\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"5eff01dc-650c-41bc-8b3b-111e5f2b125a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0445ac66-c524-4303-a924-7f8f44e4d511","name":"BulkUpdateVendors - default","request":{"urlPathTemplate":"/v2/vendors/bulk-update","method":"PUT"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"responses\": {\n \"INV_V_FMCYHBWT1TPL8MFH52PBMEN92A\": {\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ],\n \"vendor\": {\n \"id\": \"INV_V_FMCYHBWT1TPL8MFH52PBMEN92A\",\n \"created_at\": \"2022-03-16T10:21:54.859Z\",\n \"updated_at\": \"2022-03-16T20:21:54.859Z\",\n \"name\": \"Annie’s Hot Sauce\",\n \"address\": {\n \"address_line_1\": \"202 Mill St\",\n \"locality\": \"Moorestown\",\n \"administrative_district_level_1\": \"NJ\",\n \"postal_code\": \"08057\",\n \"country\": \"US\"\n },\n \"contacts\": [\n {\n \"id\": \"INV_VC_ABYYHBWT1TPL8MFH52PBMENPJ4\",\n \"name\": \"Annie Thomas\",\n \"email_address\": \"annie@annieshotsauce.com\",\n \"phone_number\": \"1-212-555-4250\",\n \"ordinal\": 0\n }\n ],\n \"version\": 11,\n \"status\": \"ACTIVE\"\n }\n },\n \"INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4\": {\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ],\n \"vendor\": {\n \"id\": \"INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4\",\n \"created_at\": \"2022-03-16T10:10:54.859Z\",\n \"updated_at\": \"2022-03-16T20:21:54.859Z\",\n \"name\": \"Joe's Fresh Seafood\",\n \"address\": {\n \"address_line_1\": \"505 Electric Ave\",\n \"address_line_2\": \"Suite 600\",\n \"locality\": \"New York\",\n \"administrative_district_level_1\": \"NY\",\n \"postal_code\": \"10003\",\n \"country\": \"US\"\n },\n \"contacts\": [\n {\n \"id\": \"INV_VC_FMCYHBWT1TPL8MFH52PBMEN92A\",\n \"name\": \"Joe Burrow\",\n \"email_address\": \"joe@joesfreshseafood.com\",\n \"phone_number\": \"1-212-555-4250\",\n \"ordinal\": 0\n }\n ],\n \"account_number\": \"4025391\",\n \"note\": \"favorite vendor\",\n \"version\": 31,\n \"status\": \"ACTIVE\"\n }\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"0445ac66-c524-4303-a924-7f8f44e4d511","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5a82579b-4b82-4d7b-8cfa-863e63f2116c","name":"CreateVendor - default","request":{"urlPathTemplate":"/v2/vendors/create","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"vendor\": {\n \"id\": \"INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4\",\n \"created_at\": \"2022-03-16T10:21:54.859Z\",\n \"updated_at\": \"2022-03-16T10:21:54.859Z\",\n \"name\": \"Joe's Fresh Seafood\",\n \"address\": {\n \"address_line_1\": \"505 Electric Ave\",\n \"address_line_2\": \"Suite 600\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"New York\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"NY\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"10003\",\n \"country\": \"US\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n },\n \"contacts\": [\n {\n \"id\": \"INV_VC_FMCYHBWT1TPL8MFH52PBMEN92A\",\n \"name\": \"Joe Burrow\",\n \"email_address\": \"joe@joesfreshseafood.com\",\n \"phone_number\": \"1-212-555-4250\",\n \"ordinal\": 1\n }\n ],\n \"account_number\": \"4025391\",\n \"note\": \"a vendor\",\n \"version\": 1,\n \"status\": \"ACTIVE\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"5a82579b-4b82-4d7b-8cfa-863e63f2116c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a40b6d16-1491-4fdb-99a3-7a9b8077f976","name":"SearchVendors - default","request":{"urlPathTemplate":"/v2/vendors/search","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"vendors\": [\n {\n \"id\": \"INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4\",\n \"created_at\": \"2022-03-16T10:21:54.859Z\",\n \"updated_at\": \"2022-03-16T10:21:54.859Z\",\n \"name\": \"Joe's Fresh Seafood\",\n \"address\": {\n \"address_line_1\": \"505 Electric Ave\",\n \"address_line_2\": \"Suite 600\",\n \"locality\": \"New York\",\n \"administrative_district_level_1\": \"NY\",\n \"postal_code\": \"10003\",\n \"country\": \"US\"\n },\n \"contacts\": [\n {\n \"id\": \"INV_VC_FMCYHBWT1TPL8MFH52PBMEN92A\",\n \"name\": \"Joe Burrow\",\n \"email_address\": \"joe@joesfreshseafood.com\",\n \"phone_number\": \"1-212-555-4250\",\n \"ordinal\": 1\n }\n ],\n \"account_number\": \"4025391\",\n \"note\": \"a vendor\",\n \"version\": 1,\n \"status\": \"ACTIVE\"\n }\n ],\n \"cursor\": \"cursor\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"a40b6d16-1491-4fdb-99a3-7a9b8077f976","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a95d285c-9908-4e9f-92a4-a88c8fc59b6e","name":"RetrieveVendor - default","request":{"urlPathTemplate":"/v2/vendors/{vendor_id}","method":"GET","pathParameters":{"vendor_id":{"equalTo":"vendor_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"vendor\": {\n \"id\": \"INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4\",\n \"created_at\": \"2022-03-16T10:21:54.859Z\",\n \"updated_at\": \"2022-03-16T10:21:54.859Z\",\n \"name\": \"Joe's Fresh Seafood\",\n \"address\": {\n \"address_line_1\": \"505 Electric Ave\",\n \"address_line_2\": \"Suite 600\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"New York\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"NY\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"10003\",\n \"country\": \"US\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n },\n \"contacts\": [\n {\n \"id\": \"INV_VC_FMCYHBWT1TPL8MFH52PBMEN92A\",\n \"name\": \"Joe Burrow\",\n \"email_address\": \"joe@joesfreshseafood.com\",\n \"phone_number\": \"1-212-555-4250\",\n \"ordinal\": 1\n }\n ],\n \"account_number\": \"4025391\",\n \"note\": \"a vendor\",\n \"version\": 1,\n \"status\": \"ACTIVE\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"a95d285c-9908-4e9f-92a4-a88c8fc59b6e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f18f4a49-e74e-4585-a66a-1d4df9e32d36","name":"UpdateVendor - default","request":{"urlPathTemplate":"/v2/vendors/{vendor_id}","method":"PUT","pathParameters":{"vendor_id":{"equalTo":"vendor_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"vendor\": {\n \"id\": \"INV_V_JDKYHBWT1D4F8MFH63DBMEN8Y4\",\n \"created_at\": \"2022-03-16T10:21:54.859Z\",\n \"updated_at\": \"2022-03-16T20:21:54.859Z\",\n \"name\": \"Jack's Chicken Shack\",\n \"address\": {\n \"address_line_1\": \"505 Electric Ave\",\n \"address_line_2\": \"Suite 600\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"New York\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"NY\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"10003\",\n \"country\": \"US\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n },\n \"contacts\": [\n {\n \"id\": \"INV_VC_FMCYHBWT1TPL8MFH52PBMEN92A\",\n \"name\": \"Joe Burrow\",\n \"email_address\": \"joe@joesfreshseafood.com\",\n \"phone_number\": \"1-212-555-4250\",\n \"ordinal\": 0\n }\n ],\n \"account_number\": \"4025391\",\n \"note\": \"note\",\n \"version\": 2,\n \"status\": \"ACTIVE\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"f18f4a49-e74e-4585-a66a-1d4df9e32d36","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"28edbbf1-d868-4b70-8f3c-2434374fe38b","name":"ListBookingCustomAttributeDefinitions - default","request":{"urlPathTemplate":"/v2/bookings/custom-attribute-definitions","method":"GET","queryParameters":{"limit":{"equalTo":"1"},"cursor":{"equalTo":"cursor"}}},"response":{"status":200,"body":"{\n \"custom_attribute_definitions\": [\n {\n \"key\": \"favoriteShampoo\",\n \"schema\": {\n \"$ref\": \"https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String\"\n },\n \"name\": \"Favorite shampoo\",\n \"description\": \"Update the description as desired.\",\n \"visibility\": \"VISIBILITY_READ_ONLY\",\n \"version\": 3,\n \"updated_at\": \"2022-11-16T15:39:38Z\",\n \"created_at\": \"2022-11-16T15:27:30Z\"\n },\n {\n \"key\": \"partySize\",\n \"schema\": {\n \"$ref\": \"https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number\"\n },\n \"name\": \"Party size\",\n \"description\": \"Number of people in the party for dine-in\",\n \"visibility\": \"VISIBILITY_HIDDEN\",\n \"version\": 1,\n \"updated_at\": \"2022-11-16T15:49:05Z\",\n \"created_at\": \"2022-11-16T15:49:05Z\"\n }\n ],\n \"cursor\": \"YEk4UPbUEsu8MUV0xouO5hCiFcD9T5ztB6UWEJq5vZnqBFmoBEi0j1j6HWYTFGMRre4p7T5wAQBj3Th1NX3XgBFcQVEVsIxUQ2NsbwjRitfoEZDml9uxxQXepowyRvCuSThHPbJSn7M7wInl3x8XypQF9ahVVQXegJ0CxEKc0SBH\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"28edbbf1-d868-4b70-8f3c-2434374fe38b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"4e087a7e-45cc-4a35-bda0-38fc9e3f3c0e","name":"CreateBookingCustomAttributeDefinition - default","request":{"urlPathTemplate":"/v2/bookings/custom-attribute-definitions","method":"POST"},"response":{"status":200,"body":"{\n \"custom_attribute_definition\": {\n \"key\": \"favoriteShampoo\",\n \"schema\": {\n \"$ref\": \"https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String\"\n },\n \"name\": \"Favorite Shampoo\",\n \"description\": \"The favorite shampoo of the customer.\",\n \"visibility\": \"VISIBILITY_HIDDEN\",\n \"version\": 1,\n \"updated_at\": \"2022-11-16T15:27:30Z\",\n \"created_at\": \"2022-11-16T15:27:30Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"4e087a7e-45cc-4a35-bda0-38fc9e3f3c0e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d04a3a41-33f0-4c07-a917-88fae7e8a20e","name":"RetrieveBookingCustomAttributeDefinition - default","request":{"urlPathTemplate":"/v2/bookings/custom-attribute-definitions/{key}","method":"GET","pathParameters":{"key":{"equalTo":"key"}},"queryParameters":{"version":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"custom_attribute_definition\": {\n \"key\": \"favoriteShampoo\",\n \"schema\": {\n \"$ref\": \"https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String\"\n },\n \"name\": \"Favorite shampoo\",\n \"description\": \"The favorite shampoo of the customer.\",\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"version\": 1,\n \"updated_at\": \"2022-11-16T15:27:30Z\",\n \"created_at\": \"2022-11-16T15:27:30Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"d04a3a41-33f0-4c07-a917-88fae7e8a20e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3256e8b2-1ce6-4547-9a33-62a67661a52e","name":"UpdateBookingCustomAttributeDefinition - default","request":{"urlPathTemplate":"/v2/bookings/custom-attribute-definitions/{key}","method":"PUT","pathParameters":{"key":{"equalTo":"key"}}},"response":{"status":200,"body":"{\n \"custom_attribute_definition\": {\n \"key\": \"favoriteShampoo\",\n \"schema\": {\n \"$ref\": \"https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String\"\n },\n \"name\": \"Favorite shampoo\",\n \"description\": \"Update the description as desired.\",\n \"visibility\": \"VISIBILITY_READ_ONLY\",\n \"version\": 2,\n \"updated_at\": \"2022-11-16T15:39:38Z\",\n \"created_at\": \"2022-11-16T15:27:30Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"3256e8b2-1ce6-4547-9a33-62a67661a52e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"9d068e36-6496-47ff-bf43-38c5203bee9e","name":"DeleteBookingCustomAttributeDefinition - default","request":{"urlPathTemplate":"/v2/bookings/custom-attribute-definitions/{key}","method":"DELETE","pathParameters":{"key":{"equalTo":"key"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"9d068e36-6496-47ff-bf43-38c5203bee9e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"1a34bd9b-fb11-450a-9e37-21eb79040c19","name":"BulkDeleteBookingCustomAttributes - default","request":{"urlPathTemplate":"/v2/bookings/custom-attributes/bulk-delete","method":"POST"},"response":{"status":200,"body":"{\n \"values\": {\n \"id1\": {\n \"booking_id\": \"N3NCVYY3WS27HF0HKANA3R9FP8\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"id2\": {\n \"booking_id\": \"SY8EMWRNDN3TQDP2H4KS1QWMMM\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"id3\": {\n \"booking_id\": \"SY8EMWRNDN3TQDP2H4KS1QWMMM\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"1a34bd9b-fb11-450a-9e37-21eb79040c19","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"dfe7476c-3988-4a47-8e84-5b1c75c48060","name":"BulkUpsertBookingCustomAttributes - default","request":{"urlPathTemplate":"/v2/bookings/custom-attributes/bulk-upsert","method":"POST"},"response":{"status":200,"body":"{\n \"values\": {\n \"id1\": {\n \"booking_id\": \"N3NCVYY3WS27HF0HKANA3R9FP8\",\n \"custom_attribute\": {\n \"key\": \"favoriteShampoo\",\n \"value\": \"Spring Fresh\",\n \"version\": 1,\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"updated_at\": \"2022-11-16T00:16:23Z\",\n \"created_at\": \"2022-11-16T23:14:47Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"id2\": {\n \"booking_id\": \"SY8EMWRNDN3TQDP2H4KS1QWMMM\",\n \"custom_attribute\": {\n \"key\": \"hasShoes\",\n \"value\": false,\n \"version\": 2,\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"updated_at\": \"2022-11-16T00:16:23Z\",\n \"created_at\": \"2022-11-16T00:16:20Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"id3\": {\n \"booking_id\": \"SY8EMWRNDN3TQDP2H4KS1QWMMM\",\n \"custom_attribute\": {\n \"key\": \"favoriteShampoo\",\n \"value\": \"Hydro-Cool\",\n \"version\": 2,\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"updated_at\": \"2022-11-16T00:16:23Z\",\n \"created_at\": \"2022-11-16T00:16:20Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"id4\": {\n \"booking_id\": \"N3NCVYY3WS27HF0HKANA3R9FP8\",\n \"custom_attribute\": {\n \"key\": \"partySize\",\n \"value\": 4,\n \"version\": 1,\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"updated_at\": \"2022-11-16T00:16:23Z\",\n \"created_at\": \"2022-11-16T23:14:47Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"id5\": {\n \"booking_id\": \"70548QG1HN43B05G0KCZ4MMC1G\",\n \"custom_attribute\": {\n \"key\": \"celebrating\",\n \"value\": \"birthday\",\n \"version\": 2,\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"updated_at\": \"2022-11-16T00:16:23Z\",\n \"created_at\": \"2022-11-16T00:16:20Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"dfe7476c-3988-4a47-8e84-5b1c75c48060","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a3889108-8a5b-46f6-aec4-5234ae805e10","name":"ListBookingCustomAttributes - default","request":{"urlPathTemplate":"/v2/bookings/{booking_id}/custom-attributes","method":"GET","pathParameters":{"booking_id":{"equalTo":"booking_id"}},"queryParameters":{"limit":{"equalTo":"1"},"cursor":{"equalTo":"cursor"},"with_definitions":{"equalTo":"true"}}},"response":{"status":200,"body":"{\n \"custom_attributes\": [\n {\n \"key\": \"favoriteShampoo\",\n \"value\": \"Hydro-Cool\",\n \"version\": 1,\n \"visibility\": \"VISIBILITY_READ_ONLY\",\n \"updated_at\": \"2022-11-16T15:50:27Z\",\n \"created_at\": \"2022-11-16T15:50:27Z\"\n },\n {\n \"key\": \"hasShoes\",\n \"value\": false,\n \"version\": 1,\n \"visibility\": \"VISIBILITY_HIDDEN\",\n \"updated_at\": \"2022-11-16T15:51:53Z\",\n \"created_at\": \"2022-11-16T15:51:53Z\"\n }\n ],\n \"cursor\": \"cursor\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"a3889108-8a5b-46f6-aec4-5234ae805e10","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"58e97a3d-e38d-4cc4-baa8-382736551ece","name":"RetrieveBookingCustomAttribute - default","request":{"urlPathTemplate":"/v2/bookings/{booking_id}/custom-attributes/{key}","method":"GET","pathParameters":{"booking_id":{"equalTo":"booking_id"},"key":{"equalTo":"key"}},"queryParameters":{"with_definition":{"equalTo":"true"},"version":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"custom_attribute\": {\n \"key\": \"favoriteShampoo\",\n \"value\": \"Dune\",\n \"version\": 1,\n \"visibility\": \"VISIBILITY_READ_ONLY\",\n \"definition\": {\n \"key\": \"key\",\n \"schema\": {\n \"key\": \"value\"\n },\n \"name\": \"name\",\n \"description\": \"description\",\n \"visibility\": \"VISIBILITY_HIDDEN\",\n \"version\": 1,\n \"updated_at\": \"updated_at\",\n \"created_at\": \"created_at\"\n },\n \"updated_at\": \"2022-11-16T15:50:27Z\",\n \"created_at\": \"2022-11-16T15:50:27Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"58e97a3d-e38d-4cc4-baa8-382736551ece","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"6b67bc86-7e96-4c03-9bf7-3f1813bbd1b5","name":"UpsertBookingCustomAttribute - default","request":{"urlPathTemplate":"/v2/bookings/{booking_id}/custom-attributes/{key}","method":"PUT","pathParameters":{"booking_id":{"equalTo":"booking_id"},"key":{"equalTo":"key"}}},"response":{"status":200,"body":"{\n \"custom_attribute\": {\n \"key\": \"favoriteShampoo\",\n \"value\": \"Spring Fresh\",\n \"version\": 1,\n \"visibility\": \"VISIBILITY_READ_ONLY\",\n \"definition\": {\n \"key\": \"key\",\n \"schema\": {\n \"key\": \"value\"\n },\n \"name\": \"name\",\n \"description\": \"description\",\n \"visibility\": \"VISIBILITY_HIDDEN\",\n \"version\": 1,\n \"updated_at\": \"updated_at\",\n \"created_at\": \"created_at\"\n },\n \"updated_at\": \"2022-11-16T15:50:27Z\",\n \"created_at\": \"2022-11-16T15:50:27Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"6b67bc86-7e96-4c03-9bf7-3f1813bbd1b5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4999c843-f81d-405d-9c2d-238fd92d5c88","name":"DeleteBookingCustomAttribute - default","request":{"urlPathTemplate":"/v2/bookings/{booking_id}/custom-attributes/{key}","method":"DELETE","pathParameters":{"booking_id":{"equalTo":"booking_id"},"key":{"equalTo":"key"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"4999c843-f81d-405d-9c2d-238fd92d5c88","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"9a8e8012-be75-4b23-9169-0107f6faf290","name":"ListLocationBookingProfiles - default","request":{"urlPathTemplate":"/v2/bookings/location-booking-profiles","method":"GET","queryParameters":{"limit":{"equalTo":"1"},"cursor":{"equalTo":"cursor"}}},"response":{"status":200,"body":"{\n \"location_booking_profiles\": [\n {\n \"location_id\": \"LY6WNBPVM6VGV\",\n \"booking_site_url\": \"https://squareup.com/book/LY6WNBPVM6VGV/testbusiness\",\n \"online_booking_enabled\": true\n },\n {\n \"location_id\": \"PYTRNBPVMJUPV\",\n \"booking_site_url\": \"booking_site_url\",\n \"online_booking_enabled\": false\n }\n ],\n \"cursor\": \"cursor\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"9a8e8012-be75-4b23-9169-0107f6faf290","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"b8758cab-2f80-4034-9764-a7054edb4c9b","name":"ListTeamMemberBookingProfiles - default","request":{"urlPathTemplate":"/v2/bookings/team-member-booking-profiles","method":"GET","queryParameters":{"bookable_only":{"equalTo":"true"},"limit":{"equalTo":"1"},"cursor":{"equalTo":"cursor"},"location_id":{"equalTo":"location_id"}}},"response":{"status":200,"body":"{\n \"team_member_booking_profiles\": [\n {\n \"team_member_id\": \"TMXUrsBWWcHTt79t\",\n \"description\": \"description\",\n \"display_name\": \"Sandbox Seller\",\n \"is_bookable\": true,\n \"profile_image_url\": \"profile_image_url\"\n },\n {\n \"team_member_id\": \"TMaJcbiRqPIGZuS9\",\n \"description\": \"description\",\n \"display_name\": \"Sandbox Staff\",\n \"is_bookable\": true,\n \"profile_image_url\": \"profile_image_url\"\n }\n ],\n \"cursor\": \"cursor\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"b8758cab-2f80-4034-9764-a7054edb4c9b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"fc319079-cba0-46c4-9b0f-e2e3845f3ab9","name":"RetrieveTeamMemberBookingProfile - default","request":{"urlPathTemplate":"/v2/bookings/team-member-booking-profiles/{team_member_id}","method":"GET","pathParameters":{"team_member_id":{"equalTo":"team_member_id"}}},"response":{"status":200,"body":"{\n \"team_member_booking_profile\": {\n \"team_member_id\": \"TMaJcbiRqPIGZuS9\",\n \"description\": \"description\",\n \"display_name\": \"Sandbox Staff\",\n \"is_bookable\": true,\n \"profile_image_url\": \"profile_image_url\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"fc319079-cba0-46c4-9b0f-e2e3845f3ab9","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"80147b04-e3bf-4e88-83a2-f03173160e28","name":"ListCashDrawerShifts - default","request":{"urlPathTemplate":"/v2/cash-drawers/shifts","method":"GET","queryParameters":{"location_id":{"equalTo":"location_id"},"sort_order":{"equalTo":"DESC"},"begin_time":{"equalTo":"begin_time"},"end_time":{"equalTo":"end_time"},"limit":{"equalTo":"1"},"cursor":{"equalTo":"cursor"}}},"response":{"status":200,"body":"{\n \"cursor\": \"cursor\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"cash_drawer_shifts\": [\n {\n \"id\": \"DCC99978-09A6-4926-849F-300BE9C5793A\",\n \"state\": \"CLOSED\",\n \"opened_at\": \"2019-11-22T00:42:54.000Z\",\n \"ended_at\": \"2019-11-22T00:44:49.000Z\",\n \"closed_at\": \"2019-11-22T00:44:49.000Z\",\n \"description\": \"Misplaced some change\",\n \"opened_cash_money\": {\n \"amount\": 10000,\n \"currency\": \"USD\"\n },\n \"expected_cash_money\": {\n \"amount\": 10000,\n \"currency\": \"USD\"\n },\n \"closed_cash_money\": {\n \"amount\": 9970,\n \"currency\": \"USD\"\n },\n \"created_at\": \"created_at\",\n \"updated_at\": \"updated_at\",\n \"location_id\": \"location_id\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"80147b04-e3bf-4e88-83a2-f03173160e28","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"3960b9a6-03ba-4237-a007-3c5e573261b6","name":"RetrieveCashDrawerShift - default","request":{"urlPathTemplate":"/v2/cash-drawers/shifts/{shift_id}","method":"GET","pathParameters":{"shift_id":{"equalTo":"shift_id"}},"queryParameters":{"location_id":{"equalTo":"location_id"}}},"response":{"status":200,"body":"{\n \"cash_drawer_shift\": {\n \"id\": \"DCC99978-09A6-4926-849F-300BE9C5793A\",\n \"state\": \"CLOSED\",\n \"opened_at\": \"2019-11-22T00:42:54.000Z\",\n \"ended_at\": \"2019-11-22T00:44:49.000Z\",\n \"closed_at\": \"2019-11-22T00:44:49.000Z\",\n \"description\": \"Misplaced some change\",\n \"opened_cash_money\": {\n \"amount\": 10000,\n \"currency\": \"USD\"\n },\n \"cash_payment_money\": {\n \"amount\": 100,\n \"currency\": \"USD\"\n },\n \"cash_refunds_money\": {\n \"amount\": -100,\n \"currency\": \"USD\"\n },\n \"cash_paid_in_money\": {\n \"amount\": 10000,\n \"currency\": \"USD\"\n },\n \"cash_paid_out_money\": {\n \"amount\": -10000,\n \"currency\": \"USD\"\n },\n \"expected_cash_money\": {\n \"amount\": 10000,\n \"currency\": \"USD\"\n },\n \"closed_cash_money\": {\n \"amount\": 9970,\n \"currency\": \"USD\"\n },\n \"device\": {\n \"id\": \"id\",\n \"name\": \"My iPad\"\n },\n \"created_at\": \"created_at\",\n \"updated_at\": \"updated_at\",\n \"location_id\": \"location_id\",\n \"team_member_ids\": [\n \"team_member_ids\"\n ],\n \"opening_team_member_id\": \"\",\n \"ending_team_member_id\": \"\",\n \"closing_team_member_id\": \"\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"3960b9a6-03ba-4237-a007-3c5e573261b6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ae66dea5-57ec-41c8-bf4a-937ba2bec1e6","name":"ListCashDrawerShiftEvents - default","request":{"urlPathTemplate":"/v2/cash-drawers/shifts/{shift_id}/events","method":"GET","pathParameters":{"shift_id":{"equalTo":"shift_id"}},"queryParameters":{"location_id":{"equalTo":"location_id"},"limit":{"equalTo":"1"},"cursor":{"equalTo":"cursor"}}},"response":{"status":200,"body":"{\n \"cursor\": \"cursor\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"cash_drawer_shift_events\": [\n {\n \"id\": \"9F07DB01-D85A-4B77-88C3-D5C64CEB5155\",\n \"event_type\": \"CASH_TENDER_PAYMENT\",\n \"event_money\": {\n \"amount\": 100,\n \"currency\": \"USD\"\n },\n \"created_at\": \"2019-11-22T00:43:02.000Z\",\n \"description\": \"\",\n \"team_member_id\": \"\"\n },\n {\n \"id\": \"B2854CEA-A781-49B3-8F31-C64558231F48\",\n \"event_type\": \"CASH_TENDER_PAYMENT\",\n \"event_money\": {\n \"amount\": 250,\n \"currency\": \"USD\"\n },\n \"created_at\": \"2019-11-22T00:43:12.000Z\",\n \"description\": \"\",\n \"team_member_id\": \"\"\n },\n {\n \"id\": \"B5FB7F72-95CD-44A3-974D-26C41064D042\",\n \"event_type\": \"CASH_TENDER_CANCELLED_PAYMENT\",\n \"event_money\": {\n \"amount\": 250,\n \"currency\": \"USD\"\n },\n \"created_at\": \"2019-11-22T00:43:23.000Z\",\n \"description\": \"\",\n \"team_member_id\": \"\"\n },\n {\n \"id\": \"0B425480-8504-40B4-A867-37B23543931B\",\n \"event_type\": \"CASH_TENDER_REFUND\",\n \"event_money\": {\n \"amount\": 100,\n \"currency\": \"USD\"\n },\n \"created_at\": \"2019-11-22T00:43:46.000Z\",\n \"description\": \"\",\n \"team_member_id\": \"\"\n },\n {\n \"id\": \"8C66E60E-FDCF-4EEF-A98D-3B14B7ED5CBE\",\n \"event_type\": \"PAID_IN\",\n \"event_money\": {\n \"amount\": 10000,\n \"currency\": \"USD\"\n },\n \"created_at\": \"2019-11-22T00:44:18.000Z\",\n \"description\": \"Transfer from another drawer\",\n \"team_member_id\": \"\"\n },\n {\n \"id\": \"D5ACA7FE-C64D-4ADA-8BC8-82118A2DAE4F\",\n \"event_type\": \"PAID_OUT\",\n \"event_money\": {\n \"amount\": 10000,\n \"currency\": \"USD\"\n },\n \"created_at\": \"2019-11-22T00:44:29.000Z\",\n \"description\": \"Transfer out to another drawer\",\n \"team_member_id\": \"\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"ae66dea5-57ec-41c8-bf4a-937ba2bec1e6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e1bfa1b5-3990-4525-94f4-c7519c2fb1ee","name":"CreateCatalogImage - default","request":{"urlPathTemplate":"/v2/catalog/images","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"image\": {\n \"id\": \"id\",\n \"updated_at\": \"updated_at\",\n \"version\": 1000000,\n \"is_deleted\": true,\n \"custom_attribute_values\": {\n \"key\": {}\n },\n \"catalog_v1_ids\": [\n {}\n ],\n \"present_at_all_locations\": true,\n \"present_at_location_ids\": [\n \"present_at_location_ids\"\n ],\n \"absent_at_location_ids\": [\n \"absent_at_location_ids\"\n ],\n \"image_id\": \"image_id\",\n \"image_data\": {\n \"name\": \"name\",\n \"url\": \"url\",\n \"caption\": \"caption\",\n \"photo_studio_order_id\": \"photo_studio_order_id\"\n },\n \"type\": \"IMAGE\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"e1bfa1b5-3990-4525-94f4-c7519c2fb1ee","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a3e32e63-2dc9-4776-a4bd-0480ec0ed4da","name":"UpdateCatalogImage - default","request":{"urlPathTemplate":"/v2/catalog/images/{image_id}","method":"PUT","pathParameters":{"image_id":{"equalTo":"image_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"image\": {\n \"id\": \"id\",\n \"updated_at\": \"updated_at\",\n \"version\": 1000000,\n \"is_deleted\": true,\n \"custom_attribute_values\": {\n \"key\": {}\n },\n \"catalog_v1_ids\": [\n {}\n ],\n \"present_at_all_locations\": true,\n \"present_at_location_ids\": [\n \"present_at_location_ids\"\n ],\n \"absent_at_location_ids\": [\n \"absent_at_location_ids\"\n ],\n \"image_id\": \"image_id\",\n \"image_data\": {\n \"name\": \"name\",\n \"url\": \"url\",\n \"caption\": \"caption\",\n \"photo_studio_order_id\": \"photo_studio_order_id\"\n },\n \"type\": \"IMAGE\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"a3e32e63-2dc9-4776-a4bd-0480ec0ed4da","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fe5a7952-aa40-4238-9182-8b002278f15e","name":"UpsertCatalogObject - default","request":{"urlPathTemplate":"/v2/catalog/object","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"catalog_object\": {\n \"id\": \"id\",\n \"updated_at\": \"updated_at\",\n \"version\": 1000000,\n \"is_deleted\": true,\n \"custom_attribute_values\": {\n \"key\": {}\n },\n \"catalog_v1_ids\": [\n {}\n ],\n \"present_at_all_locations\": true,\n \"present_at_location_ids\": [\n \"present_at_location_ids\"\n ],\n \"absent_at_location_ids\": [\n \"absent_at_location_ids\"\n ],\n \"image_id\": \"image_id\",\n \"item_data\": {\n \"name\": \"name\",\n \"description\": \"description\",\n \"abbreviation\": \"abbreviation\",\n \"label_color\": \"label_color\",\n \"is_taxable\": true,\n \"category_id\": \"category_id\",\n \"buyer_facing_name\": \"buyer_facing_name\",\n \"tax_ids\": [\n \"tax_ids\"\n ],\n \"modifier_list_info\": [\n {\n \"modifier_list_id\": \"modifier_list_id\"\n }\n ],\n \"product_type\": \"REGULAR\",\n \"skip_modifier_screen\": true,\n \"item_options\": [\n {}\n ],\n \"ecom_uri\": \"ecom_uri\",\n \"ecom_image_uris\": [\n \"ecom_image_uris\"\n ],\n \"image_ids\": [\n \"image_ids\"\n ],\n \"sort_name\": \"sort_name\",\n \"description_html\": \"description_html\",\n \"description_plaintext\": \"description_plaintext\",\n \"kitchen_name\": \"kitchen_name\",\n \"channels\": [\n \"channels\"\n ],\n \"is_archived\": true,\n \"is_alcoholic\": true\n },\n \"type\": \"ITEM\"\n },\n \"id_mappings\": [\n {\n \"client_object_id\": \"#Cocoa\",\n \"object_id\": \"R2TA2FOBUGCJZNIWJSOSNAI4\"\n },\n {\n \"client_object_id\": \"#Small\",\n \"object_id\": \"QRT53UP4LITLWGOGBZCUWP63\"\n },\n {\n \"client_object_id\": \"#Large\",\n \"object_id\": \"NS77DKEIQ3AEQTCP727DSA7U\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"fe5a7952-aa40-4238-9182-8b002278f15e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a894074e-9261-409c-a92f-bc25d8d36724","name":"RetrieveCatalogObject - default","request":{"urlPathTemplate":"/v2/catalog/object/{object_id}","method":"GET","pathParameters":{"object_id":{"equalTo":"object_id"}},"queryParameters":{"include_related_objects":{"equalTo":"true"},"catalog_version":{"equalTo":"1000000"},"include_category_path_to_root":{"equalTo":"true"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"object\": {\n \"id\": \"id\",\n \"updated_at\": \"updated_at\",\n \"version\": 1000000,\n \"is_deleted\": true,\n \"custom_attribute_values\": {\n \"key\": {}\n },\n \"catalog_v1_ids\": [\n {}\n ],\n \"present_at_all_locations\": true,\n \"present_at_location_ids\": [\n \"present_at_location_ids\"\n ],\n \"absent_at_location_ids\": [\n \"absent_at_location_ids\"\n ],\n \"image_id\": \"image_id\",\n \"item_data\": {\n \"name\": \"name\",\n \"description\": \"description\",\n \"abbreviation\": \"abbreviation\",\n \"label_color\": \"label_color\",\n \"is_taxable\": true,\n \"category_id\": \"category_id\",\n \"buyer_facing_name\": \"buyer_facing_name\",\n \"tax_ids\": [\n \"tax_ids\"\n ],\n \"modifier_list_info\": [\n {\n \"modifier_list_id\": \"modifier_list_id\"\n }\n ],\n \"product_type\": \"REGULAR\",\n \"skip_modifier_screen\": true,\n \"item_options\": [\n {}\n ],\n \"ecom_uri\": \"ecom_uri\",\n \"ecom_image_uris\": [\n \"ecom_image_uris\"\n ],\n \"image_ids\": [\n \"image_ids\"\n ],\n \"sort_name\": \"sort_name\",\n \"description_html\": \"description_html\",\n \"description_plaintext\": \"description_plaintext\",\n \"kitchen_name\": \"kitchen_name\",\n \"channels\": [\n \"channels\"\n ],\n \"is_archived\": true,\n \"is_alcoholic\": true\n },\n \"type\": \"ITEM\"\n },\n \"related_objects\": [\n {\n \"id\": \"id\",\n \"updated_at\": \"updated_at\",\n \"version\": 1000000,\n \"is_deleted\": true,\n \"custom_attribute_values\": {\n \"key\": {}\n },\n \"catalog_v1_ids\": [\n {}\n ],\n \"present_at_all_locations\": true,\n \"present_at_location_ids\": [\n \"present_at_location_ids\"\n ],\n \"absent_at_location_ids\": [\n \"absent_at_location_ids\"\n ],\n \"image_id\": \"image_id\",\n \"ordinal\": 1000000,\n \"type\": \"CATEGORY\"\n },\n {\n \"id\": \"id\",\n \"updated_at\": \"updated_at\",\n \"version\": 1000000,\n \"is_deleted\": true,\n \"custom_attribute_values\": {\n \"key\": {}\n },\n \"catalog_v1_ids\": [\n {}\n ],\n \"present_at_all_locations\": true,\n \"present_at_location_ids\": [\n \"present_at_location_ids\"\n ],\n \"absent_at_location_ids\": [\n \"absent_at_location_ids\"\n ],\n \"image_id\": \"image_id\",\n \"type\": \"TAX\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"a894074e-9261-409c-a92f-bc25d8d36724","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8b8ae413-5082-4f4d-8052-a1fbd6bb63ac","name":"DeleteCatalogObject - default","request":{"urlPathTemplate":"/v2/catalog/object/{object_id}","method":"DELETE","pathParameters":{"object_id":{"equalTo":"object_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"deleted_object_ids\": [\n \"7SB3ZQYJ5GDMVFL7JK46JCHT\",\n \"KQLFFHA6K6J3YQAQAWDQAL57\"\n ],\n \"deleted_at\": \"2016-11-16T22:25:24.878Z\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"8b8ae413-5082-4f4d-8052-a1fbd6bb63ac","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"cfc754f5-65a7-4832-9dd4-8c82203ca976","name":"ListPaymentLinks - default","request":{"urlPathTemplate":"/v2/online-checkout/payment-links","method":"GET","queryParameters":{"cursor":{"equalTo":"cursor"},"limit":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"payment_links\": [\n {\n \"id\": \"TN4BWEDJ9AI5MBIV\",\n \"version\": 2,\n \"description\": \"description\",\n \"order_id\": \"Qqc6yppGvxVwc46Cch4zHTaJqc4F\",\n \"checkout_options\": {\n \"ask_for_shipping_address\": true\n },\n \"url\": \"https://square.link/u/EXAMPLE\",\n \"long_url\": \"long_url\",\n \"created_at\": \"2022-04-26T00:15:15Z\",\n \"updated_at\": \"2022-04-26T00:18:24Z\",\n \"payment_note\": \"test\"\n },\n {\n \"id\": \"RY5UNCUMPJN5XKCT\",\n \"version\": 1,\n \"description\": \"\",\n \"order_id\": \"EmBmGt3zJD15QeO1dxzBTxMxtwfZY\",\n \"url\": \"https://square.link/u/EXAMPLE\",\n \"long_url\": \"long_url\",\n \"created_at\": \"2022-04-11T23:14:59Z\",\n \"updated_at\": \"updated_at\",\n \"payment_note\": \"payment_note\"\n }\n ],\n \"cursor\": \"MTY1NQ==\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"cfc754f5-65a7-4832-9dd4-8c82203ca976","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"9c62ea86-538a-429d-acde-72cec7e5f595","name":"CreatePaymentLink - default","request":{"urlPathTemplate":"/v2/online-checkout/payment-links","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"payment_link\": {\n \"id\": \"PKVT6XGJZXYUP3NZ\",\n \"version\": 1,\n \"description\": \"description\",\n \"order_id\": \"o4b7saqp4HzhNttf5AJxC0Srjd4F\",\n \"checkout_options\": {\n \"allow_tipping\": true,\n \"custom_fields\": [\n {\n \"title\": \"title\"\n }\n ],\n \"subscription_plan_id\": \"subscription_plan_id\",\n \"redirect_url\": \"redirect_url\",\n \"merchant_support_email\": \"merchant_support_email\",\n \"ask_for_shipping_address\": true,\n \"shipping_fee\": {\n \"charge\": {}\n },\n \"enable_coupon\": true,\n \"enable_loyalty\": true\n },\n \"pre_populated_data\": {\n \"buyer_email\": \"buyer_email\",\n \"buyer_phone_number\": \"buyer_phone_number\"\n },\n \"url\": \"https://square.link/u/EXAMPLE\",\n \"long_url\": \"https://checkout.square.site/EXAMPLE\",\n \"created_at\": \"2022-04-25T23:58:01Z\",\n \"updated_at\": \"updated_at\",\n \"payment_note\": \"payment_note\"\n },\n \"related_resources\": {\n \"orders\": [\n {\n \"id\": \"o4b7saqp4HzhNttf5AJxC0Srjd4F\",\n \"location_id\": \"{LOCATION_ID}\",\n \"source\": {\n \"name\": \"Test Online Checkout Application\"\n },\n \"line_items\": [\n {\n \"uid\": \"8YX13D1U3jO7czP8JVrAR\",\n \"name\": \"Auto Detailing\",\n \"quantity\": \"1\",\n \"item_type\": \"ITEM\",\n \"base_price_money\": {\n \"amount\": 12500,\n \"currency\": \"USD\"\n },\n \"variation_total_price_money\": {\n \"amount\": 12500,\n \"currency\": \"USD\"\n },\n \"gross_sales_money\": {\n \"amount\": 12500,\n \"currency\": \"USD\"\n },\n \"total_tax_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"total_discount_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"total_money\": {\n \"amount\": 12500,\n \"currency\": \"USD\"\n }\n }\n ],\n \"fulfillments\": [\n {\n \"uid\": \"bBpNrxjdQxGQP16sTmdzi\",\n \"type\": \"PICKUP\",\n \"state\": \"PROPOSED\"\n }\n ],\n \"net_amounts\": {\n \"total_money\": {\n \"amount\": 12500,\n \"currency\": \"USD\"\n },\n \"tax_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"discount_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"tip_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"service_charge_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n },\n \"created_at\": \"2022-03-03T00:53:15.829Z\",\n \"updated_at\": \"2022-03-03T00:53:15.829Z\",\n \"state\": \"DRAFT\",\n \"version\": 1,\n \"total_money\": {\n \"amount\": 12500,\n \"currency\": \"USD\"\n },\n \"total_tax_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"total_discount_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"total_tip_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n },\n \"total_service_charge_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n }\n ],\n \"subscription_plans\": [\n {\n \"id\": \"id\",\n \"type\": \"ITEM\"\n }\n ]\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"9c62ea86-538a-429d-acde-72cec7e5f595","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"aee64b1b-3be0-4b28-ac2b-8b1c8c2d53b7","name":"RetrievePaymentLink - default","request":{"urlPathTemplate":"/v2/online-checkout/payment-links/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"payment_link\": {\n \"id\": \"LLO5Q3FRCFICDB4B\",\n \"version\": 1,\n \"description\": \"description\",\n \"order_id\": \"4uKASDATqSd1QQ9jV86sPhMdVEbSJc4F\",\n \"checkout_options\": {\n \"allow_tipping\": true,\n \"custom_fields\": [\n {\n \"title\": \"title\"\n }\n ],\n \"subscription_plan_id\": \"subscription_plan_id\",\n \"redirect_url\": \"redirect_url\",\n \"merchant_support_email\": \"merchant_support_email\",\n \"ask_for_shipping_address\": true,\n \"shipping_fee\": {\n \"charge\": {}\n },\n \"enable_coupon\": true,\n \"enable_loyalty\": true\n },\n \"pre_populated_data\": {\n \"buyer_email\": \"buyer_email\",\n \"buyer_phone_number\": \"buyer_phone_number\"\n },\n \"url\": \"https://square.link/u/EXAMPLE\",\n \"long_url\": \"https://checkout.square.site/EXAMPLE\",\n \"created_at\": \"2022-04-26T00:10:29Z\",\n \"updated_at\": \"updated_at\",\n \"payment_note\": \"payment_note\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"aee64b1b-3be0-4b28-ac2b-8b1c8c2d53b7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"966215ed-a311-46d7-9f2d-e7992842f4ae","name":"UpdatePaymentLink - default","request":{"urlPathTemplate":"/v2/online-checkout/payment-links/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"payment_link\": {\n \"id\": \"TY4BWEDJ6AI5MBIV\",\n \"version\": 2,\n \"description\": \"description\",\n \"order_id\": \"Qqc8ypQGvxVwc46Cch4zHTaJqc4F\",\n \"checkout_options\": {\n \"allow_tipping\": true,\n \"custom_fields\": [\n {\n \"title\": \"title\"\n }\n ],\n \"subscription_plan_id\": \"subscription_plan_id\",\n \"redirect_url\": \"redirect_url\",\n \"merchant_support_email\": \"merchant_support_email\",\n \"ask_for_shipping_address\": true,\n \"shipping_fee\": {\n \"charge\": {}\n },\n \"enable_coupon\": true,\n \"enable_loyalty\": true\n },\n \"pre_populated_data\": {\n \"buyer_email\": \"buyer_email\",\n \"buyer_phone_number\": \"buyer_phone_number\"\n },\n \"url\": \"https://square.link/u/EXAMPLE\",\n \"long_url\": \"https://checkout.square.site/EXAMPLE\",\n \"created_at\": \"2022-04-26T00:15:15Z\",\n \"updated_at\": \"2022-04-26T00:18:24Z\",\n \"payment_note\": \"test\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"966215ed-a311-46d7-9f2d-e7992842f4ae","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8fe2caf8-ed49-46f3-9767-4088c3c4f5a6","name":"DeletePaymentLink - default","request":{"urlPathTemplate":"/v2/online-checkout/payment-links/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"id\": \"MQASNYL6QB6DFCJ3\",\n \"cancelled_order_id\": \"asx8LgZ6MRzD0fObfkJ6obBmSh4F\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"8fe2caf8-ed49-46f3-9767-4088c3c4f5a6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e7533bcc-4099-412f-b84b-b0aeaf614792","name":"ListCustomerCustomAttributeDefinitions - default","request":{"urlPathTemplate":"/v2/customers/custom-attribute-definitions","method":"GET","queryParameters":{"limit":{"equalTo":"1"},"cursor":{"equalTo":"cursor"}}},"response":{"status":200,"body":"{\n \"custom_attribute_definitions\": [\n {\n \"key\": \"favoritemovie\",\n \"schema\": {\n \"$ref\": \"https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String\"\n },\n \"name\": \"Favorite Movie\",\n \"description\": \"Update the description as desired.\",\n \"visibility\": \"VISIBILITY_READ_ONLY\",\n \"version\": 3,\n \"updated_at\": \"2022-04-26T15:39:38Z\",\n \"created_at\": \"2022-04-26T15:27:30Z\"\n },\n {\n \"key\": \"ownsmovie\",\n \"schema\": {\n \"$ref\": \"https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Boolean\"\n },\n \"name\": \"Owns Movie\",\n \"description\": \"Customer owns movie.\",\n \"visibility\": \"VISIBILITY_HIDDEN\",\n \"version\": 1,\n \"updated_at\": \"2022-04-26T15:49:05Z\",\n \"created_at\": \"2022-04-26T15:49:05Z\"\n }\n ],\n \"cursor\": \"YEk4UPbUEsu8MUV0xouO5hCiFcD9T5ztB6UWEJq5vZnqBFmoBEi0j1j6HWYTFGMRre4p7T5wAQBj3Th1NX3XgBFcQVEVsIxUQ2NsbwjRitfoEZDml9uxxQXepowyRvCuSThHPbJSn7M7wInl3x8XypQF9ahVVQXegJ0CxEKc0SBH\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"e7533bcc-4099-412f-b84b-b0aeaf614792","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"36c601e6-b220-4730-8916-89ef8439c1bd","name":"CreateCustomerCustomAttributeDefinition - default","request":{"urlPathTemplate":"/v2/customers/custom-attribute-definitions","method":"POST"},"response":{"status":200,"body":"{\n \"custom_attribute_definition\": {\n \"key\": \"favoritemovie\",\n \"schema\": {\n \"$ref\": \"https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String\"\n },\n \"name\": \"Favorite Movie\",\n \"description\": \"The favorite movie of the customer.\",\n \"visibility\": \"VISIBILITY_HIDDEN\",\n \"version\": 1,\n \"updated_at\": \"2022-04-26T15:27:30Z\",\n \"created_at\": \"2022-04-26T15:27:30Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"36c601e6-b220-4730-8916-89ef8439c1bd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"dd0cf639-1e2c-4364-b367-8ea99e455eda","name":"RetrieveCustomerCustomAttributeDefinition - default","request":{"urlPathTemplate":"/v2/customers/custom-attribute-definitions/{key}","method":"GET","pathParameters":{"key":{"equalTo":"key"}},"queryParameters":{"version":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"custom_attribute_definition\": {\n \"key\": \"favoritemovie\",\n \"schema\": {\n \"$ref\": \"https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String\"\n },\n \"name\": \"Favorite Movie\",\n \"description\": \"The favorite movie of the customer.\",\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"version\": 1,\n \"updated_at\": \"2022-04-26T15:27:30Z\",\n \"created_at\": \"2022-04-26T15:27:30Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"dd0cf639-1e2c-4364-b367-8ea99e455eda","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"51224fcc-144b-4381-9b53-a890f62343b1","name":"UpdateCustomerCustomAttributeDefinition - default","request":{"urlPathTemplate":"/v2/customers/custom-attribute-definitions/{key}","method":"PUT","pathParameters":{"key":{"equalTo":"key"}}},"response":{"status":200,"body":"{\n \"custom_attribute_definition\": {\n \"key\": \"favoritemovie\",\n \"schema\": {\n \"$ref\": \"https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String\"\n },\n \"name\": \"Favorite Movie\",\n \"description\": \"Update the description as desired.\",\n \"visibility\": \"VISIBILITY_READ_ONLY\",\n \"version\": 2,\n \"updated_at\": \"2022-04-26T15:39:38Z\",\n \"created_at\": \"2022-04-26T15:27:30Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"51224fcc-144b-4381-9b53-a890f62343b1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3f25488a-2c30-4c85-a180-62fab71ba4e6","name":"DeleteCustomerCustomAttributeDefinition - default","request":{"urlPathTemplate":"/v2/customers/custom-attribute-definitions/{key}","method":"DELETE","pathParameters":{"key":{"equalTo":"key"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"3f25488a-2c30-4c85-a180-62fab71ba4e6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"94515ab4-9645-4324-9547-7e4fbaa84340","name":"BulkUpsertCustomerCustomAttributes - default","request":{"urlPathTemplate":"/v2/customers/custom-attributes/bulk-upsert","method":"POST"},"response":{"status":200,"body":"{\n \"values\": {\n \"id1\": {\n \"customer_id\": \"N3NCVYY3WS27HF0HKANA3R9FP8\",\n \"custom_attribute\": {\n \"key\": \"favoritemovie\",\n \"value\": \"Dune\",\n \"version\": 1,\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"updated_at\": \"2021-12-09T00:16:23Z\",\n \"created_at\": \"2021-12-08T23:14:47Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"id2\": {\n \"customer_id\": \"SY8EMWRNDN3TQDP2H4KS1QWMMM\",\n \"custom_attribute\": {\n \"key\": \"ownsmovie\",\n \"value\": false,\n \"version\": 2,\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"updated_at\": \"2021-12-09T00:16:23Z\",\n \"created_at\": \"2021-12-09T00:16:20Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"id3\": {\n \"customer_id\": \"SY8EMWRNDN3TQDP2H4KS1QWMMM\",\n \"custom_attribute\": {\n \"key\": \"favoritemovie\",\n \"value\": \"Star Wars\",\n \"version\": 2,\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"updated_at\": \"2021-12-09T00:16:23Z\",\n \"created_at\": \"2021-12-09T00:16:20Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"id4\": {\n \"customer_id\": \"N3NCVYY3WS27HF0HKANA3R9FP8\",\n \"custom_attribute\": {\n \"key\": \"square:a0f1505a-2aa1-490d-91a8-8d31ff181808\",\n \"value\": \"10.5\",\n \"version\": 1,\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"updated_at\": \"2021-12-09T00:16:23Z\",\n \"created_at\": \"2021-12-08T23:14:47Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"id5\": {\n \"customer_id\": \"70548QG1HN43B05G0KCZ4MMC1G\",\n \"custom_attribute\": {\n \"key\": \"sq0ids-0evKIskIGaY45fCyNL66aw:backupemail\",\n \"value\": \"fake-email@squareup.com\",\n \"version\": 2,\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"updated_at\": \"2021-12-09T00:16:23Z\",\n \"created_at\": \"2021-12-09T00:16:20Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"94515ab4-9645-4324-9547-7e4fbaa84340","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"66860fe4-1011-4e99-96c3-620032fb292c","name":"ListCustomerGroups - default","request":{"urlPathTemplate":"/v2/customers/groups","method":"GET","queryParameters":{"cursor":{"equalTo":"cursor"},"limit":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"groups\": [\n {\n \"id\": \"2TAT3CMH4Q0A9M87XJZED0WMR3\",\n \"name\": \"Loyal Customers\",\n \"created_at\": \"2020-04-13T21:54:57.863Z\",\n \"updated_at\": \"2020-04-13T21:54:58Z\"\n },\n {\n \"id\": \"4XMEHESXJBNE9S9JAKZD2FGB14\",\n \"name\": \"Super Loyal Customers\",\n \"created_at\": \"2020-04-13T21:55:18.795Z\",\n \"updated_at\": \"2020-04-13T21:55:19Z\"\n }\n ],\n \"cursor\": \"cursor\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"66860fe4-1011-4e99-96c3-620032fb292c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"fd8dc229-8c16-41f6-8f13-646db71b4c88","name":"CreateCustomerGroup - default","request":{"urlPathTemplate":"/v2/customers/groups","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"group\": {\n \"id\": \"2TAT3CMH4Q0A9M87XJZED0WMR3\",\n \"name\": \"Loyal Customers\",\n \"created_at\": \"2020-04-13T21:54:57.863Z\",\n \"updated_at\": \"2020-04-13T21:54:58Z\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"fd8dc229-8c16-41f6-8f13-646db71b4c88","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"899a584e-f0bf-4535-8148-7c3d46d16884","name":"RetrieveCustomerGroup - default","request":{"urlPathTemplate":"/v2/customers/groups/{group_id}","method":"GET","pathParameters":{"group_id":{"equalTo":"group_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"group\": {\n \"id\": \"2TAT3CMH4Q0A9M87XJZED0WMR3\",\n \"name\": \"Loyal Customers\",\n \"created_at\": \"2020-04-13T21:54:57.863Z\",\n \"updated_at\": \"2020-04-13T21:54:58Z\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"899a584e-f0bf-4535-8148-7c3d46d16884","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c6042327-e4f6-4484-8f92-3170b54c6bbc","name":"UpdateCustomerGroup - default","request":{"urlPathTemplate":"/v2/customers/groups/{group_id}","method":"PUT","pathParameters":{"group_id":{"equalTo":"group_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"group\": {\n \"id\": \"2TAT3CMH4Q0A9M87XJZED0WMR3\",\n \"name\": \"Loyal Customers\",\n \"created_at\": \"2020-04-13T21:54:57.863Z\",\n \"updated_at\": \"2020-04-13T21:54:58Z\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"c6042327-e4f6-4484-8f92-3170b54c6bbc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f862df66-8a51-45c5-b501-f2584b0ad2f2","name":"DeleteCustomerGroup - default","request":{"urlPathTemplate":"/v2/customers/groups/{group_id}","method":"DELETE","pathParameters":{"group_id":{"equalTo":"group_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"f862df66-8a51-45c5-b501-f2584b0ad2f2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0996b933-654e-433e-a8ee-a6800d400271","name":"AddGroupToCustomer - default","request":{"urlPathTemplate":"/v2/customers/{customer_id}/groups/{group_id}","method":"PUT","pathParameters":{"customer_id":{"equalTo":"customer_id"},"group_id":{"equalTo":"group_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"0996b933-654e-433e-a8ee-a6800d400271","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2e7ea6b1-59a2-4570-a4ef-69533268a673","name":"RemoveGroupFromCustomer - default","request":{"urlPathTemplate":"/v2/customers/{customer_id}/groups/{group_id}","method":"DELETE","pathParameters":{"customer_id":{"equalTo":"customer_id"},"group_id":{"equalTo":"group_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"2e7ea6b1-59a2-4570-a4ef-69533268a673","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"69acb9ec-9b72-4a33-b288-5a0c5226ed2a","name":"ListCustomerSegments - default","request":{"urlPathTemplate":"/v2/customers/segments","method":"GET","queryParameters":{"cursor":{"equalTo":"cursor"},"limit":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"segments\": [\n {\n \"id\": \"GMNXRZVEXNQDF.CHURN_RISK\",\n \"name\": \"Lapsed\",\n \"created_at\": \"2020-01-09T19:33:24.469Z\",\n \"updated_at\": \"2020-04-13T21:47:04Z\"\n },\n {\n \"id\": \"GMNXRZVEXNQDF.LOYAL\",\n \"name\": \"Regulars\",\n \"created_at\": \"2020-01-09T19:33:24.486Z\",\n \"updated_at\": \"2020-04-13T21:47:04Z\"\n },\n {\n \"id\": \"GMNXRZVEXNQDF.REACHABLE\",\n \"name\": \"Reachable\",\n \"created_at\": \"2020-01-09T19:33:21.813Z\",\n \"updated_at\": \"2020-04-13T21:47:04Z\"\n },\n {\n \"id\": \"gv2:KF92J19VXN5FK30GX2E8HSGQ20\",\n \"name\": \"Instant Profile\",\n \"created_at\": \"2020-01-09T19:33:25Z\",\n \"updated_at\": \"2020-04-13T23:01:03Z\"\n }\n ],\n \"cursor\": \"cursor\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"69acb9ec-9b72-4a33-b288-5a0c5226ed2a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"d3095f6d-4e74-4500-bf44-0bc916fca807","name":"RetrieveCustomerSegment - default","request":{"urlPathTemplate":"/v2/customers/segments/{segment_id}","method":"GET","pathParameters":{"segment_id":{"equalTo":"segment_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"segment\": {\n \"id\": \"GMNXRZVEXNQDF.CHURN_RISK\",\n \"name\": \"Lapsed\",\n \"created_at\": \"2020-01-09T19:33:24.469Z\",\n \"updated_at\": \"2020-04-13T23:01:13Z\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"d3095f6d-4e74-4500-bf44-0bc916fca807","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"dad66b5c-4fd4-4f25-86a2-366ec4a00ad2","name":"CreateCustomerCard - default","request":{"urlPathTemplate":"/v2/customers/{customer_id}/cards","method":"POST","pathParameters":{"customer_id":{"equalTo":"customer_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"card\": {\n \"id\": \"icard-card_id\",\n \"card_brand\": \"VISA\",\n \"last_4\": \"1111\",\n \"exp_month\": 11,\n \"exp_year\": 2018,\n \"cardholder_name\": \"Amelia Earhart\",\n \"billing_address\": {\n \"address_line_1\": \"500 Electric Ave\",\n \"address_line_2\": \"Suite 600\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"New York\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"NY\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"10003\",\n \"country\": \"US\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n },\n \"fingerprint\": \"fingerprint\",\n \"customer_id\": \"customer_id\",\n \"merchant_id\": \"merchant_id\",\n \"reference_id\": \"reference_id\",\n \"enabled\": true,\n \"card_type\": \"UNKNOWN_CARD_TYPE\",\n \"prepaid_type\": \"UNKNOWN_PREPAID_TYPE\",\n \"bin\": \"bin\",\n \"created_at\": \"created_at\",\n \"disabled_at\": \"disabled_at\",\n \"version\": 1000000,\n \"card_co_brand\": \"UNKNOWN\",\n \"issuer_alert\": \"ISSUER_ALERT_CARD_CLOSED\",\n \"issuer_alert_at\": \"issuer_alert_at\",\n \"hsa_fsa\": true\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"dad66b5c-4fd4-4f25-86a2-366ec4a00ad2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"321ee34e-e5cc-492a-893e-cdeac527436a","name":"DeleteCustomerCard - default","request":{"urlPathTemplate":"/v2/customers/{customer_id}/cards/{card_id}","method":"DELETE","pathParameters":{"customer_id":{"equalTo":"customer_id"},"card_id":{"equalTo":"card_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"321ee34e-e5cc-492a-893e-cdeac527436a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"07c824ff-b459-42b0-a3fc-c374ddae1155","name":"ListCustomerCustomAttributes - default","request":{"urlPathTemplate":"/v2/customers/{customer_id}/custom-attributes","method":"GET","pathParameters":{"customer_id":{"equalTo":"customer_id"}},"queryParameters":{"limit":{"equalTo":"1"},"cursor":{"equalTo":"cursor"},"with_definitions":{"equalTo":"true"}}},"response":{"status":200,"body":"{\n \"custom_attributes\": [\n {\n \"key\": \"favoritemovie\",\n \"value\": \"Dune\",\n \"version\": 1,\n \"visibility\": \"VISIBILITY_READ_ONLY\",\n \"updated_at\": \"2022-04-26T15:50:27Z\",\n \"created_at\": \"2022-04-26T15:50:27Z\"\n },\n {\n \"key\": \"ownsmovie\",\n \"value\": false,\n \"version\": 1,\n \"visibility\": \"VISIBILITY_HIDDEN\",\n \"updated_at\": \"2022-04-26T15:51:53Z\",\n \"created_at\": \"2022-04-26T15:51:53Z\"\n }\n ],\n \"cursor\": \"cursor\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"07c824ff-b459-42b0-a3fc-c374ddae1155","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b7d5d0f9-ed37-4fe6-99be-19f0ac7a3c25","name":"RetrieveCustomerCustomAttribute - default","request":{"urlPathTemplate":"/v2/customers/{customer_id}/custom-attributes/{key}","method":"GET","pathParameters":{"customer_id":{"equalTo":"customer_id"},"key":{"equalTo":"key"}},"queryParameters":{"with_definition":{"equalTo":"true"},"version":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"custom_attribute\": {\n \"key\": \"favoritemovie\",\n \"value\": \"Dune\",\n \"version\": 1,\n \"visibility\": \"VISIBILITY_READ_ONLY\",\n \"definition\": {\n \"key\": \"key\",\n \"schema\": {\n \"key\": \"value\"\n },\n \"name\": \"name\",\n \"description\": \"description\",\n \"visibility\": \"VISIBILITY_HIDDEN\",\n \"version\": 1,\n \"updated_at\": \"updated_at\",\n \"created_at\": \"created_at\"\n },\n \"updated_at\": \"2022-04-26T15:50:27Z\",\n \"created_at\": \"2022-04-26T15:50:27Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"b7d5d0f9-ed37-4fe6-99be-19f0ac7a3c25","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"46829e36-939f-47d9-98a6-cc1fcfb42784","name":"UpsertCustomerCustomAttribute - default","request":{"urlPathTemplate":"/v2/customers/{customer_id}/custom-attributes/{key}","method":"POST","pathParameters":{"customer_id":{"equalTo":"customer_id"},"key":{"equalTo":"key"}}},"response":{"status":200,"body":"{\n \"custom_attribute\": {\n \"key\": \"favoritemovie\",\n \"value\": \"Dune\",\n \"version\": 1,\n \"visibility\": \"VISIBILITY_READ_ONLY\",\n \"definition\": {\n \"key\": \"key\",\n \"schema\": {\n \"key\": \"value\"\n },\n \"name\": \"name\",\n \"description\": \"description\",\n \"visibility\": \"VISIBILITY_HIDDEN\",\n \"version\": 1,\n \"updated_at\": \"updated_at\",\n \"created_at\": \"created_at\"\n },\n \"updated_at\": \"2022-04-26T15:50:27Z\",\n \"created_at\": \"2022-04-26T15:50:27Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"46829e36-939f-47d9-98a6-cc1fcfb42784","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"620ed40f-8f2c-4bf5-9b31-6a5b6220d6fb","name":"DeleteCustomerCustomAttribute - default","request":{"urlPathTemplate":"/v2/customers/{customer_id}/custom-attributes/{key}","method":"DELETE","pathParameters":{"customer_id":{"equalTo":"customer_id"},"key":{"equalTo":"key"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"620ed40f-8f2c-4bf5-9b31-6a5b6220d6fb","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"1991619a-8614-4b70-a8f3-eb04934fd832","name":"ListDeviceCodes - default","request":{"urlPathTemplate":"/v2/devices/codes","method":"GET","queryParameters":{"cursor":{"equalTo":"cursor"},"location_id":{"equalTo":"location_id"},"product_type":{"equalTo":"TERMINAL_API"},"status":{"equalTo":"UNKNOWN"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"device_codes\": [\n {\n \"id\": \"B3Z6NAMYQSMTM\",\n \"name\": \"Counter 1\",\n \"code\": \"EBCARJ\",\n \"device_id\": \"907CS13101300122\",\n \"product_type\": \"TERMINAL_API\",\n \"location_id\": \"B5E4484SHHNYH\",\n \"status\": \"PAIRED\",\n \"pair_by\": \"2020-02-06T18:49:33.000Z\",\n \"created_at\": \"2020-02-06T18:44:33.000Z\",\n \"status_changed_at\": \"2020-02-06T18:47:28.000Z\",\n \"paired_at\": \"paired_at\"\n },\n {\n \"id\": \"YKGMJMYK8H4PQ\",\n \"name\": \"Unused device code\",\n \"code\": \"GVXNYN\",\n \"device_id\": \"device_id\",\n \"product_type\": \"TERMINAL_API\",\n \"location_id\": \"A6SYFRSV4WAFW\",\n \"status\": \"UNPAIRED\",\n \"pair_by\": \"2020-02-07T20:00:04.000Z\",\n \"created_at\": \"2020-02-07T19:55:04.000Z\",\n \"status_changed_at\": \"2020-02-07T19:55:04.000Z\",\n \"paired_at\": \"paired_at\"\n }\n ],\n \"cursor\": \"cursor\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"1991619a-8614-4b70-a8f3-eb04934fd832","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"0f478d10-c829-4be0-9676-1b3189bb7cc2","name":"CreateDeviceCode - default","request":{"urlPathTemplate":"/v2/devices/codes","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"device_code\": {\n \"id\": \"B3Z6NAMYQSMTM\",\n \"name\": \"Counter 1\",\n \"code\": \"EBCARJ\",\n \"device_id\": \"device_id\",\n \"product_type\": \"TERMINAL_API\",\n \"location_id\": \"B5E4484SHHNYH\",\n \"status\": \"UNPAIRED\",\n \"pair_by\": \"2020-02-06T18:49:33.000Z\",\n \"created_at\": \"2020-02-06T18:44:33.000Z\",\n \"status_changed_at\": \"2020-02-06T18:44:33.000Z\",\n \"paired_at\": \"paired_at\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"0f478d10-c829-4be0-9676-1b3189bb7cc2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"08e361d7-5f33-4ee7-afd5-5560faff8ff0","name":"GetDeviceCode - default","request":{"urlPathTemplate":"/v2/devices/codes/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"device_code\": {\n \"id\": \"B3Z6NAMYQSMTM\",\n \"name\": \"Counter 1\",\n \"code\": \"EBCARJ\",\n \"device_id\": \"907CS13101300122\",\n \"product_type\": \"TERMINAL_API\",\n \"location_id\": \"B5E4484SHHNYH\",\n \"status\": \"PAIRED\",\n \"pair_by\": \"2020-02-06T18:49:33.000Z\",\n \"created_at\": \"2020-02-06T18:44:33.000Z\",\n \"status_changed_at\": \"2020-02-06T18:47:28.000Z\",\n \"paired_at\": \"paired_at\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"08e361d7-5f33-4ee7-afd5-5560faff8ff0","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"9c0e1878-6646-4189-83a7-82963f3507e3","name":"ListDisputeEvidence - default","request":{"urlPathTemplate":"/v2/disputes/{dispute_id}/evidence","method":"GET","pathParameters":{"dispute_id":{"equalTo":"dispute_id"}},"queryParameters":{"cursor":{"equalTo":"cursor"}}},"response":{"status":200,"body":"{\n \"evidence\": [\n {\n \"evidence_id\": \"evidence_id\",\n \"id\": \"CpfnkwGselCwS8QFvxN6\",\n \"dispute_id\": \"bVTprrwk0gygTLZ96VX1oB\",\n \"evidence_file\": {\n \"filename\": \"customer-interaction\",\n \"filetype\": \"JPG\"\n },\n \"evidence_text\": \"evidence_text\",\n \"uploaded_at\": \"2022-05-10T15:57:13.802Z\",\n \"evidence_type\": \"CARDHOLDER_COMMUNICATION\"\n },\n {\n \"evidence_id\": \"evidence_id\",\n \"id\": \"TOomLInj6iWmP3N8qfCXrB\",\n \"dispute_id\": \"bVTprrwk0gygTLZ96VX1oB\",\n \"evidence_file\": {\n \"filename\": \"\",\n \"filetype\": \"\"\n },\n \"evidence_text\": \"evidence_text\",\n \"uploaded_at\": \"2022-05-18T16:01:10.000Z\",\n \"evidence_type\": \"REBUTTAL_EXPLANATION\"\n }\n ],\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"cursor\": \"cursor\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"9c0e1878-6646-4189-83a7-82963f3507e3","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"855beb1d-70d8-44fc-b661-fe2ca29447bb","name":"RetrieveDisputeEvidence - default","request":{"urlPathTemplate":"/v2/disputes/{dispute_id}/evidence/{evidence_id}","method":"GET","pathParameters":{"dispute_id":{"equalTo":"dispute_id"},"evidence_id":{"equalTo":"evidence_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"evidence\": {\n \"evidence_id\": \"evidence_id\",\n \"id\": \"TOomLInj6iWmP3N8qfCXrB\",\n \"dispute_id\": \"bVTprrwk0gygTLZ96VX1oB\",\n \"evidence_file\": {\n \"filename\": \"customer-interaction.jpg\",\n \"filetype\": \"image/jpeg\"\n },\n \"evidence_text\": \"evidence_text\",\n \"uploaded_at\": \"2022-05-18T16:01:10.000Z\",\n \"evidence_type\": \"CARDHOLDER_COMMUNICATION\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"855beb1d-70d8-44fc-b661-fe2ca29447bb","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"1879f342-162e-4768-9f05-f4e95b177eab","name":"DeleteDisputeEvidence - default","request":{"urlPathTemplate":"/v2/disputes/{dispute_id}/evidence/{evidence_id}","method":"DELETE","pathParameters":{"dispute_id":{"equalTo":"dispute_id"},"evidence_id":{"equalTo":"evidence_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"1879f342-162e-4768-9f05-f4e95b177eab","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c5143a86-93a2-4bb4-9192-dd534f41ce3f","name":"ListGiftCardActivities - default","request":{"urlPathTemplate":"/v2/gift-cards/activities","method":"GET","queryParameters":{"gift_card_id":{"equalTo":"gift_card_id"},"type":{"equalTo":"type"},"location_id":{"equalTo":"location_id"},"begin_time":{"equalTo":"begin_time"},"end_time":{"equalTo":"end_time"},"limit":{"equalTo":"1"},"cursor":{"equalTo":"cursor"},"sort_order":{"equalTo":"sort_order"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"gift_card_activities\": [\n {\n \"id\": \"gcact_897698f894b44b3db46c6147e26a0e19\",\n \"type\": \"REDEEM\",\n \"location_id\": \"81FN9BNFZTKS4\",\n \"created_at\": \"2021-06-02T22:26:38.000Z\",\n \"gift_card_id\": \"gftc:6d55a72470d940c6ba09c0ab8ad08d20\",\n \"gift_card_gan\": \"7783320002929081\",\n \"gift_card_balance_money\": {\n \"amount\": 700,\n \"currency\": \"USD\"\n },\n \"redeem_activity_details\": {\n \"amount_money\": {\n \"amount\": 300,\n \"currency\": \"USD\"\n }\n },\n \"clear_balance_activity_details\": {\n \"reason\": \"SUSPICIOUS_ACTIVITY\"\n },\n \"deactivate_activity_details\": {\n \"reason\": \"SUSPICIOUS_ACTIVITY\"\n },\n \"adjust_increment_activity_details\": {\n \"amount_money\": {},\n \"reason\": \"COMPLIMENTARY\"\n },\n \"adjust_decrement_activity_details\": {\n \"amount_money\": {},\n \"reason\": \"SUSPICIOUS_ACTIVITY\"\n },\n \"unlinked_activity_refund_activity_details\": {\n \"amount_money\": {}\n },\n \"import_activity_details\": {\n \"amount_money\": {}\n },\n \"block_activity_details\": {\n \"reason\": \"CHARGEBACK_BLOCK\"\n },\n \"unblock_activity_details\": {\n \"reason\": \"CHARGEBACK_UNBLOCK\"\n },\n \"import_reversal_activity_details\": {\n \"amount_money\": {}\n },\n \"transfer_balance_to_activity_details\": {\n \"transfer_from_gift_card_id\": \"transfer_from_gift_card_id\",\n \"amount_money\": {}\n },\n \"transfer_balance_from_activity_details\": {\n \"transfer_to_gift_card_id\": \"transfer_to_gift_card_id\",\n \"amount_money\": {}\n }\n },\n {\n \"id\": \"gcact_b968ebfc7d46437b945be7b9e09123b4\",\n \"type\": \"ACTIVATE\",\n \"location_id\": \"81FN9BNFZTKS4\",\n \"created_at\": \"2021-05-20T22:26:54.000Z\",\n \"gift_card_id\": \"gftc:6d55a72470d940c6ba09c0ab8ad08d20\",\n \"gift_card_gan\": \"7783320002929081\",\n \"gift_card_balance_money\": {\n \"amount\": 1000,\n \"currency\": \"USD\"\n },\n \"activate_activity_details\": {\n \"amount_money\": {\n \"amount\": 1000,\n \"currency\": \"USD\"\n },\n \"order_id\": \"jJNGHm4gLI6XkFbwtiSLqK72KkAZY\",\n \"line_item_uid\": \"eIWl7X0nMuO9Ewbh0ChIx\"\n },\n \"redeem_activity_details\": {\n \"amount_money\": {}\n },\n \"clear_balance_activity_details\": {\n \"reason\": \"SUSPICIOUS_ACTIVITY\"\n },\n \"deactivate_activity_details\": {\n \"reason\": \"SUSPICIOUS_ACTIVITY\"\n },\n \"adjust_increment_activity_details\": {\n \"amount_money\": {},\n \"reason\": \"COMPLIMENTARY\"\n },\n \"adjust_decrement_activity_details\": {\n \"amount_money\": {},\n \"reason\": \"SUSPICIOUS_ACTIVITY\"\n },\n \"unlinked_activity_refund_activity_details\": {\n \"amount_money\": {}\n },\n \"import_activity_details\": {\n \"amount_money\": {}\n },\n \"block_activity_details\": {\n \"reason\": \"CHARGEBACK_BLOCK\"\n },\n \"unblock_activity_details\": {\n \"reason\": \"CHARGEBACK_UNBLOCK\"\n },\n \"import_reversal_activity_details\": {\n \"amount_money\": {}\n },\n \"transfer_balance_to_activity_details\": {\n \"transfer_from_gift_card_id\": \"transfer_from_gift_card_id\",\n \"amount_money\": {}\n },\n \"transfer_balance_from_activity_details\": {\n \"transfer_to_gift_card_id\": \"transfer_to_gift_card_id\",\n \"amount_money\": {}\n }\n }\n ],\n \"cursor\": \"cursor\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"c5143a86-93a2-4bb4-9192-dd534f41ce3f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"054d9f7c-57c9-457e-889e-1cda3f7c2b5c","name":"CreateGiftCardActivity - default","request":{"urlPathTemplate":"/v2/gift-cards/activities","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"gift_card_activity\": {\n \"id\": \"gcact_c8f8cbf1f24b448d8ecf39ed03f97864\",\n \"type\": \"ACTIVATE\",\n \"location_id\": \"81FN9BNFZTKS4\",\n \"created_at\": \"2021-05-20T22:26:54.000Z\",\n \"gift_card_id\": \"gftc:6d55a72470d940c6ba09c0ab8ad08d20\",\n \"gift_card_gan\": \"7783320002929081\",\n \"gift_card_balance_money\": {\n \"amount\": 1000,\n \"currency\": \"USD\"\n },\n \"load_activity_details\": {\n \"order_id\": \"order_id\",\n \"line_item_uid\": \"line_item_uid\",\n \"reference_id\": \"reference_id\",\n \"buyer_payment_instrument_ids\": [\n \"buyer_payment_instrument_ids\"\n ]\n },\n \"activate_activity_details\": {\n \"amount_money\": {\n \"amount\": 1000,\n \"currency\": \"USD\"\n },\n \"order_id\": \"jJNGHm4gLI6XkFbwtiSLqK72KkAZY\",\n \"line_item_uid\": \"eIWl7X0nMuO9Ewbh0ChIx\",\n \"reference_id\": \"reference_id\",\n \"buyer_payment_instrument_ids\": [\n \"buyer_payment_instrument_ids\"\n ]\n },\n \"redeem_activity_details\": {\n \"amount_money\": {},\n \"payment_id\": \"payment_id\",\n \"reference_id\": \"reference_id\",\n \"status\": \"PENDING\"\n },\n \"clear_balance_activity_details\": {\n \"reason\": \"SUSPICIOUS_ACTIVITY\"\n },\n \"deactivate_activity_details\": {\n \"reason\": \"SUSPICIOUS_ACTIVITY\"\n },\n \"adjust_increment_activity_details\": {\n \"amount_money\": {},\n \"reason\": \"COMPLIMENTARY\"\n },\n \"adjust_decrement_activity_details\": {\n \"amount_money\": {},\n \"reason\": \"SUSPICIOUS_ACTIVITY\"\n },\n \"refund_activity_details\": {\n \"redeem_activity_id\": \"redeem_activity_id\",\n \"reference_id\": \"reference_id\",\n \"payment_id\": \"payment_id\"\n },\n \"unlinked_activity_refund_activity_details\": {\n \"amount_money\": {},\n \"reference_id\": \"reference_id\",\n \"payment_id\": \"payment_id\"\n },\n \"import_activity_details\": {\n \"amount_money\": {}\n },\n \"block_activity_details\": {\n \"reason\": \"CHARGEBACK_BLOCK\"\n },\n \"unblock_activity_details\": {\n \"reason\": \"CHARGEBACK_UNBLOCK\"\n },\n \"import_reversal_activity_details\": {\n \"amount_money\": {}\n },\n \"transfer_balance_to_activity_details\": {\n \"transfer_from_gift_card_id\": \"transfer_from_gift_card_id\",\n \"amount_money\": {}\n },\n \"transfer_balance_from_activity_details\": {\n \"transfer_to_gift_card_id\": \"transfer_to_gift_card_id\",\n \"amount_money\": {}\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"054d9f7c-57c9-457e-889e-1cda3f7c2b5c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fb28a07d-c578-40e9-9cf3-a1f4fc11a4e3","name":"ListBreakTypes - default","request":{"urlPathTemplate":"/v2/labor/break-types","method":"GET","queryParameters":{"location_id":{"equalTo":"location_id"},"limit":{"equalTo":"1"},"cursor":{"equalTo":"cursor"}}},"response":{"status":200,"body":"{\n \"break_types\": [\n {\n \"id\": \"REGS1EQR1TPZ5\",\n \"location_id\": \"PAA1RJZZKXBFG\",\n \"break_name\": \"Coffee Break\",\n \"expected_duration\": \"PT5M\",\n \"is_paid\": false,\n \"version\": 1,\n \"created_at\": \"2019-01-22T20:47:37Z\",\n \"updated_at\": \"2019-01-22T20:47:37Z\"\n },\n {\n \"id\": \"92EPDRQKJ5088\",\n \"location_id\": \"PAA1RJZZKXBFG\",\n \"break_name\": \"Lunch Break\",\n \"expected_duration\": \"PT1H\",\n \"is_paid\": true,\n \"version\": 3,\n \"created_at\": \"2019-01-25T19:26:30Z\",\n \"updated_at\": \"2019-01-25T19:26:30Z\"\n }\n ],\n \"cursor\": \"2fofTniCgT0yIPAq26kmk0YyFQJZfbWkh73OOnlTHmTAx13NgED\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"fb28a07d-c578-40e9-9cf3-a1f4fc11a4e3","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"e7eff84d-93f6-4bcf-b9d7-b8482f6a4812","name":"CreateBreakType - default","request":{"urlPathTemplate":"/v2/labor/break-types","method":"POST"},"response":{"status":200,"body":"{\n \"break_type\": {\n \"id\": \"49SSVDJG76WF3\",\n \"location_id\": \"CGJN03P1D08GF\",\n \"break_name\": \"Lunch Break\",\n \"expected_duration\": \"PT30M\",\n \"is_paid\": true,\n \"version\": 1,\n \"created_at\": \"2019-02-26T22:42:54Z\",\n \"updated_at\": \"2019-02-26T22:42:54Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"e7eff84d-93f6-4bcf-b9d7-b8482f6a4812","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"719c2f51-a983-4539-9c0f-35681ebce951","name":"GetBreakType - default","request":{"urlPathTemplate":"/v2/labor/break-types/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"break_type\": {\n \"id\": \"lA0mj_RSOprNPwMUXdYp\",\n \"location_id\": \"059SB0E0WCNWS\",\n \"break_name\": \"Lunch Break\",\n \"expected_duration\": \"PT30M\",\n \"is_paid\": true,\n \"version\": 1,\n \"created_at\": \"2019-02-21T17:50:00Z\",\n \"updated_at\": \"2019-02-21T17:50:00Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"719c2f51-a983-4539-9c0f-35681ebce951","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"25c3f4c7-7173-40cc-90df-3b588214a5f3","name":"UpdateBreakType - default","request":{"urlPathTemplate":"/v2/labor/break-types/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"break_type\": {\n \"id\": \"Q6JSJS6D4DBCH\",\n \"location_id\": \"26M7H24AZ9N6R\",\n \"break_name\": \"Lunch\",\n \"expected_duration\": \"PT50M\",\n \"is_paid\": true,\n \"version\": 2,\n \"created_at\": \"2018-06-12T20:19:12Z\",\n \"updated_at\": \"2019-02-26T23:12:59Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"25c3f4c7-7173-40cc-90df-3b588214a5f3","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b4c631db-ed98-4ce7-a44f-4b037f4561b1","name":"DeleteBreakType - default","request":{"urlPathTemplate":"/v2/labor/break-types/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"b4c631db-ed98-4ce7-a44f-4b037f4561b1","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e17a4f71-0c89-48dd-83f9-25ec4662f883","name":"ListEmployeeWages - default","request":{"urlPathTemplate":"/v2/labor/employee-wages","method":"GET","queryParameters":{"employee_id":{"equalTo":"employee_id"},"limit":{"equalTo":"1"},"cursor":{"equalTo":"cursor"}}},"response":{"status":200,"body":"{\n \"employee_wages\": [\n {\n \"id\": \"pXS3qCv7BERPnEGedM4S8mhm\",\n \"employee_id\": \"33fJchumvVdJwxV0H6L9\",\n \"title\": \"Manager\",\n \"hourly_rate\": {\n \"amount\": 3250,\n \"currency\": \"USD\"\n }\n },\n {\n \"id\": \"rZduCkzYDUVL3ovh1sQgbue6\",\n \"employee_id\": \"33fJchumvVdJwxV0H6L9\",\n \"title\": \"Cook\",\n \"hourly_rate\": {\n \"amount\": 2600,\n \"currency\": \"USD\"\n }\n },\n {\n \"id\": \"FxLbs5KpPUHa8wyt5ctjubDX\",\n \"employee_id\": \"33fJchumvVdJwxV0H6L9\",\n \"title\": \"Barista\",\n \"hourly_rate\": {\n \"amount\": 1600,\n \"currency\": \"USD\"\n }\n },\n {\n \"id\": \"vD1wCgijMDR3cX5TPnu7VXto\",\n \"employee_id\": \"33fJchumvVdJwxV0H6L9\",\n \"title\": \"Cashier\",\n \"hourly_rate\": {\n \"amount\": 1700,\n \"currency\": \"USD\"\n }\n }\n ],\n \"cursor\": \"2fofTniCgT0yIPAq26kmk0YyFQJZfbWkh73OOnlTHmTAx13NgED\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"e17a4f71-0c89-48dd-83f9-25ec4662f883","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"fcb5a81e-9c3b-4b70-ab3c-00c7cae60922","name":"GetEmployeeWage - default","request":{"urlPathTemplate":"/v2/labor/employee-wages/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"employee_wage\": {\n \"id\": \"pXS3qCv7BERPnEGedM4S8mhm\",\n \"employee_id\": \"33fJchumvVdJwxV0H6L9\",\n \"title\": \"Manager\",\n \"hourly_rate\": {\n \"amount\": 2000,\n \"currency\": \"USD\"\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"fcb5a81e-9c3b-4b70-ab3c-00c7cae60922","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"93ce0c7b-2eba-4c10-a3a7-e980a67a4093","name":"CreateShift - default","request":{"urlPathTemplate":"/v2/labor/shifts","method":"POST"},"response":{"status":200,"body":"{\n \"shift\": {\n \"id\": \"K0YH4CV5462JB\",\n \"employee_id\": \"ormj0jJJZ5OZIzxrZYJI\",\n \"location_id\": \"PAA1RJZZKXBFG\",\n \"timezone\": \"America/New_York\",\n \"start_at\": \"2019-01-25T03:11:00-05:00\",\n \"end_at\": \"2019-01-25T13:11:00-05:00\",\n \"wage\": {\n \"title\": \"Barista\",\n \"hourly_rate\": {\n \"amount\": 1100,\n \"currency\": \"USD\"\n },\n \"job_id\": \"FzbJAtt9qEWncK1BWgVCxQ6M\",\n \"tip_eligible\": true\n },\n \"breaks\": [\n {\n \"id\": \"X7GAQYVVRRG6P\",\n \"start_at\": \"2019-01-25T06:11:00-05:00\",\n \"end_at\": \"2019-01-25T06:16:00-05:00\",\n \"break_type_id\": \"REGS1EQR1TPZ5\",\n \"name\": \"Tea Break\",\n \"expected_duration\": \"PT5M\",\n \"is_paid\": true\n }\n ],\n \"status\": \"CLOSED\",\n \"version\": 1,\n \"created_at\": \"2019-02-28T00:39:02Z\",\n \"updated_at\": \"2019-02-28T00:39:02Z\",\n \"team_member_id\": \"ormj0jJJZ5OZIzxrZYJI\",\n \"declared_cash_tip_money\": {\n \"amount\": 500,\n \"currency\": \"USD\"\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"93ce0c7b-2eba-4c10-a3a7-e980a67a4093","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"01cf64c8-9170-4b2a-a4d0-cb7b01b76ffc","name":"SearchShifts - default","request":{"urlPathTemplate":"/v2/labor/shifts/search","method":"POST"},"response":{"status":200,"body":"{\n \"shifts\": [\n {\n \"id\": \"X714F3HA6D1PT\",\n \"employee_id\": \"ormj0jJJZ5OZIzxrZYJI\",\n \"location_id\": \"PAA1RJZZKXBFG\",\n \"timezone\": \"America/New_York\",\n \"start_at\": \"2019-01-21T03:11:00-05:00\",\n \"end_at\": \"2019-01-21T13:11:00-05:00\",\n \"wage\": {\n \"title\": \"Barista\",\n \"hourly_rate\": {\n \"amount\": 1100,\n \"currency\": \"USD\"\n },\n \"job_id\": \"FzbJAtt9qEWncK1BWgVCxQ6M\",\n \"tip_eligible\": true\n },\n \"breaks\": [\n {\n \"id\": \"SJW7X6AKEJQ65\",\n \"start_at\": \"2019-01-21T06:11:00-05:00\",\n \"end_at\": \"2019-01-21T06:11:00-05:00\",\n \"break_type_id\": \"REGS1EQR1TPZ5\",\n \"name\": \"Tea Break\",\n \"expected_duration\": \"PT10M\",\n \"is_paid\": true\n }\n ],\n \"status\": \"CLOSED\",\n \"version\": 6,\n \"created_at\": \"2019-01-24T01:12:03Z\",\n \"updated_at\": \"2019-02-07T22:21:08Z\",\n \"team_member_id\": \"ormj0jJJZ5OZIzxrZYJI\",\n \"declared_cash_tip_money\": {\n \"amount\": 500,\n \"currency\": \"USD\"\n }\n },\n {\n \"id\": \"GDHYBZYWK0P2V\",\n \"employee_id\": \"33fJchumvVdJwxV0H6L9\",\n \"location_id\": \"PAA1RJZZKXBFG\",\n \"timezone\": \"America/New_York\",\n \"start_at\": \"2019-01-22T12:02:00-05:00\",\n \"end_at\": \"2019-01-22T13:02:00-05:00\",\n \"wage\": {\n \"title\": \"Cook\",\n \"hourly_rate\": {\n \"amount\": 1600,\n \"currency\": \"USD\"\n },\n \"job_id\": \"gcbz15vKGnMKmaWJJ152kjim\",\n \"tip_eligible\": true\n },\n \"breaks\": [\n {\n \"id\": \"BKS6VR7WR748A\",\n \"start_at\": \"2019-01-23T14:30:00-05:00\",\n \"end_at\": \"2019-01-23T14:40:00-05:00\",\n \"break_type_id\": \"WQX00VR99F53J\",\n \"name\": \"Tea Break\",\n \"expected_duration\": \"PT10M\",\n \"is_paid\": true\n },\n {\n \"id\": \"BQFEZSHFZSC51\",\n \"start_at\": \"2019-01-22T12:30:00-05:00\",\n \"end_at\": \"2019-01-22T12:44:00-05:00\",\n \"break_type_id\": \"P6Q468ZFRN1AC\",\n \"name\": \"Coffee Break\",\n \"expected_duration\": \"PT15M\",\n \"is_paid\": false\n }\n ],\n \"status\": \"CLOSED\",\n \"version\": 16,\n \"created_at\": \"2019-01-23T23:32:45Z\",\n \"updated_at\": \"2019-01-24T00:56:25Z\",\n \"team_member_id\": \"33fJchumvVdJwxV0H6L9\",\n \"declared_cash_tip_money\": {\n \"amount\": 0,\n \"currency\": \"USD\"\n }\n }\n ],\n \"cursor\": \"cursor\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"01cf64c8-9170-4b2a-a4d0-cb7b01b76ffc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"346df66f-3fcc-42f5-95c5-76f099cef626","name":"GetShift - default","request":{"urlPathTemplate":"/v2/labor/shifts/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"shift\": {\n \"id\": \"T35HMQSN89SV4\",\n \"employee_id\": \"D71KRMQof6cXGUW0aAv7\",\n \"location_id\": \"PAA1RJZZKXBFG\",\n \"timezone\": \"America/New_York\",\n \"start_at\": \"2019-02-23T18:00:00-05:00\",\n \"end_at\": \"2019-02-23T21:00:00-05:00\",\n \"wage\": {\n \"title\": \"Cashier\",\n \"hourly_rate\": {\n \"amount\": 1457,\n \"currency\": \"USD\"\n },\n \"job_id\": \"N4YKVLzFj3oGtNocqoYHYpW3\",\n \"tip_eligible\": true\n },\n \"breaks\": [\n {\n \"id\": \"M9BBKEPQAQD2T\",\n \"start_at\": \"2019-02-23T19:00:00-05:00\",\n \"end_at\": \"2019-02-23T20:00:00-05:00\",\n \"break_type_id\": \"92EPDRQKJ5088\",\n \"name\": \"Lunch Break\",\n \"expected_duration\": \"PT1H\",\n \"is_paid\": true\n }\n ],\n \"status\": \"CLOSED\",\n \"version\": 1,\n \"created_at\": \"2019-02-27T00:12:12Z\",\n \"updated_at\": \"2019-02-27T00:12:12Z\",\n \"team_member_id\": \"D71KRMQof6cXGUW0aAv7\",\n \"declared_cash_tip_money\": {\n \"amount\": 500,\n \"currency\": \"USD\"\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"346df66f-3fcc-42f5-95c5-76f099cef626","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"aea56479-ddc8-4f18-a173-182edefd2da8","name":"UpdateShift - default","request":{"urlPathTemplate":"/v2/labor/shifts/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"shift\": {\n \"id\": \"K0YH4CV5462JB\",\n \"employee_id\": \"ormj0jJJZ5OZIzxrZYJI\",\n \"location_id\": \"PAA1RJZZKXBFG\",\n \"timezone\": \"America/New_York\",\n \"start_at\": \"2019-01-25T03:11:00-05:00\",\n \"end_at\": \"2019-01-25T13:11:00-05:00\",\n \"wage\": {\n \"title\": \"Bartender\",\n \"hourly_rate\": {\n \"amount\": 1500,\n \"currency\": \"USD\"\n },\n \"job_id\": \"dZtrPh5GSDGugyXGByesVp51\",\n \"tip_eligible\": true\n },\n \"breaks\": [\n {\n \"id\": \"X7GAQYVVRRG6P\",\n \"start_at\": \"2019-01-25T06:11:00-05:00\",\n \"end_at\": \"2019-01-25T06:16:00-05:00\",\n \"break_type_id\": \"REGS1EQR1TPZ5\",\n \"name\": \"Tea Break\",\n \"expected_duration\": \"PT5M\",\n \"is_paid\": true\n }\n ],\n \"status\": \"CLOSED\",\n \"version\": 2,\n \"created_at\": \"2019-02-28T00:39:02Z\",\n \"updated_at\": \"2019-02-28T00:42:41Z\",\n \"team_member_id\": \"ormj0jJJZ5OZIzxrZYJI\",\n \"declared_cash_tip_money\": {\n \"amount\": 500,\n \"currency\": \"USD\"\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"aea56479-ddc8-4f18-a173-182edefd2da8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2739a786-612a-4f16-ae4c-fa9f156c95f0","name":"DeleteShift - default","request":{"urlPathTemplate":"/v2/labor/shifts/{id}","method":"DELETE","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"2739a786-612a-4f16-ae4c-fa9f156c95f0","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4e417ce4-db78-4965-b2e1-eefd1c64c7b7","name":"ListTeamMemberWages - default","request":{"urlPathTemplate":"/v2/labor/team-member-wages","method":"GET","queryParameters":{"team_member_id":{"equalTo":"team_member_id"},"limit":{"equalTo":"1"},"cursor":{"equalTo":"cursor"}}},"response":{"status":200,"body":"{\n \"team_member_wages\": [\n {\n \"id\": \"pXS3qCv7BERPnEGedM4S8mhm\",\n \"team_member_id\": \"33fJchumvVdJwxV0H6L9\",\n \"title\": \"Manager\",\n \"hourly_rate\": {\n \"amount\": 3250,\n \"currency\": \"USD\"\n },\n \"job_id\": \"jxJNN6eCJsLrhg5UFJrDWDGE\",\n \"tip_eligible\": false\n },\n {\n \"id\": \"rZduCkzYDUVL3ovh1sQgbue6\",\n \"team_member_id\": \"33fJchumvVdJwxV0H6L9\",\n \"title\": \"Cook\",\n \"hourly_rate\": {\n \"amount\": 2600,\n \"currency\": \"USD\"\n },\n \"job_id\": \"gcbz15vKGnMKmaWJJ152kjim\",\n \"tip_eligible\": true\n },\n {\n \"id\": \"FxLbs5KpPUHa8wyt5ctjubDX\",\n \"team_member_id\": \"33fJchumvVdJwxV0H6L9\",\n \"title\": \"Barista\",\n \"hourly_rate\": {\n \"amount\": 1600,\n \"currency\": \"USD\"\n },\n \"job_id\": \"FzbJAtt9qEWncK1BWgVCxQ6M\",\n \"tip_eligible\": true\n },\n {\n \"id\": \"vD1wCgijMDR3cX5TPnu7VXto\",\n \"team_member_id\": \"33fJchumvVdJwxV0H6L9\",\n \"title\": \"Cashier\",\n \"hourly_rate\": {\n \"amount\": 1700,\n \"currency\": \"USD\"\n },\n \"job_id\": \"N4YKVLzFj3oGtNocqoYHYpW3\",\n \"tip_eligible\": true\n }\n ],\n \"cursor\": \"2fofTniCgT0yIPAq26kmk0YyFQJZfbWkh73OOnlTHmTAx13NgED\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"4e417ce4-db78-4965-b2e1-eefd1c64c7b7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"d7e4ab81-d471-483b-baa0-1d49a51a0d76","name":"GetTeamMemberWage - default","request":{"urlPathTemplate":"/v2/labor/team-member-wages/{id}","method":"GET","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"team_member_wage\": {\n \"id\": \"pXS3qCv7BERPnEGedM4S8mhm\",\n \"team_member_id\": \"33fJchumvVdJwxV0H6L9\",\n \"title\": \"Manager\",\n \"hourly_rate\": {\n \"amount\": 2000,\n \"currency\": \"USD\"\n },\n \"job_id\": \"jxJNN6eCJsLrhg5UFJrDWDGE\",\n \"tip_eligible\": false\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"d7e4ab81-d471-483b-baa0-1d49a51a0d76","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b6bd3fc5-2473-4a30-a904-53ac495f6894","name":"ListWorkweekConfigs - default","request":{"urlPathTemplate":"/v2/labor/workweek-configs","method":"GET","queryParameters":{"limit":{"equalTo":"1"},"cursor":{"equalTo":"cursor"}}},"response":{"status":200,"body":"{\n \"workweek_configs\": [\n {\n \"id\": \"FY4VCAQN700GM\",\n \"start_of_week\": \"MON\",\n \"start_of_day_local_time\": \"10:00\",\n \"version\": 11,\n \"created_at\": \"2016-02-04T00:58:24Z\",\n \"updated_at\": \"2019-02-28T01:04:35Z\"\n }\n ],\n \"cursor\": \"2fofTniCgT0yIPAq26kmk0YyFQJZfbWkh73OOnlTHmTAx13NgED\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"b6bd3fc5-2473-4a30-a904-53ac495f6894","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"efb9e758-4505-474c-9151-f96a9c93870f","name":"UpdateWorkweekConfig - default","request":{"urlPathTemplate":"/v2/labor/workweek-configs/{id}","method":"PUT","pathParameters":{"id":{"equalTo":"id"}}},"response":{"status":200,"body":"{\n \"workweek_config\": {\n \"id\": \"FY4VCAQN700GM\",\n \"start_of_week\": \"MON\",\n \"start_of_day_local_time\": \"10:00\",\n \"version\": 11,\n \"created_at\": \"2016-02-04T00:58:24Z\",\n \"updated_at\": \"2019-02-28T01:04:35Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"efb9e758-4505-474c-9151-f96a9c93870f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f90d69b9-b323-4d10-8c10-7dfd453c1900","name":"ListLocationCustomAttributeDefinitions - default","request":{"urlPathTemplate":"/v2/locations/custom-attribute-definitions","method":"GET","queryParameters":{"visibility_filter":{"equalTo":"ALL"},"limit":{"equalTo":"1"},"cursor":{"equalTo":"cursor"}}},"response":{"status":200,"body":"{\n \"custom_attribute_definitions\": [\n {\n \"key\": \"phone-number\",\n \"schema\": {\n \"$ref\": \"https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.PhoneNumber\"\n },\n \"name\": \"phone number\",\n \"description\": \"Location's phone number\",\n \"visibility\": \"VISIBILITY_READ_ONLY\",\n \"version\": 1,\n \"updated_at\": \"2022-12-02T19:50:21.832Z\",\n \"created_at\": \"2022-12-02T19:50:21.832Z\"\n },\n {\n \"key\": \"bestseller\",\n \"schema\": {\n \"$ref\": \"https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String\"\n },\n \"name\": \"Bestseller\",\n \"description\": \"Bestselling item at location\",\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"version\": 4,\n \"updated_at\": \"2022-12-03T10:17:52.341Z\",\n \"created_at\": \"2022-12-02T19:06:36.559Z\"\n }\n ],\n \"cursor\": \"ImfNzWVSiAYyiAR4gEcxDJ75KZAOSjX8H2BVHUTR0ofCtp4SdYvrUKbwYY2aCH2WqZ2FsfAuylEVUlTfaINg3ecIlFpP9Y5Ie66w9NSg9nqdI5fCJ6qdH2s0za5m2plFonsjIuFaoN89j78ROUwuSOzD6mFZPcJHhJ0CxEKc0SBH\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"f90d69b9-b323-4d10-8c10-7dfd453c1900","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"096a99fd-9b30-4569-9339-6826396b60ef","name":"CreateLocationCustomAttributeDefinition - default","request":{"urlPathTemplate":"/v2/locations/custom-attribute-definitions","method":"POST"},"response":{"status":200,"body":"{\n \"custom_attribute_definition\": {\n \"key\": \"bestseller\",\n \"schema\": {\n \"$ref\": \"https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String\"\n },\n \"name\": \"Bestseller\",\n \"description\": \"Bestselling item at location\",\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"version\": 1,\n \"updated_at\": \"2022-12-02T19:06:36.559Z\",\n \"created_at\": \"2022-12-02T19:06:36.559Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"096a99fd-9b30-4569-9339-6826396b60ef","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"279ef108-6194-407e-90bc-c8d4a6674be8","name":"RetrieveLocationCustomAttributeDefinition - default","request":{"urlPathTemplate":"/v2/locations/custom-attribute-definitions/{key}","method":"GET","pathParameters":{"key":{"equalTo":"key"}},"queryParameters":{"version":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"custom_attribute_definition\": {\n \"key\": \"bestseller\",\n \"schema\": {\n \"$ref\": \"https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String\"\n },\n \"name\": \"Bestseller\",\n \"description\": \"Bestselling item at location\",\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"version\": 1,\n \"updated_at\": \"2022-12-02T19:06:36.559Z\",\n \"created_at\": \"2022-12-02T19:06:36.559Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"279ef108-6194-407e-90bc-c8d4a6674be8","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8e28e541-4d63-4078-a696-a222815aace5","name":"UpdateLocationCustomAttributeDefinition - default","request":{"urlPathTemplate":"/v2/locations/custom-attribute-definitions/{key}","method":"PUT","pathParameters":{"key":{"equalTo":"key"}}},"response":{"status":200,"body":"{\n \"custom_attribute_definition\": {\n \"key\": \"bestseller\",\n \"schema\": {\n \"$ref\": \"https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String\"\n },\n \"name\": \"Bestseller\",\n \"description\": \"Update the description as desired.\",\n \"visibility\": \"VISIBILITY_READ_ONLY\",\n \"version\": 2,\n \"updated_at\": \"2022-12-02T19:34:10.181Z\",\n \"created_at\": \"2022-12-02T19:06:36.559Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"8e28e541-4d63-4078-a696-a222815aace5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fda22ca7-2f63-403d-b0a5-c633005f3630","name":"DeleteLocationCustomAttributeDefinition - default","request":{"urlPathTemplate":"/v2/locations/custom-attribute-definitions/{key}","method":"DELETE","pathParameters":{"key":{"equalTo":"key"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"fda22ca7-2f63-403d-b0a5-c633005f3630","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"11e7cbbf-e589-4579-8818-4dc3a78641eb","name":"BulkDeleteLocationCustomAttributes - default","request":{"urlPathTemplate":"/v2/locations/custom-attributes/bulk-delete","method":"POST"},"response":{"status":200,"body":"{\n \"values\": {\n \"id1\": {\n \"location_id\": \"L0TBCBTB7P8RQ\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"id2\": {\n \"location_id\": \"L9XMD04V3STJX\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"id3\": {\n \"location_id\": \"L0TBCBTB7P8RQ\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"11e7cbbf-e589-4579-8818-4dc3a78641eb","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"7d4aa216-d37d-4475-a07a-26a775314aa2","name":"BulkUpsertLocationCustomAttributes - default","request":{"urlPathTemplate":"/v2/locations/custom-attributes/bulk-upsert","method":"POST"},"response":{"status":200,"body":"{\n \"values\": {\n \"id1\": {\n \"location_id\": \"L0TBCBTB7P8RQ\",\n \"custom_attribute\": {\n \"key\": \"bestseller\",\n \"value\": \"hot cocoa\",\n \"version\": 2,\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"updated_at\": \"2023-01-09T19:21:04.551Z\",\n \"created_at\": \"2023-01-09T19:02:58.647Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"id2\": {\n \"location_id\": \"L9XMD04V3STJX\",\n \"custom_attribute\": {\n \"key\": \"bestseller\",\n \"value\": \"berry smoothie\",\n \"version\": 1,\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"updated_at\": \"2023-01-09T19:21:04.551Z\",\n \"created_at\": \"2023-01-09T19:02:58.647Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"id3\": {\n \"location_id\": \"L0TBCBTB7P8RQ\",\n \"custom_attribute\": {\n \"key\": \"phone-number\",\n \"value\": \"+12239903892\",\n \"version\": 2,\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"updated_at\": \"2023-01-09T19:21:04.563Z\",\n \"created_at\": \"2023-01-09T19:04:57.985Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"7d4aa216-d37d-4475-a07a-26a775314aa2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"1faffd97-520b-468e-bbc4-ba4c308373b7","name":"ListLocationCustomAttributes - default","request":{"urlPathTemplate":"/v2/locations/{location_id}/custom-attributes","method":"GET","pathParameters":{"location_id":{"equalTo":"location_id"}},"queryParameters":{"visibility_filter":{"equalTo":"ALL"},"limit":{"equalTo":"1"},"cursor":{"equalTo":"cursor"},"with_definitions":{"equalTo":"true"}}},"response":{"status":200,"body":"{\n \"custom_attributes\": [\n {\n \"key\": \"phone-number\",\n \"value\": \"+12223334444\",\n \"version\": 1,\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"updated_at\": \"2022-12-12T18:13:03.745Z\",\n \"created_at\": \"2022-12-12T18:13:03.745Z\"\n },\n {\n \"key\": \"bestseller\",\n \"value\": \"hot cocoa\",\n \"version\": 1,\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"updated_at\": \"2022-12-12T19:27:57.975Z\",\n \"created_at\": \"2022-12-12T19:27:57.975Z\"\n }\n ],\n \"cursor\": \"cursor\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"1faffd97-520b-468e-bbc4-ba4c308373b7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"df8f6539-f61f-43c4-a9c8-47781fb76ef0","name":"RetrieveLocationCustomAttribute - default","request":{"urlPathTemplate":"/v2/locations/{location_id}/custom-attributes/{key}","method":"GET","pathParameters":{"location_id":{"equalTo":"location_id"},"key":{"equalTo":"key"}},"queryParameters":{"with_definition":{"equalTo":"true"},"version":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"custom_attribute\": {\n \"key\": \"bestseller\",\n \"value\": \"hot cocoa\",\n \"version\": 2,\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"definition\": {\n \"key\": \"key\",\n \"schema\": {\n \"key\": \"value\"\n },\n \"name\": \"name\",\n \"description\": \"description\",\n \"visibility\": \"VISIBILITY_HIDDEN\",\n \"version\": 1,\n \"updated_at\": \"updated_at\",\n \"created_at\": \"created_at\"\n },\n \"updated_at\": \"2023-01-09T19:21:04.551Z\",\n \"created_at\": \"2023-01-09T19:02:58.647Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"df8f6539-f61f-43c4-a9c8-47781fb76ef0","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"1fd14263-418e-4c13-8789-1484fecb48bb","name":"UpsertLocationCustomAttribute - default","request":{"urlPathTemplate":"/v2/locations/{location_id}/custom-attributes/{key}","method":"POST","pathParameters":{"location_id":{"equalTo":"location_id"},"key":{"equalTo":"key"}}},"response":{"status":200,"body":"{\n \"custom_attribute\": {\n \"key\": \"bestseller\",\n \"value\": \"hot cocoa\",\n \"version\": 2,\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"definition\": {\n \"key\": \"key\",\n \"schema\": {\n \"key\": \"value\"\n },\n \"name\": \"name\",\n \"description\": \"description\",\n \"visibility\": \"VISIBILITY_HIDDEN\",\n \"version\": 1,\n \"updated_at\": \"updated_at\",\n \"created_at\": \"created_at\"\n },\n \"updated_at\": \"2023-01-09T19:21:04.551Z\",\n \"created_at\": \"2023-01-09T19:02:58.647Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"1fd14263-418e-4c13-8789-1484fecb48bb","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"04b6f8aa-2ac7-40e9-8111-dd4ec63e2f77","name":"DeleteLocationCustomAttribute - default","request":{"urlPathTemplate":"/v2/locations/{location_id}/custom-attributes/{key}","method":"DELETE","pathParameters":{"location_id":{"equalTo":"location_id"},"key":{"equalTo":"key"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"04b6f8aa-2ac7-40e9-8111-dd4ec63e2f77","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2145cca7-17a7-4d7c-898b-8eb627727da6","name":"ListTransactions - default","request":{"urlPathTemplate":"/v2/locations/{location_id}/transactions","method":"GET","pathParameters":{"location_id":{"equalTo":"location_id"}},"queryParameters":{"begin_time":{"equalTo":"begin_time"},"end_time":{"equalTo":"end_time"},"sort_order":{"equalTo":"DESC"},"cursor":{"equalTo":"cursor"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"transactions\": [\n {\n \"id\": \"KnL67ZIwXCPtzOrqj0HrkxMF\",\n \"location_id\": \"18YC4JDH91E1H\",\n \"created_at\": \"2016-01-20T22:57:56Z\",\n \"tenders\": [\n {\n \"id\": \"MtZRYYdDrYNQbOvV7nbuBvMF\",\n \"location_id\": \"18YC4JDH91E1H\",\n \"transaction_id\": \"KnL67ZIwXCPtzOrqj0HrkxMF\",\n \"created_at\": \"2016-01-20T22:57:56Z\",\n \"note\": \"some optional note\",\n \"amount_money\": {\n \"amount\": 5000,\n \"currency\": \"USD\"\n },\n \"processing_fee_money\": {\n \"amount\": 138,\n \"currency\": \"USD\"\n },\n \"type\": \"CARD\",\n \"card_details\": {\n \"status\": \"CAPTURED\",\n \"card\": {\n \"card_brand\": \"VISA\",\n \"last_4\": \"1111\"\n },\n \"entry_method\": \"KEYED\"\n },\n \"additional_recipients\": [\n {\n \"location_id\": \"057P5VYJ4A5X1\",\n \"description\": \"Application fees\",\n \"amount_money\": {\n \"amount\": 20,\n \"currency\": \"USD\"\n }\n }\n ]\n }\n ],\n \"refunds\": [\n {\n \"id\": \"7a5RcVI0CxbOcJ2wMOkE\",\n \"location_id\": \"18YC4JDH91E1H\",\n \"transaction_id\": \"KnL67ZIwXCPtzOrqj0HrkxMF\",\n \"tender_id\": \"MtZRYYdDrYNQbOvV7nbuBvMF\",\n \"created_at\": \"2016-01-20T22:59:20Z\",\n \"reason\": \"some reason why\",\n \"amount_money\": {\n \"amount\": 5000,\n \"currency\": \"USD\"\n },\n \"status\": \"APPROVED\",\n \"processing_fee_money\": {\n \"amount\": 138,\n \"currency\": \"USD\"\n },\n \"additional_recipients\": [\n {\n \"location_id\": \"057P5VYJ4A5X1\",\n \"description\": \"Application fees\",\n \"amount_money\": {\n \"amount\": 100,\n \"currency\": \"USD\"\n }\n }\n ]\n }\n ],\n \"reference_id\": \"some optional reference id\",\n \"product\": \"EXTERNAL_API\",\n \"client_id\": \"client_id\",\n \"order_id\": \"order_id\"\n }\n ],\n \"cursor\": \"cursor\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"2145cca7-17a7-4d7c-898b-8eb627727da6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"837251e3-df09-440c-9681-e98c115a07ac","name":"RetrieveTransaction - default","request":{"urlPathTemplate":"/v2/locations/{location_id}/transactions/{transaction_id}","method":"GET","pathParameters":{"location_id":{"equalTo":"location_id"},"transaction_id":{"equalTo":"transaction_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"transaction\": {\n \"id\": \"KnL67ZIwXCPtzOrqj0HrkxMF\",\n \"location_id\": \"18YC4JDH91E1H\",\n \"created_at\": \"2016-03-10T22:57:56Z\",\n \"tenders\": [\n {\n \"id\": \"MtZRYYdDrYNQbOvV7nbuBvMF\",\n \"location_id\": \"18YC4JDH91E1H\",\n \"transaction_id\": \"KnL67ZIwXCPtzOrqj0HrkxMF\",\n \"created_at\": \"2016-03-10T22:57:56Z\",\n \"note\": \"some optional note\",\n \"amount_money\": {\n \"amount\": 5000,\n \"currency\": \"USD\"\n },\n \"processing_fee_money\": {\n \"amount\": 138,\n \"currency\": \"USD\"\n },\n \"type\": \"CARD\",\n \"card_details\": {\n \"status\": \"CAPTURED\",\n \"card\": {\n \"card_brand\": \"VISA\",\n \"last_4\": \"1111\"\n },\n \"entry_method\": \"KEYED\"\n },\n \"additional_recipients\": [\n {\n \"location_id\": \"057P5VYJ4A5X1\",\n \"description\": \"Application fees\",\n \"amount_money\": {\n \"amount\": 20,\n \"currency\": \"USD\"\n }\n }\n ]\n }\n ],\n \"refunds\": [\n {\n \"id\": \"id\",\n \"location_id\": \"location_id\",\n \"reason\": \"reason\",\n \"amount_money\": {},\n \"status\": \"PENDING\"\n }\n ],\n \"reference_id\": \"some optional reference id\",\n \"product\": \"EXTERNAL_API\",\n \"client_id\": \"client_id\",\n \"shipping_address\": {\n \"address_line_1\": \"address_line_1\",\n \"address_line_2\": \"address_line_2\",\n \"address_line_3\": \"address_line_3\",\n \"locality\": \"locality\",\n \"sublocality\": \"sublocality\",\n \"sublocality_2\": \"sublocality_2\",\n \"sublocality_3\": \"sublocality_3\",\n \"administrative_district_level_1\": \"administrative_district_level_1\",\n \"administrative_district_level_2\": \"administrative_district_level_2\",\n \"administrative_district_level_3\": \"administrative_district_level_3\",\n \"postal_code\": \"postal_code\",\n \"country\": \"ZZ\",\n \"first_name\": \"first_name\",\n \"last_name\": \"last_name\"\n },\n \"order_id\": \"order_id\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"837251e3-df09-440c-9681-e98c115a07ac","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"703c2dc1-5f2d-4cb3-8ab3-78edf025c02d","name":"CaptureTransaction - default","request":{"urlPathTemplate":"/v2/locations/{location_id}/transactions/{transaction_id}/capture","method":"POST","pathParameters":{"location_id":{"equalTo":"location_id"},"transaction_id":{"equalTo":"transaction_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"703c2dc1-5f2d-4cb3-8ab3-78edf025c02d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e056ce6c-895b-4c55-8253-d999d5a64b7f","name":"VoidTransaction - default","request":{"urlPathTemplate":"/v2/locations/{location_id}/transactions/{transaction_id}/void","method":"POST","pathParameters":{"location_id":{"equalTo":"location_id"},"transaction_id":{"equalTo":"transaction_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"e056ce6c-895b-4c55-8253-d999d5a64b7f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e7c9cc8e-4299-4c17-858f-9269ba4fc97f","name":"CreateLoyaltyAccount - default","request":{"urlPathTemplate":"/v2/loyalty/accounts","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"loyalty_account\": {\n \"id\": \"79b807d2-d786-46a9-933b-918028d7a8c5\",\n \"program_id\": \"d619f755-2d17-41f3-990d-c04ecedd64dd\",\n \"balance\": 0,\n \"lifetime_points\": 0,\n \"customer_id\": \"QPTXM8PQNX3Q726ZYHPMNP46XC\",\n \"enrolled_at\": \"enrolled_at\",\n \"created_at\": \"2020-05-08T21:44:32Z\",\n \"updated_at\": \"2020-05-08T21:44:32Z\",\n \"mapping\": {\n \"id\": \"66aaab3f-da99-49ed-8b19-b87f851c844f\",\n \"created_at\": \"2020-05-08T21:44:32Z\",\n \"phone_number\": \"+14155551234\"\n },\n \"expiring_point_deadlines\": [\n {\n \"points\": 1,\n \"expires_at\": \"expires_at\"\n }\n ]\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"e7c9cc8e-4299-4c17-858f-9269ba4fc97f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a92b051b-631c-4375-9861-325fbd04002a","name":"SearchLoyaltyAccounts - default","request":{"urlPathTemplate":"/v2/loyalty/accounts/search","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"loyalty_accounts\": [\n {\n \"id\": \"79b807d2-d786-46a9-933b-918028d7a8c5\",\n \"program_id\": \"d619f755-2d17-41f3-990d-c04ecedd64dd\",\n \"balance\": 10,\n \"lifetime_points\": 20,\n \"customer_id\": \"Q8002FAM9V1EZ0ADB2T5609X6NET1H0\",\n \"enrolled_at\": \"enrolled_at\",\n \"created_at\": \"2020-05-08T21:44:32Z\",\n \"updated_at\": \"2020-05-08T21:44:32Z\",\n \"mapping\": {\n \"id\": \"66aaab3f-da99-49ed-8b19-b87f851c844f\",\n \"created_at\": \"2020-05-08T21:44:32Z\",\n \"phone_number\": \"+14155551234\"\n },\n \"expiring_point_deadlines\": [\n {\n \"points\": 1,\n \"expires_at\": \"expires_at\"\n }\n ]\n }\n ],\n \"cursor\": \"cursor\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"a92b051b-631c-4375-9861-325fbd04002a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ef624980-2312-45c4-b61f-38bd7181039d","name":"RetrieveLoyaltyAccount - default","request":{"urlPathTemplate":"/v2/loyalty/accounts/{account_id}","method":"GET","pathParameters":{"account_id":{"equalTo":"account_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"loyalty_account\": {\n \"id\": \"79b807d2-d786-46a9-933b-918028d7a8c5\",\n \"program_id\": \"d619f755-2d17-41f3-990d-c04ecedd64dd\",\n \"balance\": 10,\n \"lifetime_points\": 20,\n \"customer_id\": \"Q8002FAM9V1EZ0ADB2T5609X6NET1H0\",\n \"enrolled_at\": \"enrolled_at\",\n \"created_at\": \"2020-05-08T21:44:32Z\",\n \"updated_at\": \"2020-05-08T21:44:32Z\",\n \"mapping\": {\n \"id\": \"66aaab3f-da99-49ed-8b19-b87f851c844f\",\n \"created_at\": \"2020-05-08T21:44:32Z\",\n \"phone_number\": \"+14155551234\"\n },\n \"expiring_point_deadlines\": [\n {\n \"points\": 1,\n \"expires_at\": \"expires_at\"\n }\n ]\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"ef624980-2312-45c4-b61f-38bd7181039d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5a4d1537-8093-4f44-9ae0-4577d4ff9da6","name":"AccumulateLoyaltyPoints - default","request":{"urlPathTemplate":"/v2/loyalty/accounts/{account_id}/accumulate","method":"POST","pathParameters":{"account_id":{"equalTo":"account_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"event\": {\n \"id\": \"id\",\n \"type\": \"ACCUMULATE_POINTS\",\n \"created_at\": \"created_at\",\n \"accumulate_points\": {\n \"loyalty_program_id\": \"loyalty_program_id\",\n \"points\": 1,\n \"order_id\": \"order_id\"\n },\n \"create_reward\": {\n \"loyalty_program_id\": \"loyalty_program_id\",\n \"reward_id\": \"reward_id\",\n \"points\": 1\n },\n \"redeem_reward\": {\n \"loyalty_program_id\": \"loyalty_program_id\",\n \"reward_id\": \"reward_id\",\n \"order_id\": \"order_id\"\n },\n \"delete_reward\": {\n \"loyalty_program_id\": \"loyalty_program_id\",\n \"reward_id\": \"reward_id\",\n \"points\": 1\n },\n \"adjust_points\": {\n \"loyalty_program_id\": \"loyalty_program_id\",\n \"points\": 1,\n \"reason\": \"reason\"\n },\n \"loyalty_account_id\": \"loyalty_account_id\",\n \"location_id\": \"location_id\",\n \"source\": \"SQUARE\",\n \"expire_points\": {\n \"loyalty_program_id\": \"loyalty_program_id\",\n \"points\": 1\n },\n \"other_event\": {\n \"loyalty_program_id\": \"loyalty_program_id\",\n \"points\": 1\n },\n \"accumulate_promotion_points\": {\n \"loyalty_program_id\": \"loyalty_program_id\",\n \"loyalty_promotion_id\": \"loyalty_promotion_id\",\n \"points\": 1,\n \"order_id\": \"order_id\"\n }\n },\n \"events\": [\n {\n \"id\": \"ee46aafd-1af6-3695-a385-276e2ef0be26\",\n \"type\": \"ACCUMULATE_POINTS\",\n \"created_at\": \"2020-05-08T21:41:12Z\",\n \"accumulate_points\": {\n \"loyalty_program_id\": \"d619f755-2d17-41f3-990d-c04ecedd64dd\",\n \"points\": 6,\n \"order_id\": \"RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY\"\n },\n \"adjust_points\": {\n \"points\": 1\n },\n \"loyalty_account_id\": \"5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd\",\n \"location_id\": \"P034NEENMD09F\",\n \"source\": \"LOYALTY_API\",\n \"expire_points\": {\n \"points\": 1\n },\n \"other_event\": {\n \"points\": 1\n }\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"5a4d1537-8093-4f44-9ae0-4577d4ff9da6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a8e73ea8-1a60-4e71-8249-7c4f987f56e6","name":"AdjustLoyaltyPoints - default","request":{"urlPathTemplate":"/v2/loyalty/accounts/{account_id}/adjust","method":"POST","pathParameters":{"account_id":{"equalTo":"account_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"event\": {\n \"id\": \"613a6fca-8d67-39d0-bad2-3b4bc45c8637\",\n \"type\": \"ADJUST_POINTS\",\n \"created_at\": \"2020-05-08T21:42:32Z\",\n \"accumulate_points\": {\n \"loyalty_program_id\": \"loyalty_program_id\",\n \"points\": 1,\n \"order_id\": \"order_id\"\n },\n \"create_reward\": {\n \"loyalty_program_id\": \"loyalty_program_id\",\n \"reward_id\": \"reward_id\",\n \"points\": 1\n },\n \"redeem_reward\": {\n \"loyalty_program_id\": \"loyalty_program_id\",\n \"reward_id\": \"reward_id\",\n \"order_id\": \"order_id\"\n },\n \"delete_reward\": {\n \"loyalty_program_id\": \"loyalty_program_id\",\n \"reward_id\": \"reward_id\",\n \"points\": 1\n },\n \"adjust_points\": {\n \"loyalty_program_id\": \"d619f755-2d17-41f3-990d-c04ecedd64dd\",\n \"points\": 10,\n \"reason\": \"Complimentary points\"\n },\n \"loyalty_account_id\": \"5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd\",\n \"location_id\": \"location_id\",\n \"source\": \"LOYALTY_API\",\n \"expire_points\": {\n \"loyalty_program_id\": \"loyalty_program_id\",\n \"points\": 1\n },\n \"other_event\": {\n \"loyalty_program_id\": \"loyalty_program_id\",\n \"points\": 1\n },\n \"accumulate_promotion_points\": {\n \"loyalty_program_id\": \"loyalty_program_id\",\n \"loyalty_promotion_id\": \"loyalty_promotion_id\",\n \"points\": 1,\n \"order_id\": \"order_id\"\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"a8e73ea8-1a60-4e71-8249-7c4f987f56e6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"cae4cac3-8b4f-490c-a42d-2d4b2da29d91","name":"ListLoyaltyPrograms - default","request":{"urlPathTemplate":"/v2/loyalty/programs","method":"GET"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"programs\": [\n {\n \"id\": \"d619f755-2d17-41f3-990d-c04ecedd64dd\",\n \"status\": \"ACTIVE\",\n \"reward_tiers\": [\n {\n \"id\": \"e1b39225-9da5-43d1-a5db-782cdd8ad94f\",\n \"points\": 10,\n \"name\": \"10% off entire sale\",\n \"created_at\": \"2020-04-20T16:55:11Z\",\n \"pricing_rule_reference\": {\n \"object_id\": \"74C4JSHESNLTB2A7ITO5HO6F\",\n \"catalog_version\": 1000000\n }\n }\n ],\n \"expiration_policy\": {\n \"expiration_duration\": \"expiration_duration\"\n },\n \"terminology\": {\n \"one\": \"Point\",\n \"other\": \"Points\"\n },\n \"location_ids\": [\n \"P034NEENMD09F\"\n ],\n \"created_at\": \"2020-04-20T16:55:11Z\",\n \"updated_at\": \"2020-05-01T02:00:02Z\",\n \"accrual_rules\": [\n {\n \"accrual_type\": \"SPEND\",\n \"points\": 1,\n \"spend_data\": {\n \"amount_money\": {\n \"amount\": 100,\n \"currency\": \"USD\"\n },\n \"excluded_category_ids\": [\n \"7ZERJKO5PVYXCVUHV2JCZ2UG\",\n \"FQKAOJE5C4FIMF5A2URMLW6V\"\n ],\n \"excluded_item_variation_ids\": [\n \"CBZXBUVVTYUBZGQO44RHMR6B\",\n \"EDILT24Z2NISEXDKGY6HP7XV\"\n ],\n \"tax_mode\": \"BEFORE_TAX\"\n }\n }\n ]\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"cae4cac3-8b4f-490c-a42d-2d4b2da29d91","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"37036379-839a-4e90-b2d6-ba031659651e","name":"RetrieveLoyaltyProgram - default","request":{"urlPathTemplate":"/v2/loyalty/programs/{program_id}","method":"GET","pathParameters":{"program_id":{"equalTo":"program_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"program\": {\n \"id\": \"d619f755-2d17-41f3-990d-c04ecedd64dd\",\n \"status\": \"ACTIVE\",\n \"reward_tiers\": [\n {\n \"id\": \"e1b39225-9da5-43d1-a5db-782cdd8ad94f\",\n \"points\": 10,\n \"name\": \"10% off entire sale\",\n \"created_at\": \"2020-04-20T16:55:11Z\",\n \"pricing_rule_reference\": {\n \"object_id\": \"74C4JSHESNLTB2A7ITO5HO6F\",\n \"catalog_version\": 1000000\n }\n }\n ],\n \"expiration_policy\": {\n \"expiration_duration\": \"expiration_duration\"\n },\n \"terminology\": {\n \"one\": \"Point\",\n \"other\": \"Points\"\n },\n \"location_ids\": [\n \"P034NEENMD09F\"\n ],\n \"created_at\": \"2020-04-20T16:55:11Z\",\n \"updated_at\": \"2020-05-01T02:00:02Z\",\n \"accrual_rules\": [\n {\n \"accrual_type\": \"SPEND\",\n \"points\": 1,\n \"spend_data\": {\n \"amount_money\": {\n \"amount\": 100,\n \"currency\": \"USD\"\n },\n \"excluded_category_ids\": [\n \"7ZERJKO5PVYXCVUHV2JCZ2UG\",\n \"FQKAOJE5C4FIMF5A2URMLW6V\"\n ],\n \"excluded_item_variation_ids\": [\n \"CBZXBUVVTYUBZGQO44RHMR6B\",\n \"EDILT24Z2NISEXDKGY6HP7XV\"\n ],\n \"tax_mode\": \"BEFORE_TAX\"\n }\n }\n ]\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"37036379-839a-4e90-b2d6-ba031659651e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f320537e-01d2-4f0e-9e92-51ba338be2d5","name":"CalculateLoyaltyPoints - default","request":{"urlPathTemplate":"/v2/loyalty/programs/{program_id}/calculate","method":"POST","pathParameters":{"program_id":{"equalTo":"program_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"points\": 6,\n \"promotion_points\": 12\n}","headers":{"Content-Type":"application/json"}},"uuid":"f320537e-01d2-4f0e-9e92-51ba338be2d5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"b0c3b8c5-55a7-48ba-98ba-b6f71cdc4b87","name":"CreateLoyaltyReward - default","request":{"urlPathTemplate":"/v2/loyalty/rewards","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"reward\": {\n \"id\": \"a8f43ebe-2ad6-3001-bdd5-7d7c2da08943\",\n \"status\": \"ISSUED\",\n \"loyalty_account_id\": \"5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd\",\n \"reward_tier_id\": \"e1b39225-9da5-43d1-a5db-782cdd8ad94f\",\n \"points\": 10,\n \"order_id\": \"RFZfrdtm3mhO1oGzf5Cx7fEMsmGZY\",\n \"created_at\": \"2020-05-01T21:49:54Z\",\n \"updated_at\": \"2020-05-01T21:49:54Z\",\n \"redeemed_at\": \"redeemed_at\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"b0c3b8c5-55a7-48ba-98ba-b6f71cdc4b87","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"044693c3-b66c-47a1-b618-7397390f7eac","name":"SearchLoyaltyRewards - default","request":{"urlPathTemplate":"/v2/loyalty/rewards/search","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"rewards\": [\n {\n \"id\": \"d03f79f4-815f-3500-b851-cc1e68a457f9\",\n \"status\": \"REDEEMED\",\n \"loyalty_account_id\": \"5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd\",\n \"reward_tier_id\": \"e1b39225-9da5-43d1-a5db-782cdd8ad94f\",\n \"points\": 10,\n \"order_id\": \"PyATxhYLfsMqpVkcKJITPydgEYfZY\",\n \"created_at\": \"2020-05-08T22:00:44Z\",\n \"updated_at\": \"2020-05-08T22:01:17Z\",\n \"redeemed_at\": \"2020-05-08T22:01:17Z\"\n },\n {\n \"id\": \"9f18ac21-233a-31c3-be77-b45840f5a810\",\n \"status\": \"REDEEMED\",\n \"loyalty_account_id\": \"5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd\",\n \"reward_tier_id\": \"e1b39225-9da5-43d1-a5db-782cdd8ad94f\",\n \"points\": 10,\n \"order_id\": \"order_id\",\n \"created_at\": \"2020-05-08T21:55:42Z\",\n \"updated_at\": \"2020-05-08T21:56:00Z\",\n \"redeemed_at\": \"2020-05-08T21:56:00Z\"\n },\n {\n \"id\": \"a8f43ebe-2ad6-3001-bdd5-7d7c2da08943\",\n \"status\": \"DELETED\",\n \"loyalty_account_id\": \"5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd\",\n \"reward_tier_id\": \"e1b39225-9da5-43d1-a5db-782cdd8ad94f\",\n \"points\": 10,\n \"order_id\": \"5NB69ZNh3FbsOs1ox43bh1xrli6YY\",\n \"created_at\": \"2020-05-01T21:49:54Z\",\n \"updated_at\": \"2020-05-08T21:55:10Z\",\n \"redeemed_at\": \"redeemed_at\"\n },\n {\n \"id\": \"a051254c-f840-3b45-8cf1-50bcd38ff92a\",\n \"status\": \"ISSUED\",\n \"loyalty_account_id\": \"5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd\",\n \"reward_tier_id\": \"e1b39225-9da5-43d1-a5db-782cdd8ad94f\",\n \"points\": 10,\n \"order_id\": \"LQQ16znvi2VIUKPVhUfJefzr1eEZY\",\n \"created_at\": \"2020-05-01T20:20:37Z\",\n \"updated_at\": \"2020-05-01T20:20:40Z\",\n \"redeemed_at\": \"redeemed_at\"\n }\n ],\n \"cursor\": \"cursor\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"044693c3-b66c-47a1-b618-7397390f7eac","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"640301c4-a49a-4c47-9fbc-fe3c60060fac","name":"RetrieveLoyaltyReward - default","request":{"urlPathTemplate":"/v2/loyalty/rewards/{reward_id}","method":"GET","pathParameters":{"reward_id":{"equalTo":"reward_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"reward\": {\n \"id\": \"9f18ac21-233a-31c3-be77-b45840f5a810\",\n \"status\": \"REDEEMED\",\n \"loyalty_account_id\": \"5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd\",\n \"reward_tier_id\": \"e1b39225-9da5-43d1-a5db-782cdd8ad94f\",\n \"points\": 10,\n \"order_id\": \"order_id\",\n \"created_at\": \"2020-05-08T21:55:42Z\",\n \"updated_at\": \"2020-05-08T21:56:00Z\",\n \"redeemed_at\": \"2020-05-08T21:56:00Z\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"640301c4-a49a-4c47-9fbc-fe3c60060fac","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e85ed986-fb78-4acb-bdfa-e53da02a8278","name":"DeleteLoyaltyReward - default","request":{"urlPathTemplate":"/v2/loyalty/rewards/{reward_id}","method":"DELETE","pathParameters":{"reward_id":{"equalTo":"reward_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"e85ed986-fb78-4acb-bdfa-e53da02a8278","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"24b6b3ba-1b9a-49fe-8683-84a70286d02f","name":"RedeemLoyaltyReward - default","request":{"urlPathTemplate":"/v2/loyalty/rewards/{reward_id}/redeem","method":"POST","pathParameters":{"reward_id":{"equalTo":"reward_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"event\": {\n \"id\": \"67377a6e-dbdc-369d-aa16-2e7ed422e71f\",\n \"type\": \"REDEEM_REWARD\",\n \"created_at\": \"2020-05-08T21:56:00Z\",\n \"accumulate_points\": {\n \"loyalty_program_id\": \"loyalty_program_id\",\n \"points\": 1,\n \"order_id\": \"order_id\"\n },\n \"create_reward\": {\n \"loyalty_program_id\": \"loyalty_program_id\",\n \"reward_id\": \"reward_id\",\n \"points\": 1\n },\n \"redeem_reward\": {\n \"loyalty_program_id\": \"d619f755-2d17-41f3-990d-c04ecedd64dd\",\n \"reward_id\": \"9f18ac21-233a-31c3-be77-b45840f5a810\",\n \"order_id\": \"order_id\"\n },\n \"delete_reward\": {\n \"loyalty_program_id\": \"loyalty_program_id\",\n \"reward_id\": \"reward_id\",\n \"points\": 1\n },\n \"adjust_points\": {\n \"loyalty_program_id\": \"loyalty_program_id\",\n \"points\": 1,\n \"reason\": \"reason\"\n },\n \"loyalty_account_id\": \"5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd\",\n \"location_id\": \"P034NEENMD09F\",\n \"source\": \"LOYALTY_API\",\n \"expire_points\": {\n \"loyalty_program_id\": \"loyalty_program_id\",\n \"points\": 1\n },\n \"other_event\": {\n \"loyalty_program_id\": \"loyalty_program_id\",\n \"points\": 1\n },\n \"accumulate_promotion_points\": {\n \"loyalty_program_id\": \"loyalty_program_id\",\n \"loyalty_promotion_id\": \"loyalty_promotion_id\",\n \"points\": 1,\n \"order_id\": \"order_id\"\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"24b6b3ba-1b9a-49fe-8683-84a70286d02f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3e09c143-ac29-4bfb-834f-39a9fe1c176e","name":"ListLoyaltyPromotions - default","request":{"urlPathTemplate":"/v2/loyalty/programs/{program_id}/promotions","method":"GET","pathParameters":{"program_id":{"equalTo":"program_id"}},"queryParameters":{"status":{"equalTo":"ACTIVE"},"cursor":{"equalTo":"cursor"},"limit":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"loyalty_promotions\": [\n {\n \"id\": \"loypromo_f0f9b849-725e-378d-b810-511237e07b67\",\n \"name\": \"Tuesday Happy Hour Promo\",\n \"incentive\": {\n \"type\": \"POINTS_MULTIPLIER\",\n \"points_multiplier_data\": {\n \"points_multiplier\": 3,\n \"multiplier\": \"3.000\"\n }\n },\n \"available_time\": {\n \"start_date\": \"2022-08-16\",\n \"time_periods\": [\n \"BEGIN:VEVENT\\nDTSTART:20220816T160000\\nDURATION:PT2H\\nRRULE:FREQ=WEEKLY;BYDAY=TU\\nEND:VEVENT\"\n ]\n },\n \"trigger_limit\": {\n \"times\": 1,\n \"interval\": \"DAY\"\n },\n \"status\": \"ACTIVE\",\n \"created_at\": \"2022-08-16T08:38:54Z\",\n \"canceled_at\": \"canceled_at\",\n \"updated_at\": \"2022-08-16T08:38:54Z\",\n \"loyalty_program_id\": \"d619f755-2d17-41f3-990d-c04ecedd64dd\",\n \"qualifying_item_variation_ids\": [\n \"CJ3RYL56ITAKMD4VRCM7XERS\",\n \"AT3RYLR3TUA9C34VRCB7X5RR\"\n ],\n \"qualifying_category_ids\": [\n \"qualifying_category_ids\"\n ]\n },\n {\n \"id\": \"loypromo_e696f057-2286-35ff-8108-132241328106\",\n \"name\": \"July Special\",\n \"incentive\": {\n \"type\": \"POINTS_MULTIPLIER\",\n \"points_multiplier_data\": {\n \"points_multiplier\": 2,\n \"multiplier\": \"2.000\"\n }\n },\n \"available_time\": {\n \"start_date\": \"2022-07-01\",\n \"end_date\": \"2022-08-01\",\n \"time_periods\": [\n \"BEGIN:VEVENT\\nDTSTART:20220704T090000\\nDURATION:PT8H\\nRRULE:FREQ=WEEKLY;UNTIL=20220801T000000;BYDAY=MO\\nEND:VEVENT\",\n \"BEGIN:VEVENT\\nDTSTART:20220705T090000\\nDURATION:PT8H\\nRRULE:FREQ=WEEKLY;UNTIL=20220801T000000;BYDAY=TU\\nEND:VEVENT\",\n \"BEGIN:VEVENT\\nDTSTART:20220706T090000\\nDURATION:PT8H\\nRRULE:FREQ=WEEKLY;UNTIL=20220801T000000;BYDAY=WE\\nEND:VEVENT\",\n \"BEGIN:VEVENT\\nDTSTART:20220707T090000\\nDURATION:PT8H\\nRRULE:FREQ=WEEKLY;UNTIL=20220801T000000;BYDAY=TH\\nEND:VEVENT\",\n \"BEGIN:VEVENT\\nDTSTART:20220701T090000\\nDURATION:PT8H\\nRRULE:FREQ=WEEKLY;UNTIL=20220801T000000;BYDAY=FR\\nEND:VEVENT\"\n ]\n },\n \"trigger_limit\": {\n \"times\": 5,\n \"interval\": \"ALL_TIME\"\n },\n \"status\": \"ENDED\",\n \"created_at\": \"2022-06-27T15:37:38Z\",\n \"canceled_at\": \"canceled_at\",\n \"updated_at\": \"2022-06-27T15:37:38Z\",\n \"loyalty_program_id\": \"d619f755-2d17-41f3-990d-c04ecedd64dd\",\n \"minimum_spend_amount_money\": {\n \"amount\": 2000,\n \"currency\": \"USD\"\n },\n \"qualifying_item_variation_ids\": [\n \"qualifying_item_variation_ids\"\n ],\n \"qualifying_category_ids\": [\n \"XTQPYLR3IIU9C44VRCB3XD12\"\n ]\n }\n ],\n \"cursor\": \"cursor\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"3e09c143-ac29-4bfb-834f-39a9fe1c176e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"edaef85e-f3c5-4564-8944-86ff2d5d6de2","name":"CreateLoyaltyPromotion - default","request":{"urlPathTemplate":"/v2/loyalty/programs/{program_id}/promotions","method":"POST","pathParameters":{"program_id":{"equalTo":"program_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"loyalty_promotion\": {\n \"id\": \"loypromo_f0f9b849-725e-378d-b810-511237e07b67\",\n \"name\": \"Tuesday Happy Hour Promo\",\n \"incentive\": {\n \"type\": \"POINTS_MULTIPLIER\",\n \"points_multiplier_data\": {\n \"points_multiplier\": 3,\n \"multiplier\": \"3.000\"\n },\n \"points_addition_data\": {\n \"points_addition\": 1\n }\n },\n \"available_time\": {\n \"start_date\": \"2022-08-16\",\n \"end_date\": \"end_date\",\n \"time_periods\": [\n \"BEGIN:VEVENT\\nDTSTART:20220816T160000\\nDURATION:PT2H\\nRRULE:FREQ=WEEKLY;BYDAY=TU\\nEND:VEVENT\"\n ]\n },\n \"trigger_limit\": {\n \"times\": 1,\n \"interval\": \"DAY\"\n },\n \"status\": \"ACTIVE\",\n \"created_at\": \"2022-08-16T08:38:54Z\",\n \"canceled_at\": \"canceled_at\",\n \"updated_at\": \"2022-08-16T08:38:54Z\",\n \"loyalty_program_id\": \"d619f755-2d17-41f3-990d-c04ecedd64dd\",\n \"minimum_spend_amount_money\": {\n \"amount\": 2000,\n \"currency\": \"USD\"\n },\n \"qualifying_item_variation_ids\": [\n \"qualifying_item_variation_ids\"\n ],\n \"qualifying_category_ids\": [\n \"XTQPYLR3IIU9C44VRCB3XD12\"\n ]\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"edaef85e-f3c5-4564-8944-86ff2d5d6de2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"0808bf33-89fd-481e-a631-55351d89cbe7","name":"RetrieveLoyaltyPromotion - default","request":{"urlPathTemplate":"/v2/loyalty/programs/{program_id}/promotions/{promotion_id}","method":"GET","pathParameters":{"program_id":{"equalTo":"program_id"},"promotion_id":{"equalTo":"promotion_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"loyalty_promotion\": {\n \"id\": \"loypromo_f0f9b849-725e-378d-b810-511237e07b67\",\n \"name\": \"Tuesday Happy Hour Promo\",\n \"incentive\": {\n \"type\": \"POINTS_MULTIPLIER\",\n \"points_multiplier_data\": {\n \"points_multiplier\": 3,\n \"multiplier\": \"3.000\"\n },\n \"points_addition_data\": {\n \"points_addition\": 1\n }\n },\n \"available_time\": {\n \"start_date\": \"2022-08-16\",\n \"end_date\": \"end_date\",\n \"time_periods\": [\n \"BEGIN:VEVENT\\nDTSTART:20220816T160000\\nDURATION:PT2H\\nRRULE:FREQ=WEEKLY;BYDAY=TU\\nEND:VEVENT\"\n ]\n },\n \"trigger_limit\": {\n \"times\": 1,\n \"interval\": \"DAY\"\n },\n \"status\": \"ACTIVE\",\n \"created_at\": \"2022-08-16T08:38:54Z\",\n \"canceled_at\": \"canceled_at\",\n \"updated_at\": \"2022-08-16T08:38:54Z\",\n \"loyalty_program_id\": \"d619f755-2d17-41f3-990d-c04ecedd64dd\",\n \"minimum_spend_amount_money\": {\n \"amount\": 2000,\n \"currency\": \"USD\"\n },\n \"qualifying_item_variation_ids\": [\n \"CJ3RYL56ITAKMD4VRCM7XERS\",\n \"AT3RYLR3TUA9C34VRCB7X5RR\"\n ],\n \"qualifying_category_ids\": [\n \"qualifying_category_ids\"\n ]\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"0808bf33-89fd-481e-a631-55351d89cbe7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4212474e-2581-4057-9eb6-a522da81019e","name":"CancelLoyaltyPromotion - default","request":{"urlPathTemplate":"/v2/loyalty/programs/{program_id}/promotions/{promotion_id}/cancel","method":"POST","pathParameters":{"program_id":{"equalTo":"program_id"},"promotion_id":{"equalTo":"promotion_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"loyalty_promotion\": {\n \"id\": \"loypromo_f0f9b849-725e-378d-b810-511237e07b67\",\n \"name\": \"Tuesday Happy Hour Promo\",\n \"incentive\": {\n \"type\": \"POINTS_MULTIPLIER\",\n \"points_multiplier_data\": {\n \"points_multiplier\": 3,\n \"multiplier\": \"3.000\"\n },\n \"points_addition_data\": {\n \"points_addition\": 1\n }\n },\n \"available_time\": {\n \"start_date\": \"2022-08-16\",\n \"end_date\": \"end_date\",\n \"time_periods\": [\n \"BEGIN:VEVENT\\nDTSTART:20220816T160000\\nDURATION:PT2H\\nRRULE:FREQ=WEEKLY;BYDAY=TU\\nEND:VEVENT\"\n ]\n },\n \"trigger_limit\": {\n \"times\": 1,\n \"interval\": \"DAY\"\n },\n \"status\": \"CANCELED\",\n \"created_at\": \"2022-08-16T08:38:54Z\",\n \"canceled_at\": \"2022-08-17T12:42:49Z\",\n \"updated_at\": \"2022-08-17T12:42:49Z\",\n \"loyalty_program_id\": \"d619f755-2d17-41f3-990d-c04ecedd64dd\",\n \"minimum_spend_amount_money\": {\n \"amount\": 2000,\n \"currency\": \"USD\"\n },\n \"qualifying_item_variation_ids\": [\n \"qualifying_item_variation_ids\"\n ],\n \"qualifying_category_ids\": [\n \"XTQPYLR3IIU9C44VRCB3XD12\"\n ]\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"4212474e-2581-4057-9eb6-a522da81019e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e6deee3b-c5dd-4354-985e-0ec0f4a843f4","name":"ListMerchantCustomAttributeDefinitions - default","request":{"urlPathTemplate":"/v2/merchants/custom-attribute-definitions","method":"GET","queryParameters":{"visibility_filter":{"equalTo":"ALL"},"limit":{"equalTo":"1"},"cursor":{"equalTo":"cursor"}}},"response":{"status":200,"body":"{\n \"custom_attribute_definitions\": [\n {\n \"key\": \"has_seen_tutorial\",\n \"schema\": {\n \"$ref\": \"https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Boolean\"\n },\n \"name\": \"NAME\",\n \"description\": \"Whether the merchant has seen the tutorial screen for using the app.\",\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"version\": 1,\n \"updated_at\": \"2023-05-05T16:50:21.832Z\",\n \"created_at\": \"2023-05-05T16:50:21.832Z\"\n },\n {\n \"key\": \"alternative_seller_name\",\n \"schema\": {\n \"$ref\": \"https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String\"\n },\n \"name\": \"Alternative Merchant Name\",\n \"description\": \"This is the other name this merchant goes by.\",\n \"visibility\": \"VISIBILITY_READ_ONLY\",\n \"version\": 4,\n \"updated_at\": \"2023-05-05T10:17:52.341Z\",\n \"created_at\": \"2023-05-05T19:06:36.559Z\"\n }\n ],\n \"cursor\": \"ImfNzWVSiAYyiAR4gEcxDJ75KZAOSjX8H2BVHUTR0ofCtp4SdYvrUKbwYY2aCH2WqZ2FsfAuylEVUlTfaINg3ecIlFpP9Y5Ie66w9NSg9nqdI5fCJ6qdH2s0za5m2plFonsjIuFaoN89j78ROUwuSOzD6mFZPcJHhJ0CxEKc0SBH\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"e6deee3b-c5dd-4354-985e-0ec0f4a843f4","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"4f14c1b3-c14e-402c-bd22-78355a24be89","name":"CreateMerchantCustomAttributeDefinition - default","request":{"urlPathTemplate":"/v2/merchants/custom-attribute-definitions","method":"POST"},"response":{"status":200,"body":"{\n \"custom_attribute_definition\": {\n \"key\": \"alternative_seller_name\",\n \"schema\": {\n \"$ref\": \"https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String\"\n },\n \"name\": \"Alternative Merchant Name\",\n \"description\": \"This is the other name this merchant goes by.\",\n \"visibility\": \"VISIBILITY_READ_ONLY\",\n \"version\": 1,\n \"updated_at\": \"2023-05-05T19:06:36.559Z\",\n \"created_at\": \"2023-05-05T19:06:36.559Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"4f14c1b3-c14e-402c-bd22-78355a24be89","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"85db70f5-b40d-4d57-8c90-4fc112cc676e","name":"RetrieveMerchantCustomAttributeDefinition - default","request":{"urlPathTemplate":"/v2/merchants/custom-attribute-definitions/{key}","method":"GET","pathParameters":{"key":{"equalTo":"key"}},"queryParameters":{"version":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"custom_attribute_definition\": {\n \"key\": \"alternative_seller_name\",\n \"schema\": {\n \"$ref\": \"https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String\"\n },\n \"name\": \"Alternative Merchant Name\",\n \"description\": \"This is the other name this merchant goes by.\",\n \"visibility\": \"VISIBILITY_READ_ONLY\",\n \"version\": 1,\n \"updated_at\": \"2023-05-05T19:06:36.559Z\",\n \"created_at\": \"2023-05-05T19:06:36.559Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"85db70f5-b40d-4d57-8c90-4fc112cc676e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"67ea8341-1f37-44eb-89be-e5c6164c3585","name":"UpdateMerchantCustomAttributeDefinition - default","request":{"urlPathTemplate":"/v2/merchants/custom-attribute-definitions/{key}","method":"PUT","pathParameters":{"key":{"equalTo":"key"}}},"response":{"status":200,"body":"{\n \"custom_attribute_definition\": {\n \"key\": \"alternative_seller_name\",\n \"schema\": {\n \"$ref\": \"https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.String\"\n },\n \"name\": \"Alternative Merchant Name\",\n \"description\": \"Update the description as desired.\",\n \"visibility\": \"VISIBILITY_READ_ONLY\",\n \"version\": 2,\n \"updated_at\": \"2023-05-05T19:34:10.181Z\",\n \"created_at\": \"2023-05-05T19:06:36.559Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"67ea8341-1f37-44eb-89be-e5c6164c3585","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"522e7a64-06f0-49f9-842c-a181bbfed6da","name":"DeleteMerchantCustomAttributeDefinition - default","request":{"urlPathTemplate":"/v2/merchants/custom-attribute-definitions/{key}","method":"DELETE","pathParameters":{"key":{"equalTo":"key"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"522e7a64-06f0-49f9-842c-a181bbfed6da","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4be52a89-5242-46b8-84bd-d96c9d35f543","name":"BulkDeleteMerchantCustomAttributes - default","request":{"urlPathTemplate":"/v2/merchants/custom-attributes/bulk-delete","method":"POST"},"response":{"status":200,"body":"{\n \"values\": {\n \"id1\": {\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"id2\": {\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"4be52a89-5242-46b8-84bd-d96c9d35f543","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"adeb5f9a-9f06-4cdc-9b80-53d87e4bd9d3","name":"BulkUpsertMerchantCustomAttributes - default","request":{"urlPathTemplate":"/v2/merchants/custom-attributes/bulk-upsert","method":"POST"},"response":{"status":200,"body":"{\n \"values\": {\n \"id1\": {\n \"merchant_id\": \"DM7VKY8Q63GNP\",\n \"custom_attribute\": {\n \"key\": \"alternative_seller_name\",\n \"value\": \"Ultimate Sneaker Store\",\n \"version\": 2,\n \"visibility\": \"VISIBILITY_READ_ONLY\",\n \"updated_at\": \"2023-05-06T19:21:04.551Z\",\n \"created_at\": \"2023-05-06T19:02:58.647Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"id2\": {\n \"merchant_id\": \"DM7VKY8Q63GNP\",\n \"custom_attribute\": {\n \"key\": \"has_seen_tutorial\",\n \"value\": true,\n \"version\": 1,\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"updated_at\": \"2023-05-06T19:21:04.551Z\",\n \"created_at\": \"2023-05-06T19:02:58.647Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n }\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"adeb5f9a-9f06-4cdc-9b80-53d87e4bd9d3","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"dd9069dc-f724-484c-89be-f63c75e6d55b","name":"ListMerchantCustomAttributes - default","request":{"urlPathTemplate":"/v2/merchants/{merchant_id}/custom-attributes","method":"GET","pathParameters":{"merchant_id":{"equalTo":"merchant_id"}},"queryParameters":{"visibility_filter":{"equalTo":"ALL"},"limit":{"equalTo":"1"},"cursor":{"equalTo":"cursor"},"with_definitions":{"equalTo":"true"}}},"response":{"status":200,"body":"{\n \"custom_attributes\": [\n {\n \"key\": \"has_seen_tutorial\",\n \"value\": true,\n \"version\": 1,\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"updated_at\": \"2023-05-05T18:13:03.745Z\",\n \"created_at\": \"2023-05-05T18:13:03.745Z\"\n },\n {\n \"key\": \"alternative_seller_name\",\n \"value\": \"Ultimate Sneaker Store\",\n \"version\": 1,\n \"visibility\": \"VISIBILITY_READ_ONLY\",\n \"updated_at\": \"2023-05-05T19:27:57.975Z\",\n \"created_at\": \"2023-05-05T19:27:57.975Z\"\n }\n ],\n \"cursor\": \"cursor\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"dd9069dc-f724-484c-89be-f63c75e6d55b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"f730b2d5-aad8-4727-a360-adc4fbb24d63","name":"RetrieveMerchantCustomAttribute - default","request":{"urlPathTemplate":"/v2/merchants/{merchant_id}/custom-attributes/{key}","method":"GET","pathParameters":{"merchant_id":{"equalTo":"merchant_id"},"key":{"equalTo":"key"}},"queryParameters":{"with_definition":{"equalTo":"true"},"version":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"custom_attribute\": {\n \"key\": \"alternative_seller_name\",\n \"value\": \"Ultimate Sneaker Store\",\n \"version\": 2,\n \"visibility\": \"VISIBILITY_READ_ONLY\",\n \"definition\": {\n \"key\": \"key\",\n \"schema\": {\n \"key\": \"value\"\n },\n \"name\": \"name\",\n \"description\": \"description\",\n \"visibility\": \"VISIBILITY_HIDDEN\",\n \"version\": 1,\n \"updated_at\": \"updated_at\",\n \"created_at\": \"created_at\"\n },\n \"updated_at\": \"2023-05-06T19:21:04.551Z\",\n \"created_at\": \"2023-05-06T19:02:58.647Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"f730b2d5-aad8-4727-a360-adc4fbb24d63","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4d965579-8da0-4112-b308-f7354738ae8b","name":"UpsertMerchantCustomAttribute - default","request":{"urlPathTemplate":"/v2/merchants/{merchant_id}/custom-attributes/{key}","method":"POST","pathParameters":{"merchant_id":{"equalTo":"merchant_id"},"key":{"equalTo":"key"}}},"response":{"status":200,"body":"{\n \"custom_attribute\": {\n \"key\": \"alternative_seller_name\",\n \"value\": \"Ultimate Sneaker Store\",\n \"version\": 2,\n \"visibility\": \"VISIBILITY_READ_ONLY\",\n \"definition\": {\n \"key\": \"key\",\n \"schema\": {\n \"key\": \"value\"\n },\n \"name\": \"name\",\n \"description\": \"description\",\n \"visibility\": \"VISIBILITY_HIDDEN\",\n \"version\": 1,\n \"updated_at\": \"updated_at\",\n \"created_at\": \"created_at\"\n },\n \"updated_at\": \"2023-05-06T19:21:04.551Z\",\n \"created_at\": \"2023-05-06T19:02:58.647Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"4d965579-8da0-4112-b308-f7354738ae8b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"639bd80f-eae0-41fe-a3c0-07892b850746","name":"DeleteMerchantCustomAttribute - default","request":{"urlPathTemplate":"/v2/merchants/{merchant_id}/custom-attributes/{key}","method":"DELETE","pathParameters":{"merchant_id":{"equalTo":"merchant_id"},"key":{"equalTo":"key"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"639bd80f-eae0-41fe-a3c0-07892b850746","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"45fb8ba6-05a6-45d0-9ebb-9e6f3aae8e0c","name":"ListOrderCustomAttributeDefinitions - default","request":{"urlPathTemplate":"/v2/orders/custom-attribute-definitions","method":"GET","queryParameters":{"visibility_filter":{"equalTo":"ALL"},"cursor":{"equalTo":"cursor"},"limit":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"custom_attribute_definitions\": [\n {\n \"key\": \"cover-count\",\n \"schema\": {\n \"$ref\": \"https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number\"\n },\n \"name\": \"Cover count\",\n \"description\": \"The number of people seated at a table\",\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"version\": 1,\n \"updated_at\": \"2022-11-16T18:03:44.051Z\",\n \"created_at\": \"2022-11-16T18:03:44.051Z\"\n },\n {\n \"key\": \"seat-number\",\n \"schema\": {\n \"$ref\": \"https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number\"\n },\n \"name\": \"Seat number\",\n \"description\": \"The identifier for a particular seat\",\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"version\": 1,\n \"updated_at\": \"2022-11-16T18:04:32.059Z\",\n \"created_at\": \"2022-11-16T18:04:32.059Z\"\n },\n {\n \"key\": \"table-number\",\n \"schema\": {\n \"$ref\": \"https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number\"\n },\n \"name\": \"Table number\",\n \"description\": \"The identifier for a particular table\",\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"version\": 1,\n \"updated_at\": \"2022-11-16T18:04:21.912Z\",\n \"created_at\": \"2022-11-16T18:04:21.912Z\"\n }\n ],\n \"cursor\": \"cursor\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"45fb8ba6-05a6-45d0-9ebb-9e6f3aae8e0c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"b7228e36-0ad1-4dfd-b538-ce1426ea119a","name":"CreateOrderCustomAttributeDefinition - default","request":{"urlPathTemplate":"/v2/orders/custom-attribute-definitions","method":"POST"},"response":{"status":200,"body":"{\n \"custom_attribute_definition\": {\n \"key\": \"cover-count\",\n \"schema\": {\n \"$ref\": \"https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number\"\n },\n \"name\": \"Cover count\",\n \"description\": \"The number of people seated at a table\",\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"version\": 1,\n \"updated_at\": \"2022-10-06T16:53:23.141Z\",\n \"created_at\": \"2022-10-06T16:53:23.141Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"b7228e36-0ad1-4dfd-b538-ce1426ea119a","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d0e65529-ca92-4321-90eb-4a81303f97dd","name":"RetrieveOrderCustomAttributeDefinition - default","request":{"urlPathTemplate":"/v2/orders/custom-attribute-definitions/{key}","method":"GET","pathParameters":{"key":{"equalTo":"key"}},"queryParameters":{"version":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"custom_attribute_definition\": {\n \"key\": \"cover-count\",\n \"schema\": {\n \"$ref\": \"https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number\"\n },\n \"name\": \"Cover count\",\n \"description\": \"The number of people seated at a table\",\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"version\": 1,\n \"updated_at\": \"2022-10-06T16:53:23.141Z\",\n \"created_at\": \"2022-10-06T16:53:23.141Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"d0e65529-ca92-4321-90eb-4a81303f97dd","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a77b1e27-8d44-4aae-9038-2a78c902638e","name":"UpdateOrderCustomAttributeDefinition - default","request":{"urlPathTemplate":"/v2/orders/custom-attribute-definitions/{key}","method":"PUT","pathParameters":{"key":{"equalTo":"key"}}},"response":{"status":200,"body":"{\n \"custom_attribute_definition\": {\n \"key\": \"cover-count\",\n \"schema\": {\n \"$ref\": \"https://developer-production-s.squarecdn.com/schemas/v1/common.json#squareup.common.Number\"\n },\n \"name\": \"Cover count\",\n \"description\": \"The number of people seated at a table\",\n \"visibility\": \"VISIBILITY_READ_ONLY\",\n \"version\": 2,\n \"updated_at\": \"2022-11-16T17:44:11.436Z\",\n \"created_at\": \"2022-11-16T16:53:23.141Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"a77b1e27-8d44-4aae-9038-2a78c902638e","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"aee4b3af-bc43-4bca-b41b-dc8e6907784b","name":"DeleteOrderCustomAttributeDefinition - default","request":{"urlPathTemplate":"/v2/orders/custom-attribute-definitions/{key}","method":"DELETE","pathParameters":{"key":{"equalTo":"key"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"aee4b3af-bc43-4bca-b41b-dc8e6907784b","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"3192375d-9f96-49e1-9663-085c55df5b87","name":"BulkDeleteOrderCustomAttributes - default","request":{"urlPathTemplate":"/v2/orders/custom-attributes/bulk-delete","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"values\": {\n \"cover-count\": {\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"table-number\": {\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"3192375d-9f96-49e1-9663-085c55df5b87","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5e8acf42-8451-4797-9b25-80b51e1fdca2","name":"BulkUpsertOrderCustomAttributes - default","request":{"urlPathTemplate":"/v2/orders/custom-attributes/bulk-upsert","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"values\": {\n \"cover-count\": {\n \"custom_attribute\": {\n \"key\": \"cover-count\",\n \"value\": \"6\",\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"updated_at\": \"2022-11-22T21:28:35.721Z\",\n \"created_at\": \"2022-11-22T21:27:33.429Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n },\n \"table-number\": {\n \"custom_attribute\": {\n \"key\": \"table-number\",\n \"value\": \"11\",\n \"visibility\": \"VISIBILITY_HIDDEN\",\n \"updated_at\": \"2022-11-22T21:28:35.726Z\",\n \"created_at\": \"2022-11-22T21:24:57.823Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\"\n }\n ]\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"5e8acf42-8451-4797-9b25-80b51e1fdca2","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d183aeda-26bf-4991-88af-51dff905c9e6","name":"ListOrderCustomAttributes - default","request":{"urlPathTemplate":"/v2/orders/{order_id}/custom-attributes","method":"GET","pathParameters":{"order_id":{"equalTo":"order_id"}},"queryParameters":{"visibility_filter":{"equalTo":"ALL"},"cursor":{"equalTo":"cursor"},"limit":{"equalTo":"1"},"with_definitions":{"equalTo":"true"}}},"response":{"status":200,"body":"{\n \"custom_attributes\": [\n {\n \"key\": \"wayne-test-15\",\n \"value\": \"TEST\",\n \"version\": 1,\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"updated_at\": \"2022-11-10T17:31:36.111Z\",\n \"created_at\": \"2022-11-10T17:31:36.111Z\"\n }\n ],\n \"cursor\": \"cursor\",\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"d183aeda-26bf-4991-88af-51dff905c9e6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d1037c30-3d08-49fa-a99d-7b6f7b17c2a9","name":"RetrieveOrderCustomAttribute - default","request":{"urlPathTemplate":"/v2/orders/{order_id}/custom-attributes/{custom_attribute_key}","method":"GET","pathParameters":{"order_id":{"equalTo":"order_id"},"custom_attribute_key":{"equalTo":"custom_attribute_key"}},"queryParameters":{"version":{"equalTo":"1"},"with_definition":{"equalTo":"true"}}},"response":{"status":200,"body":"{\n \"custom_attribute\": {\n \"key\": \"cover-count\",\n \"value\": \"6\",\n \"version\": 1,\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"definition\": {\n \"key\": \"key\",\n \"schema\": {\n \"key\": \"value\"\n },\n \"name\": \"name\",\n \"description\": \"description\",\n \"visibility\": \"VISIBILITY_HIDDEN\",\n \"version\": 1,\n \"updated_at\": \"updated_at\",\n \"created_at\": \"created_at\"\n },\n \"updated_at\": \"2022-11-22T21:28:35.721Z\",\n \"created_at\": \"2022-11-22T21:27:33.429Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"d1037c30-3d08-49fa-a99d-7b6f7b17c2a9","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e0aca753-6b02-4dca-845c-8721f142d40c","name":"UpsertOrderCustomAttribute - default","request":{"urlPathTemplate":"/v2/orders/{order_id}/custom-attributes/{custom_attribute_key}","method":"POST","pathParameters":{"order_id":{"equalTo":"order_id"},"custom_attribute_key":{"equalTo":"custom_attribute_key"}}},"response":{"status":200,"body":"{\n \"custom_attribute\": {\n \"key\": \"table-number\",\n \"value\": \"42\",\n \"version\": 1,\n \"visibility\": \"VISIBILITY_READ_WRITE_VALUES\",\n \"definition\": {\n \"key\": \"key\",\n \"schema\": {\n \"key\": \"value\"\n },\n \"name\": \"name\",\n \"description\": \"description\",\n \"visibility\": \"VISIBILITY_HIDDEN\",\n \"version\": 1,\n \"updated_at\": \"updated_at\",\n \"created_at\": \"created_at\"\n },\n \"updated_at\": \"2022-10-06T20:41:22.673Z\",\n \"created_at\": \"2022-10-06T20:41:22.673Z\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"e0aca753-6b02-4dca-845c-8721f142d40c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a50d7fba-c495-454e-a9d8-b85e71f706e3","name":"DeleteOrderCustomAttribute - default","request":{"urlPathTemplate":"/v2/orders/{order_id}/custom-attributes/{custom_attribute_key}","method":"DELETE","pathParameters":{"order_id":{"equalTo":"order_id"},"custom_attribute_key":{"equalTo":"custom_attribute_key"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"a50d7fba-c495-454e-a9d8-b85e71f706e3","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e4cb74ca-d59c-472a-93a2-a2ff93a68a44","name":"RetrieveWageSetting - default","request":{"urlPathTemplate":"/v2/team-members/{team_member_id}/wage-setting","method":"GET","pathParameters":{"team_member_id":{"equalTo":"team_member_id"}}},"response":{"status":200,"body":"{\n \"wage_setting\": {\n \"team_member_id\": \"1yJlHapkseYnNPETIU1B\",\n \"job_assignments\": [\n {\n \"job_title\": \"Manager\",\n \"pay_type\": \"SALARY\",\n \"hourly_rate\": {\n \"amount\": 2164,\n \"currency\": \"USD\"\n },\n \"annual_rate\": {\n \"amount\": 4500000,\n \"currency\": \"USD\"\n },\n \"weekly_hours\": 40\n }\n ],\n \"is_overtime_exempt\": false,\n \"version\": 1,\n \"created_at\": \"2020-06-11T23:01:21+00:00\",\n \"updated_at\": \"2020-06-11T23:01:21+00:00\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"e4cb74ca-d59c-472a-93a2-a2ff93a68a44","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c3a6283a-671e-4e91-aea3-8ea80672ad9f","name":"UpdateWageSetting - default","request":{"urlPathTemplate":"/v2/team-members/{team_member_id}/wage-setting","method":"PUT","pathParameters":{"team_member_id":{"equalTo":"team_member_id"}}},"response":{"status":200,"body":"{\n \"wage_setting\": {\n \"team_member_id\": \"-3oZQKPKVk6gUXU_V5Qa\",\n \"job_assignments\": [\n {\n \"job_title\": \"Manager\",\n \"pay_type\": \"SALARY\",\n \"hourly_rate\": {\n \"amount\": 1443,\n \"currency\": \"USD\"\n },\n \"annual_rate\": {\n \"amount\": 3000000,\n \"currency\": \"USD\"\n },\n \"weekly_hours\": 40\n },\n {\n \"job_title\": \"Cashier\",\n \"pay_type\": \"HOURLY\",\n \"hourly_rate\": {\n \"amount\": 2000,\n \"currency\": \"USD\"\n }\n }\n ],\n \"is_overtime_exempt\": true,\n \"version\": 1,\n \"created_at\": \"2019-07-10T17:26:48+00:00\",\n \"updated_at\": \"2020-06-11T23:12:04+00:00\"\n },\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"c3a6283a-671e-4e91-aea3-8ea80672ad9f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8950891c-7157-4153-bc67-44b11e759cac","name":"CreateTerminalAction - default","request":{"urlPathTemplate":"/v2/terminals/actions","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"action\": {\n \"id\": \"termapia:jveJIAkkAjILHkdCE\",\n \"device_id\": \"DEVICE_ID\",\n \"deadline_duration\": \"PT5M\",\n \"status\": \"PENDING\",\n \"cancel_reason\": \"BUYER_CANCELED\",\n \"created_at\": \"2021-07-28T23:22:07.476Z\",\n \"updated_at\": \"2021-07-28T23:22:07.476Z\",\n \"app_id\": \"APP_ID\",\n \"location_id\": \"LOCATION_ID\",\n \"type\": \"SAVE_CARD\",\n \"qr_code_options\": {\n \"title\": \"title\",\n \"body\": \"body\",\n \"barcode_contents\": \"barcode_contents\"\n },\n \"save_card_options\": {\n \"customer_id\": \"CUSTOMER_ID\",\n \"card_id\": \"card_id\",\n \"reference_id\": \"user-id-1\"\n },\n \"signature_options\": {\n \"title\": \"title\",\n \"body\": \"body\",\n \"signature\": [\n {}\n ]\n },\n \"confirmation_options\": {\n \"title\": \"title\",\n \"body\": \"body\",\n \"agree_button_text\": \"agree_button_text\",\n \"disagree_button_text\": \"disagree_button_text\"\n },\n \"receipt_options\": {\n \"payment_id\": \"payment_id\",\n \"print_only\": true,\n \"is_duplicate\": true\n },\n \"data_collection_options\": {\n \"title\": \"title\",\n \"body\": \"body\",\n \"input_type\": \"EMAIL\"\n },\n \"select_options\": {\n \"title\": \"title\",\n \"body\": \"body\",\n \"options\": [\n {\n \"reference_id\": \"reference_id\",\n \"title\": \"title\"\n }\n ],\n \"selected_option\": {\n \"reference_id\": \"reference_id\",\n \"title\": \"title\"\n }\n },\n \"device_metadata\": {\n \"battery_percentage\": \"battery_percentage\",\n \"charging_state\": \"charging_state\",\n \"location_id\": \"location_id\",\n \"merchant_id\": \"merchant_id\",\n \"network_connection_type\": \"network_connection_type\",\n \"payment_region\": \"payment_region\",\n \"serial_number\": \"serial_number\",\n \"os_version\": \"os_version\",\n \"app_version\": \"app_version\",\n \"wifi_network_name\": \"wifi_network_name\",\n \"wifi_network_strength\": \"wifi_network_strength\",\n \"ip_address\": \"ip_address\"\n },\n \"await_next_action\": true,\n \"await_next_action_duration\": \"await_next_action_duration\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"8950891c-7157-4153-bc67-44b11e759cac","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e17065ca-ca0b-482c-a44c-574c96687a70","name":"SearchTerminalActions - default","request":{"urlPathTemplate":"/v2/terminals/actions/search","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"action\": [\n {\n \"id\": \"termapia:oBGWlAats8xWCiCE\",\n \"device_id\": \"DEVICE_ID\",\n \"deadline_duration\": \"PT5M\",\n \"status\": \"IN_PROGRESS\",\n \"cancel_reason\": \"BUYER_CANCELED\",\n \"created_at\": \"2022-04-08T15:14:04.895Z\",\n \"updated_at\": \"2022-04-08T15:14:05.446Z\",\n \"app_id\": \"APP_ID\",\n \"location_id\": \"LOCATION_ID\",\n \"type\": \"SAVE_CARD\",\n \"qr_code_options\": {\n \"title\": \"title\",\n \"body\": \"body\",\n \"barcode_contents\": \"barcode_contents\"\n },\n \"save_card_options\": {\n \"customer_id\": \"CUSTOMER_ID\",\n \"reference_id\": \"user-id-1\"\n },\n \"signature_options\": {\n \"title\": \"title\",\n \"body\": \"body\"\n },\n \"confirmation_options\": {\n \"title\": \"title\",\n \"body\": \"body\",\n \"agree_button_text\": \"agree_button_text\"\n },\n \"receipt_options\": {\n \"payment_id\": \"payment_id\"\n },\n \"data_collection_options\": {\n \"title\": \"title\",\n \"body\": \"body\",\n \"input_type\": \"EMAIL\"\n },\n \"select_options\": {\n \"title\": \"title\",\n \"body\": \"body\",\n \"options\": [\n {\n \"reference_id\": \"reference_id\",\n \"title\": \"title\"\n }\n ]\n },\n \"await_next_action\": true,\n \"await_next_action_duration\": \"await_next_action_duration\"\n },\n {\n \"id\": \"termapia:K2NY2YSSml3lTiCE\",\n \"device_id\": \"DEVICE_ID\",\n \"deadline_duration\": \"PT5M\",\n \"status\": \"COMPLETED\",\n \"cancel_reason\": \"BUYER_CANCELED\",\n \"created_at\": \"2022-04-08T15:14:01.210Z\",\n \"updated_at\": \"2022-04-08T15:14:09.861Z\",\n \"app_id\": \"APP_ID\",\n \"location_id\": \"LOCATION_ID\",\n \"type\": \"SAVE_CARD\",\n \"qr_code_options\": {\n \"title\": \"title\",\n \"body\": \"body\",\n \"barcode_contents\": \"barcode_contents\"\n },\n \"save_card_options\": {\n \"customer_id\": \"CUSTOMER_ID\",\n \"card_id\": \"ccof:CARD_ID\",\n \"reference_id\": \"user-id-1\"\n },\n \"signature_options\": {\n \"title\": \"title\",\n \"body\": \"body\"\n },\n \"confirmation_options\": {\n \"title\": \"title\",\n \"body\": \"body\",\n \"agree_button_text\": \"agree_button_text\"\n },\n \"receipt_options\": {\n \"payment_id\": \"payment_id\"\n },\n \"data_collection_options\": {\n \"title\": \"title\",\n \"body\": \"body\",\n \"input_type\": \"EMAIL\"\n },\n \"select_options\": {\n \"title\": \"title\",\n \"body\": \"body\",\n \"options\": [\n {\n \"reference_id\": \"reference_id\",\n \"title\": \"title\"\n }\n ]\n },\n \"await_next_action\": true,\n \"await_next_action_duration\": \"await_next_action_duration\"\n }\n ],\n \"cursor\": \"CURSOR\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"e17065ca-ca0b-482c-a44c-574c96687a70","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"a6606b21-d1b4-498d-ae80-7d97b844c1a7","name":"GetTerminalAction - default","request":{"urlPathTemplate":"/v2/terminals/actions/{action_id}","method":"GET","pathParameters":{"action_id":{"equalTo":"action_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"action\": {\n \"id\": \"termapia:jveJIAkkAjILHkdCE\",\n \"device_id\": \"DEVICE_ID\",\n \"deadline_duration\": \"PT5M\",\n \"status\": \"IN_PROGRESS\",\n \"cancel_reason\": \"BUYER_CANCELED\",\n \"created_at\": \"2021-07-28T23:22:07.476Z\",\n \"updated_at\": \"2021-07-28T23:22:08.301Z\",\n \"app_id\": \"APP_ID\",\n \"location_id\": \"LOCATION_ID\",\n \"type\": \"SAVE_CARD\",\n \"qr_code_options\": {\n \"title\": \"title\",\n \"body\": \"body\",\n \"barcode_contents\": \"barcode_contents\"\n },\n \"save_card_options\": {\n \"customer_id\": \"CUSTOMER_ID\",\n \"card_id\": \"card_id\",\n \"reference_id\": \"user-id-1\"\n },\n \"signature_options\": {\n \"title\": \"title\",\n \"body\": \"body\",\n \"signature\": [\n {}\n ]\n },\n \"confirmation_options\": {\n \"title\": \"title\",\n \"body\": \"body\",\n \"agree_button_text\": \"agree_button_text\",\n \"disagree_button_text\": \"disagree_button_text\"\n },\n \"receipt_options\": {\n \"payment_id\": \"payment_id\",\n \"print_only\": true,\n \"is_duplicate\": true\n },\n \"data_collection_options\": {\n \"title\": \"title\",\n \"body\": \"body\",\n \"input_type\": \"EMAIL\"\n },\n \"select_options\": {\n \"title\": \"title\",\n \"body\": \"body\",\n \"options\": [\n {\n \"reference_id\": \"reference_id\",\n \"title\": \"title\"\n }\n ],\n \"selected_option\": {\n \"reference_id\": \"reference_id\",\n \"title\": \"title\"\n }\n },\n \"device_metadata\": {\n \"battery_percentage\": \"battery_percentage\",\n \"charging_state\": \"charging_state\",\n \"location_id\": \"location_id\",\n \"merchant_id\": \"merchant_id\",\n \"network_connection_type\": \"network_connection_type\",\n \"payment_region\": \"payment_region\",\n \"serial_number\": \"serial_number\",\n \"os_version\": \"os_version\",\n \"app_version\": \"app_version\",\n \"wifi_network_name\": \"wifi_network_name\",\n \"wifi_network_strength\": \"wifi_network_strength\",\n \"ip_address\": \"ip_address\"\n },\n \"await_next_action\": true,\n \"await_next_action_duration\": \"await_next_action_duration\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"a6606b21-d1b4-498d-ae80-7d97b844c1a7","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"c8cfa4a0-c889-4b6e-a1a5-4a110e156b3d","name":"CancelTerminalAction - default","request":{"urlPathTemplate":"/v2/terminals/actions/{action_id}/cancel","method":"POST","pathParameters":{"action_id":{"equalTo":"action_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"action\": {\n \"id\": \"termapia:jveJIAkkAjILHkdCE\",\n \"device_id\": \"DEVICE_ID\",\n \"deadline_duration\": \"PT5M\",\n \"status\": \"CANCELED\",\n \"cancel_reason\": \"SELLER_CANCELED\",\n \"created_at\": \"2021-07-28T23:22:07.476Z\",\n \"updated_at\": \"2021-07-28T23:22:29.511Z\",\n \"app_id\": \"APP_ID\",\n \"location_id\": \"LOCATION_ID\",\n \"type\": \"SAVE_CARD\",\n \"qr_code_options\": {\n \"title\": \"title\",\n \"body\": \"body\",\n \"barcode_contents\": \"barcode_contents\"\n },\n \"save_card_options\": {\n \"customer_id\": \"CUSTOMER_ID\",\n \"card_id\": \"card_id\",\n \"reference_id\": \"user-id-1\"\n },\n \"signature_options\": {\n \"title\": \"title\",\n \"body\": \"body\",\n \"signature\": [\n {}\n ]\n },\n \"confirmation_options\": {\n \"title\": \"title\",\n \"body\": \"body\",\n \"agree_button_text\": \"agree_button_text\",\n \"disagree_button_text\": \"disagree_button_text\"\n },\n \"receipt_options\": {\n \"payment_id\": \"payment_id\",\n \"print_only\": true,\n \"is_duplicate\": true\n },\n \"data_collection_options\": {\n \"title\": \"title\",\n \"body\": \"body\",\n \"input_type\": \"EMAIL\"\n },\n \"select_options\": {\n \"title\": \"title\",\n \"body\": \"body\",\n \"options\": [\n {\n \"reference_id\": \"reference_id\",\n \"title\": \"title\"\n }\n ],\n \"selected_option\": {\n \"reference_id\": \"reference_id\",\n \"title\": \"title\"\n }\n },\n \"device_metadata\": {\n \"battery_percentage\": \"battery_percentage\",\n \"charging_state\": \"charging_state\",\n \"location_id\": \"location_id\",\n \"merchant_id\": \"merchant_id\",\n \"network_connection_type\": \"network_connection_type\",\n \"payment_region\": \"payment_region\",\n \"serial_number\": \"serial_number\",\n \"os_version\": \"os_version\",\n \"app_version\": \"app_version\",\n \"wifi_network_name\": \"wifi_network_name\",\n \"wifi_network_strength\": \"wifi_network_strength\",\n \"ip_address\": \"ip_address\"\n },\n \"await_next_action\": true,\n \"await_next_action_duration\": \"await_next_action_duration\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"c8cfa4a0-c889-4b6e-a1a5-4a110e156b3d","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"29dc372b-56bf-4283-80e2-04e853382e37","name":"CreateTerminalCheckout - default","request":{"urlPathTemplate":"/v2/terminals/checkouts","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"checkout\": {\n \"id\": \"08YceKh7B3ZqO\",\n \"amount_money\": {\n \"amount\": 2610,\n \"currency\": \"USD\"\n },\n \"reference_id\": \"id11572\",\n \"note\": \"A brief note\",\n \"order_id\": \"order_id\",\n \"payment_options\": {\n \"autocomplete\": true,\n \"delay_duration\": \"delay_duration\",\n \"accept_partial_authorization\": true,\n \"delay_action\": \"CANCEL\"\n },\n \"device_options\": {\n \"device_id\": \"dbb5d83a-7838-11ea-bc55-0242ac130003\",\n \"skip_receipt_screen\": false,\n \"collect_signature\": true,\n \"tip_settings\": {\n \"allow_tipping\": false\n },\n \"show_itemized_cart\": true,\n \"allow_auto_card_surcharge\": true\n },\n \"deadline_duration\": \"PT5M\",\n \"status\": \"PENDING\",\n \"cancel_reason\": \"BUYER_CANCELED\",\n \"payment_ids\": [\n \"payment_ids\"\n ],\n \"created_at\": \"2020-04-06T16:39:32.545Z\",\n \"updated_at\": \"2020-04-06T16:39:32.545Z\",\n \"app_id\": \"APP_ID\",\n \"location_id\": \"LOCATION_ID\",\n \"payment_type\": \"CARD_PRESENT\",\n \"team_member_id\": \"team_member_id\",\n \"customer_id\": \"customer_id\",\n \"app_fee_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"statement_description_identifier\": \"statement_description_identifier\",\n \"tip_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"29dc372b-56bf-4283-80e2-04e853382e37","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"10f09101-2344-4f4b-9caf-e8c18a401766","name":"SearchTerminalCheckouts - default","request":{"urlPathTemplate":"/v2/terminals/checkouts/search","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"checkouts\": [\n {\n \"id\": \"tsQPvzwBpMqqO\",\n \"amount_money\": {\n \"amount\": 2610,\n \"currency\": \"USD\"\n },\n \"reference_id\": \"id14467\",\n \"note\": \"A brief note\",\n \"order_id\": \"order_id\",\n \"device_options\": {\n \"device_id\": \"dbb5d83a-7838-11ea-bc55-0242ac130003\",\n \"skip_receipt_screen\": false,\n \"tip_settings\": {\n \"allow_tipping\": false\n }\n },\n \"deadline_duration\": \"PT5M\",\n \"status\": \"COMPLETED\",\n \"cancel_reason\": \"BUYER_CANCELED\",\n \"payment_ids\": [\n \"rXnhZzywrEk4vR6pw76fPZfgvaB\"\n ],\n \"created_at\": \"2020-03-31T18:13:15.921Z\",\n \"updated_at\": \"2020-03-31T18:13:52.725Z\",\n \"app_id\": \"APP_ID\",\n \"location_id\": \"location_id\",\n \"payment_type\": \"CARD_PRESENT\",\n \"team_member_id\": \"team_member_id\",\n \"customer_id\": \"customer_id\",\n \"statement_description_identifier\": \"statement_description_identifier\"\n },\n {\n \"id\": \"XlOPTgcEhrbqO\",\n \"amount_money\": {\n \"amount\": 2610,\n \"currency\": \"USD\"\n },\n \"reference_id\": \"id41623\",\n \"note\": \"A brief note\",\n \"order_id\": \"order_id\",\n \"device_options\": {\n \"device_id\": \"dbb5d83a-7838-11ea-bc55-0242ac130003\",\n \"skip_receipt_screen\": true,\n \"tip_settings\": {\n \"allow_tipping\": false\n }\n },\n \"deadline_duration\": \"PT5M\",\n \"status\": \"COMPLETED\",\n \"cancel_reason\": \"BUYER_CANCELED\",\n \"payment_ids\": [\n \"VYBF861PaoKPP7Pih0TlbZiNvaB\"\n ],\n \"created_at\": \"2020-03-31T18:08:31.882Z\",\n \"updated_at\": \"2020-03-31T18:08:41.635Z\",\n \"app_id\": \"APP_ID\",\n \"location_id\": \"location_id\",\n \"payment_type\": \"CARD_PRESENT\",\n \"team_member_id\": \"team_member_id\",\n \"customer_id\": \"customer_id\",\n \"statement_description_identifier\": \"statement_description_identifier\"\n }\n ],\n \"cursor\": \"RiTJqBoTuXlbLmmrPvEkX9iG7XnQ4W4RjGnH\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"10f09101-2344-4f4b-9caf-e8c18a401766","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"674cc1e1-e071-4242-b4ca-789229e32232","name":"GetTerminalCheckout - default","request":{"urlPathTemplate":"/v2/terminals/checkouts/{checkout_id}","method":"GET","pathParameters":{"checkout_id":{"equalTo":"checkout_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"checkout\": {\n \"id\": \"08YceKh7B3ZqO\",\n \"amount_money\": {\n \"amount\": 2610,\n \"currency\": \"USD\"\n },\n \"reference_id\": \"id11572\",\n \"note\": \"A brief note\",\n \"order_id\": \"order_id\",\n \"payment_options\": {\n \"autocomplete\": true,\n \"delay_duration\": \"delay_duration\",\n \"accept_partial_authorization\": true,\n \"delay_action\": \"CANCEL\"\n },\n \"device_options\": {\n \"device_id\": \"dbb5d83a-7838-11ea-bc55-0242ac130003\",\n \"skip_receipt_screen\": false,\n \"collect_signature\": true,\n \"tip_settings\": {\n \"allow_tipping\": false\n },\n \"show_itemized_cart\": true,\n \"allow_auto_card_surcharge\": true\n },\n \"deadline_duration\": \"PT5M\",\n \"status\": \"IN_PROGRESS\",\n \"cancel_reason\": \"BUYER_CANCELED\",\n \"payment_ids\": [\n \"payment_ids\"\n ],\n \"created_at\": \"2020-04-06T16:39:32.545Z\",\n \"updated_at\": \"2020-04-06T16:39:323.001Z\",\n \"app_id\": \"APP_ID\",\n \"location_id\": \"LOCATION_ID\",\n \"payment_type\": \"CARD_PRESENT\",\n \"team_member_id\": \"team_member_id\",\n \"customer_id\": \"customer_id\",\n \"app_fee_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"statement_description_identifier\": \"statement_description_identifier\",\n \"tip_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"674cc1e1-e071-4242-b4ca-789229e32232","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"e6a68917-4e12-47d7-b65d-d101a4e7b403","name":"CancelTerminalCheckout - default","request":{"urlPathTemplate":"/v2/terminals/checkouts/{checkout_id}/cancel","method":"POST","pathParameters":{"checkout_id":{"equalTo":"checkout_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"checkout\": {\n \"id\": \"S1yDlPQx7slqO\",\n \"amount_money\": {\n \"amount\": 123,\n \"currency\": \"USD\"\n },\n \"reference_id\": \"id36815\",\n \"note\": \"note\",\n \"order_id\": \"order_id\",\n \"payment_options\": {\n \"autocomplete\": true,\n \"delay_duration\": \"delay_duration\",\n \"accept_partial_authorization\": true,\n \"delay_action\": \"CANCEL\"\n },\n \"device_options\": {\n \"device_id\": \"dbb5d83a-7838-11ea-bc55-0242ac130003\",\n \"skip_receipt_screen\": true,\n \"collect_signature\": true,\n \"tip_settings\": {\n \"allow_tipping\": true\n },\n \"show_itemized_cart\": true,\n \"allow_auto_card_surcharge\": true\n },\n \"deadline_duration\": \"PT5M\",\n \"status\": \"CANCELED\",\n \"cancel_reason\": \"SELLER_CANCELED\",\n \"payment_ids\": [\n \"payment_ids\"\n ],\n \"created_at\": \"2020-03-16T15:31:19.934Z\",\n \"updated_at\": \"2020-03-16T15:31:45.787Z\",\n \"app_id\": \"APP_ID\",\n \"location_id\": \"LOCATION_ID\",\n \"payment_type\": \"CARD_PRESENT\",\n \"team_member_id\": \"team_member_id\",\n \"customer_id\": \"customer_id\",\n \"app_fee_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n },\n \"statement_description_identifier\": \"statement_description_identifier\",\n \"tip_money\": {\n \"amount\": 1000000,\n \"currency\": \"UNKNOWN_CURRENCY\"\n }\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"e6a68917-4e12-47d7-b65d-d101a4e7b403","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"51e76ff1-fc39-4cd5-b57f-2f636d78defc","name":"CreateTerminalRefund - default","request":{"urlPathTemplate":"/v2/terminals/refunds","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"refund\": {\n \"id\": \"009DP5HD-5O5OvgkcNUhl7JBuINflcjKqUzXZY\",\n \"refund_id\": \"refund_id\",\n \"payment_id\": \"5O5OvgkcNUhl7JBuINflcjKqUzXZY\",\n \"order_id\": \"kcuKDKreRaI4gF4TjmEgZjHk8Z7YY\",\n \"amount_money\": {\n \"amount\": 111,\n \"currency\": \"CAD\"\n },\n \"reason\": \"Returning items\",\n \"device_id\": \"f72dfb8e-4d65-4e56-aade-ec3fb8d33291\",\n \"deadline_duration\": \"PT5M\",\n \"status\": \"PENDING\",\n \"cancel_reason\": \"BUYER_CANCELED\",\n \"created_at\": \"2020-09-29T15:21:46.771Z\",\n \"updated_at\": \"2020-09-29T15:21:46.771Z\",\n \"app_id\": \"sandbox-sq0idb-c2OuYt13YaCAeJq_2cd8OQ\",\n \"location_id\": \"76C9W6K8CNNQ5\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"51e76ff1-fc39-4cd5-b57f-2f636d78defc","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"ac106af1-8877-4cc4-98cd-da6924cbb19c","name":"SearchTerminalRefunds - default","request":{"urlPathTemplate":"/v2/terminals/refunds/search","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"refunds\": [\n {\n \"id\": \"009DP5HD-5O5OvgkcNUhl7JBuINflcjKqUzXZY\",\n \"refund_id\": \"5O5OvgkcNUhl7JBuINflcjKqUzXZY_43Q4iGp7sNeATiWrUruA1EYeMRUXaddXXlDDJ1EQLvb\",\n \"payment_id\": \"5O5OvgkcNUhl7JBuINflcjKqUzXZY\",\n \"order_id\": \"kcuKDKreRaI4gF4TjmEgZjHk8Z7YY\",\n \"amount_money\": {\n \"amount\": 111,\n \"currency\": \"CAD\"\n },\n \"reason\": \"Returning item\",\n \"device_id\": \"f72dfb8e-4d65-4e56-aade-ec3fb8d33291\",\n \"deadline_duration\": \"PT5M\",\n \"status\": \"COMPLETED\",\n \"cancel_reason\": \"BUYER_CANCELED\",\n \"created_at\": \"2020-09-29T15:21:46.771Z\",\n \"updated_at\": \"2020-09-29T15:21:48.675Z\",\n \"app_id\": \"sandbox-sq0idb-c2OuYt13YaCAeJq_2cd8OQ\",\n \"location_id\": \"76C9W6K8CNNQ5\"\n }\n ],\n \"cursor\": \"cursor\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"ac106af1-8877-4cc4-98cd-da6924cbb19c","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"8db9c25e-6b2d-4bc3-b9f5-aca8efaf6038","name":"GetTerminalRefund - default","request":{"urlPathTemplate":"/v2/terminals/refunds/{terminal_refund_id}","method":"GET","pathParameters":{"terminal_refund_id":{"equalTo":"terminal_refund_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"refund\": {\n \"id\": \"009DP5HD-5O5OvgkcNUhl7JBuINflcjKqUzXZY\",\n \"refund_id\": \"5O5OvgkcNUhl7JBuINflcjKqUzXZY_43Q4iGp7sNeATiWrUruA1EYeMRUXaddXXlDDJ1EQLvb\",\n \"payment_id\": \"5O5OvgkcNUhl7JBuINflcjKqUzXZY\",\n \"order_id\": \"kcuKDKreRaI4gF4TjmEgZjHk8Z7YY\",\n \"amount_money\": {\n \"amount\": 111,\n \"currency\": \"CAD\"\n },\n \"reason\": \"Returning item\",\n \"device_id\": \"f72dfb8e-4d65-4e56-aade-ec3fb8d33291\",\n \"deadline_duration\": \"PT5M\",\n \"status\": \"COMPLETED\",\n \"cancel_reason\": \"BUYER_CANCELED\",\n \"created_at\": \"2020-09-29T15:21:46.771Z\",\n \"updated_at\": \"2020-09-29T15:21:48.675Z\",\n \"app_id\": \"sandbox-sq0idb-c2OuYt13YaCAeJq_2cd8OQ\",\n \"location_id\": \"76C9W6K8CNNQ5\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"8db9c25e-6b2d-4bc3-b9f5-aca8efaf6038","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"5ac35886-e0e5-445d-8f0b-0f8b4abf8e29","name":"CancelTerminalRefund - default","request":{"urlPathTemplate":"/v2/terminals/refunds/{terminal_refund_id}/cancel","method":"POST","pathParameters":{"terminal_refund_id":{"equalTo":"terminal_refund_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"refund\": {\n \"id\": \"g6ycb6HD-5O5OvgkcNUhl7JBuINflcjKqUzXZY\",\n \"refund_id\": \"refund_id\",\n \"payment_id\": \"5O5OvgkcNUhl7JBuINflcjKqUzXZY\",\n \"order_id\": \"kcuKDKreRaI4gF4TjmEgZjHk8Z7YY\",\n \"amount_money\": {\n \"amount\": 100,\n \"currency\": \"CAD\"\n },\n \"reason\": \"reason\",\n \"device_id\": \"42690809-faa2-4701-a24b-19d3d34c9aaa\",\n \"deadline_duration\": \"PT5M\",\n \"status\": \"CANCELED\",\n \"cancel_reason\": \"SELLER_CANCELED\",\n \"created_at\": \"2020-10-21T22:47:23.241Z\",\n \"updated_at\": \"2020-10-21T22:47:30.096Z\",\n \"app_id\": \"sandbox-sq0idb-c2OuYt13YaCAeJq_2cd8OQ\",\n \"location_id\": \"76C9W6K8CNNQ5\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"5ac35886-e0e5-445d-8f0b-0f8b4abf8e29","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2bcc1c01-83dc-4a5f-b5e9-bb73394dd84f","name":"ListWebhookEventTypes - default","request":{"urlPathTemplate":"/v2/webhooks/event-types","method":"GET","queryParameters":{"api_version":{"equalTo":"api_version"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"event_types\": [\n \"inventory.count.updated\"\n ],\n \"metadata\": [\n {\n \"event_type\": \"inventory.count.updated\",\n \"api_version_introduced\": \"2018-07-12\",\n \"release_status\": \"PUBLIC\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"2bcc1c01-83dc-4a5f-b5e9-bb73394dd84f","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"35981236-25c8-46f6-b60c-3483335a8fe5","name":"ListWebhookSubscriptions - default","request":{"urlPathTemplate":"/v2/webhooks/subscriptions","method":"GET","queryParameters":{"cursor":{"equalTo":"cursor"},"include_disabled":{"equalTo":"true"},"sort_order":{"equalTo":"DESC"},"limit":{"equalTo":"1"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"subscriptions\": [\n {\n \"id\": \"wbhk_b35f6b3145074cf9ad513610786c19d5\",\n \"name\": \"Example Webhook Subscription\",\n \"enabled\": true,\n \"event_types\": [\n \"payment.created\",\n \"payment.updated\"\n ],\n \"notification_url\": \"https://example-webhook-url.com\",\n \"api_version\": \"2021-12-15\",\n \"signature_key\": \"signature_key\",\n \"created_at\": \"2022-01-10 23:29:48 +0000 UTC\",\n \"updated_at\": \"2022-01-10 23:29:48 +0000 UTC\"\n }\n ],\n \"cursor\": \"cursor\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"35981236-25c8-46f6-b60c-3483335a8fe5","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}},"postServeActions":[]},{"id":"b4107165-9376-43b3-a19a-5e7af7c76955","name":"CreateWebhookSubscription - default","request":{"urlPathTemplate":"/v2/webhooks/subscriptions","method":"POST"},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"subscription\": {\n \"id\": \"wbhk_b35f6b3145074cf9ad513610786c19d5\",\n \"name\": \"Example Webhook Subscription\",\n \"enabled\": true,\n \"event_types\": [\n \"payment.created\",\n \"payment.updated\"\n ],\n \"notification_url\": \"https://example-webhook-url.com\",\n \"api_version\": \"2021-12-15\",\n \"signature_key\": \"1k9bIJKCeTmSQwyagtNRLg\",\n \"created_at\": \"2022-01-10 23:29:48 +0000 UTC\",\n \"updated_at\": \"2022-01-10 23:29:48 +0000 UTC\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"b4107165-9376-43b3-a19a-5e7af7c76955","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"2965b9d9-d895-4a37-b6b6-3b66887a54c6","name":"RetrieveWebhookSubscription - default","request":{"urlPathTemplate":"/v2/webhooks/subscriptions/{subscription_id}","method":"GET","pathParameters":{"subscription_id":{"equalTo":"subscription_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"subscription\": {\n \"id\": \"wbhk_b35f6b3145074cf9ad513610786c19d5\",\n \"name\": \"Example Webhook Subscription\",\n \"enabled\": true,\n \"event_types\": [\n \"payment.created\",\n \"payment.updated\"\n ],\n \"notification_url\": \"https://example-webhook-url.com\",\n \"api_version\": \"2021-12-15\",\n \"signature_key\": \"1k9bIJKCeTmSQwyagtNRLg\",\n \"created_at\": \"2022-01-10 23:29:48 +0000 UTC\",\n \"updated_at\": \"2022-01-10 23:29:48 +0000 UTC\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"2965b9d9-d895-4a37-b6b6-3b66887a54c6","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"fc98d4ab-f5bc-4538-96b2-bbb5de25ad50","name":"UpdateWebhookSubscription - default","request":{"urlPathTemplate":"/v2/webhooks/subscriptions/{subscription_id}","method":"PUT","pathParameters":{"subscription_id":{"equalTo":"subscription_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"subscription\": {\n \"id\": \"wbhk_b35f6b3145074cf9ad513610786c19d5\",\n \"name\": \"Updated Example Webhook Subscription\",\n \"enabled\": false,\n \"event_types\": [\n \"payment.created\",\n \"payment.updated\"\n ],\n \"notification_url\": \"https://example-webhook-url.com\",\n \"api_version\": \"2021-12-15\",\n \"signature_key\": \"signature_key\",\n \"created_at\": \"2022-01-10 23:29:48 +0000 UTC\",\n \"updated_at\": \"2022-01-10 23:45:51 +0000 UTC\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"fc98d4ab-f5bc-4538-96b2-bbb5de25ad50","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"9c8aa451-491f-4079-a7ee-18e0ad669ef9","name":"DeleteWebhookSubscription - default","request":{"urlPathTemplate":"/v2/webhooks/subscriptions/{subscription_id}","method":"DELETE","pathParameters":{"subscription_id":{"equalTo":"subscription_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ]\n}","headers":{"Content-Type":"application/json"}},"uuid":"9c8aa451-491f-4079-a7ee-18e0ad669ef9","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"4eb5a32a-53cf-4653-ba37-dccd2c693247","name":"UpdateWebhookSubscriptionSignatureKey - default","request":{"urlPathTemplate":"/v2/webhooks/subscriptions/{subscription_id}/signature-key","method":"POST","pathParameters":{"subscription_id":{"equalTo":"subscription_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"signature_key\": \"1k9bIJKCeTmSQwyagtNRLg\"\n}","headers":{"Content-Type":"application/json"}},"uuid":"4eb5a32a-53cf-4653-ba37-dccd2c693247","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}},{"id":"d125ea67-6758-448b-9a5d-d5c3a3153938","name":"TestWebhookSubscription - default","request":{"urlPathTemplate":"/v2/webhooks/subscriptions/{subscription_id}/test","method":"POST","pathParameters":{"subscription_id":{"equalTo":"subscription_id"}}},"response":{"status":200,"body":"{\n \"errors\": [\n {\n \"category\": \"API_ERROR\",\n \"code\": \"INTERNAL_SERVER_ERROR\",\n \"detail\": \"detail\",\n \"field\": \"field\"\n }\n ],\n \"subscription_test_result\": {\n \"id\": \"23eed5a9-2b12-403e-b212-7e2889aea0f6\",\n \"status_code\": 404,\n \"payload\": {\n \"key\": \"value\"\n },\n \"created_at\": \"2022-01-11 00:06:48.322945116 +0000 UTC m=+3863.054453746\",\n \"updated_at\": \"2022-01-11 00:06:48.322945116 +0000 UTC m=+3863.054453746\",\n \"notification_url\": \"notification_url\",\n \"passes_filter\": true\n },\n \"notification_url\": \"notification_url\",\n \"status_code\": 1,\n \"passes_filter\": true,\n \"payload\": {\n \"key\": \"value\"\n }\n}","headers":{"Content-Type":"application/json"}},"uuid":"d125ea67-6758-448b-9a5d-d5c3a3153938","persistent":true,"priority":3,"metadata":{"mocklab":{"created":{"at":"2020-01-01T00:00:00.000Z","via":"SYSTEM"}}}}],"meta":{"total":329}} \ No newline at end of file